aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Le <solnovus@gmail.com>2015-02-09 16:40:07 -0800
committerKevin Le <solnovus@gmail.com>2015-02-09 16:40:07 -0800
commit89940cc381fb3df1ab0b8f0305309e758da148d2 (patch)
tree385db8ae1b6661c8671c48b4abe888bdabe81a25
parenta83bc51d04198f69bafb492d3cebfdb960738bc7 (diff)
fix issue with motion between 'CONSECUTIVE ACRONYMS'
-rw-r--r--autoload/camelcasemotion.vim2
1 files changed, 1 insertions, 1 deletions
diff --git a/autoload/camelcasemotion.vim b/autoload/camelcasemotion.vim
index a3ec6c8..7816ef7 100644
--- a/autoload/camelcasemotion.vim
+++ b/autoload/camelcasemotion.vim
@@ -74,7 +74,7 @@ function! s:Move( direction, count, mode )
"call search( '\<\|\u\(\l\+\|\u\+\ze\u\)\|\d\+\|_\zs\(\a\|\d\)\+', 'W' . l:direction )
" beginning of ...
" word | empty line | non-keyword after whitespaces | non-whitespace after word | number | ACRONYM followed by CamelCase or number | CamelCase | ACRONYM | underscore followed by ACRONYM, Camel, lowercase or number
- call search( '\<\D\|^$\|\%(^\|\s\)\+\zs\k\@!\S\|\>\<\|\d\+\|\u\+\zs\%(\u\l\|\d\)\|\u\l\+\|\u\+\|[-_]\zs\%(\u\+\|\u\l\+\|\l\+\|\d\+\)', 'W' . l:direction )
+ call search( '\<\D\|^$\|\%(^\|\s\)\+\zs\k\@!\S\|\>\<\|\d\+\|\u\+\zs\%(\u\l\|\d\)\|\u\l\+\|\u\@<!\u\+\|[-_]\zs\%(\u\+\|\u\l\+\|\l\+\|\d\+\)', 'W' . l:direction )
" Note: word must be defined as '\<\D' to avoid that a word like
" 1234Test is moved over as [1][2]34[T]est instead of [1]234[T]est
" because \< matches with zero width, and \d\+ will then start