diff --git a/vim/.vim/cheatsheet.md b/vim/.vim/cheatsheet.md index ec9e080..c8ca4fb 100644 --- a/vim/.vim/cheatsheet.md +++ b/vim/.vim/cheatsheet.md @@ -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-L` - clear highlight +* `` - Jump to last edited filed +* `Control-o <>` - For a single normal operation in insert mode +* `gx` - on URL to open it in the browser - WUUT +* `:g/<>/d` delete lines containing pattern +* `:v/<>/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 @@ -28,6 +42,7 @@ Generel stuff that I need to get into my muscle memory. ## surround * `cs"'` - changes surrouding " to ' +* `ysiw` to add `` around a word ## undo @@ -39,6 +54,12 @@ Generel stuff that I need to get into my muscle memory. * `g` - kick off * without entering anything, takes word under the cursor +## GitGutter + +* `]c`, `[c` - jump to next/prev hunk (*c*hange) +* `hs` - stage hunk +* `hu` - undo hunk + ## options Generally `[o` is to enable, `]o` to disable and `=o` to toggle an @@ -58,12 +79,6 @@ option. * `[ow` 'wrap' * `[ox` 'cursorline' 'cursorcolumn' (x as in crosshairs) -## GitGutter - -* `]c`, `[c` - jump to next/prev hunk (*c*hange) -* `hs` - stage hunk -* `hu` - undo hunk - ## Debugging * `DD` - start profiling