This commit is contained in:
baabelfish 2016-02-22 11:12:53 +02:00
commit c3f6a03349
9 changed files with 123 additions and 35 deletions

View file

@ -49,7 +49,12 @@ endfunction
function! features#info#web()
call suggest#New("def", 0, 0, s:New(1))
let current_word = expand("<cword>")
if modules#isGlobalImport(current_word)
call util#open_module_doc(current_word, "")
else
call suggest#New("def", 0, 0, s:New(1))
endif
endfunction

View file

@ -83,5 +83,17 @@ function! modules#FindGlobalImports()
endfunction
function! modules#moduleLocation(str)
if has_key(modules#FindGlobalImports(), a:str)
return modules#FindGlobalImports()[a:str]
endif
endfunction
function! modules#isGlobalImport(str)
return has_key(modules#FindGlobalImports(), a:str)
endfunction
let &cpo = s:save_cpo
unlet s:save_cpo

View file

@ -285,6 +285,11 @@ function! util#SelectNimProc(inner)
endfunction
function! util#goto_file()
let module_loc = modules#moduleLocation(expand("<cword>"))
endfunction
call operator#user#define('nimrepl_send', 'NimReplSend')
function! NimReplSend(motion_wiseness)
let start = getpos("'[")