Permalink
Browse files

Move g:easytags_languages documentation to README.md

Integration of pull request #40:
#40
  • Loading branch information...
1 parent dc05bed commit ebe2ba9aedafeac5ffc19b52e9f6cf0d994e5726 @xolox committed Apr 18, 2013
Showing with 70 additions and 46 deletions.
  1. +21 −0 README.md
  2. +1 −1 autoload/xolox/easytags.vim
  3. +48 −45 doc/easytags.txt
View
@@ -54,6 +54,26 @@ The plug-in will try to determine the location where Exuberant Ctags is installe
:let g:easytags_cmd = '/usr/local/bin/ctags'
+If you rely entirely on language-specific configuration and don't have a general ctags program, set this to the empty string.
+
+### The `g:easytags_languages` option
+
+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:
+
+ let g:easytags_languages = {
+ \ 'language': {
+ \ 'cmd': g:easytags_cmd,
+ \ 'args': [],
+ \ 'fileoutput_opt': '-f',
+ \ 'stdout_opt': '-f-',
+ \ 'recurse_flag': '-R'
+ \ }
+ \}
+
+Each key is a special language definition. The key is in the notation of ctags in lowercase; you still need to use `xolox#easytags#map_filetypes()` to map this to Vim's filetypes, if necessary.
+
+Above snippets shows the defaults; you only need to specify options that differ.
+
### The `g:easytags_file` option
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.:
@@ -278,6 +298,7 @@ This software is licensed under the [MIT license](http://en.wikipedia.org/wiki/M
[exctags]: http://ctags.sourceforge.net/
[hlinks]: http://en.wikipedia.org/wiki/Hard_link
[ide]: http://en.wikipedia.org/wiki/Integrated_development_environment
+[jsctags]: https://npmjs.org/package/jsctags
[messages]: http://vimdoc.sourceforge.net/htmldoc/message.html#:messages
[neocomplcache]: http://www.vim.org/scripts/script.php?script_id=2620
[shell]: http://peterodding.com/code/vim/shell/
@@ -3,7 +3,7 @@
" Last Change: April 19, 2013
" URL: http://peterodding.com/code/vim/easytags/
-let g:xolox#easytags#version = '2.9'
+let g:xolox#easytags#version = '3.0'
" Public interface through (automatic) commands. {{{1
View
@@ -12,20 +12,21 @@ Contents ~
2. The |:HighlightTags| command
4. Options |easytags-options|
1. The |g:easytags_cmd| option
- 2. The |g:easytags_file| option
- 3. The |g:easytags_dynamic_files| option
- 4. The |g:easytags_by_filetype| option
- 5. The |g:easytags_always_enabled| option
- 6. The |g:easytags_on_cursorhold| option
- 7. The |g:easytags_updatetime_min| option
- 8. The |g:easytags_updatetime_autodisable| option
- 9. The |g:easytags_auto_update| option
- 10. The |g:easytags_auto_highlight| option
- 11. The |g:easytags_autorecurse| option
- 12. The |g:easytags_include_members| option
- 13. The |g:easytags_resolve_links| option
- 14. The |g:easytags_suppress_ctags_warning| option
- 15. The |g:easytags_ignored_syntax_groups| option
+ 2. The |g:easytags_languages| option
+ 3. The |g:easytags_file| option
+ 4. The |g:easytags_dynamic_files| option
+ 5. The |g:easytags_by_filetype| option
+ 6. The |g:easytags_always_enabled| option
+ 7. The |g:easytags_on_cursorhold| option
+ 8. The |g:easytags_updatetime_min| option
+ 9. The |g:easytags_updatetime_autodisable| option
+ 10. The |g:easytags_auto_update| option
+ 11. The |g:easytags_auto_highlight| option
+ 12. The |g:easytags_autorecurse| option
+ 13. The |g:easytags_include_members| option
+ 14. The |g:easytags_resolve_links| option
+ 15. The |g:easytags_suppress_ctags_warning| option
+ 16. The |g:easytags_ignored_syntax_groups| option
5. Faster syntax highlighting using Python |easytags-faster-syntax-highlighting-using-python|
1. The |g:easytags_python_enabled| option
2. The |g:easytags_python_script| option
@@ -169,30 +170,31 @@ where you've installed Exuberant Ctags, e.g.:
>
:let g:easytags_cmd = '/usr/local/bin/ctags'
-If you entirely rely on language-specific configuration and don't have a
+If you rely entirely on language-specific configuration and don't have a
general ctags program, set this to the empty string.
-------------------------------------------------------------------------------
The *g:easytags_languages* option
-The Exuberant Ctags tools supports many languages and can be extended via
-regexp patterns, but for some languages, separate tools with ctags-compatible
-output exist (e.g. jsctags for Javascript). To use these, the executable and
-its arguments must be configured. >
-
+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 [9] for Javascript). To use these,
+the executable and its arguments must be configured:
+>
let g:easytags_languages = {
\ 'language': {
- \ 'cmd': g:easytags_cmd,
- \ 'args': [],
- \ 'fileoutput_opt': '-f',
- \ 'stdout_opt': '-f-',
- \ 'recurse_flag': '-R'
+ \ 'cmd': g:easytags_cmd,
+ \ 'args': [],
+ \ 'fileoutput_opt': '-f',
+ \ 'stdout_opt': '-f-',
+ \ 'recurse_flag': '-R'
\ }
\}
-Each key is a special language definition. The key is in the notation of
-ctags in lowercase; you still need to use xolox#easytags#map_filetypes() to
-map this to Vim's filetypes, if necessary.
+Each key is a special language definition. The key is in the notation of ctags
+in lowercase; you still need to use 'xolox#easytags#map_filetypes()' to map
+this to Vim's filetypes, if necessary.
+
Above snippets shows the defaults; you only need to specify options that
differ.
@@ -300,7 +302,7 @@ this option (number of milliseconds).
The *g:easytags_updatetime_autodisable* option
Other plug-ins may lower the |'updatetime'| value in certain contexts, e.g.
-insert mode in the case of the neocomplcache [9] plug-in. By setting this
+insert mode in the case of the neocomplcache [10] 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
@@ -372,14 +374,14 @@ your vimrc script, a file type plug-in, etc.):
-------------------------------------------------------------------------------
The *g:easytags_resolve_links* option
-UNIX has symbolic links [10] and hard links [11], both of which conflict with
+UNIX has symbolic links [11] and hard links [12], 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 [12]. To enable this option (which I strongly suggest doing when you
+pathnames [13]. To enable this option (which I strongly suggest doing when you
run UNIX and use symbolic links) execute the following Vim command:
>
:let g:easytags_resolve_links = 1
@@ -463,11 +465,11 @@ modes (except of course for the 'Tag' suffix).
Passing custom command line arguments to Exuberant Ctags ~
You may want to run Exuberant Ctags with specific command line options, for
-example the code_complete [13] plug-in requires the signature field to be
+example the code_complete [14] 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 [14] for details.
+manual [15] for details.
===============================================================================
*easytags-troubleshooting*
@@ -567,7 +569,7 @@ project directories.
-------------------------------------------------------------------------------
The plug-in doesn't seem to work in Cygwin ~
-If you want to use the plug-in with Vim under Cygwin [15], you need to have
+If you want to use the plug-in with Vim under Cygwin [16], you need to have
the Cygwin version of Ctags installed instead of the Windows version (thanks
to Alex Zuroff for reporting this!).
@@ -578,13 +580,13 @@ Contact ~
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 [16].
+If you like this plug-in please vote for it on Vim Online [17].
===============================================================================
*easytags-license*
License ~
-This software is licensed under the MIT license [17]. Copyright 2011 Peter
+This software is licensed under the MIT license [18]. Copyright 2011 Peter
Odding <peter@peterodding.com>.
===============================================================================
@@ -599,14 +601,15 @@ References ~
[6] http://peterodding.com/code/vim/downloads/easytags.zip
[7] http://peterodding.com/code/vim/shell/
[8] http://en.wikipedia.org/wiki/Dynamic-link_library
-[9] http://www.vim.org/scripts/script.php?script_id=2620
-[10] http://en.wikipedia.org/wiki/Symbolic_link
-[11] http://en.wikipedia.org/wiki/Hard_link
-[12] http://en.wikipedia.org/wiki/Canonicalization
-[13] http://www.vim.org/scripts/script.php?script_id=1764
-[14] http://ctags.sourceforge.net/ctags.html#FILES
-[15] http://en.wikipedia.org/wiki/Cygwin
-[16] http://www.vim.org/scripts/script.php?script_id=3114
-[17] http://en.wikipedia.org/wiki/MIT_License
+[9] https://npmjs.org/package/jsctags
+[10] http://www.vim.org/scripts/script.php?script_id=2620
+[11] http://en.wikipedia.org/wiki/Symbolic_link
+[12] http://en.wikipedia.org/wiki/Hard_link
+[13] http://en.wikipedia.org/wiki/Canonicalization
+[14] http://www.vim.org/scripts/script.php?script_id=1764
+[15] http://ctags.sourceforge.net/ctags.html#FILES
+[16] http://en.wikipedia.org/wiki/Cygwin
+[17] http://www.vim.org/scripts/script.php?script_id=3114
+[18] http://en.wikipedia.org/wiki/MIT_License
vim: ft=help

0 comments on commit ebe2ba9

Please sign in to comment.