nvim: Drop supertab

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-05-30 12:32:51 +05:30
parent af01dd3351
commit f0dc894593
4 changed files with 13 additions and 6 deletions

View file

@ -40,11 +40,11 @@ set magic " Use 'magic' patterns (extended regular expressions
set autoread " Autoload file if it changes on disk set autoread " Autoload file if it changes on disk
set termguicolors " Enable colors for terminal set termguicolors " Enable colors for terminal
set completeopt-=menu set completeopt-=menu
set completeopt+=menuone " Show the completions UI even with only 1 item
set completeopt-=longest " Don't insert the longest common text set completeopt-=longest " Don't insert the longest common text
set completeopt-=preview " Hide the documentation preview window set completeopt-=preview " Hide the documentation preview window
set completeopt+=menuone " Show the completions UI even with only 1 item
set completeopt+=noinsert " Don't insert text automatically set completeopt+=noinsert " Don't insert text automatically
set completeopt-=noselect " Highlight the first completion automatically set completeopt+=noselect " Do not select a match in the menu
" Required for vim-workspace " Required for vim-workspace
" See https://github.com/thaerkh/vim-workspace/issues/11 " See https://github.com/thaerkh/vim-workspace/issues/11
set sessionoptions-=blank set sessionoptions-=blank

View file

@ -1,7 +1,5 @@
call plug#begin('~/.config/nvim/plugged') call plug#begin('~/.config/nvim/plugged')
" Tab completion
Plug 'ervandew/supertab'
" Motions " Motions
Plug 'haya14busa/incsearch.vim' Plug 'haya14busa/incsearch.vim'
Plug 'justinmk/vim-sneak' Plug 'justinmk/vim-sneak'

View file

@ -145,6 +145,17 @@ nnoremap <BS> <C-^>
imap <C-j> <cmd>lua require'source'.prevCompletion()<CR> imap <C-j> <cmd>lua require'source'.prevCompletion()<CR>
imap <C-k> <cmd>lua require'source'.nextCompletion()<CR> imap <C-k> <cmd>lua require'source'.nextCompletion()<CR>
" 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 <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ completion#trigger_completion()
" Asynchronous make " Asynchronous make
command! -bang -nargs=* -complete=file Make call asyncdo#run(<bang>0, &makeprg, <f-args>) command! -bang -nargs=* -complete=file Make call asyncdo#run(<bang>0, &makeprg, <f-args>)
command! -bang -nargs=* -complete=file LMake call asyncdo#lrun(<bang>0, &makeprg, <f-args>) command! -bang -nargs=* -complete=file LMake call asyncdo#lrun(<bang>0, &makeprg, <f-args>)

View file

@ -12,8 +12,6 @@ let g:gitgutter_sign_modified_removed = 'mr'
" Automatically detect style file and apply style to formatting " Automatically detect style file and apply style to formatting
let g:clang_format#detect_style_file = 1 let g:clang_format#detect_style_file = 1
" Fix tab behaviour while switching through completion options
let g:SuperTabDefaultCompletionType = "<c-n>"
" For workspace " For workspace
let g:workspace_session_directory = $HOME . '/.vim/session/' let g:workspace_session_directory = $HOME . '/.vim/session/'
let g:workspace_undodir = $HOME . '/.vim/undodir' let g:workspace_undodir = $HOME . '/.vim/undodir'