diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-05-31 14:18:00 +0200 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2020-05-31 14:18:00 +0200 |
commit | 7500d752f77ecca5e41f43f48da2a036aa916e76 (patch) | |
tree | c751ebc0c5d7abec4f740602f0b332e9be9233a9 | |
parent | 7a97a7c53238bb957366798930e0b3c3dea6f312 (diff) |
Add new vim tricks
-rw-r--r-- | vim.md | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -10,6 +10,10 @@ Open window with all instances: :copen +## Settings + + ic - ignore case in searches + ## readline vi keybindings in various `readline` and similar CLIs: @@ -63,6 +67,8 @@ character-wise, <c-v> makes them block-wise. :co <location> # copies range to location (can be ., +n, 'a) :mv <location> # same but moves + :s/pattern/thing/c # replace, prompting at each replacement + ## Visual mode gv - selects the previous visual @@ -82,3 +88,30 @@ g<c-a/x> - increment/decrement by 1 more on each selected line :setlocal spell spelllang=en_us [/]s - previous/next marked word [/]S - previous/next bad word + z= - replacement suggestions + +## Splits + +* number before split shortcut - height of old window + +Set window height/width (defaults to max): + + [n]^W _ + [n]^W | + +Equalize window heights/widths: + + ^W = + +Close window: + + ^W c + +## Movements + + % - goes to matching bracket + +## Time travel + + :earlier 5m + :later 10m |