nvim: Drop supertab
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
af01dd3351
commit
f0dc894593
4 changed files with 13 additions and 6 deletions
|
@ -40,11 +40,11 @@ set magic " Use 'magic' patterns (extended regular expressions
|
|||
set autoread " Autoload file if it changes on disk
|
||||
set termguicolors " Enable colors for terminal
|
||||
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-=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-=noselect " Highlight the first completion automatically
|
||||
set completeopt+=noselect " Do not select a match in the menu
|
||||
" Required for vim-workspace
|
||||
" See https://github.com/thaerkh/vim-workspace/issues/11
|
||||
set sessionoptions-=blank
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
call plug#begin('~/.config/nvim/plugged')
|
||||
|
||||
" Tab completion
|
||||
Plug 'ervandew/supertab'
|
||||
" Motions
|
||||
Plug 'haya14busa/incsearch.vim'
|
||||
Plug 'justinmk/vim-sneak'
|
||||
|
|
|
@ -145,6 +145,17 @@ nnoremap <BS> <C-^>
|
|||
imap <C-j> <cmd>lua require'source'.prevCompletion()<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
|
||||
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>)
|
||||
|
|
|
@ -12,8 +12,6 @@ let g:gitgutter_sign_modified_removed = 'mr'
|
|||
|
||||
" Automatically detect style file and apply style to formatting
|
||||
let g:clang_format#detect_style_file = 1
|
||||
" Fix tab behaviour while switching through completion options
|
||||
let g:SuperTabDefaultCompletionType = "<c-n>"
|
||||
" For workspace
|
||||
let g:workspace_session_directory = $HOME . '/.vim/session/'
|
||||
let g:workspace_undodir = $HOME . '/.vim/undodir'
|
||||
|
|
Loading…
Reference in a new issue