From b6f8757d004d5f4ef7280fd111a21821e6bee79a Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Wed, 9 Jul 2014 01:37:43 +0200 Subject: Support for keyword based syntax highlighting (much faster) See the following issues on GitHub: - https://github.com/xolox/vim-easytags/issues/68 - https://github.com/xolox/vim-easytags/pull/80 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 (if I can build one :-). --- doc/easytags.txt | 55 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 14 deletions(-) (limited to 'doc') diff --git a/doc/easytags.txt b/doc/easytags.txt index 24c3fe4..f1f9820 100644 --- a/doc/easytags.txt +++ b/doc/easytags.txt @@ -12,20 +12,21 @@ Contents ~ 4. Options |easytags-options| 1. The |g:easytags_cmd| option 2. The |g:easytags_async| option - 3. The |g:easytags_languages| option - 4. The |g:easytags_file| option - 5. The |g:easytags_dynamic_files| option - 6. The |g:easytags_by_filetype| option - 7. The |g:easytags_events| option - 8. The |g:easytags_always_enabled| option - 9. The |g:easytags_on_cursorhold| option - 10. The |g:easytags_updatetime_min| 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 + 3. The |g:easytags_syntax_keyword| option + 4. The |g:easytags_languages| option + 5. The |g:easytags_file| option + 6. The |g:easytags_dynamic_files| option + 7. The |g:easytags_by_filetype| option + 8. The |g:easytags_events| option + 9. The |g:easytags_always_enabled| option + 10. The |g:easytags_on_cursorhold| option + 11. The |g:easytags_updatetime_min| option + 12. The |g:easytags_auto_update| option + 13. The |g:easytags_auto_highlight| option + 14. The |g:easytags_autorecurse| option + 15. The |g:easytags_include_members| option + 16. The |g:easytags_resolve_links| option + 17. The |g:easytags_suppress_ctags_warning| option 5. Customizing the easytags plug-in |customizing-easytags-plug-in| 1. Passing custom command line arguments to Exuberant Ctags |easytags-passing-custom-command-line-arguments-to-exuberant-ctags| 2. Update & highlight tags immediately after save |easytags-update-highlight-tags-immediately-after-save| @@ -203,6 +204,32 @@ Note that asynchronous updates on Windows currently require the installation of my vim-shell [12] plug-in (for obscure technical reasons that I want to fix but don't know how yet). +------------------------------------------------------------------------------- +The *g:easytags_syntax_keyword* option + +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). + +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: +> + let g:easytags_syntax_keyword = 'always' +< +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. + +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. + ------------------------------------------------------------------------------- The *g:easytags_languages* option -- cgit v1.2.3