Skip to content

Commit

Permalink
use <cword> to grab identifier closes #50
Browse files Browse the repository at this point in the history
thanks for both the bug report and fix by @memeplex
  • Loading branch information
ivanov committed Mar 26, 2013
1 parent 6a0b1e1 commit 185f0ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ftplugin/python/ipy.vim
Expand Up @@ -226,7 +226,10 @@ def get_doc_msg(msg_id):

def get_doc_buffer(level=0):
# empty string in case vim.eval return None
word = vim.eval('expand("<cfile>")') or ''
vim.command("let isk_save = &isk") # save iskeyword list
vim.command("let &isk = '@,48-57,_,192-255,.'")
word = vim.eval('expand("<cword>")') or ''
vim.command("let &isk = isk_save") # restore iskeyword list
doc = get_doc(word)
if len(doc) ==0:
echo(repr(word)+" not found","Error")
Expand Down

0 comments on commit 185f0ca

Please sign in to comment.