Add codelines mappings

This commit is contained in:
Alexander Gehrke 2019-09-23 09:37:48 +02:00
parent 74d42fac18
commit 2a3668363b
4 changed files with 7 additions and 7 deletions

View file

@ -12,4 +12,7 @@ noremap K :EnDocBrowse<CR>
noremap <Leader>f :Autoformat<CR> noremap <Leader>f :Autoformat<CR>
imap //< <Plug>(codelines-close)<CR>
map <silent> <buffer> <leader>cl :call jobstart(['codelines', '.'])<cr>
au BufWritePost *.scala Neomake! au BufWritePost *.scala Neomake!

View file

@ -12,4 +12,5 @@ imap <buffer> [( \left(
setlocal tw=100 setlocal tw=100
map <silent> <buffer> <F3> :exec "Ack! -w " . substitute(expand('<cword>'), 'SRC','\\>','')<cr>v:ccl<cr>zR map <silent> <buffer> <F3> <Plug>(codelines-go-to-def)
map <silent> <buffer> <leader>cl :call jobstart(['codelines', '.'])<cr>

View file

@ -7,12 +7,6 @@ endif
inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>" inoremap <expr><C-h> deoplete#smart_close_popup()."\<C-h>"
inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>" inoremap <expr><BS> deoplete#smart_close_popup()."\<C-h>"
" <CR>: close popup and save indent.
inoremap <silent> <CR> <C-r>=<SID>my_cr_function()<CR>
function! s:my_cr_function() abort
return deoplete#close_popup() . "\<CR>"
endfunction
inoremap <silent><expr> <TAB> inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" : \ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" : \ <SID>check_back_space() ? "\<TAB>" :

View file

@ -2,4 +2,6 @@ function! codelines#close()
let n_line = search('//>', 'bnW') let n_line = search('//>', 'bnW')
return trim(substitute(getline(n_line), '>', '<', '')) return trim(substitute(getline(n_line), '>', '<', ''))
endfunction endfunction
inoremap <silent> <Plug>(codelines-close) <c-r>=codelines#close()<cr> inoremap <silent> <Plug>(codelines-close) <c-r>=codelines#close()<cr>
noremap <silent> <Plug>(codelines-go-to-def) :exec "vimgrep #//>" . strpart(expand('<cword>'), 3) . "# code/*"<cr>