This page looks best with JavaScript enabled

Vim Notes

 ·   ·  โ˜• 1 min read · ๐Ÿ‘€... views

my simple config

my simple config can be found here: .dotfiles/.vimrc

widows

C-w s
horizontal split window
C-w v
vertical split window
C-w q
quit a window
C-w h/j/k/l
move between windows
C-w H/J/K/L
make current master window
C-w +/-
inc/dec height, can prepend with a number
C-w >/<
inc/dec width, can prepend with a number

jump

C-o
jump back
C-i
jump forward

Folding

  • zc: fold/close current tree
  • zo: unfold/open current tree
  • za: toggle fold

Search and replace

https://vim.fandom.com/wiki/Search_and_replace
single buffer

  • /pattern
  • ?pattern
  • :%s/old/new/g
  • :%s/old/new/gc

multiple files

References

Share on