Mercurial > vim
comparison runtime/doc/filetype.txt @ 1125:96cd8222a819
updated for version 7.1a
author | vimboss |
---|---|
date | Sat, 05 May 2007 18:24:42 +0000 |
parents | 4bac29d27e2f |
children | a49d06539452 |
comparison
equal
deleted
inserted
replaced
1124:da2a955f150a | 1125:96cd8222a819 |
---|---|
1 *filetype.txt* For Vim version 7.0. Last change: 2006 Apr 28 | 1 *filetype.txt* For Vim version 7.1a. Last change: 2007 Mar 24 |
2 | 2 |
3 | 3 |
4 VIM REFERENCE MANUAL by Bram Moolenaar | 4 VIM REFERENCE MANUAL by Bram Moolenaar |
5 | 5 |
6 | 6 |
41 VMS $VIMRUNTIME/filetype.vim | 41 VMS $VIMRUNTIME/filetype.vim |
42 This file is a Vim script that defines autocommands for the | 42 This file is a Vim script that defines autocommands for the |
43 BufNewFile and BufRead events. If the file type is not found by the | 43 BufNewFile and BufRead events. If the file type is not found by the |
44 name, the file $VIMRUNTIME/scripts.vim is used to detect it from the | 44 name, the file $VIMRUNTIME/scripts.vim is used to detect it from the |
45 contents of the file. | 45 contents of the file. |
46 When the GUI is running or will start soon, the menu.vim script is | |
47 also sourced. See |'go-M'| about avoiding that. | |
46 | 48 |
47 To add your own file types, see |new-filetype| below. To search for help on a | 49 To add your own file types, see |new-filetype| below. To search for help on a |
48 filetype prepend "ft-" and optionally append "-syntax", "-indent" or | 50 filetype prepend "ft-" and optionally append "-syntax", "-indent" or |
49 "-plugin". For example: > | 51 "-plugin". For example: > |
50 :help ft-vim-indent | 52 :help ft-vim-indent |
302 option. All of these directories will be searched for plugins and they are | 304 option. All of these directories will be searched for plugins and they are |
303 all loaded. For example, if this command: > | 305 all loaded. For example, if this command: > |
304 | 306 |
305 set runtimepath | 307 set runtimepath |
306 | 308 |
307 produces this output: > | 309 produces this output: |
308 | 310 |
309 runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60 | 311 runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60 ~ |
310 | 312 |
311 then Vim will load all plugins in these directories: > | 313 then Vim will load all plugins in these directories and below: |
312 | 314 |
313 /etc/vim/plugin/ | 315 /etc/vim/plugin/ ~ |
314 ~/.vim/plugin/ | 316 ~/.vim/plugin/ ~ |
315 /usr/local/share/vim/vim60/plugin/ | 317 /usr/local/share/vim/vim60/plugin/ ~ |
316 | 318 |
317 Note that the last one is the value of $VIMRUNTIME which has been expanded. | 319 Note that the last one is the value of $VIMRUNTIME which has been expanded. |
318 | 320 |
319 What if it looks like your plugin is not being loaded? You can find out what | 321 What if it looks like your plugin is not being loaded? You can find out what |
320 happens when Vim starts up by using the |-V| argument: > | 322 happens when Vim starts up by using the |-V| argument: > |
321 vim -V1 | 323 |
324 vim -V2 | |
325 | |
322 You will see a lot of messages, in between them is a remark about loading the | 326 You will see a lot of messages, in between them is a remark about loading the |
323 plugins. It starts with: > | 327 plugins. It starts with: |
324 Searching for "plugin/*.vim" in | 328 |
329 Searching for "plugin/**/*.vim" in ~ | |
330 | |
325 There you can see where Vim looks for your plugin scripts. | 331 There you can see where Vim looks for your plugin scripts. |
326 | 332 |
327 ============================================================================== | 333 ============================================================================== |
328 2. Filetype plugin *filetype-plugins* | 334 2. Filetype plugin *filetype-plugins* |
329 | 335 |