A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Using vim's viewports

  • :sp [filename] will split the Vim window horizontally
    • Can be written out entirely as :split
    • [filename] is optional, if it's omitted then the current file is loaded in the new viewport
  • :vsp [filename] will split the Vim window vertically
    • Can be written out as :vsplit
  • Ctrl-e [filename] loads a new file into the current viewport
  • Ctrl-w Ctrl-w moves between Vim viewports.
  • Ctrl-w j moves one viewport down.
  • Ctrl-w k moves one viewport up.
  • Ctrl-w h moves one viewport to the left.
  • Ctrl-w l moves one viewport to the right.
    • Can also use the arrow keys instead of h/j/k/l
  • Ctrl-w = tells Vim to resize viewports to be of equal size.
  • Ctrl-w - reduce active viewport by one line.
  • Ctrl-w 10- reduce active viewport by ten lines.
  • Ctrl-w + increase active viewport by one line.
  • Ctrl-w 10+ increase active viewport by ten lines.
  • Ctrl-w q will close the active window.
  • Ctrl-w r will rotate windows to the right.
  • Ctrl-w R will rotate windows to the left.


Full article

Run bash in a viewport, with this plugin (easy installation).