diff --git a/nvim/init.vim b/nvim/init.vim index 5456024..86fb3b8 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -31,17 +31,8 @@ filetype plugin indent on " Set shift width to 4 spaces. set shiftwidth=4 -" Set tab width to 4 columns. -set tabstop=4 - -" Use space characters instead of tabs. -set expandtab - -" Do not save backup files. -set nobackup - " Do not let cursor scroll below or above N number of lines when scrolling. -set scrolloff=10 +set scrolloff=5 " Do not wrap lines. Allow long lines to extend as far as the line goes. set nowrap @@ -59,9 +50,6 @@ set smartcase " Show partial command you type in the last line of the screen. set showcmd -" Show the mode you are on the last line. -set showmode - " Show matching words during a search. set showmatch @@ -119,17 +107,14 @@ imap (coc-snippets-expand-jump) xmap x (coc-convert-snippet) " ##################################################### -" : completion -inoremap - \ pumvisible() ? "\" : - \ s:check_back_space() ? "\" : - \ coc#refresh() -" : completion back -inoremap pumvisible() ? "\" : "\" -" : confirm completion, or insert -inoremap pumvisible() ? "\" : "\" function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~ '\s' endfunction + +inoremap coc#pum#visible() ? coc#pum#next(1) : "\" +inoremap coc#pum#visible() ? coc#pum#prev(1) : "\" + +" : confirm completion, or insert +inoremap pumvisible() ? "\" : "\"