aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2013-05-20 01:13:15 +0200
committerPeter Odding <peter@peterodding.com>2013-05-20 01:13:15 +0200
commit4a30d880368c08732fd89657f7a0c3679c00b654 (patch)
tree4bdab03860dd93153ea37cb633a963cafd975f2c
parente83117d0260a0fc30c3f6bf884e23f0805affa4b (diff)
downloadvim-easytags-4a30d880368c08732fd89657f7a0c3679c00b654.tar.gz
Document the g:easytags_events option (issue #46)
Issue #46 on GitHub: https://github.com/xolox/vim-easytags/issues/46
-rw-r--r--README.md12
-rw-r--r--doc/easytags.txt43
2 files changed, 42 insertions, 13 deletions
diff --git a/README.md b/README.md
index 92248ec..688c7b7 100644
--- a/README.md
+++ b/README.md
@@ -105,6 +105,16 @@ Note that the `g:easytags_dynamic_files` option takes precedence over this optio
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`.
+### The `g:easytags_events` option
+
+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.
+
+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]:
+
+ :let g:easytags_events = ['BufWritePost']
+
+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.
+
### The `g:easytags_always_enabled` option
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:
@@ -207,7 +217,7 @@ By default the easytags plug-in automatically updates & highlights tags for the
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]:
- :autocmd BufWritePost * call xolox#easytags#autoload('BufWritePost')
+ :let g:easytags_events = ['BufWritePost']
### How to customize the highlighting colors?
diff --git a/doc/easytags.txt b/doc/easytags.txt
index f6edef1..1e134c9 100644
--- a/doc/easytags.txt
+++ b/doc/easytags.txt
@@ -16,17 +16,18 @@ Contents ~
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_warn| 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
+ 6. The |g:easytags_events| option
+ 7. The |g:easytags_always_enabled| option
+ 8. The |g:easytags_on_cursorhold| option
+ 9. The |g:easytags_updatetime_min| option
+ 10. The |g:easytags_updatetime_warn| option
+ 11. The |g:easytags_auto_update| option
+ 12. The |g:easytags_auto_highlight| option
+ 13. The |g:easytags_autorecurse| option
+ 14. The |g:easytags_include_members| option
+ 15. The |g:easytags_resolve_links| option
+ 16. The |g:easytags_suppress_ctags_warning| option
+ 17. The |g:easytags_ignored_syntax_groups| option
5. Customizing the easytags plug-in |customizing-easytags-plug-in|
1. Passing custom command line arguments to Exuberant Ctags
2. Update & highlight tags immediately after save
@@ -258,6 +259,24 @@ 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'.
-------------------------------------------------------------------------------
+The *g:easytags_events* option
+
+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.
+
+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:
+>
+ :let g:easytags_events = ['BufWritePost']
+
+Note that if you set |g:easytags_events| in your |vimrc| script, the values of
+the options |g:easytags_always_enabled| and |g:easytags_on_cursorhold| will be
+ignored completely.
+
+-------------------------------------------------------------------------------
The *g:easytags_always_enabled* option
By default the plug-in automatically generates and highlights tags when you
@@ -453,7 +472,7 @@ 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:
>
- :autocmd BufWritePost * call xolox#easytags#autoload('BufWritePost')
+ :let g:easytags_events = ['BufWritePost']
-------------------------------------------------------------------------------
How to customize the highlighting colors? ~