Skip to content

Instantly share code, notes, and snippets.

@sergray
Created February 4, 2011 16:41
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 sergray/811341 to your computer and use it in GitHub Desktop.
Save sergray/811341 to your computer and use it in GitHub Desktop.
add tree of directories to vim path
python << END_PATH
import os
import vim
walker = os.walk(os.getcwd())
dir_list = ['.']
for root, dirs, paths in walker:
dir_list += map(lambda d: os.path.join(root, d), dirs)
vim.command('set path=%s' % ','.join(dir_list))
END_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment