Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Added neocomplcache__convertable attribute.

  • Loading branch information...
commit fae1575e127c5aa20fe248a8d6c7a7234d12b11c 1 parent 3edb56f
@Shougo authored
Showing with 11 additions and 5 deletions.
  1. +10 −5 autoload/neocomplcache.vim
  2. +1 −0  doc/neocomplcache.txt
View
15 autoload/neocomplcache.vim
@@ -1554,20 +1554,25 @@ function! neocomplcache#get_complete_words(complete_results, cur_keyword_pos, cu
" Convert words.
if neocomplcache#is_text_mode() "{{{
+ let convert_candidates = filter(copy(complete_words),
+ \ "get(v:val, 'neocomplcache__convertable', 1)")
+
if a:cur_keyword_str =~ '^\l\+$'
- for keyword in complete_words
+ for keyword in convert_candidates
let keyword.word = tolower(keyword.word)
let keyword.abbr = tolower(keyword.abbr)
endfor
elseif a:cur_keyword_str =~ '^\u\+$'
- for keyword in complete_words
+ for keyword in convert_candidates
let keyword.word = toupper(keyword.word)
let keyword.abbr = toupper(keyword.abbr)
endfor
elseif a:cur_keyword_str =~ '^\u\l\+$'
- for keyword in complete_words
- let keyword.word = toupper(keyword.word[0]).tolower(keyword.word[1:])
- let keyword.abbr = toupper(keyword.abbr[0]).tolower(keyword.abbr[1:])
+ for keyword in convert_candidates
+ let keyword.word = toupper(keyword.word[0]).
+ \ tolower(keyword.word[1:])
+ let keyword.abbr = toupper(keyword.abbr[0]).
+ \ tolower(keyword.abbr[1:])
endfor
endif
endif"}}}
View
1  doc/neocomplcache.txt
@@ -1175,6 +1175,7 @@ CHANGELOG *neocomplcache-changelog*
2012-09-06
- Fixed include pattern.
- Fixed force omni patterns.
+- Added neocomplcache__convertable attribute.
2012-09-05
- Fixed check force_omni_patterns.
Please sign in to comment.
Something went wrong with that request. Please try again.