Skip to content

Latest commit

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Vim Tricks

Shortcuts

ActionCombination
Toggle treeCtrl + n
Next tabgt
Previous tabgT
Go to beginning of line0
Go to end$
Move forward one wordw
Move backward one wordb
Move to end of fileG
Move to top of filegg
Begin a new line above the cursorO
Begin a new line below the cursoro
Go to function definitionCtrl + ]
Jump back from definitionCtrl + T
Open the definition in a horizontal splitCtrl+W Ctrl+]
delete character at cursorx
delete a worddw
delete to the beginning of a lined0
delete to end of the lined$
Cut a linedd
Copy a visual selectiony
Paste a linep
Select and cut multiple linesv + d
Move a line to n number:m2
Turn off highlighting:noh
move current line to the middle of the screenz z
Moves screen up one linectrl + y
Moves screen down one linectrl + e
Moves cursor & screen up 1/2 pageCtrl-u
Moves cursor & screen down 1/2 pageCtrl-d
Move to end of the matching brace%

  • Replace
:%s/foo/bar/g # Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.
:2,5s/foo/bar/g # Change each 'foo' to 'bar' for all lines from line 2 to line 5 inclusive.

About

Shortcuts and hacks in Vim

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages