Tip #364: Automatic file type detection with fully qualified ClearCase names
tip karma |
Rating 22/10, Viewed by 1038
|
created: |
|
November 8, 2002 1:47 |
|
complexity: |
|
basic |
author: |
|
Arnaud Cassignol |
|
as of Vim: |
|
6.0 |
I am using the great plugin from Douglas Potts (vimscript #15).
When you load a specific ClearCase version of a file, vim cannot find the correct file type in the full name (ex. filename.c@@/main/foo/1). To improve that, you can create an autocommand in the filetype.vim file in your user runtime directory.
augroup filetypedetect
au BufNewFile,BufRead */*@@*
\ if expand("<afile>") =~ '@@' |
\ exe "doau filetypedetect BufRead " . expand("<afile>:s?@@.*$??") |
\ endif
augroup END
The test in the command is for compatibility with path containing '@@' sequence.
<<Starting up Vim very fast expecially from a telnet session |
Vim Book Online >>
Additional Notes
|