More specifically, I want to disable backup and swap file creation in vim, but only when opening/editing files that are on a specific remote volume or a specific folder.

So, how do I go about disabling/enabling a set of options when opening a file in a specific location (not depending on the filetype)

link|improve this question
feedback

2 Answers

I did answer your question on SO: http://stackoverflow.com/questions/456792/vim-apply-settings-on-files-in-directory/456889#456889

However, for remote files (you may have to add a pattern to an autocommand that will match external filenames).

link|improve this answer
feedback

with % you can get info about file, example:

echo expand('%:p:h')
link|improve this answer
Could you provide some explanation about what your code does? You've only explained %... – Tom Wijsman Oct 31 '11 at 13:19
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.