This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original: | |
# http://stackoverflow.com/a/6078528 | |
# | |
# Call `zipit` with the path to either a directory or a file. | |
# All paths packed into the zip are relative to the directory | |
# or the directory of the file. | |
def zipit(path, archname): | |
archive = zipfile.ZipFile(archname, "w", zipfile.ZIP_DEFLATED) | |
if os.path.isdir(path): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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() |
NewerOlder