Skip to content
This repository
Newer
Older
100644 369 lines (214 sloc) 29.39 kb
0c57fc83 »
2010-06-06 Initial commit
1 # Automated tag generation and syntax highlighting in Vim
2
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
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.
58ccaa03 »
2010-06-06 Updated README with instructions on installing ctags
4
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
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...
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
6
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
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!
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
8
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
9 ## Installation
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
10
7916b461 »
2013-05-25 Document vim-misc as external dependency (needs to be installed separ…
11 *Please note that the vim-easytags plug-in requires my vim-misc plug-in which is separately distributed.*
12
13 Unzip the most recent ZIP archives of the [vim-easytags] [download-easytags] and [vim-misc] [download-misc] plug-ins 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).
14
15 If you prefer you can also use [Pathogen] [pathogen], [Vundle] [vundle] or a similar tool to install & update the [vim-easytags] [github-easytags] and [vim-misc] [github-misc] plug-ins using a local clone of the git repository.
16
17 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!
58ccaa03 »
2010-06-06 Updated README with instructions on installing ctags
18
3d7e0910 »
2011-10-01 Bump version + minor updates for Awk, Shell & TCL support
19 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.
0c57fc83 »
2010-06-06 Initial commit
20
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
21 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.
22
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
23 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:
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
24
25 $ sudo apt-get install exuberant-ctags
0c57fc83 »
2010-06-06 Initial commit
26
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
27 ### A note about Windows
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
28
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
29 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.
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
30
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
31 ## Commands
32
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
33 ### The `:UpdateTags` command
34
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
35 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).
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
36
37 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.
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
41 ### The `:HighlightTags` command
42
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
43 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]).
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
44
45 Note that this command will be executed automatically every once in a while, assuming you haven't changed `g:easytags_on_cursorhold`.
46
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
47 ## Options
48
2e05e0ea »
2011-06-27 Support buffer local variants of most options
49 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]:
50
51 :autocmd FileType python let b:easytags_auto_highlight = 0
52
53 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]:
54
55 :unlet b:easytags_auto_highlight
56
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
57 ### The `g:easytags_cmd` option
8fe189c6 »
2010-06-15 Mention version detection in README
58
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
59 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.:
8fe189c6 »
2010-06-15 Mention version detection in README
60
61 :let g:easytags_cmd = '/usr/local/bin/ctags'
62
ebe2ba9a »
2013-04-19 Move g:easytags_languages documentation to README.md
63 If you rely entirely on language-specific configuration and don't have a general ctags program, set this to the empty string.
64
27c29aa6 »
2014-06-22 Support for synchronous + asynchronous tags file updates (huge refact…
65 ### The `g:easytags_async` option
66
67 By default vim-easytags runs Exuberant Ctags and updates your tags file in the foreground, blocking Vim in the process. As your tags files get larger this becomes more annoying. It has been the number one complaint about vim-easytags since I published the first release online.
68
69 In version 3.5 of the vim-easytags plug-in support for asynchronous tags file updates was added. It's not enabled by default yet because I want to make sure I'm not breaking the plug-in for the majority of users. However after I've gathered some feedback I definitely want to make this the default mode.
70
71 By setting this option to true (1) you enable asynchronous tags file updates. Good luck! ;-)
72
1a09c983 »
2014-07-08 Merge pull request #84: Asynchronous tags file updates! \o/
73 Note that asynchronous updates on Windows currently require the installation of my [vim-shell] [shell] plug-in (for obscure technical reasons that I want to fix but don't know how yet).
74
b6f8757d »
2014-07-09 Support for keyword based syntax highlighting (much faster)
75 ### The `g:easytags_syntax_keyword` option
76
77 When you look into how the dynamic syntax highlighting in the vim-easytags plug-in works you'll realize that vim-easytags is really abusing Vim's syntax highlighting engine. This can cause Vim to slow down to a crawl, depending on how big your tags files are. To make things worse in Vim 7.4 a new regex engine was introduced which exacerbates the problem (the patterns generated by vim-easytags bring out the worst of the new regex engine).
78
79 Since version 3.6 the vim-easytags plug-in tries to squeeze as much performance as possible out of Vim by using keyword highlighting where this is possible without sacrificing accuracy. If your Vim's syntax highlighting is still too slow you can add the following to your [vimrc script] [vimrc]:
80
81 let g:easytags_syntax_keyword = 'always'
82
83 The default value of this option is 'auto' which means to use keyword highlighting where this is possible without sacrificing accuracy. By changing it to 'always' you're telling vim-easytags to sacrifice accuracy in order to gain performance. Try it out and see what works best for you.
84
85 Please note that right now this 'feature' is not integrated with the "accelerated Python syntax highlighting" feature, because I'm considering ripping that out and replacing it with a *fast* Vim script implementation.
86
ebe2ba9a »
2013-04-19 Move g:easytags_languages documentation to README.md
87 ### The `g:easytags_languages` option
88
89 Exuberant Ctags supports many languages and can be extended via regular expression patterns, but for some languages separate tools with ctags-compatible output exist (e.g. [jsctags] [jsctags] for Javascript). To use these, the executable and its arguments must be configured:
90
91 let g:easytags_languages = {
92 \ 'language': {
93 \ 'cmd': g:easytags_cmd,
94 \ 'args': [],
95 \ 'fileoutput_opt': '-f',
96 \ 'stdout_opt': '-f-',
97 \ 'recurse_flag': '-R'
98 \ }
99 \}
100
27c29aa6 »
2014-06-22 Support for synchronous + asynchronous tags file updates (huge refact…
101 Each key is a special language definition. The key is a Vim file type in lowercase. The above snippet shows the defaults; you only need to specify options that differ.
ebe2ba9a »
2013-04-19 Move g:easytags_languages documentation to README.md
102
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
103 ### The `g:easytags_file` option
0c57fc83 »
2010-06-06 Initial commit
104
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
105 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.:
0c57fc83 »
2010-06-06 Initial commit
106
107 :let g:easytags_file = '~/.vim/tags'
108
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
109 A leading `~` in the `g:easytags_file` variable is expanded to your current home directory (`$HOME` on UNIX, `%USERPROFILE%` on Windows).
0c57fc83 »
2010-06-06 Initial commit
110
670910e8 »
2011-05-02 Enable updating of project specific tags files
111 ### The `g:easytags_dynamic_files` option
112
fae8ddd3 »
2011-09-05 Improve easytags_dynamic_files implementation (best of both worlds?)
113 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]:
670910e8 »
2011-05-02 Enable updating of project specific tags files
114
115 :set tags=./tags;
116 :let g:easytags_dynamic_files = 1
117
fae8ddd3 »
2011-09-05 Improve easytags_dynamic_files implementation (best of both worlds?)
118 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).
119
1aae392a »
2013-04-30 Don't try to use dynamic tags files for non-writable directories (issue
120 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. In this mode the the global tags file or file type specific tags files are only used for directories where you don't have write permissions.
670910e8 »
2011-05-02 Enable updating of project specific tags files
121
fae8ddd3 »
2011-09-05 Improve easytags_dynamic_files implementation (best of both worlds?)
122 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.
d727ac0c » Kenny Stuart
2011-06-24 Allow enabling both dynamic and file type tags files
123
4df41ade »
2011-06-13 Basic support for file type specific tags files!
124 ### The `g:easytags_by_filetype` option
125
126 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.
127
128 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.
129
d2a2cb54 »
2011-08-31 Make "easytags_dynamic_files" create missing tags files
130 Note that the `g:easytags_dynamic_files` option takes precedence over this option.
d727ac0c » Kenny Stuart
2011-06-24 Allow enabling both dynamic and file type tags files
131
d2a2cb54 »
2011-08-31 Make "easytags_dynamic_files" create missing tags files
132 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`.
1194a6b8 »
2011-06-13 :TagsByFileType to create filetype specific tagsfiles from global tag…
133
4a30d880 »
2013-05-20 Document the g:easytags_events option (issue #46)
134 ### The `g:easytags_events` option
135
136 This option can be used to customize the events that trigger the automatic updating and highlighting performed by the easytags plug-in. The `g:easytags_always_enabled` and `g:easytags_on_cursorhold` options are more user friendly but limited ways to accomplish the same thing.
137
138 Here's an example: Say you want the easytags plug-in to automatically update & highlight tags for the current file right after you save the file. You can accomplish this by adding the following line to your [vimrc script] [vimrc]:
139
140 :let g:easytags_events = ['BufWritePost']
141
142 Note that if you set `g:easytags_events` in your [vimrc script] [vimrc], the values of the options `g:easytags_always_enabled` and `g:easytags_on_cursorhold` will be ignored completely.
143
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
144 ### The `g:easytags_always_enabled` option
0c57fc83 »
2010-06-06 Initial commit
145
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
146 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:
0c57fc83 »
2010-06-06 Initial commit
147
148 :let g:easytags_always_enabled = 1
149
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
150 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!
0c57fc83 »
2010-06-06 Initial commit
151
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
152 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].
0c57fc83 »
2010-06-06 Initial commit
153
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
154 ### The `g:easytags_on_cursorhold` option
0c57fc83 »
2010-06-06 Initial commit
155
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
156 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:
0c57fc83 »
2010-06-06 Initial commit
157
158 :let g:easytags_on_cursorhold = 0
159
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
160 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].
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
161
100bd8df »
2011-09-17 New g:easytags_updatetime_autodisable option (issue #17, reported by …
162 ### The `g:easytags_updatetime_min` option
163
27c29aa6 »
2014-06-22 Support for synchronous + asynchronous tags file updates (huge refact…
164 Vim's ['updatetime'] [updatetime] option controls how often the easytags plug-in is automatically executed. A lot of popular Vim plug-ins manipulate this option to control how often they are called. Unfortunately some of those plug-ins set ['updatetime'] [updatetime] to a very low value (less than a second) and this can break the easytags plug-in. Because of this the easytags plug-in compensates by keeping track of when it was last executed.
384ebf41 »
2013-05-19 Add g:easytags_updatetime_warn option, improve documentation (issue #47)
165
166 The default value of Vim's ['updatetime] [updatetime] option *and* the `g:easytags_updatetime_min` option is 4000 milliseconds (4 seconds).
167
168 If you know what you're doing and you really want the easytags plug-in to be executed more than once every 4 seconds you can lower the minimum acceptable updatetime by setting `g:easytags_updatetime_min` to the number of milliseconds (an integer).
169
170 Note that although `g:easytags_updatetime_min` counts in milliseconds, the easytags plug-in does not support subsecond granularity because it is limited by Vim's [localtime()] [localtime] function which has one-second resolution.
171
67616b25 »
2011-06-26 Add easytags_auto_update/auto_highlight options
172 ### The `g:easytags_auto_update` option
173
174 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:
175
176 :let g:easytags_auto_update = 0
177
178 ### The `g:easytags_auto_highlight` option
179
180 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:
181
182 :let g:easytags_auto_highlight = 0
183
0d956790 »
2010-08-10 Support for automatic recursion using ctags -R
184 ### The `g:easytags_autorecurse` option
185
186 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):
187
188 :let g:easytags_autorecurse = 1
189
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
190 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...
0d956790 »
2010-08-10 Support for automatic recursion using ctags -R
191
a536d774 »
2010-08-10 Typo in g:easytags_autorecurse documentation
192 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.
0d956790 »
2010-08-10 Support for automatic recursion using ctags -R
193
2f73c57c »
2010-08-11 Support scanning & highlighting of struct/class members
194 ### The `g:easytags_include_members` option
195
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
196 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):
2f73c57c »
2010-08-11 Support scanning & highlighting of struct/class members
197
198 :let g:easytags_include_members = 1
199
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
200 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.):
2f73c57c »
2010-08-11 Support scanning & highlighting of struct/class members
201
202 " If you like one of the existing styles you can link them:
203 highlight link cMember Special
204
205 " You can also define your own style if you want:
206 highlight cMember gui=italic
207
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
208 ### The `g:easytags_resolve_links` option
0c57fc83 »
2010-06-06 Initial commit
209
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
210 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:
0c57fc83 »
2010-06-06 Initial commit
211
a40a5565 »
2010-06-06 Made README more consistent
212 :let g:easytags_resolve_links = 1
0c57fc83 »
2010-06-06 Initial commit
213
6e279a38 » blueyed
2011-03-19 Add g:easytags_suppress_ctags_warning option
214 ### The `g:easytags_suppress_ctags_warning` option
215
216 If this is set and not false, it will suppress the warning on startup if ctags is not found or not recent enough.
217
218 :let g:easytags_suppress_ctags_warning = 1
219
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
220 ## Customizing the easytags plug-in
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
221
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
222 Advanced users may wish to customize how the easytags plug-in works beyond the point of changing configuration defaults. This section contains some hints about this. If you have suggestions, please feel free to submit them.
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
223
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
224 ### Passing custom command line arguments to Exuberant Ctags
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
225
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
226 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.
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
227
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
228 ### Update & highlight tags immediately after save
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
229
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
230 By default the easytags plug-in automatically updates & highlights tags for the current file after several seconds of inactivity. This is done to prevent the easytags plug-in from interrupting your workflow.
231
232 If you want the easytags plug-in to automatically update & highlight tags for the current file right after you save the file, you can add the following line to your [vimrc script] [vimrc]:
9abe3487 »
2011-06-14 2x faster syntax highlighting using Python Interface to Vim :-)
233
4a30d880 »
2013-05-20 Document the g:easytags_events option (issue #46)
234 :let g:easytags_events = ['BufWritePost']
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
235
236 ### How to customize the highlighting colors?
2a2cba0e »
2011-02-24 Document the highlighting groups used by the plug-in
237
238 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:
239
3d7e0910 »
2011-10-01 Bump version + minor updates for Awk, Shell & TCL support
240 * **AWK**: `awkFunctionTag`
241 * **C#:** `csClassOrStructTag`, `csMethodTag`
242 * **C, C++, Objective C:** `cTypeTag`, `cEnumTag`, `cPreProcTag`, `cFunctionTag`, `cMemberTag`
fddbe787 »
2013-07-16 Merge pull request #59: Java interfaces support
243 * **Java:** `javaClassTag`, `javaInterfaceTag`, `javaMethodTag`
2a2cba0e »
2011-02-24 Document the highlighting groups used by the plug-in
244 * **Lua:** `luaFuncTag`
245 * **PHP:** `phpFunctionsTag`, `phpClassesTag`
246 * **Python:** `pythonFunctionTag`, `pythonMethodTag`, `pythonClassTag`
45e97ff1 »
2011-05-23 Dynamic highlighting for Ruby source code (issue #9)
247 * **Ruby:** `rubyModuleNameTag`, `rubyClassNameTag`, `rubyMethodNameTag`
3d7e0910 »
2011-10-01 Bump version + minor updates for Awk, Shell & TCL support
248 * **Shell**: `shFunctionTag`
249 * **Tcl**: `tclCommandTag`
250 * **Vim:** `vimAutoGroupTag`, `vimCommandTag`, `vimFuncNameTag`, `vimScriptFuncNameTag`
2a2cba0e »
2011-02-24 Document the highlighting groups used by the plug-in
251
252 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).
253
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
254 ## Faster syntax highlighting using Python
255
256 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.
46d87b30 »
2011-07-09 Explain how to setup custom ctags command line options
257
cad39a99 »
2013-05-19 Document BufWritePost example, improve documentation structure (issue #…
258 ### The `g:easytags_python_enabled` option
259
260 To disable the Python implementation of dynamic syntax highlighting you can set this option to false (0).
261
262 ### The `g:easytags_python_script` option
263
264 This option defines the pathname of the script that contains the Python implementation of dynamic syntax highlighting.
46d87b30 »
2011-07-09 Explain how to setup custom ctags command line options
265
0c57fc83 »
2010-06-06 Initial commit
266 ## Troubleshooting
267
738d7508 »
2010-08-12 Documented :HighlightTags tags file format requirements
268 ### `:HighlightTags` only works for the tags file created by `:UpdateTags`
269
270 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:
271
272 $ ctags --fields=+l --c-kinds=+p --c++-kinds=+p ...
273
274 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.
275
276 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.
277
8fe189c6 »
2010-06-15 Mention version detection in README
278 ### The plug-in complains that Exuberant Ctags isn't installed
279
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
280 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:
8fe189c6 »
2010-06-15 Mention version detection in README
281
282 easytags.vim: Plug-in not loaded because Exuberant Ctags isn't installed!
283 Please download & install Exuberant Ctags from http://ctags.sf.net
284
285 If the installed Exuberant Ctags version is too old the plug-in will complain:
286
287 easytags.vim: Plug-in not loaded because Exuberant Ctags 5.5
288 or newer is required while you have version %s installed!
289
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
290 If you have the right version of Exuberant Ctags installed but the plug-in still complains, try executing the following command from inside Vim:
8fe189c6 »
2010-06-15 Mention version detection in README
291
292 :!which ctags
293
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
294 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.
8fe189c6 »
2010-06-15 Mention version detection in README
295
296 ### Vim locks up while the plug-in is running
297
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
298 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):
0c57fc83 »
2010-06-06 Initial commit
299
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
300 $ pkill -KILL ctags
0c57fc83 »
2010-06-06 Initial commit
301
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
302 If Vim seems very slow and you suspect this plug-in might be the one to blame, increase Vim's verbosity level:
0c57fc83 »
2010-06-06 Initial commit
303
304 :set vbs=1
305
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
306 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.
0c57fc83 »
2010-06-06 Initial commit
307
92cd87df »
2010-07-10 Handle patterns that are too large for Vim to evaluate
308 ### Failed to highlight tags because pattern is too big!
309
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
310 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...
92cd87df »
2010-07-10 Handle patterns that are too large for Vim to evaluate
311
5207365a »
2011-06-27 Fix broken link in README
312 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:
92cd87df »
2010-07-10 Handle patterns that are too large for Vim to evaluate
313
314 :set tags=./.tags;,~/.vimtags
315
89f9205f »
2010-08-09 Enable commands like :UpdateTags -R ~/.vim
316 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.
92cd87df »
2010-07-10 Handle patterns that are too large for Vim to evaluate
317
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
318 ### The plug-in doesn't seem to work in Cygwin
ea6efd67 »
2011-02-24 Added caveat about Cygwin, updated to-do list
319
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
320 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!).
ea6efd67 »
2011-02-24 Added caveat about Cygwin, updated to-do list
321
0c57fc83 »
2010-06-06 Initial commit
322 ## Contact
323
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
324 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].
0c57fc83 »
2010-06-06 Initial commit
325
326 ## License
327
5f17a01f »
2014-07-08 Credit Ingo for his work, thank other contributors as well
328 This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License).
329 © 2014 Peter Odding &lt;<peter@peterodding.com>&gt; and Ingo Karkat.
330
331 Thanks go out to everyone who has helped to improve the vim-easytags plug-in (whether through pull requests, bug reports or personal e-mails).
0c57fc83 »
2010-06-06 Initial commit
332
333
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
334 [canon]: http://en.wikipedia.org/wiki/Canonicalization
46d87b30 »
2011-07-09 Explain how to setup custom ctags command line options
335 [code_complete]: http://www.vim.org/scripts/script.php?script_id=1764
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
336 [ctags]: http://en.wikipedia.org/wiki/Ctags
46d87b30 »
2011-07-09 Explain how to setup custom ctags command line options
337 [ctags_cfg]: http://ctags.sourceforge.net/ctags.html#FILES
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
338 [ctags_fts]: http://ctags.sourceforge.net/languages.html
339 [ctrl_c]: http://vimdoc.sourceforge.net/htmldoc/pattern.html#CTRL-C
340 [ctrl_mapping]: http://vimdoc.sourceforge.net/htmldoc/tagsrch.html#CTRL-]
341 [cursorhold]: http://vimdoc.sourceforge.net/htmldoc/autocmd.html#CursorHold
342 [cygwin]: http://en.wikipedia.org/wiki/Cygwin
343 [dll]: http://en.wikipedia.org/wiki/Dynamic-link_library
7916b461 »
2013-05-25 Document vim-misc as external dependency (needs to be installed separ…
344 [download-easytags]: http://peterodding.com/code/vim/downloads/easytags.zip
345 [download-misc]: http://peterodding.com/code/vim/downloads/misc.zip
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
346 [e339]: http://vimdoc.sourceforge.net/htmldoc/message.html#E339
347 [exctags]: http://ctags.sourceforge.net/
7916b461 »
2013-05-25 Document vim-misc as external dependency (needs to be installed separ…
348 [github-easytags]: http://github.com/xolox/vim-easytags
349 [github-misc]: http://github.com/xolox/vim-misc
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
350 [hlinks]: http://en.wikipedia.org/wiki/Hard_link
351 [ide]: http://en.wikipedia.org/wiki/Integrated_development_environment
ebe2ba9a »
2013-04-19 Move g:easytags_languages documentation to README.md
352 [jsctags]: https://npmjs.org/package/jsctags
384ebf41 »
2013-05-19 Add g:easytags_updatetime_warn option, improve documentation (issue #47)
353 [localtime]: http://vimdoc.sourceforge.net/htmldoc/eval.html#localtime()
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
354 [messages]: http://vimdoc.sourceforge.net/htmldoc/message.html#:messages
100bd8df »
2011-09-17 New g:easytags_updatetime_autodisable option (issue #17, reported by …
355 [neocomplcache]: http://www.vim.org/scripts/script.php?script_id=2620
7916b461 »
2013-05-25 Document vim-misc as external dependency (needs to be installed separ…
356 [pathogen]: http://www.vim.org/scripts/script.php?script_id=2332
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
357 [shell]: http://peterodding.com/code/vim/shell/
358 [slinks]: http://en.wikipedia.org/wiki/Symbolic_link
359 [syn_groups]: http://vimdoc.sourceforge.net/htmldoc/syntax.html#group-name
7e8533fc »
2010-08-09 Automatic/optional integration with shell.vim
360 [system]: http://vimdoc.sourceforge.net/htmldoc/eval.html#system%28%29
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
361 [tagfiles_fun]: http://vimdoc.sourceforge.net/htmldoc/eval.html#tagfiles%28%29
362 [tags_opt]: http://vimdoc.sourceforge.net/htmldoc/options.html#%27tags%27
363 [unlet]: http://vimdoc.sourceforge.net/htmldoc/eval.html#:unlet
100bd8df »
2011-09-17 New g:easytags_updatetime_autodisable option (issue #17, reported by …
364 [updatetime]: http://vimdoc.sourceforge.net/htmldoc/options.html#'updatetime'
f0f0513c »
2011-06-27 Change inline hyper links in README to reference style
365 [vim]: http://www.vim.org/
366 [vim_fts]: http://ftp.vim.org/vim/runtime/syntax/
367 [vim_online]: http://www.vim.org/scripts/script.php?script_id=3114
726c08bf »
2010-07-10 Improved README, added references to Vim documentation
368 [vimrc]: http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
7916b461 »
2013-05-25 Document vim-misc as external dependency (needs to be installed separ…
369 [vundle]: https://github.com/gmarik/vundle
Something went wrong with that request. Please try again.