[Melbourne-pm] Editor mod in Padre and Notepad++ for Regexp::Grammars magic variable

Andrew sgc294 at internode.on.net
Sat Sep 4 04:30:40 PDT 2010

After Sam mentioning that vim handled %/ better than the other two, I've 
have a solution to my problem.

However, out of the box, vim doesn't treat %/ as a variable. But it 
doesn't treat it as the beginning of a regex either, so it is closer 
than Padre or Notepad++.
But Sam's pointer to vim was great as it seems the learning curve for 
customizing the syntax highlighting in vim is not nearly as steep (for 
me at least) as I found Padre and Notepad++ to be.

To make vim treat %/ as a variable (tested on Ubuntu)
1. Create the directory ~/.vim/after/syntax
2. In that directory create a file called perl.vim
3. Put this line in the file
     syn match  perlVarSlash          "%/"
And bingo. Vim will consider %/ to be a variable, like it does for $/

Many thanks to Sam for suggesting to use vim instead.


Andrew Dent

More information about the Melbourne-pm mailing list