]>
git.madduck.net Git - etc/vim.git/blobdiff - autoload/nwo/magic.vim
madduck's git repository
Every one of the projects in this repository is available at the canonical
URL git://git.madduck.net/madduck/pub/<projectpath> — see
each project's metadata for the exact URL.
All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@ git. madduck. net .
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
SSH access, as well as push access can be individually
arranged .
If you use my repositories frequently, consider adding the following
snippet to ~/.gitconfig and using the third clone URL listed for each
project:
[url "git://git.madduck.net/madduck/"]
insteadOf = madduck:
" File: makemagic.vim
" Created: 2011 Apr 18
" File: makemagic.vim
" Created: 2011 Apr 18
-" Last Change: 2012 Dec 19
-" Rev Days: 4
+" Last Change: 2013 Mar 06
+" Rev Days: 6
" Author: Andy Wokula <anwoku@yahoo.de>
" License: Vim License, see :h license
" Author: Andy Wokula <anwoku@yahoo.de>
" License: Vim License, see :h license
" TODO
" - recognize [#-\\]], with spaces: [ #-\ \] ]
" (collection ends at second ']')
" TODO
" - recognize [#-\\]], with spaces: [ #-\ \] ]
" (collection ends at second ']')
" 2011 Nov 01 copied from asneeded\makemagic.vim
" now asneeded\nwo\makemagic.vim (comments there!)
" 2011 Nov 01 copied from asneeded\makemagic.vim
" now asneeded\nwo\makemagic.vim (comments there!)
" s:variables {{{
" pattern to match very magic items:
" s:variables {{{
" pattern to match very magic items:
-let s:vmagic_items_pat = '\\.\|%\%([#$(UV[\^cdlouvx]\|''.\|[<>]\%(''.\| [clv]\)\)\|[&()+<=>?|]\|@\%([!=>]\|<[!=]\)\|{'
+let s:vmagic_items_pat = '\C\\\%(z(\|.\)\|%\%([#$(UV[\^cdlouvx]\|[<>]\=\%(''.\|\d\+ [clv]\)\)\|[&()+<=>?|]\|@\%([!=>]\|<[!=]\)\|{'
" not escaped - require an even number of '\' (zero or more) to the left:
let s:not_escaped = '\%(\%(^\|[^\\]\)\%(\\\\\)*\)\@<='
" not escaped - require an even number of '\' (zero or more) to the left:
let s:not_escaped = '\%(\%(^\|[^\\]\)\%(\\\\\)*\)\@<='
" skip over a collection (starting at '[' (same for all magic modes) or
" starting at '\_[' (same for all modes))
" skip over a collection (starting at '[' (same for all magic modes) or
" starting at '\_[' (same for all modes))
-let s:collection_skip_pat = '^\%(\\_\)\=\[\^\=]\=\%(\%(\\[\^\]\-\\bertn]\|\[:\w\+:]\|[^\]]\)\@>\)*]'
+let s:collection_skip_pat = '^\%(\\_\)\=\[\^\=]\=\%(\%(\\[\^\]\-\\bertn]\|\[:\w\+:]\|\[=.=]\|\[\..\.]\| [^\]]\)\@>\)*]'