Gvim Commands
Gvim Commands
Gvim Commands
com/
https://www.cse.iitb.ac.in/~avadhut/sysadgiri/vim/vimtips.html
:w to save which is in write mode
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
k cursor goes up
------------------------------------------------------------------------------------------
yy to copy a line where cursor is present(1 line yanked)
yH to copy from the line of cursor to first line of your screen
yL to copy from the line of cursor to last line of your screen
ygg to copy all lines above the cursor till first line
yG to copy all lines below the cursor till last line
y$ to copy the line till end from the middle of line
y^ to copy the line till start from the middle of line
m+a y'a to copy specific lines(m+a marks your line, move cursor to desired line till which you
want to copy and use y'a)
------------------------------------------------------------------------------------------
p to paste which is previously copied or deleted in next line where cursor is present
3p to paste the copied line 3times in next line where cursor is present
------------------------------------------------------------------------------------------
d$ to deletes the line till end from the middle of line
d^ to deletes the line till start from the middle of line
dH to delete from the line of cursor to first line of your screen
dL to delete from the line of cursor to last line of your screen
dgg to delete all lines above the cursor till first line
dG to delete all lines below the cursor till last line
m+a d'a to delete specific lines(m+a marks your line, move cursor to desired line till which you
want to delete and use d'a)
u to undo the previous action
------------------------------------------------------------------------------------------
* to search the same word in the file(place cursor at that word)
------------------------------------------------------------------------------------------
:%s/'word1'/'word2'/gc to replace all word1 to word2 with check for each
word(globalcheck)
:%s/^/'word'/gc to insert 'word' at starting of all lines check for each
word(globalcheck)
:set ic (ignore case)to ignore case while searching same word
(product/PRODUCT)
:set expandtab
:se all
l for letter
k is up
:set nolist
Terminal Commands:
Ctrl + u -->to remove everything when you type a wrong command/or remove the complete
command in terminal
Ctrl + S -->stops the output on the terminal. Nice if a running command prints too fast.
Ctrl+XX: Move between the beginning of the line and the current position of the cursor. This
allows you to press Ctrl+XX to return to the start of the line, change something, and then
press Ctrl+XX to go back to your original cursor position. To use this shortcut, hold the Ctrl key
and tap the X key twice.