Skip to content

Instantly share code, notes, and snippets.

@basyura
Created June 3, 2012 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save basyura/2862951 to your computer and use it in GitHub Desktop.
Save basyura/2862951 to your computer and use it in GitHub Desktop.
neco-tweetvim
function! s:source.get_keyword_pos(cur_text)
let col = col('.')
let pos = 0
while 1
let idx = stridx(a:cur_text, '@', pos + 1)
if idx == -1 || idx >= col
break
endif
let pos = idx
endwhile
return matchend(a:cur_text, '@', pos)
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment