add more vim cheets

This commit is contained in:
Thomas Ruoff
2018-03-27 08:08:14 +02:00
committed by Thomas Ruoff
parent 4eedfbcd44
commit 57fe15a670

View File

@@ -4,6 +4,20 @@ Generel stuff that I need to get into my muscle memory.
* `C-W [hjkl]` - switch to window left, above, below, right * `C-W [hjkl]` - switch to window left, above, below, right
* `C-L` - clear highlight * `C-L` - clear highlight
* `<C-o><C-o>` - Jump to last edited filed
* `Control-o <<command>>` - For a single normal operation in insert mode
* `gx` - on URL to open it in the browser - WUUT
* `:g/<<some-pattern>>/d` delete lines containing pattern
* `:v/<<some-pattern>>/d` delete lines NOT containing pattern
### edit macros
* `"ip` to past register `i` in buffer
* `"iyy` to yank into register `i`
## Remember lately added config
* `gdefault` - do always global substitute
* read again and again `:h grepper`
## yanking ## yanking
@@ -28,6 +42,7 @@ Generel stuff that I need to get into my muscle memory.
## surround ## surround
* `cs"'` - changes surrouding " to ' * `cs"'` - changes surrouding " to '
* `ysiw<em>` to add `<em></em>` around a word
## undo ## undo
@@ -39,6 +54,12 @@ Generel stuff that I need to get into my muscle memory.
* `<leader>g` - kick off * `<leader>g` - kick off
* without entering anything, takes word under the cursor * without entering anything, takes word under the cursor
## GitGutter
* `]c`, `[c` - jump to next/prev hunk (*c*hange)
* `<leader>hs` - stage hunk
* `<leader>hu` - undo hunk
## options ## options
Generally `[o` is to enable, `]o` to disable and `=o` to toggle an Generally `[o` is to enable, `]o` to disable and `=o` to toggle an
@@ -58,12 +79,6 @@ option.
* `[ow` 'wrap' * `[ow` 'wrap'
* `[ox` 'cursorline' 'cursorcolumn' (x as in crosshairs) * `[ox` 'cursorline' 'cursorcolumn' (x as in crosshairs)
## GitGutter
* `]c`, `[c` - jump to next/prev hunk (*c*hange)
* `<leader>hs` - stage hunk
* `<leader>hu` - undo hunk
## Debugging ## Debugging
* `<leader>DD` - start profiling * `<leader>DD` - start profiling