Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 295 lines (169 sloc) 23.801 kB
0c57fc8 @xolox Initial commit
authored
1 # Automated tag generation and syntax highlighting in Vim
2
f0f0513 @xolox Change inline hyper links in README to reference style
authored
3 [Vim] [vim] has long been my favorite text editor and combined with [Exuberant Ctags] [exctags] it has the potential to provide most of what I expect from an [integrated development environment] [ide]. Exuberant Ctags is the latest incarnation of a [family of computer programs] [ctags] that scan source code files to create an index of identifiers (tags) and where they are defined. Vim uses this index (a so-called tags file) to enable you to jump to the definition of any identifier using the [Control-]] [ctrl_mapping] mapping.
58ccaa0 @xolox Updated README with instructions on installing ctags
authored
4
f0f0513 @xolox Change inline hyper links in README to reference style
authored
5 When you're familiar with integrated development environments you may recognize this feature as "Go-to definition". One advantage of the combination of Vim and Exuberant Ctags over integrated development environments is that Vim supports syntax highlighting for [over 500 file types] [vim_fts] (!) and Exuberant Ctags can generate tags for [over 40 file types] [ctags_fts] as well...
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
6
7e8533f @xolox Automatic/optional integration with shell.vim
authored
7 There's just one problem: You have to manually keep your tags files up-to-date and this turns out to be a royal pain in the ass! So I set out to write a Vim plug-in that would do this boring work for me. When I finished the plug-in's basic functionality (one automatic command and a call to [system()] [system] later) I became interested in dynamic syntax highlighting, so I added that as well to see if it would work -- surprisingly well I'm happy to report!
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
8
9abe348 @xolox 2x faster syntax highlighting using Python Interface to Vim :-)
authored
9 ## Installation
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
10
f0f0513 @xolox Change inline hyper links in README to reference style
authored
11 Unzip the most recent [ZIP archive] [download] file inside your Vim profile directory (usually this is `~/.vim` on UNIX and `%USERPROFILE%\vimfiles` on Windows), restart Vim and execute the command `:helptags ~/.vim/doc` (use `:helptags ~\vimfiles\doc` instead on Windows). Now try it out: Edit any file type supported by Exuberant Ctags and within ten seconds the plug-in should create/update your tags file (`~/.vimtags` on UNIX, `~/_vimtags` on Windows) with the tags defined in the file you just edited! This means that whatever file you're editing in Vim (as long as it's on the local file system), tags will always be available by the time you need them!
58ccaa0 @xolox Updated README with instructions on installing ctags
authored
12
3d7e091 @xolox Bump version + minor updates for Awk, Shell & TCL support
authored
13 Additionally if the file you just opened is an AWK, C#, C, C++, Objective-C, Java, Lua, PHP, Python, Ruby, Shell, Tcl or Vim source file you should also notice that the function and type names defined in the file have been syntax highlighted.
0c57fc8 @xolox Initial commit
authored
14
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
15 The `easytags.vim` plug-in is intended to work automatically once it's installed, but if you want to change how it works there are several options you can change and commands you can execute from your own mappings and/or automatic commands. These are all documented below.
16
f0f0513 @xolox Change inline hyper links in README to reference style
authored
17 Note that if the plug-in warns you `ctags` isn't installed you'll have to download it from its [homepage] [exctags], or if you're running Debian/Ubuntu you can install it by executing the following shell command:
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
18
19 $ sudo apt-get install exuberant-ctags
0c57fc8 @xolox Initial commit
authored
20
9abe348 @xolox 2x faster syntax highlighting using Python Interface to Vim :-)
authored
21 ### A note about Windows
7e8533f @xolox Automatic/optional integration with shell.vim
authored
22
f0f0513 @xolox Change inline hyper links in README to reference style
authored
23 On Windows the [system()] [system] function used by `easytags.vim` causes a command prompt window to pop up while Exuberant Ctags is executing. If this bothers you then you can install my [shell.vim] [shell] plug-in which includes a [DLL] [dll] that works around this issue. Once you've installed both plug-ins it should work out of the box! Please let me know if this doesn't work for you.
7e8533f @xolox Automatic/optional integration with shell.vim
authored
24
9abe348 @xolox 2x faster syntax highlighting using Python Interface to Vim :-)
authored
25 ## Commands
26
7e8533f @xolox Automatic/optional integration with shell.vim
authored
27 ### The `:UpdateTags` command
28
f0f0513 @xolox Change inline hyper links in README to reference style
authored
29 This command executes [Exuberant Ctags] [exctags] from inside Vim to update the global tags file defined by `g:easytags_file`. When no arguments are given the tags for the current file are updated, otherwise the arguments are passed on to `ctags`. For example when you execute the Vim command `:UpdateTags -R ~/.vim` (or `:UpdateTags -R ~\vimfiles` on Windows) the plug-in will execute `ctags -R ~/.vim` for you (with some additional arguments, see the troubleshooting section "`:HighlightTags` only works for the tags file created by `:UpdateTags`" for more information).
7e8533f @xolox Automatic/optional integration with shell.vim
authored
30
31 When you execute this command like `:UpdateTags!` (including the bang!) then all tags whose files are missing will be filtered from the global tags file.
32
33 Note that this command will be executed automatically every once in a while, assuming you haven't changed `g:easytags_on_cursorhold`.
34
35 ### The `:HighlightTags` command
36
f0f0513 @xolox Change inline hyper links in README to reference style
authored
37 When you execute this command while editing one of the supported file types (see above) the relevant tags in the current file are highlighted. The tags to highlight are gathered from all tags files known to Vim (through the ['tags' option] [tags_opt]).
7e8533f @xolox Automatic/optional integration with shell.vim
authored
38
39 Note that this command will be executed automatically every once in a while, assuming you haven't changed `g:easytags_on_cursorhold`.
40
9abe348 @xolox 2x faster syntax highlighting using Python Interface to Vim :-)
authored
41 ## Options
42
2e05e0e @xolox Support buffer local variants of most options
authored
43 The easytags plug-in should work out of the box but if you don't like the default configuration you can change how it works by setting the variables documented below. Most of these variables can also be changed for specific files by setting a buffer local variable instead of the global variable. For example to disable automatic highlighting (enabled by default) only in Python files you can add the following line to your [vimrc script] [vimrc]:
44
45 :autocmd FileType python let b:easytags_auto_highlight = 0
46
47 Note that buffer local variables always override global variables, so if you want to undo this for a specific file you have to use [:unlet] [unlet]:
48
49 :unlet b:easytags_auto_highlight
50
726c08b @xolox Improved README, added references to Vim documentation
authored
51 ### The `g:easytags_cmd` option
8fe189c @xolox Mention version detection in README
authored
52
9abe348 @xolox 2x faster syntax highlighting using Python Interface to Vim :-)
authored
53 The plug-in will try to determine the location where Exuberant Ctags is installed on its own but this might not always work because any given executable named `ctags` in your `$PATH` might not in fact be Exuberant Ctags but some older, more primitive `ctags` implementation which doesn't support the same command line options and thus breaks the easytags plug-in. If this is the case you can set the global variable `g:easytags_cmd` to the location where you've installed Exuberant Ctags, e.g.:
8fe189c @xolox Mention version detection in README
authored
54
55 :let g:easytags_cmd = '/usr/local/bin/ctags'
56
726c08b @xolox Improved README, added references to Vim documentation
authored
57 ### The `g:easytags_file` option
0c57fc8 @xolox Initial commit
authored
58
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
59 As mentioned above the plug-in will store your tags in `~/.vimtags` on UNIX and `~/_vimtags` on Windows. To change the location of this file, set the global variable `g:easytags_file`, e.g.:
0c57fc8 @xolox Initial commit
authored
60
61 :let g:easytags_file = '~/.vim/tags'
62
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
63 A leading `~` in the `g:easytags_file` variable is expanded to your current home directory (`$HOME` on UNIX, `%USERPROFILE%` on Windows).
0c57fc8 @xolox Initial commit
authored
64
670910e @xolox Enable updating of project specific tags files
authored
65 ### The `g:easytags_dynamic_files` option
66
fae8ddd @xolox Improve easytags_dynamic_files implementation (best of both worlds?)
authored
67 By default `:UpdateTags` only writes to the global tags file, but it can be configured to look for project specific tags files by adding the following lines to your [vimrc script] [vimrc]:
670910e @xolox Enable updating of project specific tags files
authored
68
69 :set tags=./tags;
70 :let g:easytags_dynamic_files = 1
71
fae8ddd @xolox Improve easytags_dynamic_files implementation (best of both worlds?)
authored
72 You can change the name of the tags file, the important thing is that it's relative to your working directory or the buffer (using a leading `./`). When `g:easytags_dynamic_files` is set to 1 the easytags plug-in will write to the first existing tags file seen by Vim (based on the ['tags' option] [tags_opt]). In other words: If a project specific tags file is found it will be used, otherwise the plug-in falls back to the global tags file (or a file type specific tags file).
73
74 If you set `g:easytags_dynamic_files` to 2 the easytags plug-in will automatically create project specific tags based on the first name in the 'tags' option. This disables the global tags file and file type specific tags files.
670910e @xolox Enable updating of project specific tags files
authored
75
fae8ddd @xolox Improve easytags_dynamic_files implementation (best of both worlds?)
authored
76 The ['tags' option] [tags_opt] is reevaluated each time the plug-in runs, so which tags file is selected can differ depending on the buffer and working directory.
d727ac0 Allow enabling both dynamic and file type tags files
Kenny Stuart authored
77
4df41ad @xolox Basic support for file type specific tags files!
authored
78 ### The `g:easytags_by_filetype` option
79
80 By default all tags are stored in a global tags file. When the tags file grows beyond a certain size Vim will be slowed down by the easytags plug-in because it has to read and process a large number of tags very frequently.
81
82 To avoid this problem you can set `g:easytags_by_filetype` to the path of an existing directory. The easytags plug-in will create separate tags files for each file type in the configured directory. These tags files are automatically registered by the easytags plug-in when the file type of a buffer is set.
83
d2a2cb5 @xolox Make "easytags_dynamic_files" create missing tags files
authored
84 Note that the `g:easytags_dynamic_files` option takes precedence over this option.
d727ac0 Allow enabling both dynamic and file type tags files
Kenny Stuart authored
85
d2a2cb5 @xolox Make "easytags_dynamic_files" create missing tags files
authored
86 If you already have a global tags file you can create file type specific tags files from the global tags file using the command `:TagsByFileType`.
1194a6b @xolox :TagsByFileType to create filetype specific tagsfiles from global tag…
authored
87
726c08b @xolox Improved README, added references to Vim documentation
authored
88 ### The `g:easytags_always_enabled` option
0c57fc8 @xolox Initial commit
authored
89
f0f0513 @xolox Change inline hyper links in README to reference style
authored
90 By default the plug-in automatically generates and highlights tags when you stop typing for a few seconds (this works using the [CursorHold] [cursorhold] automatic command). This means that when you edit a file, the dynamic highlighting won't appear until you pause for a moment. If you don't like this you can configure the plug-in to always enable dynamic highlighting:
0c57fc8 @xolox Initial commit
authored
91
92 :let g:easytags_always_enabled = 1
93
7e8533f @xolox Automatic/optional integration with shell.vim
authored
94 Be warned that after setting this option you'll probably notice why it's disabled by default: Every time you edit a file in Vim, the plug-in will first run Exuberant Ctags and then highlight the tags, and this slows Vim down quite a lot. I have some ideas on how to improve this latency by running Exuberant Ctags in the background so stay tuned!
0c57fc8 @xolox Initial commit
authored
95
f0f0513 @xolox Change inline hyper links in README to reference style
authored
96 Note: If you change this option it won't apply until you restart Vim, so you'll have to set this option in your [vimrc script] [vimrc].
0c57fc8 @xolox Initial commit
authored
97
726c08b @xolox Improved README, added references to Vim documentation
authored
98 ### The `g:easytags_on_cursorhold` option
0c57fc8 @xolox Initial commit
authored
99
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
100 As I explained above the plug-in by default doesn't update or highlight your tags until you stop typing for a moment. The plug-in tries hard to do the least amount of work possible in this break but it might still interrupt your workflow. If it does you can disable the periodic update:
0c57fc8 @xolox Initial commit
authored
101
102 :let g:easytags_on_cursorhold = 0
103
f0f0513 @xolox Change inline hyper links in README to reference style
authored
104 Note: Like the `g:easytags_always_enabled` option, if you change this option it won't apply until you restart Vim, so you'll have to set this option in your [vimrc script] [vimrc].
726c08b @xolox Improved README, added references to Vim documentation
authored
105
100bd8d @xolox New g:easytags_updatetime_autodisable option (issue #17, reported by …
authored
106 ### The `g:easytags_updatetime_min` option
107
108 Vim has a setting which influences how often the plug-in is automatically executed. When this setting is too low, the plug-in can break. For this reason the plug-in warns you when ['updatetime'][updatetime] is lower than 4000 milliseconds. If you really want the plug-in to be executed more than once every 4 seconds (without a warning) you can lower the minimum acceptable updatetime by setting this option (number of milliseconds).
109
110 ### The `g:easytags_updatetime_autodisable` option
111
112 Other plug-ins may lower the ['updatetime'][updatetime] value in certain contexts, e.g. insert mode in the case of the [neocomplcache][neocomplcache] plug-in. By setting this option to 1 (true) you can configure the easytags plug-in so that it doesn't give warnings about the updatetime option but instead skip updating and highlighting while the updatetime is set too low. When the updatetime is restored to a reasonable value the plug-in resumes.
113
67616b2 @xolox Add easytags_auto_update/auto_highlight options
authored
114 ### The `g:easytags_auto_update` option
115
116 By default the plug-in automatically updates and highlights your tags when you stop typing for a moment. If you want to disable automatic updating while keeping automatic highlighting enabled you can set this option to false:
117
118 :let g:easytags_auto_update = 0
119
120 ### The `g:easytags_auto_highlight` option
121
122 By default the plug-in automatically updates and highlights your tags when you stop typing for a moment. If you want to disable automatic highlighting while keeping automatic updating enabled you can set this option to false:
123
124 :let g:easytags_auto_highlight = 0
125
0d95679 @xolox Support for automatic recursion using ctags -R
authored
126 ### The `g:easytags_autorecurse` option
127
128 When the `:UpdateTags` command is executed automatically or without arguments, it defaults to updating just the tags for the current file. If you'd rather have it recursively scan everything below the directory of the current file then set this option to true (1):
129
130 :let g:easytags_autorecurse = 1
131
f0f0513 @xolox Change inline hyper links in README to reference style
authored
132 You have to explicitly enable this option because it should only be used while navigating around small directory trees. Imagine always having this option enabled and then having to edit a file in e.g. the root of your home directory: The `easytags.vim` plug-in would freeze Vim for a long time while you'd have to wait for Exuberant Ctags to scan thousands of files...
0d95679 @xolox Support for automatic recursion using ctags -R
authored
133
a536d77 @xolox Typo in g:easytags_autorecurse documentation
authored
134 Note that when you enable this option the `easytags.vim` plug-in might ignore other options like `g:easytags_resolve_links`. This is an implementation detail which I intend to fix.
0d95679 @xolox Support for automatic recursion using ctags -R
authored
135
2f73c57 @xolox Support scanning & highlighting of struct/class members
authored
136 ### The `g:easytags_include_members` option
137
f0f0513 @xolox Change inline hyper links in README to reference style
authored
138 Exuberant Ctags knows how to generate tags for struct/class members in C++ and Java source code but doesn't do so by default because it can more than double the size of your tags files, thus taking much longer to read/write the tags file. When you enable the `g:easytags_include_members` option from your [vimrc script] [vimrc] (before the `easytags.vim` plug-in is loaded):
2f73c57 @xolox Support scanning & highlighting of struct/class members
authored
139
140 :let g:easytags_include_members = 1
141
f0f0513 @xolox Change inline hyper links in README to reference style
authored
142 Exuberant Ctags will be instructed to include struct/class members using the `--extra=+q` command line argument and the `easytags.vim` plug-in will highlight them using the `cMember` highlighting group. Because most color schemes don't distinguish the [Identifier and Type] [syn_groups] highlighting groups all members will now probably look like type definitions. You can change that by executing either of the following Vim commands (from your vimrc script, a file type plug-in, etc.):
2f73c57 @xolox Support scanning & highlighting of struct/class members
authored
143
144 " If you like one of the existing styles you can link them:
145 highlight link cMember Special
146
147 " You can also define your own style if you want:
148 highlight cMember gui=italic
149
726c08b @xolox Improved README, added references to Vim documentation
authored
150 ### The `g:easytags_resolve_links` option
0c57fc8 @xolox Initial commit
authored
151
f0f0513 @xolox Change inline hyper links in README to reference style
authored
152 UNIX has [symbolic links] [slinks] and [hard links] [hlinks], both of which conflict with the concept of having one unique location for every identifier. With regards to hard links there's not much anyone can do, but because I use symbolic links quite a lot I've added this option. It's disabled by default since it has a small performance impact and might not do what unknowing users expect it to: When you enable this option the plug-in will resolve symbolic links in pathnames, which means your tags file will only contain entries with [canonical pathnames] [canon]. To enable this option (which I strongly suggest doing when you run UNIX and use symbolic links) execute the following Vim command:
0c57fc8 @xolox Initial commit
authored
153
a40a556 @xolox Made README more consistent
authored
154 :let g:easytags_resolve_links = 1
0c57fc8 @xolox Initial commit
authored
155
6e279a3 @blueyed Add g:easytags_suppress_ctags_warning option
blueyed authored
156 ### The `g:easytags_suppress_ctags_warning` option
157
158 If this is set and not false, it will suppress the warning on startup if ctags is not found or not recent enough.
159
160 :let g:easytags_suppress_ctags_warning = 1
161
e3290ab @xolox Make list of ignored syntax groups configurable
authored
162 ### The `g:easytags_ignored_syntax_groups` option
163
164 This variable is a string of comma separated names of syntax groups in which dynamic highlighting is not applied. It defaults to `.*String.*,.*Comment.*,cIncluded`.
165
9abe348 @xolox 2x faster syntax highlighting using Python Interface to Vim :-)
authored
166 ## Faster syntax highlighting using Python
167
168 The Vim script implementation of dynamic syntax highlighting is quite slow on large tags files. When the Python Interface to Vim is enabled the easytags plug-in will therefor automatically use a Python script that performs dynamic syntax highlighting about twice as fast as the Vim script implementation. The following options are available to change the default configuration.
169
170 ### The `g:easytags_python_enabled` option
171
08186f0 @xolox Documentation bug fix (it's getting late..)
authored
172 To disable the Python implementation of dynamic syntax highlighting you can set this option to false (0).
9abe348 @xolox 2x faster syntax highlighting using Python Interface to Vim :-)
authored
173
174 ### The `g:easytags_python_script` option
175
176 This option defines the pathname of the script that contains the Python implementation of dynamic syntax highlighting.
177
178 ## How to customize the highlighting colors?
2a2cba0 @xolox Document the highlighting groups used by the plug-in
authored
179
180 The easytags plug-in defines new highlighting groups for dynamically highlighted tags. These groups are linked to Vim's default groups so that they're colored out of the box, but if you want you can change the styles. To do so use a `highlight` command such as the ones given a few paragraphs back. Of course you'll need to change the group name. Here are the group names used by the easytags plug-in:
181
3d7e091 @xolox Bump version + minor updates for Awk, Shell & TCL support
authored
182 * **AWK**: `awkFunctionTag`
183 * **C#:** `csClassOrStructTag`, `csMethodTag`
184 * **C, C++, Objective C:** `cTypeTag`, `cEnumTag`, `cPreProcTag`, `cFunctionTag`, `cMemberTag`
185 * **Java:** `javaClassTag`, `javaMethodTag`
2a2cba0 @xolox Document the highlighting groups used by the plug-in
authored
186 * **Lua:** `luaFuncTag`
187 * **PHP:** `phpFunctionsTag`, `phpClassesTag`
188 * **Python:** `pythonFunctionTag`, `pythonMethodTag`, `pythonClassTag`
45e97ff @xolox Dynamic highlighting for Ruby source code (issue #9)
authored
189 * **Ruby:** `rubyModuleNameTag`, `rubyClassNameTag`, `rubyMethodNameTag`
3d7e091 @xolox Bump version + minor updates for Awk, Shell & TCL support
authored
190 * **Shell**: `shFunctionTag`
191 * **Tcl**: `tclCommandTag`
192 * **Vim:** `vimAutoGroupTag`, `vimCommandTag`, `vimFuncNameTag`, `vimScriptFuncNameTag`
2a2cba0 @xolox Document the highlighting groups used by the plug-in
authored
193
194 As you can see each of these names ends in `Tag` to avoid conflicts with the syntax modes shipped with Vim. And about the singular/plural confusion: I've tried to match the existing highlighting groups defined by popular syntax modes (except of course for the `Tag` suffix).
195
46d87b3 @xolox Explain how to setup custom ctags command line options
authored
196 ## Passing custom command line arguments to Exuberant Ctags
197
198 You may want to run Exuberant Ctags with specific command line options, for example the [code_complete] [code_complete] plug-in requires the signature field to be present. To do this you can create a configuration file for Exuberant Ctags, e.g. `~/.ctags` on UNIX or `%USERPROFILE%\ctags.cnf` on Windows. The file should contain one command line option per line. See the [Exuberant Ctags manual] [ctags_cfg] for details.
199
0c57fc8 @xolox Initial commit
authored
200 ## Troubleshooting
201
738d750 @xolox Documented :HighlightTags tags file format requirements
authored
202 ### `:HighlightTags` only works for the tags file created by `:UpdateTags`
203
204 If you want to create tags files and have their tags highlighted by the `easytags.vim` plug-in then you'll have to create the tags file with certain arguments to Exuberant Ctags:
205
206 $ ctags --fields=+l --c-kinds=+p --c++-kinds=+p ...
207
208 The `--fields=+l` argument makes sure that Exuberant Ctags includes a `language:...` property with each entry in the tags file. This is required by the `:HighlightTags` command so it can filter tags by their file type. The other two arguments make sure Exuberant Ctags generates tags for function prototypes in C/C++ source code.
209
210 If you have the `g:easytags_include_members` option enabled (its off by default) then you'll also need to add the `--extra=+q` argument so that Exuberant Ctags generates tags for structure/class members.
211
8fe189c @xolox Mention version detection in README
authored
212 ### The plug-in complains that Exuberant Ctags isn't installed
213
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
214 After a Mac OS X user found out the hard way that the `ctags` executable isn't always Exuberant Ctags and we spend a few hours debugging the problem I added proper version detection: The plug-in executes `ctags --version` when Vim is started to verify that Exuberant Ctags 5.5 or newer is installed. If it isn't Vim will show the following message on startup:
8fe189c @xolox Mention version detection in README
authored
215
216 easytags.vim: Plug-in not loaded because Exuberant Ctags isn't installed!
217 Please download & install Exuberant Ctags from http://ctags.sf.net
218
219 If the installed Exuberant Ctags version is too old the plug-in will complain:
220
221 easytags.vim: Plug-in not loaded because Exuberant Ctags 5.5
222 or newer is required while you have version %s installed!
223
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
224 If you have the right version of Exuberant Ctags installed but the plug-in still complains, try executing the following command from inside Vim:
8fe189c @xolox Mention version detection in README
authored
225
226 :!which ctags
227
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
228 If this doesn't print the location where you installed Exuberant Ctags it means your system already had a `ctags` executable but it isn't compatible with Exuberant Ctags 5.5 and you'll need to set the `g:easytags_cmd` option (see above) so the plug-in knows which `ctags` to run.
8fe189c @xolox Mention version detection in README
authored
229
230 ### Vim locks up while the plug-in is running
231
f0f0513 @xolox Change inline hyper links in README to reference style
authored
232 Once or twice now in several years I've experienced Exuberant Ctags getting into an infinite loop when given garbage input. In my case this happened by accident a few days ago :-|. Because my plug-in executes `ctags` in the foreground this will block Vim indefinitely! If this happens you might be able to kill `ctags` by pressing [Control-C] [ctrl_c] but if that doesn't work you can also kill it without stopping Vim using a task manager or the `pkill` command (available on most UNIX systems):
0c57fc8 @xolox Initial commit
authored
233
726c08b @xolox Improved README, added references to Vim documentation
authored
234 $ pkill -KILL ctags
0c57fc8 @xolox Initial commit
authored
235
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
236 If Vim seems very slow and you suspect this plug-in might be the one to blame, increase Vim's verbosity level:
0c57fc8 @xolox Initial commit
authored
237
238 :set vbs=1
239
f0f0513 @xolox Change inline hyper links in README to reference style
authored
240 Every time the plug-in executes it will time how long the execution takes and add the results to Vim's message history, which you can view by executing the [:messages] [messages] command.
0c57fc8 @xolox Initial commit
authored
241
92cd87d @xolox Handle patterns that are too large for Vim to evaluate
authored
242 ### Failed to highlight tags because pattern is too big!
243
f0f0513 @xolox Change inline hyper links in README to reference style
authored
244 If the `easytags.vim` plug-in fails to highlight your tags and the error message mentions that the pattern is too big, your tags file has grown too large for Vim to be able to highlight all tagged identifiers! I've had this happen to me with 50 KB patterns because I added most of the headers in `/usr/include/` to my tags file. Internally Vim raises the error [E339: Pattern too long] [e339] and unfortunately the only way to avoid this problem once it occurs is to reduce the number of tagged identifiers...
92cd87d @xolox Handle patterns that are too large for Vim to evaluate
authored
245
5207365 @xolox Fix broken link in README
authored
246 In my case the solution was to move most of the tags from `/usr/include/` over to project specific tags files which are automatically loaded by Vim when I edit files in different projects because I've set the ['tags' option] [tags_opt] as follows:
92cd87d @xolox Handle patterns that are too large for Vim to evaluate
authored
247
248 :set tags=./.tags;,~/.vimtags
249
89f9205 @xolox Enable commands like :UpdateTags -R ~/.vim
authored
250 Once you've executed the above command, Vim will automatically look for a file named `.tags` in the directory of the current file. Because of the `;` Vim also recurses upwards so that you can nest files arbitrarily deep under your project directories.
92cd87d @xolox Handle patterns that are too large for Vim to evaluate
authored
251
f0f0513 @xolox Change inline hyper links in README to reference style
authored
252 ### The plug-in doesn't seem to work in Cygwin
ea6efd6 @xolox Added caveat about Cygwin, updated to-do list
authored
253
f0f0513 @xolox Change inline hyper links in README to reference style
authored
254 If you want to use the plug-in with Vim under [Cygwin] [cygwin], you need to have the Cygwin version of Ctags installed instead of the Windows version (thanks to Alex Zuroff for reporting this!).
ea6efd6 @xolox Added caveat about Cygwin, updated to-do list
authored
255
0c57fc8 @xolox Initial commit
authored
256 ## Contact
257
f0f0513 @xolox Change inline hyper links in README to reference style
authored
258 If you have questions, bug reports, suggestions, etc. the author can be contacted at <peter@peterodding.com>. The latest version is available at <http://peterodding.com/code/vim/easytags/> and <http://github.com/xolox/vim-easytags>. If you like this plug-in please vote for it on [Vim Online] [vim_online].
0c57fc8 @xolox Initial commit
authored
259
260 ## License
261
7e8533f @xolox Automatic/optional integration with shell.vim
authored
262 This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
27b9aa3 @xolox Remove duplicate tag from Vim help file
authored
263 © 2011 Peter Odding &lt;<peter@peterodding.com>&gt;.
0c57fc8 @xolox Initial commit
authored
264
265
f0f0513 @xolox Change inline hyper links in README to reference style
authored
266 [canon]: http://en.wikipedia.org/wiki/Canonicalization
46d87b3 @xolox Explain how to setup custom ctags command line options
authored
267 [code_complete]: http://www.vim.org/scripts/script.php?script_id=1764
f0f0513 @xolox Change inline hyper links in README to reference style
authored
268 [ctags]: http://en.wikipedia.org/wiki/Ctags
46d87b3 @xolox Explain how to setup custom ctags command line options
authored
269 [ctags_cfg]: http://ctags.sourceforge.net/ctags.html#FILES
f0f0513 @xolox Change inline hyper links in README to reference style
authored
270 [ctags_fts]: http://ctags.sourceforge.net/languages.html
271 [ctrl_c]: http://vimdoc.sourceforge.net/htmldoc/pattern.html#CTRL-C
272 [ctrl_mapping]: http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#CTRL-]
273 [cursorhold]: http://vimdoc.sourceforge.net/htmldoc/autocmd.html#CursorHold
274 [cygwin]: http://en.wikipedia.org/wiki/Cygwin
275 [dll]: http://en.wikipedia.org/wiki/Dynamic-link_library
276 [download]: http://peterodding.com/code/vim/downloads/easytags.zip
277 [e339]: http://vimdoc.sourceforge.net/htmldoc/message.html#E339
278 [exctags]: http://ctags.sourceforge.net/
279 [hlinks]: http://en.wikipedia.org/wiki/Hard_link
280 [ide]: http://en.wikipedia.org/wiki/Integrated_development_environment
281 [messages]: http://vimdoc.sourceforge.net/htmldoc/message.html#:messages
100bd8d @xolox New g:easytags_updatetime_autodisable option (issue #17, reported by …
authored
282 [neocomplcache]: http://www.vim.org/scripts/script.php?script_id=2620
f0f0513 @xolox Change inline hyper links in README to reference style
authored
283 [shell]: http://peterodding.com/code/vim/shell/
284 [slinks]: http://en.wikipedia.org/wiki/Symbolic_link
285 [syn_groups]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#group-name
7e8533f @xolox Automatic/optional integration with shell.vim
authored
286 [system]: http://vimdoc.sourceforge.net/htmldoc/eval.html#system%28%29
f0f0513 @xolox Change inline hyper links in README to reference style
authored
287 [tagfiles_fun]: http://vimdoc.sourceforge.net/htmldoc/eval.html#tagfiles%28%29
288 [tags_opt]: http://vimdoc.sourceforge.net/htmldoc/options.html#%27tags%27
289 [unlet]: http://vimdoc.sourceforge.net/htmldoc/eval.html#:unlet
100bd8d @xolox New g:easytags_updatetime_autodisable option (issue #17, reported by …
authored
290 [updatetime]: http://vimdoc.sourceforge.net/htmldoc/options.html#'updatetime'
f0f0513 @xolox Change inline hyper links in README to reference style
authored
291 [vim]: http://www.vim.org/
292 [vim_fts]: http://ftp.vim.org/vim/runtime/syntax/
293 [vim_online]: http://www.vim.org/scripts/script.php?script_id=3114
726c08b @xolox Improved README, added references to Vim documentation
authored
294 [vimrc]: http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
Something went wrong with that request. Please try again.