diff --git a/nvim/.config/nvim/after/plugin/asyncdo.vim b/nvim/.config/nvim/after/plugin/asyncdo.vim new file mode 100644 index 0000000..1f435ea --- /dev/null +++ b/nvim/.config/nvim/after/plugin/asyncdo.vim @@ -0,0 +1,7 @@ +" Async Make mappings +nnoremap b :Make +nnoremap B :LMake + +" Asynchronous make +command! -bang -nargs=* -complete=file Make call asyncdo#run(0, &makeprg, ) +command! -bang -nargs=* -complete=file LMake call asyncdo#lrun(0, &makeprg, ) diff --git a/nvim/.config/nvim/after/plugin/completion.vim b/nvim/.config/nvim/after/plugin/completion.vim new file mode 100644 index 0000000..01894cb --- /dev/null +++ b/nvim/.config/nvim/after/plugin/completion.vim @@ -0,0 +1,14 @@ +" For nvim-completion +imap (completion_next_source) +imap (completion_prev_source) + +" Tab completion. Taken from nvim-completion README. +function! s:check_back_space() abort + let col = col('.') - 1 + return !col || getline('.')[col - 1] =~ '\s' +endfunction + +inoremap + \ pumvisible() ? "\" : + \ check_back_space() ? "\" : + \ completion#trigger_completion() diff --git a/nvim/.config/nvim/keymappings.vim b/nvim/.config/nvim/keymappings.vim index f085870..7d56ffd 100644 --- a/nvim/.config/nvim/keymappings.vim +++ b/nvim/.config/nvim/keymappings.vim @@ -7,9 +7,6 @@ inoremap cnoremap " Use Q to execute default register. nnoremap Q -" Async Make mappings -nnoremap b :Make -nnoremap B :LMake " Save nnoremap w :w @@ -76,6 +73,7 @@ nnoremap zms :set foldmethod=syntax tnoremap jk nnoremap :ToggleTerminal tnoremap :ToggleTerminal + " Key bindings to move between window splits for key in range(0, 9) execute 'nnoremap '.key key.'w' @@ -120,25 +118,6 @@ vnoremap . :norm. " Go to the last file we changed nnoremap -" For nvim-completion -imap (completion_next_source) -imap (completion_prev_source) - -" Tab completion. Taken from nvim-completion README. -function! s:check_back_space() abort - let col = col('.') - 1 - return !col || getline('.')[col - 1] =~ '\s' -endfunction - -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ completion#trigger_completion() - -" Asynchronous make -command! -bang -nargs=* -complete=file Make call asyncdo#run(0, &makeprg, ) -command! -bang -nargs=* -complete=file LMake call asyncdo#lrun(0, &makeprg, ) - nnoremap [i [I:call PromptAndExec(":ijump! %d \022\027\015") nnoremap ]i ]I:call PromptAndExec(":+1,$ijump! %d \022\027\015")