Added hidden buffer mode and solved line numbers disappearing on window with term
This commit is contained in:
parent
365e30c643
commit
f30d88ae75
1 changed files with 8 additions and 2 deletions
10
init.vim
10
init.vim
|
@ -6,6 +6,9 @@ if !has('nvim')
|
|||
setlocal cm=blowfish2
|
||||
end
|
||||
|
||||
" allow unsaved hidden buffers
|
||||
set hidden
|
||||
|
||||
" set relative line numbers
|
||||
set number relativenumber
|
||||
|
||||
|
@ -19,7 +22,10 @@ if has('nvim')
|
|||
" prevent terminal buffers to be closed when changing buffer
|
||||
autocmd TermOpen * set bufhidden=hide
|
||||
|
||||
" remove line numbers to terminale
|
||||
" restore line numbers for all buffers (revert changes of cmd below)
|
||||
autocmd BufCreate * set rnu nu
|
||||
|
||||
" remove line numbers to terminal
|
||||
autocmd TermOpen * set nornu nonu
|
||||
end
|
||||
|
||||
|
@ -62,7 +68,7 @@ endfunction
|
|||
inoremap <silent> <tab> <C-r>=AutocompleteIfKeyword()<CR>
|
||||
|
||||
" use standard vim autocomplete as fallback
|
||||
let g:autocomplete_key = "\<C-n>"
|
||||
let g:autocomplete_key = "\<C-N>"
|
||||
|
||||
" autocomplete with Tsuquyomi on TypeScript files
|
||||
autocmd FileType typescript let g:autocomplete_key = "\<C-x>\<C-o>"
|
||||
|
|
Reference in a new issue