Skip to content

Instantly share code, notes, and snippets.

@antonmry
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antonmry/491703c056e85ba32692 to your computer and use it in GitHub Desktop.
Save antonmry/491703c056e85ba32692 to your computer and use it in GitHub Desktop.
Shortcuts
  • Ctrl+a c: new window
  • Ctrl+a n: next window
  • Ctrl+a p: previous window
  • Ctrl+a ": select window from list
  • Ctrl+a Ctrl+a: previous window viewed

  • Ctrl+a S: split terminal horizontally into regions (Ctrl+a c to create new window there)
  • Ctrl+a |: split terminal vertically into regions
  • Ctrl+a :resize : resize region
  • Ctrl+a :fit: fit screen size to new terminal size (Ctrl+a F is the same. Do after resizing xterm)
  • Ctrl+a :remove: remove region (Ctrl+a X is the same)
  • Ctrl+a tab: Move to next region

  • Ctrl+a d: detach screen from terminal (Start screen with -r option to reattach)
  • Ctrl+a A: set window title
  • Ctrl+a x: lock session (Enter user password to unlock)
  • Ctrl+a [: enter scrollback/copy mode Enter to start and end copy region. Ctrl+a ] to leave this mode
  • Ctrl+a ]: paste buffer (supports pasting between windows).
  • Ctrl+a >: write paste buffer to file useful for copying between screens
  • Ctrl+a <: read paste buffer from file useful for pasting between screens

  • Ctrl+a ?: show key bindings/command names (note unbound commands only in man page)
  • Ctrl+a :: goto screen command prompt (up shows last command entered)
  • Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.
:%s/foo/bar/g
  • Spell checking
:setlocal spell spelllang=en_us
  • Auto-indent

Go to the first line, indent, last line, return :-)

gg=G''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment