diff options
author | breadcat | 2021-05-16 20:59:17 +0100 |
---|---|---|
committer | breadcat | 2021-05-16 20:59:17 +0100 |
commit | 6dabaf5a7faef5470ae25ab7b877a7f0026da31a (patch) | |
tree | 53fa514779cec42e553bf63d4b52fb38bfbe3025 | |
parent | 756fab7d99d92dbd99e7dbd9a1e04629ef45e5b4 (diff) | |
download | blog.minskio.co.uk-6dabaf5a7faef5470ae25ab7b877a7f0026da31a.tar.gz blog.minskio.co.uk-6dabaf5a7faef5470ae25ab7b877a7f0026da31a.tar.bz2 blog.minskio.co.uk-6dabaf5a7faef5470ae25ab7b877a7f0026da31a.zip |
Additional vim notes
-rw-r--r-- | content/posts/personal-vim-cheatsheet.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/content/posts/personal-vim-cheatsheet.md b/content/posts/personal-vim-cheatsheet.md index 764c9ae..2df7645 100644 --- a/content/posts/personal-vim-cheatsheet.md +++ b/content/posts/personal-vim-cheatsheet.md @@ -26,9 +26,20 @@ Ctrl + r redo changes Ctrl + g shows location status bar gg go to the top line G go to last line +gj move one line down in a text block +gk move one line up in a text block +g$ move to the end of a text blocks' current line +g0 move to the start of a text blocks' current line 25% move to 25% of the way through the file '' move back to previous location before % movement u undoes changes +gu uncapitalise +gU capitalise +~ switch case of current letter +gv jump back to previously selected text + +J join current and next line +gJ join current and next line, without spaces v start visual selection/highlighting Ctrl + v start visual selection as a block @@ -61,9 +72,11 @@ R replace mode, more than one character, but exact length matching v enters visual mode V enters visual mode, whole lines +0 move to the start of the line $ move to the end of the line ^ move to the start of the line % jump to matching parenthesis +W jump one word right :s/old/new/ replace old with new once on a line :s/old/new/g replace old with new every time on a line |