Permalink
Browse files

use <cword> to grab identifier closes #50

thanks for both the bug report and fix by @memeplex
  • Loading branch information...
ivanov committed Mar 26, 2013
1 parent 6a0b1e1 commit 185f0ca6276badbaa82d8cd10072add527584eb9
Showing with 4 additions and 1 deletion.
  1. +4 −1 ftplugin/python/ipy.vim
View
@@ -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")

0 comments on commit 185f0ca

Please sign in to comment.