aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-15 11:58:30 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-15 11:58:30 +1200
commit02e99cb699f7ea22851004e7bd8acff3f07823a2 (patch)
tree9b4ba316ed0892708677a237971050bce1cac905 /vim
parent95b27d9da95f8e40143db032547c9e58c20a888e (diff)
downloaddotfiles-02e99cb699f7ea22851004e7bd8acff3f07823a2.tar.gz
dotfiles-02e99cb699f7ea22851004e7bd8acff3f07823a2.zip
Use \= in preference to \+ in VimL patterns
It comes first in the documentation.
Diffstat (limited to 'vim')
-rw-r--r--vim/scripts.vim10
1 files changed, 5 insertions, 5 deletions
diff --git a/vim/scripts.vim b/vim/scripts.vim
index 2dc602d7..44b07255 100644
--- a/vim/scripts.vim
+++ b/vim/scripts.vim
@@ -11,11 +11,11 @@ if stridx(s:line, '#!') != 0
endif
" AWK
-if s:line =~# '\m\<[gm]\?awk\>'
+if s:line =~# '\m\<[gm]\=awk\>'
setfiletype awk
" Perl 5
-elseif s:line =~# '\m\<perl5\?\>'
+elseif s:line =~# '\m\<perl5\=\>'
setfiletype perl
" Perl 6
@@ -27,11 +27,11 @@ elseif s:line =~# '\m\<php\>'
setfiletype php
" Python
-elseif s:line =~# '\m\<python[23]\?\>'
+elseif s:line =~# '\m\<python[23]\=\>'
setfiletype python
" Ruby
-elseif s:line =~# '\m\<ruby[23]\?\>'
+elseif s:line =~# '\m\<ruby[23]\=\>'
setfiletype ruby
" sed
@@ -44,7 +44,7 @@ elseif s:line =~# '\m\<bash\>'
setfiletype sh
" Korn shell
-elseif s:line =~# '\m\<\(m\|pd\)\?ksh\(93\)\?\>'
+elseif s:line =~# '\m\<\(m\|pd\)\=ksh\(93\)\=\>'
let b:is_kornshell = 1
setfiletype sh