Skip to content

Instantly share code, notes, and snippets.

@felixSchl
Created January 30, 2014 23:00
Show Gist options
  • Save felixSchl/8721943 to your computer and use it in GitHub Desktop.
Save felixSchl/8721943 to your computer and use it in GitHub Desktop.
Working directory per tab
" There is no way to set the cwd per tab by default.
" :cd changes the cwd for all of vim
" :lcd changes the cwd for the active window
" These two lines remedy this:
au TabEnter * if exists("t:wd") | exe "cd" . '"' t:wd . '"' | endif
au TabLeave * let t:wd=getcwd()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment