Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 185f0ca

Browse files
committed
use <cword> to grab identifier closes #50
thanks for both the bug report and fix by @memeplex
1 parent 6a0b1e1 commit 185f0ca

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ftplugin/python/ipy.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,10 @@ def get_doc_msg(msg_id):
226226

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

0 commit comments

Comments
 (0)