Find and replace
To replace all
Search in the working directory:
Or, search in the specified path:
:Ack foo /path/to/dir
Now, the quickfix window shows up with every result found. Delete the undesired result by typing
To replace every result still present in the quickfix window:
Automatically regenerate PDF after saving Latex file
pdflatex [current-file] after we saved the current
.tex file in Vim:
autocmd BufWritePost *.tex silent! execute "!pdflatex % >/dev/null 2>&1" | redraw!
Notice that it outputs files to the current working directory.