.vimrc
- The dot-vimrc file is the central configuration file for vim, which a user can use to configure vim and gvim to his liking.
- It is written in vimscript, and one can put there normal commands that one normally puts in command line-mode.
Location based commands
- One can define commands to be executed for certain files (with certain prefixes, under certain locations, etc.) using the autocmd feature.
- For example:
autocmd BufNewFile,BufRead ~/Download/unpack/graphics/*.pdb set filetype=perl
Will set the file type of all the files under ~/Download/unpack/graphics whose extension is ".pdb" to perl.