vim delete to end of file

C++
# Basic syntax:
dG#use without parenthesis, you can change the command in the parenthesis
VG(x) #to delete from your position to the End of File
Vgg(x) #to delete from your position to the start of the file
Source

Also in C++: