Skip to content

Instantly share code, notes, and snippets.


Felix Schlitter felixSchl

  • DN3010
  • Auckland, New Zealand
View GitHub Profile
felixSchl / gist:8721943
Created Jan 30, 2014
Working directory per tab
View gist:8721943
" 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()