Skip to content

Instantly share code, notes, and snippets.

@espinz
Last active November 2, 2019 11:26
Show Gist options
  • Save espinz/e46caf29b0d5c24eae5208cdbd3093ec to your computer and use it in GitHub Desktop.
Save espinz/e46caf29b0d5c24eae5208cdbd3093ec to your computer and use it in GitHub Desktop.
vim recipes

vim

Recipes for the vim editor

split screen

This is perfect for viewing files side by side.

  • vim -O filename1 filename2

tab each file

Open files in a separate tab. Use gt in command mode to switch between tabs.

  • vim -p filename1 filename2

Save tabbed session; restore session; save all after changes are made.

  • :mksession vim-session.vim
  • vim -S vim-session.vim
  • :mks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment