65 lines
1.7 KiB
Markdown
65 lines
1.7 KiB
Markdown
# vim-keys
|
|
|
|
A cheat sheet for my vim customizations
|
|
|
|
---
|
|
|
|
## Macros
|
|
|
|
`q`<register><commands>`q` - record macro
|
|
`@`<register> - replay macro
|
|
|
|
## Spelling
|
|
|
|
* `]s` - move to next misspelled word
|
|
* `[s` - move to previous misspelled word
|
|
* `z=` - suggest correction
|
|
* `<ctrl>-p` - auto-complete spelling suggestions
|
|
* `<F10>` - toggle spellcheck
|
|
|
|
## Highlights
|
|
|
|
* `<leader><leader>` - turn off search highlight
|
|
* `<Leader>C` - toggle row/column cursor
|
|
|
|
## Buffers
|
|
|
|
* `<ctrl>H` - to move to previous BUFFER
|
|
* `<ctrl>L` - to move to next BUFFER
|
|
* `<ctrl>J` - to move to lower PANE
|
|
* `<ctrl>K` - to move to upper PANE
|
|
|
|
* `<leader>s` - to save buffer
|
|
* `<leader>c` - to close buffer
|
|
* `<leader>a` - to abandon unsaved buffer
|
|
|
|
* `<leader>x` - bring up the copy buffer
|
|
* `<F5>` - refresh buffer
|
|
|
|
* `<leader>r` - open registers
|
|
|
|
## FZF
|
|
|
|
* `<leader>f` - open FZF files
|
|
* `<leader>b` - open FZF buffers
|
|
|
|
## Text bubbling (http://vimcasts.org/episodes/bubbling-text/)
|
|
|
|
After text selection (`<ctrl-v>`)
|
|
|
|
* `<ctrl>k` - bubble up
|
|
* `<ctrl>j` - bubble down
|
|
|
|
## Date and Time stamps
|
|
|
|
* `<F2>` - insert %Y-%m-%d %H:%M:%S
|
|
* `<F3>` - insert %Y-%m-%d %a
|
|
* `<F4>` - insert %H:%M
|
|
|
|
## Snippets
|
|
pre-made files inserted from `.vim/templates`
|
|
|
|
* `,sh` - insert shell header
|
|
* `,md` - insert markdown header
|
|
* `,ban` - insert ASCII banner
|