diff --git a/after/ftplugin/scala.vim b/after/ftplugin/scala.vim index 1c1d496..0fd0feb 100644 --- a/after/ftplugin/scala.vim +++ b/after/ftplugin/scala.vim @@ -12,4 +12,7 @@ noremap K :EnDocBrowse noremap f :Autoformat +imap //< (codelines-close) +map cl :call jobstart(['codelines', '.']) + au BufWritePost *.scala Neomake! diff --git a/after/ftplugin/tex.vim b/after/ftplugin/tex.vim index 320b9ac..e04fe7f 100644 --- a/after/ftplugin/tex.vim +++ b/after/ftplugin/tex.vim @@ -12,4 +12,5 @@ imap [( \left( setlocal tw=100 -map :exec "Ack! -w " . substitute(expand(''), 'SRC','\\>','')v:cclzR +map (codelines-go-to-def) +map cl :call jobstart(['codelines', '.']) diff --git a/after/plugin/general.vim b/after/plugin/general.vim index 603177c..b0c23e0 100644 --- a/after/plugin/general.vim +++ b/after/plugin/general.vim @@ -7,12 +7,6 @@ endif inoremap deoplete#smart_close_popup()."\" inoremap deoplete#smart_close_popup()."\" -" : close popup and save indent. -inoremap =my_cr_function() -function! s:my_cr_function() abort - return deoplete#close_popup() . "\" -endfunction - inoremap \ pumvisible() ? "\" : \ check_back_space() ? "\" : diff --git a/plugin/codelines.vim b/plugin/codelines.vim index d3f4e21..9c040fa 100644 --- a/plugin/codelines.vim +++ b/plugin/codelines.vim @@ -2,4 +2,6 @@ function! codelines#close() let n_line = search('//>', 'bnW') return trim(substitute(getline(n_line), '>', '<', '')) endfunction + inoremap (codelines-close) =codelines#close() +noremap (codelines-go-to-def) :exec "vimgrep #//>" . strpart(expand(''), 3) . "# code/*"