aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2014-09-17 22:31:52 +0200
committerPeter Odding <peter@peterodding.com>2014-09-17 22:31:52 +0200
commitd251fdb37c9cf71d569073621e277ddf6c392f02 (patch)
tree1cec97c5a1ff4e5be5429ca83794dea3d22e2571
parentb4d5dd6e12c8b158d8f0598ba98a45650b6fc956 (diff)
downloadvim-easytags-d251fdb37c9cf71d569073621e277ddf6c392f02.tar.gz
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
-rw-r--r--README.md5
-rw-r--r--autoload/xolox/easytags.vim14
-rw-r--r--doc/easytags.txt11
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 <peter@peterodding.com>
-" 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': '\%(\<sub\s\+\)\@<!\<'})
+
+highlight def link perlFunctionTag Operator
+
" }}}
" Restore "cpoptions".
diff --git a/doc/easytags.txt b/doc/easytags.txt
index f07e8cc..d1789a2 100644
--- a/doc/easytags.txt
+++ b/doc/easytags.txt
@@ -84,8 +84,8 @@ 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 [8], Vundle [9] or a similar tool to
-install & update the vim-easytags [10] and vim-misc [11] plug-ins using a local
-clone of the git repository.
+install and update the vim-easytags [10] and vim-misc [11] 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,
@@ -94,9 +94,9 @@ 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.
+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
@@ -527,6 +527,7 @@ by the easytags plug-in:
'cFunctionTag', 'cMemberTag'
- **Java:**'javaClassTag', 'javaInterfaceTag', 'javaMethodTag'
- **Lua:**'luaFuncTag'
+- **Perl:**'perlFunctionTag'
- **PHP:**'phpFunctionsTag', 'phpClassesTag'
- **Python:**'pythonFunctionTag', 'pythonMethodTag', 'pythonClassTag'
- **Ruby:**'rubyModuleNameTag', 'rubyClassNameTag', 'rubyMethodNameTag'