Skip to content

Commit d251fdb

Browse files
committed
Support for Perl highlighting (thanks to Jessica Kathleen McIntosh, see issue #97)
See issue #97 on GitHub: #97
1 parent b4d5dd6 commit d251fdb

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ There's just one problem: You have to manually keep your tags files up-to-date a
1212

1313
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).
1414

15-
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.
15+
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.
1616

1717
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!
1818

19-
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.
19+
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.
2020

2121
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.
2222

@@ -248,6 +248,7 @@ The easytags plug-in defines new highlighting groups for dynamically highlighted
248248
* **C, C++, Objective C:** `cTypeTag`, `cEnumTag`, `cPreProcTag`, `cFunctionTag`, `cMemberTag`
249249
* **Java:** `javaClassTag`, `javaInterfaceTag`, `javaMethodTag`
250250
* **Lua:** `luaFuncTag`
251+
* **Perl:** `perlFunctionTag`
251252
* **PHP:** `phpFunctionsTag`, `phpClassesTag`
252253
* **Python:** `pythonFunctionTag`, `pythonMethodTag`, `pythonClassTag`
253254
* **Ruby:** `rubyModuleNameTag`, `rubyClassNameTag`, `rubyMethodNameTag`

autoload/xolox/easytags.vim

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
" Vim script
22
" Author: Peter Odding <peter@peterodding.com>
3-
" Last Change: September 14, 2014
3+
" Last Change: September 17, 2014
44
" URL: http://peterodding.com/code/vim/easytags/
55

6-
let g:xolox#easytags#version = '3.6.7'
6+
let g:xolox#easytags#version = '3.7'
77
let g:xolox#easytags#default_pattern_prefix = '\C\<'
88
let g:xolox#easytags#default_pattern_suffix = '\>'
99

@@ -826,6 +826,16 @@ call xolox#easytags#define_tagkind({
826826

827827
highlight def link tclCommandTag Operator
828828

829+
" Perl. {{{2
830+
831+
call xolox#easytags#define_tagkind({
832+
\ 'filetype': 'perl',
833+
\ 'hlgroup': 'perlFunctionTag',
834+
\ 'tagkinds': '[s]',
835+
\ 'pattern_prefix': '\%(\<sub\s\+\)\@<!\<'})
836+
837+
highlight def link perlFunctionTag Operator
838+
829839
" }}}
830840

831841
" Restore "cpoptions".

doc/easytags.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ and '%USERPROFILE%\vimfiles' on Windows), restart Vim and execute the command
8484
':helptags ~/.vim/doc' (use ':helptags ~\vimfiles\doc' instead on Windows).
8585

8686
If you prefer you can also use Pathogen [8], Vundle [9] or a similar tool to
87-
install & update the vim-easytags [10] and vim-misc [11] plug-ins using a local
88-
clone of the git repository.
87+
install and update the vim-easytags [10] and vim-misc [11] plug-ins using a
88+
local clone of the git repository.
8989

9090
Now try it out: Edit any file type supported by Exuberant Ctags and within ten
9191
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
9494
local file system), tags will always be available by the time you need them!
9595

9696
Additionally if the file you just opened is an AWK, C#, C, C++, Objective-C,
97-
Java, Lua, PHP, Python, Ruby, Shell, Tcl or Vim source file you should also
98-
notice that the function and type names defined in the file have been syntax
99-
highlighted.
97+
Java, Lua, Perl, PHP, Python, Ruby, Shell, Tcl or Vim source file you should
98+
also notice that the function and/or type names defined in the file have been
99+
syntax highlighted.
100100

101101
The 'easytags.vim' plug-in is intended to work automatically once it's
102102
installed, but if you want to change how it works there are several options you
@@ -527,6 +527,7 @@ by the easytags plug-in:
527527
'cFunctionTag', 'cMemberTag'
528528
- **Java:**'javaClassTag', 'javaInterfaceTag', 'javaMethodTag'
529529
- **Lua:**'luaFuncTag'
530+
- **Perl:**'perlFunctionTag'
530531
- **PHP:**'phpFunctionsTag', 'phpClassesTag'
531532
- **Python:**'pythonFunctionTag', 'pythonMethodTag', 'pythonClassTag'
532533
- **Ruby:**'rubyModuleNameTag', 'rubyClassNameTag', 'rubyMethodNameTag'

0 commit comments

Comments
 (0)