Files
dotfiles-vim/.vim/vim-keys-help.md
chawley b6028f8adb Update personal help file
Also added keybind (`<leader>h`) to open it automatically
2024-02-14 10:01:50 -05:00

1.7 KiB

vim-keys

A cheat sheet for my vim customizations


Macros

qq - record macro @ - 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