I don't like
.gitignore files very much. For general things I want Git to ignore, like
*.sw?, I prefer to use
~/.gitignore_global. Similarly, rather than using modelines to improve filetype detection I use
bin/run_migration, etc. These files start with
I could add a modeline, like this:
A better solution is to use
getline function is used to compare the first line of the file against a regular expression that looks for scripts that use
node (source: http://stackoverflow.com/a/8891619/306167).
For more about
scripts.vim, take a look at :help new-filetype-scripts.