Skip to content

Commit

Permalink
vim-smartword: Refactor - naming / passing argument
Browse files Browse the repository at this point in the history
  • Loading branch information
kana committed Mar 28, 2010
1 parent 5917083 commit a89c955
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vim/dot.vim/autoload/smartword.vim
Expand Up @@ -51,14 +51,13 @@ function! s:current_char(pos)
return getline(a:pos[1])[a:pos[2] - 1]
endfunction

function! s:iskeyword_to_list()
let set = []
function! s:parse_iskeyword(iskeyword)
" FIXME: NIY
return split('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', '\ze.')
endfunction

function! s:letter_p(char)
let chars = s:iskeyword_to_list()
let chars = s:parse_iskeyword(&l:iskeyword)
let pattern = '[' . escape(join(chars, ''), '\[]-^:') . ']'
return a:char =~# pattern
endfunction
Expand Down

0 comments on commit a89c955

Please sign in to comment.