GVim :- GVim, or Vim (Vi Improved), is a highly configurable text editor that enhances the
traditional Vi editor with additional features, providing a powerful and efficient platform for text
editing in a graphical environment. Below are the basic useful GVim commands.
COMMAND DESCRIPTION
i Enter insert mode before the cursor
I Enter insert mode at the beginning of the line
a Enter insert mode after the cursor
A Enter insert mode at the end of the line
o Open a new line below the current line
O Open a new line above the current line
yy Copy (yank) the current line
dd Delete the current line
D Delete from the cursor position to the end of the line
x Delete the character under the cursor
p Paste the content after the cursor
P Paste the content before the cursor
u Undo the last change
Ctrl + r Redo the last undone change
:w Save the current file
:q Quit Vim (close current file)
:q! Quit Vim without saving changes
:wq Save and quit
:e <filename> Open a new file
:bnext or :bn Switch to the next buffer
:bprev or :bp Switch to the previous buffer
:bd Close the current buffer
:vsp <filename> Open a file in a vertical split
:sp <filename> Open a file in a horizontal split
Ctrl + w + hjkl Move between split windows
gg Move to the beginning of the file
G Move to the end of the file
:set number Show line numbers
:set nonumber Hide line numbers