From d251fdb37c9cf71d569073621e277ddf6c392f02 Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Wed, 17 Sep 2014 22:31:52 +0200 Subject: Support for Perl highlighting (thanks to Jessica Kathleen McIntosh, see issue #97) See issue #97 on GitHub: https://github.com/xolox/vim-easytags/issues/97 --- README.md | 5 +++-- autoload/xolox/easytags.vim | 14 ++++++++++++-- doc/easytags.txt | 11 ++++++----- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 46e8de3..29ad0e5 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ There's just one problem: You have to manually keep your tags files up-to-date a 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). -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. +If you prefer you can also use [Pathogen] [pathogen], [Vundle] [vundle] or a similar tool to install and update the [vim-easytags] [github-easytags] and [vim-misc] [github-misc] plug-ins using a local clone of the git repository. 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! -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. +Additionally if the file you just opened is an AWK, C#, C, C++, Objective-C, Java, Lua, Perl, PHP, Python, Ruby, Shell, Tcl or Vim source file you should also notice that the function and/or type names defined in the file have been syntax highlighted. 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. @@ -248,6 +248,7 @@ The easytags plug-in defines new highlighting groups for dynamically highlighted * **C, C++, Objective C:** `cTypeTag`, `cEnumTag`, `cPreProcTag`, `cFunctionTag`, `cMemberTag` * **Java:** `javaClassTag`, `javaInterfaceTag`, `javaMethodTag` * **Lua:** `luaFuncTag` + * **Perl:** `perlFunctionTag` * **PHP:** `phpFunctionsTag`, `phpClassesTag` * **Python:** `pythonFunctionTag`, `pythonMethodTag`, `pythonClassTag` * **Ruby:** `rubyModuleNameTag`, `rubyClassNameTag`, `rubyMethodNameTag` diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 23f6288..7a40980 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -1,9 +1,9 @@ " Vim script " Author: Peter Odding -" Last Change: September 14, 2014 +" Last Change: September 17, 2014 " URL: http://peterodding.com/code/vim/easytags/ -let g:xolox#easytags#version = '3.6.7' +let g:xolox#easytags#version = '3.7' let g:xolox#easytags#default_pattern_prefix = '\C\<' let g:xolox#easytags#default_pattern_suffix = '\>' @@ -826,6 +826,16 @@ call xolox#easytags#define_tagkind({ highlight def link tclCommandTag Operator +" Perl. {{{2 + +call xolox#easytags#define_tagkind({ + \ 'filetype': 'perl', + \ 'hlgroup': 'perlFunctionTag', + \ 'tagkinds': '[s]', + \ 'pattern_prefix': '\%(\