annotate runtime/doc/filetype.txt @ 29326:1f1d99bba06c v9.0.0006

patch 9.0.0006: not all Visual Basic files are recognized Commit: https://github.com/vim/vim/commit/8b5901e2f9466eb6f38f5b251e871f609f65e252 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 29 14:39:12 2022 +0100 patch 9.0.0006: not all Visual Basic files are recognized Problem: Not all Visual Basic files are recognized. Solution: Change detection of *.cls files. (Doug Kearns)
author Bram Moolenaar <Bram@vim.org>
date Wed, 29 Jun 2022 15:45:03 +0200
parents f8116058ca76
children f4f531986753
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29314
f8116058ca76 release version 9.0
Bram Moolenaar <Bram@vim.org>
parents: 29290
diff changeset
1 *filetype.txt* For Vim version 9.0. Last change: 2022 Apr 09
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 Filetypes *filetype* *file-type*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 1. Filetypes |filetypes|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 2. Filetype plugin |filetype-plugins|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 3. Docs for the default filetype plugins. |ftplugin-docs|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 Also see |autocmd.txt|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 1. Filetypes *filetypes* *file-types*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 Vim can detect the type of file that is edited. This is done by checking the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 file name and sometimes by inspecting the contents of the file for specific
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 *:filetype* *:filet*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 To enable file type detection, use this command in your vimrc: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 :filetype on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 Each time a new or existing file is edited, Vim will try to recognize the type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 of the file and set the 'filetype' option. This will trigger the FileType
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 event, which can be used to set the syntax highlighting, set options, etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 NOTE: Filetypes and 'compatible' don't work together well, since being Vi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 compatible means options are global. Resetting 'compatible' is recommended,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 if you didn't do that already.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 Detail: The ":filetype on" command will load one of these files:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 Amiga $VIMRUNTIME/filetype.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 Mac $VIMRUNTIME:filetype.vim
18972
130acb903dbe Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
37 MS-Windows $VIMRUNTIME\filetype.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 Unix $VIMRUNTIME/filetype.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 VMS $VIMRUNTIME/filetype.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 This file is a Vim script that defines autocommands for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 BufNewFile and BufRead events. If the file type is not found by the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 contents of the file.
12756
3b26420fc639 Long overdue runtime update.
Christian Brabandt <cb@256bit.org>
parents: 11262
diff changeset
44 When the GUI is running or will start soon, the |menu.vim| script is
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
45 also sourced. See |'go-M'| about avoiding that.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
47 To add your own file types, see |new-filetype| below. To search for help on a
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
48 filetype prepend "ft-" and optionally append "-syntax", "-indent" or
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
49 "-plugin". For example: >
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
50 :help ft-vim-indent
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
51 :help ft-vim-syntax
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
52 :help ft-man-plugin
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 If the file type is not detected automatically, or it finds the wrong type,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 you can either set the 'filetype' option manually, or add a modeline to your
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1624
diff changeset
56 file. Example, for an IDL file use the command: >
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 :set filetype=idl
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
58
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
59 or add this |modeline| to the file:
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
60 /* vim: set filetype=idl : */ ~
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
61
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 *:filetype-plugin-on*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 You can enable loading the plugin files for specific file types with: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 :filetype plugin on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 If filetype detection was not switched on yet, it will be as well.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 This actually loads the file "ftplugin.vim" in 'runtimepath'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 The result is that when a file is edited its plugin file is loaded (if there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 is one for the detected filetype). |filetype-plugin|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 *:filetype-plugin-off*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 You can disable it again with: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 :filetype plugin off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 The filetype detection is not switched off then. But if you do switch off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 filetype detection, the plugins will not be loaded either.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 This actually loads the file "ftplugof.vim" in 'runtimepath'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 *:filetype-indent-on*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 You can enable loading the indent file for specific file types with: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 :filetype indent on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 If filetype detection was not switched on yet, it will be as well.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 This actually loads the file "indent.vim" in 'runtimepath'.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 The result is that when a file is edited its indent file is loaded (if there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 is one for the detected filetype). |indent-expression|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 *:filetype-indent-off*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 You can disable it again with: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 :filetype indent off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 The filetype detection is not switched off then. But if you do switch off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 filetype detection, the indent files will not be loaded either.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 This actually loads the file "indoff.vim" in 'runtimepath'.
22
cc049b00ee70 updated for version 7.0014
vimboss
parents: 10
diff changeset
91 This disables auto-indenting for files you will open. It will keep working in
cc049b00ee70 updated for version 7.0014
vimboss
parents: 10
diff changeset
92 already opened files. Reset 'autoindent', 'cindent', 'smartindent' and/or
cc049b00ee70 updated for version 7.0014
vimboss
parents: 10
diff changeset
93 'indentexpr' to disable indenting in an opened file.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 *:filetype-off*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 To disable file type detection, use this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 :filetype off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 This will keep the flags for "plugin" and "indent", but since no file types
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 are being detected, they won't work until the next ":filetype on".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 Overview: *:filetype-overview*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 command detection plugin indent ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 :filetype on on unchanged unchanged
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 :filetype off off unchanged unchanged
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 :filetype plugin on on on unchanged
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 :filetype plugin off unchanged off unchanged
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 :filetype indent on on unchanged on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 :filetype indent off unchanged unchanged off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 :filetype plugin indent on on on on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 :filetype plugin indent off unchanged off off
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 To see the current status, type: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 :filetype
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 The output looks something like this: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 filetype detection:ON plugin:ON indent:OFF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 The file types are also used for syntax highlighting. If the ":syntax on"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 command is used, the file type detection is installed too. There is no need
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 to do ":filetype on" after ":syntax on".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
123 To disable one of the file types, add a line in your filetype file, see
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 |remove-filetype|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 *filetype-detect*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 To detect the file type again: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 :filetype detect
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 Use this if you started with an empty file and typed text that makes it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 possible to detect the file type. For example, when you entered this in a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 shell script: "#!/bin/csh".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 When filetype detection was off, it will be enabled first, like the "on"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 argument was used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 *filetype-overrule*
27321
3649b5a6b1b6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26847
diff changeset
136 When the same extension is used for multiple filetypes, Vim tries to guess
3649b5a6b1b6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26847
diff changeset
137 what kind of file it is. This doesn't always work. A number of global
3649b5a6b1b6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26847
diff changeset
138 variables can be used to overrule the filetype used for certain extensions:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 file name variable ~
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
141 *.asa g:filetype_asa |ft-aspvbs-syntax| |ft-aspperl-syntax|
26311
ce3678583211 patch 8.2.3686: filetype detection often mixes up Forth and F#
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
142 *.asm g:asmsyntax |ft-asm-syntax|
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
143 *.asp g:filetype_asp |ft-aspvbs-syntax| |ft-aspperl-syntax|
27321
3649b5a6b1b6 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26847
diff changeset
144 *.bas g:filetype_bas |ft-basic-syntax|
28392
f77b9d4cb007 patch 8.2.4720: ABB Rapid files are not recognized properly
Bram Moolenaar <Bram@vim.org>
parents: 28390
diff changeset
145 *.cfg g:filetype_cfg
29326
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
146 *.cls g:filetype_cls
29290
dc4de65a7fb7 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 29193
diff changeset
147 *.csh g:filetype_csh |ft-csh-syntax|
28379
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27537
diff changeset
148 *.dat g:filetype_dat
27537
063952f68595 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27321
diff changeset
149 *.frm g:filetype_frm |ft-form-syntax|
063952f68595 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 27321
diff changeset
150 *.fs g:filetype_fs |ft-forth-syntax|
26311
ce3678583211 patch 8.2.3686: filetype detection often mixes up Forth and F#
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
151 *.i g:filetype_i |ft-progress-syntax|
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 *.inc g:filetype_inc
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24911
diff changeset
153 *.m g:filetype_m |ft-mathematica-syntax|
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
154 *.mod g:filetype_mod
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
155 *.p g:filetype_p |ft-pascal-syntax|
26311
ce3678583211 patch 8.2.3686: filetype detection often mixes up Forth and F#
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
156 *.pl g:filetype_pl
23666
96206643bd9f Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 23047
diff changeset
157 *.pp g:filetype_pp |ft-pascal-syntax|
26311
ce3678583211 patch 8.2.3686: filetype detection often mixes up Forth and F#
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
158 *.prg g:filetype_prg
28620
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28517
diff changeset
159 *.r g:filetype_r
4d76b3e07c07 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28517
diff changeset
160 *.sql g:filetype_sql |ft-sql-syntax|
28379
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27537
diff changeset
161 *.src g:filetype_src
28445
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28392
diff changeset
162 *.sys g:filetype_sys
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
163 *.sh g:bash_is_sh |ft-sh-syntax|
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
164 *.tex g:tex_flavor |ft-tex-plugin|
26311
ce3678583211 patch 8.2.3686: filetype detection often mixes up Forth and F#
Bram Moolenaar <Bram@vim.org>
parents: 25880
diff changeset
165 *.w g:filetype_w |ft-cweb-syntax|
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
28379
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27537
diff changeset
167 For a few filetypes the global variable is used only when the filetype could
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27537
diff changeset
168 not be detected:
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27537
diff changeset
169 *.r g:filetype_r |ft-rexx-syntax|
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 27537
diff changeset
170
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 *filetype-ignore*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 To avoid that certain files are being inspected, the g:ft_ignore_pat variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 is used. The default value is set like this: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 :let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 This means that the contents of compressed files are not inspected.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 *new-filetype*
22
cc049b00ee70 updated for version 7.0014
vimboss
parents: 10
diff changeset
178 If a file type that you want to use is not detected yet, there are four ways
10
4e2284e71352 updated for version 7.0002
vimboss
parents: 7
diff changeset
179 to add it. In any way, it's better not to modify the $VIMRUNTIME/filetype.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 file. It will be overwritten when installing a new version of Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 A. If you want to overrule all default file type checks.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 This works by writing one file for each filetype. The disadvantage is that
21825
0db0640e16e0 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
184 there can be many files. The advantage is that you can simply drop this
0db0640e16e0 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 19116
diff changeset
185 file in the right directory to make it work.
22
cc049b00ee70 updated for version 7.0014
vimboss
parents: 10
diff changeset
186 *ftdetect*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 1. Create your user runtime directory. You would normally use the first
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 item of the 'runtimepath' option. Then create the directory "ftdetect"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 inside it. Example for Unix: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 :!mkdir ~/.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 :!mkdir ~/.vim/ftdetect
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 2. Create a file that contains an autocommand to detect the file type.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 au BufRead,BufNewFile *.mine set filetype=mine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 < Note that there is no "augroup" command, this has already been done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 when sourcing your file. You could also use the pattern "*" and then
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 check the contents of the file to recognize it.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 Write this file as "mine.vim" in the "ftdetect" directory in your user
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 runtime directory. For example, for Unix: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 :w ~/.vim/ftdetect/mine.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 < 3. To use the new filetype detection you must restart Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 The files in the "ftdetect" directory are used after all the default
530
339999b511a0 updated for version 7.0148
vimboss
parents: 501
diff changeset
206 checks, thus they can overrule a previously detected file type. But you
339999b511a0 updated for version 7.0148
vimboss
parents: 501
diff changeset
207 can also use |:setfiletype| to keep a previously detected filetype.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 B. If you want to detect your file after the default file type checks.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 This works like A above, but instead of setting 'filetype' unconditionally
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 use ":setfiletype". This will only set 'filetype' if no file type was
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 detected yet. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 au BufRead,BufNewFile *.txt setfiletype text
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 You can also use the already detected file type in your command. For
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 example, to use the file type "mypascal" when "pascal" has been detected: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 au BufRead,BufNewFile * if &ft == 'pascal' | set ft=mypascal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 | endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 C. If your file type can be detected by the file name.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 1. Create your user runtime directory. You would normally use the first
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 item of the 'runtimepath' option. Example for Unix: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 :!mkdir ~/.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 2. Create a file that contains autocommands to detect the file type.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 " my filetype file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 if exists("did_load_filetypes")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 augroup filetypedetect
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 au! BufRead,BufNewFile *.mine setfiletype mine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 au! BufRead,BufNewFile *.xyz setfiletype drawing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 augroup END
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 < Write this file as "filetype.vim" in your user runtime directory. For
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 example, for Unix: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 :w ~/.vim/filetype.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 < 3. To use the new filetype detection you must restart Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 Your filetype.vim will be sourced before the default FileType autocommands
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 have been installed. Your autocommands will match first, and the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 ":setfiletype" command will make sure that no other autocommands will set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 'filetype' after this.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 *new-filetype-scripts*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 D. If your filetype can only be detected by inspecting the contents of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 1. Create your user runtime directory. You would normally use the first
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 item of the 'runtimepath' option. Example for Unix: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 :!mkdir ~/.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 2. Create a vim script file for doing this. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 if did_filetype() " filetype already set..
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 finish " ..don't do these checks
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 if getline(1) =~ '^#!.*\<mine\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 setfiletype mine
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 elseif getline(1) =~? '\<drawing\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 setfiletype drawing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 < See $VIMRUNTIME/scripts.vim for more examples.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 Write this file as "scripts.vim" in your user runtime directory. For
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 example, for Unix: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 :w ~/.vim/scripts.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 3. The detection will work right away, no need to restart Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 Your scripts.vim is loaded before the default checks for file types, which
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 means that your rules override the default rules in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 $VIMRUNTIME/scripts.vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 *remove-filetype*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 If a file type is detected that is wrong for you, install a filetype.vim or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 scripts.vim to catch it (see above). You can set 'filetype' to a non-existing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 name to avoid that it will be set later anyway: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278 :set filetype=ignored
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
279
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
280 If you are setting up a system with many users, and you don't want each user
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 to add/remove the same filetypes, consider writing the filetype.vim and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282 scripts.vim files in a runtime directory that is used for everybody. Check
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 the 'runtimepath' for a directory to use. If there isn't one, set
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 'runtimepath' in the |system-vimrc|. Be careful to keep the default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 directories!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 *autocmd-osfiletypes*
2908
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
289 NOTE: this code is currently disabled, as the RISC OS implementation was
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
290 removed. In the future this will use the 'filetype' option.
fd09a9c8468e Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
291
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 On operating systems which support storing a file type with the file, you can
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 specify that an autocommand should only be executed if the file is of a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 certain type.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 The actual type checking depends on which platform you are running Vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 on; see your system's documentation for details.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 To use osfiletype checking in an autocommand you should put a list of types to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300 match in angle brackets in place of a pattern, like this: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 :au BufRead *.html,<&faf;HTML> runtime! syntax/html.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304 This will match:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1624
diff changeset
306 - Any file whose name ends in ".html"
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1624
diff changeset
307 - Any file whose type is "&faf" or "HTML", where the meaning of these types
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308 depends on which version of Vim you are using.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 Unknown types are considered NOT to match.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 You can also specify a type and a pattern at the same time (in which case they
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 must both match): >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 :au BufRead <&fff>diff*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315
1668
0b796e045c42 updated for version 7.2b-000
vimboss
parents: 1624
diff changeset
316 This will match files of type "&fff" whose names start with "diff".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 *plugin-details*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 The "plugin" directory can be in any of the directories in the 'runtimepath'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 option. All of these directories will be searched for plugins and they are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 all loaded. For example, if this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 set runtimepath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
326 produces this output:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327
19116
9b7f90e56753 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
328 runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim82 ~
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
330 then Vim will load all plugins in these directories and below:
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
332 /etc/vim/plugin/ ~
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
333 ~/.vim/plugin/ ~
19116
9b7f90e56753 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18972
diff changeset
334 /usr/local/share/vim/vim82/plugin/ ~
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 Note that the last one is the value of $VIMRUNTIME which has been expanded.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13231
diff changeset
338 Note that when using a plugin manager or |packages| many directories will be
14249
4543777545a3 Updated runtime and language files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
339 added to 'runtimepath'. These plugins each require their own directory, don't
4543777545a3 Updated runtime and language files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
340 put them directly in ~/.vim/plugin.
13735
a62eeee5f116 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13231
diff changeset
341
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 What if it looks like your plugin is not being loaded? You can find out what
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 happens when Vim starts up by using the |-V| argument: >
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
344
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
345 vim -V2
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
346
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 You will see a lot of messages, in between them is a remark about loading the
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
348 plugins. It starts with:
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
349
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
350 Searching for "plugin/**/*.vim" in ~
96cd8222a819 updated for version 7.1a
vimboss
parents: 874
diff changeset
351
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 There you can see where Vim looks for your plugin scripts.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
353
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 2. Filetype plugin *filetype-plugins*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 When loading filetype plugins has been enabled |:filetype-plugin-on|, options
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 will be set and mappings defined. These are all local to the buffer, they
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359 will not be used for other files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
361 Defining mappings for a filetype may get in the way of the mappings you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 define yourself. There are a few ways to avoid this:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 1. Set the "maplocalleader" variable to the key sequence you want the mappings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364 to start with. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 :let maplocalleader = ","
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 < All mappings will then start with a comma instead of the default, which
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367 is a backslash. Also see |<LocalLeader>|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369 2. Define your own mapping. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370 :map ,p <Plug>MailQuote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 < You need to check the description of the plugin file below for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372 functionality it offers and the string to map to.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 You need to define your own mapping before the plugin is loaded (before
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374 editing a file of that type). The plugin will then skip installing the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
375 default mapping.
26847
eafb9fd4ec32 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26438
diff changeset
376 *no_mail_maps* *g:no_mail_maps*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 3. Disable defining mappings for a specific filetype by setting a variable,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
378 which contains the name of the filetype. For the "mail" filetype this
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
379 would be: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 :let no_mail_maps = 1
26847
eafb9fd4ec32 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26438
diff changeset
381 < *no_plugin_maps* *g:no_plugin_maps*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 4. Disable defining mappings for all filetypes by setting a variable: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 :let no_plugin_maps = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
385
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
386 *ftplugin-overrule*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
387 If a global filetype plugin does not do exactly what you want, there are three
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 ways to change this:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
389
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 1. Add a few settings.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 You must create a new filetype plugin in a directory early in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
392 'runtimepath'. For Unix, for example you could use this file: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
393 vim ~/.vim/ftplugin/fortran.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
394 < You can set those settings and mappings that you would like to add. Note
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395 that the global plugin will be loaded after this, it may overrule the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396 settings that you do here. If this is the case, you need to use one of the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 following two methods.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399 2. Make a copy of the plugin and change it.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400 You must put the copy in a directory early in 'runtimepath'. For Unix, for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 example, you could do this: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 cp $VIMRUNTIME/ftplugin/fortran.vim ~/.vim/ftplugin/fortran.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403 < Then you can edit the copied file to your liking. Since the b:did_ftplugin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404 variable will be set, the global plugin will not be loaded.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 A disadvantage of this method is that when the distributed plugin gets
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 improved, you will have to copy and modify it again.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 3. Overrule the settings after loading the global plugin.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 You must create a new filetype plugin in a directory from the end of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
410 'runtimepath'. For Unix, for example, you could use this file: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
411 vim ~/.vim/after/ftplugin/fortran.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
412 < In this file you can change just those settings that you want to change.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
413
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
414 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415 3. Docs for the default filetype plugins. *ftplugin-docs*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417
22441
a3bb84cd0f59 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21825
diff changeset
418 AWK *ft-awk-plugin*
a3bb84cd0f59 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21825
diff changeset
419
a3bb84cd0f59 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21825
diff changeset
420 Support for features specific to GNU Awk, like @include, can be enabled by
a3bb84cd0f59 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21825
diff changeset
421 setting: >
a3bb84cd0f59 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21825
diff changeset
422 let g:awk_is_gawk = 1
a3bb84cd0f59 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21825
diff changeset
423
a3bb84cd0f59 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 21825
diff changeset
424
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
425 CHANGELOG *ft-changelog-plugin*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 22
diff changeset
427 Allows for easy entrance of Changelog entries in Changelog files. There are
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 some commands, mappings, and variables worth exploring:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 Options:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 'comments' is made empty to not mess up formatting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 'textwidth' is set to 78, which is standard.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433 'formatoptions' the 't' flag is added to wrap when inserting text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 Commands:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 NewChangelogEntry Adds a new Changelog entry in an intelligent fashion
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 (see below).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 Local mappings:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 <Leader>o Starts a new Changelog entry in an equally intelligent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 fashion (see below).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 Global mappings:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 NOTE: The global mappings are accessed by sourcing the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 ftplugin/changelog.vim file first, e.g. with >
497
73f10d8124f4 updated for version 7.0136
vimboss
parents: 237
diff changeset
446 runtime ftplugin/changelog.vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 < in your |.vimrc|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 <Leader>o Switches to the ChangeLog buffer opened for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 current directory, or opens it in a new buffer if it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450 exists in the current directory. Then it does the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451 same as the local <Leader>o described above.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 Variables:
1226
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
454 g:changelog_timeformat Deprecated; use g:changelog_dateformat instead.
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
455 g:changelog_dateformat The date (and time) format used in ChangeLog entries.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 The format accepted is the same as for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 |strftime()| function.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 The default is "%Y-%m-%d" which is the standard format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 for many ChangeLog layouts.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
460 g:changelog_username The name and email address of the user.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 The default is deduced from environment variables and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 system files. It searches /etc/passwd for the comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463 part of the current user, which informally contains
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 the real name of the user up to the first separating
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 comma. then it checks the $NAME environment variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 and finally runs `whoami` and `hostname` to build an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 email address. The final form is >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 Full Name <user@host>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 g:changelog_new_date_format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 The format to use when creating a new date-entry.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 The following table describes special tokens in the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 string:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 %% insert a single '%' character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 %d insert the date from above
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 %u insert the user from above
5568
2f856c7c1d43 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
477 %p insert result of b:changelog_entry_prefix
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 %c where to position cursor when done
5568
2f856c7c1d43 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
479 The default is "%d %u\n\n\t* %p%c\n\n", which produces
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 something like (| is where cursor will be, unless at
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 the start of the line where it denotes the beginning
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 of the line) >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 |2003-01-14 Full Name <user@host>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 |
5568
2f856c7c1d43 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
485 | * prefix|
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487 g:changelog_new_entry_format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 The format used when creating a new entry.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 The following table describes special tokens in the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 string:
5568
2f856c7c1d43 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
491 %p insert result of b:changelog_entry_prefix
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 %c where to position cursor when done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 The default is "\t*%c", which produces something
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 similar to >
5568
2f856c7c1d43 Runtime file updates.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
495 | * prefix|
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 g:changelog_date_entry_search
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 The search pattern to use when searching for a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 date-entry.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500 The same tokens that can be used for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 g:changelog_new_date_format can be used here as well.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 The default is '^\s*%d\_s*%u' which finds lines
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 matching the form >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 |2003-01-14 Full Name <user@host>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 < and some similar formats.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506
1226
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
507 g:changelog_date_end_entry_search
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
508 The search pattern to use when searching for the end
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
509 of a date-entry.
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
510 The same tokens that can be used for
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
511 g:changelog_new_date_format can be used here as well.
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
512 The default is '^\s*$' which finds lines that contain
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
513 only whitespace or are completely empty.
a49d06539452 updated for version 7.1b
vimboss
parents: 1125
diff changeset
514
1698
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
515 b:changelog_name *b:changelog_name*
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
516 Name of the ChangeLog file to look for.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
517 The default is 'ChangeLog'.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
518
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
519 b:changelog_path
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
520 Path of the ChangeLog to use for the current buffer.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
521 The default is empty, thus looking for a file named
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
522 |b:changelog_name| in the same directory as the
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
523 current buffer. If not found, the parent directory of
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
524 the current buffer is searched. This continues
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
525 recursively until a file is found or there are no more
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
526 parent directories to search.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
527
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
528 b:changelog_entry_prefix
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
529 Name of a function to call to generate a prefix to a
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
530 new entry. This function takes no arguments and
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
531 should return a string containing the prefix.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
532 Returning an empty prefix is fine.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
533 The default generates the shortest path between the
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
534 ChangeLog's pathname and the current buffers pathname.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
535 In the future, it will also be possible to use other
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
536 variable contexts for this variable, for example, g:.
f4f8014d516e updated for version 7.2c-000
vimboss
parents: 1668
diff changeset
537
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
538 The Changelog entries are inserted where they add the least amount of text.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
539 After figuring out the current date and user, the file is searched for an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
540 entry beginning with the current date and user and if found adds another item
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 22
diff changeset
541 under it. If not found, a new entry and item is prepended to the beginning of
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
542 the Changelog.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
543
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
544
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
545 FORTRAN *ft-fortran-plugin*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
546
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
547 Options:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
548 'expandtab' is switched on to avoid tabs as required by the Fortran
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
549 standards unless the user has set fortran_have_tabs in .vimrc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
550 'textwidth' is set to 72 for fixed source format as required by the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
551 Fortran standards and to 80 for free source format.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
552 'formatoptions' is set to break code and comment lines and to preserve long
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 22
diff changeset
553 lines. You can format comments with |gq|.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
554 For further discussion of fortran_have_tabs and the method used for the
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
555 detection of source format see |ft-fortran-syntax|.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
556
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
557
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
558 GIT COMMIT *ft-gitcommit-plugin*
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
559
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
560 One command, :DiffGitCached, is provided to show a diff of the current commit
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
561 in the preview window. It is equivalent to calling "git diff --cached" plus
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
562 any arguments given to the command.
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
563
25880
9c221ad9634a Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25836
diff changeset
564 GPROF *ft-gprof-plugin*
25836
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
565
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
566 The gprof filetype plugin defines a mapping <C-]> to jump from a function
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
567 entry in the gprof flat profile or from a function entry in the call graph
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
568 to the details of that function in the call graph.
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
569
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
570 The mapping can be disabled with: >
65de67669df3 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
571 let g:no_gprof_maps = 1
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
572
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
573 MAIL *ft-mail-plugin*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
574
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
575 Options:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
576 'modeline' is switched off to avoid the danger of trojan horses, and to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
577 avoid that a Subject line with "Vim:" in it will cause an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
578 error message.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
579 'textwidth' is set to 72. This is often recommended for e-mail.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
580 'formatoptions' is set to break text lines and to repeat the comment leader
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
581 in new lines, so that a leading ">" for quotes is repeated.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
582 You can also format quoted text with |gq|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
583
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
584 Local mappings:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
585 <LocalLeader>q or \\MailQuote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
586 Quotes the text selected in Visual mode, or from the cursor position
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
587 to the end of the file in Normal mode. This means "> " is inserted in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
588 each line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
589
7315
444efa5f5015 commit https://github.com/vim/vim/commit/2c5e8e80eacf491d4f266983f534a77776c7ae83
Christian Brabandt <cb@256bit.org>
parents: 7272
diff changeset
590 MAN *ft-man-plugin* *:Man* *man.vim*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
591
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
592 This plugin displays a manual page in a nice way. See |find-manpage| in the
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
593 user manual for more information.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
594
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
595 To start using the |:Man| command before any manual page has been loaded,
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
596 source this script from your startup |vimrc| file: >
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
597 runtime ftplugin/man.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
598
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
599 Options:
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
600 'iskeyword' The '.' character is added to support the use of CTRL-] on the
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
601 manual page name.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
602
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
603 Commands:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
604 Man {name} Display the manual page for {name} in a window.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
605 Man {number} {name}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
606 Display the manual page for {name} in a section {number}.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
607
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
608 Global mapping:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
609 <Leader>K Displays the manual page for the word under the cursor.
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
610 <Plug>ManPreGetPage
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
611 idem, allows for using a mapping: >
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
612 nmap <F1> <Plug>ManPreGetPage
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
613
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
614 Local mappings:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
615 CTRL-] Jump to the manual page for the word under the cursor.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
616 CTRL-T Jump back to the previous manual page.
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
617 q Same as the |:quit| command.
7272
17333ebd2bbd commit https://github.com/vim/vim/commit/d042dc825c9b97dacd84d4728f88300da4d5b6b9
Christian Brabandt <cb@256bit.org>
parents: 5568
diff changeset
618
9344
33c1b85d408c commit https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0
Christian Brabandt <cb@256bit.org>
parents: 9116
diff changeset
619 To use a vertical split instead of horizontal: >
33c1b85d408c commit https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0
Christian Brabandt <cb@256bit.org>
parents: 9116
diff changeset
620 let g:ft_man_open_mode = 'vert'
33c1b85d408c commit https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0
Christian Brabandt <cb@256bit.org>
parents: 9116
diff changeset
621 To use a new tab: >
33c1b85d408c commit https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0
Christian Brabandt <cb@256bit.org>
parents: 9116
diff changeset
622 let g:ft_man_open_mode = 'tab'
33c1b85d408c commit https://github.com/vim/vim/commit/802a0d902fca423acb15f835d7b09183883d79a0
Christian Brabandt <cb@256bit.org>
parents: 9116
diff changeset
623
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
624 To enable |folding|, use this: >
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
625 let g:ft_man_folding_enable = 1
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
626 If you do not like the default folding, use an |autocommand| to add your desired
7384
aea5ebf352c4 commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents: 7315
diff changeset
627 folding style instead. For example: >
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
628 autocmd FileType man setlocal foldmethod=indent foldenable
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
629
18186
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17433
diff changeset
630 If you would like :Man {number} {name} to behave like man {number} {name} by
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17433
diff changeset
631 not running man {name} if no page is found, then use this: >
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17433
diff changeset
632 let g:ft_man_no_sect_fallback = 1
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 17433
diff changeset
633
9116
bc38030aec7d commit https://github.com/vim/vim/commit/26852128a2b713ef49341a0c18daba928444e7eb
Christian Brabandt <cb@256bit.org>
parents: 9041
diff changeset
634 You may also want to set 'keywordprg' to make the |K| command open a manual
bc38030aec7d commit https://github.com/vim/vim/commit/26852128a2b713ef49341a0c18daba928444e7eb
Christian Brabandt <cb@256bit.org>
parents: 9041
diff changeset
635 page in a Vim window: >
bc38030aec7d commit https://github.com/vim/vim/commit/26852128a2b713ef49341a0c18daba928444e7eb
Christian Brabandt <cb@256bit.org>
parents: 9041
diff changeset
636 set keywordprg=:Man
bc38030aec7d commit https://github.com/vim/vim/commit/26852128a2b713ef49341a0c18daba928444e7eb
Christian Brabandt <cb@256bit.org>
parents: 9041
diff changeset
637
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
638
9041
34c45ee4210d commit https://github.com/vim/vim/commit/06481427005a9dae39721087df94855f7d4d1feb
Christian Brabandt <cb@256bit.org>
parents: 7384
diff changeset
639 MANPAGER *manpager.vim*
34c45ee4210d commit https://github.com/vim/vim/commit/06481427005a9dae39721087df94855f7d4d1feb
Christian Brabandt <cb@256bit.org>
parents: 7384
diff changeset
640
23047
29c5f168c6fd Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 22441
diff changeset
641 The |:Man| command allows you to turn Vim into a manpager (that syntax highlights
9041
34c45ee4210d commit https://github.com/vim/vim/commit/06481427005a9dae39721087df94855f7d4d1feb
Christian Brabandt <cb@256bit.org>
parents: 7384
diff changeset
642 manpages and follows linked manpages on hitting CTRL-]).
34c45ee4210d commit https://github.com/vim/vim/commit/06481427005a9dae39721087df94855f7d4d1feb
Christian Brabandt <cb@256bit.org>
parents: 7384
diff changeset
643
12826
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
644 For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...)
9041
34c45ee4210d commit https://github.com/vim/vim/commit/06481427005a9dae39721087df94855f7d4d1feb
Christian Brabandt <cb@256bit.org>
parents: 7384
diff changeset
645
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28620
diff changeset
646 export MANPAGER="vim +MANPAGER --not-a-term -"
9041
34c45ee4210d commit https://github.com/vim/vim/commit/06481427005a9dae39721087df94855f7d4d1feb
Christian Brabandt <cb@256bit.org>
parents: 7384
diff changeset
647
12826
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
648 For (t)csh, add to the config file
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
649
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28620
diff changeset
650 setenv MANPAGER "vim +MANPAGER --not-a-term -"
12826
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
651
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
652 For fish, add to the config file
f690da1b3c04 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 12756
diff changeset
653
29193
1e9e9d89f0ee Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28620
diff changeset
654 set -x MANPAGER "vim +MANPAGER --not-a-term -"
9041
34c45ee4210d commit https://github.com/vim/vim/commit/06481427005a9dae39721087df94855f7d4d1feb
Christian Brabandt <cb@256bit.org>
parents: 7384
diff changeset
655
24103
788e10cec9bd Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
656
788e10cec9bd Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
657 MARKDOWN *ft-markdown-plugin*
788e10cec9bd Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
658
788e10cec9bd Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
659 To enable folding use this: >
24911
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24103
diff changeset
660 let g:markdown_folding = 1
24103
788e10cec9bd Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
661 <
788e10cec9bd Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 23737
diff changeset
662
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
663 PDF *ft-pdf-plugin*
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
664
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
665 Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
666 the PDF. The following are treated as tags:
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
667
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
668 - The byte offset after "startxref" to the xref table
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
669 - The byte offset after the /Prev key in the trailer to an earlier xref table
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
670 - A line of the form "0123456789 00000 n" in the xref table
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
671 - An object reference like "1 0 R" anywhere in the PDF
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
672
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
673 These maps can be disabled with >
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
674 :let g:no_pdf_maps = 1
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
675 <
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
676
10186
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
677 PYTHON *ft-python-plugin* *PEP8*
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
678
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
679 By default the following options are set, in accordance with PEP8: >
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
680
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
681 setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
682
14637
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
683 To disable this behavior, set the following variable in your vimrc: >
13231
167a030448fa Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13051
diff changeset
684
10186
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
685 let g:python_recommended_style = 0
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
686
a5ef9968638c commit https://github.com/vim/vim/commit/7e1479b86c590a66b63a274c079b7f18907d45a4
Christian Brabandt <cb@256bit.org>
parents: 9344
diff changeset
687
17433
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
688 QF QUICKFIX *qf.vim* *ft-qf-plugin*
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
689
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
690 The "qf" filetype is used for the quickfix window, see |quickfix-window|.
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
691
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
692 The quickfix filetype plugin includes configuration for displaying the command
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
693 that produced the quickfix list in the |status-line|. To disable this setting,
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
694 configure as follows: >
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
695 :let g:qf_disable_statusline = 1
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
696
ca8e754bdd53 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 16553
diff changeset
697
14637
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
698 R MARKDOWN *ft-rmd-plugin*
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
699
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
700 By default ftplugin/html.vim is not sourced. If you want it sourced, add to
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
701 your |vimrc|: >
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
702 let rmd_include_html = 1
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
703
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
704 The 'formatexpr' option is set dynamically with different values for R code
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
705 and for Markdown code. If you prefer that 'formatexpr' is not set, add to your
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
706 |vimrc|: >
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
707 let rmd_dynamic_comments = 0
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
708
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
709
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
710 R RESTRUCTURED TEXT *ft-rrst-plugin*
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
711
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
712 The 'formatexpr' option is set dynamically with different values for R code
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
713 and for ReStructured text. If you prefer that 'formatexpr' is not set, add to
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
714 your |vimrc|: >
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
715 let rrst_dynamic_comments = 0
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
716
0ecb909e3249 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14421
diff changeset
717
15878
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
718 RESTRUCTUREDTEXT *ft-rst-plugin*
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
719
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
720 The following formatting setting are optionally available: >
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
721 setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
722
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
723 To enable this behavior, set the following variable in your vimrc: >
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
724 let g:rst_style = 1
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
725
314694a2e74a Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 14637
diff changeset
726
501
ce2181d14aa0 updated for version 7.0139
vimboss
parents: 497
diff changeset
727 RPM SPEC *ft-spec-plugin*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
728
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
729 Since the text for this plugin is rather long it has been put in a separate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
730 file: |pi_spec.txt|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
731
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
732
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents: 10548
diff changeset
733 RUST *ft-rust*
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents: 10548
diff changeset
734
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents: 10548
diff changeset
735 Since the text for this plugin is rather long it has been put in a separate
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents: 10548
diff changeset
736 file: |ft_rust.txt|.
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents: 10548
diff changeset
737
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents: 10548
diff changeset
738
720
e180933b876a updated for version 7.0219
vimboss
parents: 530
diff changeset
739 SQL *ft-sql*
e180933b876a updated for version 7.0219
vimboss
parents: 530
diff changeset
740
e180933b876a updated for version 7.0219
vimboss
parents: 530
diff changeset
741 Since the text for this plugin is rather long it has been put in a separate
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1278
diff changeset
742 file: |ft_sql.txt|.
720
e180933b876a updated for version 7.0219
vimboss
parents: 530
diff changeset
743
e180933b876a updated for version 7.0219
vimboss
parents: 530
diff changeset
744
4681
2eb30f341e8d Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2908
diff changeset
745 TEX *ft-tex-plugin* *g:tex_flavor*
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
746
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
747 If the first line of a *.tex file has the form >
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
748 %&<format>
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
749 then this determined the file type: plaintex (for plain TeX), context (for
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
750 ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to
800
d8f905020502 updated for version 7.0b
vimboss
parents: 798
diff changeset
751 choose context or tex. If no keywords are found, it defaults to plaintex.
d8f905020502 updated for version 7.0b
vimboss
parents: 798
diff changeset
752 You can change the default by defining the variable g:tex_flavor to the format
851
e73f2978bd40 updated for version 7.0f04
vimboss
parents: 842
diff changeset
753 (not the file type) you use most. Use one of these: >
e73f2978bd40 updated for version 7.0f04
vimboss
parents: 842
diff changeset
754 let g:tex_flavor = "plain"
e73f2978bd40 updated for version 7.0f04
vimboss
parents: 842
diff changeset
755 let g:tex_flavor = "context"
e73f2978bd40 updated for version 7.0f04
vimboss
parents: 842
diff changeset
756 let g:tex_flavor = "latex"
e73f2978bd40 updated for version 7.0f04
vimboss
parents: 842
diff changeset
757 Currently no other formats are recognized.
798
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
758
95dac6af3b3a updated for version 7.0232
vimboss
parents: 720
diff changeset
759
13051
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
760 VIM *ft-vim-plugin*
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
761
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
762 The Vim filetype plugin defines mappings to move to the start and end of
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
763 functions with [[ and ]]. Move around comments with ]" and [".
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
764
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
765 The mappings can be disabled with: >
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
766 let g:no_vim_maps = 1
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
767
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
768
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
769 ZIMBU *ft-zimbu-plugin*
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
770
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
771 The Zimbu filetype plugin defines mappings to move to the start and end of
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
772 functions with [[ and ]].
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
773
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
774 The mappings can be disabled with: >
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
775 let g:no_zimbu_maps = 1
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
776 <
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
777
a6d3e2081544 Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 12826
diff changeset
778
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14249
diff changeset
779 vim:tw=78:ts=8:noet:ft=help:norl: