aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2013-05-19 14:27:40 +0200
committerPeter Odding <peter@peterodding.com>2013-05-19 14:27:40 +0200
commitcad39a99417bcd7c70b63da7a0c5ccb4c9d8cd9c (patch)
treec00947a80ca573f92d82cb723959fa608a4fdd03 /README.md
parent384ebf413dac9739d15857bf5a51c05e9c91d514 (diff)
downloadvim-easytags-cad39a99417bcd7c70b63da7a0c5ccb4c9d8cd9c.tar.gz
Document BufWritePost example, improve documentation structure (issue #46)
Issue #46 on GitHub: https://github.com/xolox/vim-easytags/issues/46
Diffstat (limited to 'README.md')
-rw-r--r--README.md30
1 files changed, 21 insertions, 9 deletions
diff --git a/README.md b/README.md
index d29492d..92248ec 100644
--- a/README.md
+++ b/README.md
@@ -193,19 +193,23 @@ If this is set and not false, it will suppress the warning on startup if ctags i
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`.
-## Faster syntax highlighting using Python
+## Customizing the easytags plug-in
-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.
+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.
-### The `g:easytags_python_enabled` option
+### Passing custom command line arguments to Exuberant Ctags
-To disable the Python implementation of dynamic syntax highlighting you can set this option to false (0).
+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.
-### The `g:easytags_python_script` option
+### Update & highlight tags immediately after save
-This option defines the pathname of the script that contains the Python implementation of dynamic syntax highlighting.
+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.
+
+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]:
-## How to customize the highlighting colors?
+ :autocmd BufWritePost * call xolox#easytags#autoload('BufWritePost')
+
+### How to customize the highlighting colors?
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:
@@ -223,9 +227,17 @@ The easytags plug-in defines new highlighting groups for dynamically highlighted
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).
-## Passing custom command line arguments to Exuberant Ctags
+## Faster syntax highlighting using Python
+
+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.
-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.
+### The `g:easytags_python_enabled` option
+
+To disable the Python implementation of dynamic syntax highlighting you can set this option to false (0).
+
+### The `g:easytags_python_script` option
+
+This option defines the pathname of the script that contains the Python implementation of dynamic syntax highlighting.
## Troubleshooting