Update nvim/init.vim
parent
440de8fc5e
commit
f76db807ec
|
|
@ -31,17 +31,8 @@ filetype plugin indent on
|
||||||
" Set shift width to 4 spaces.
|
" Set shift width to 4 spaces.
|
||||||
set shiftwidth=4
|
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.
|
" 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.
|
" Do not wrap lines. Allow long lines to extend as far as the line goes.
|
||||||
set nowrap
|
set nowrap
|
||||||
|
|
@ -59,9 +50,6 @@ set smartcase
|
||||||
" Show partial command you type in the last line of the screen.
|
" Show partial command you type in the last line of the screen.
|
||||||
set showcmd
|
set showcmd
|
||||||
|
|
||||||
" Show the mode you are on the last line.
|
|
||||||
set showmode
|
|
||||||
|
|
||||||
" Show matching words during a search.
|
" Show matching words during a search.
|
||||||
set showmatch
|
set showmatch
|
||||||
|
|
||||||
|
|
@ -119,17 +107,14 @@ imap <C-j> <Plug>(coc-snippets-expand-jump)
|
||||||
xmap <leader>x <Plug>(coc-convert-snippet)
|
xmap <leader>x <Plug>(coc-convert-snippet)
|
||||||
|
|
||||||
" #####################################################
|
" #####################################################
|
||||||
" <Tab>: completion
|
|
||||||
inoremap <silent><expr> <Tab>
|
|
||||||
\ pumvisible() ? "\<C-N>" :
|
|
||||||
\ s:check_back_space() ? "\<Tab>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
" <S-Tab>: completion back
|
|
||||||
inoremap <silent><expr> <S-Tab> pumvisible() ? "\<C-P>" : "\<C-H>"
|
|
||||||
" <CR>: confirm completion, or insert <CR>
|
|
||||||
inoremap <expr> <CR> pumvisible() ? "\<C-Y>" : "\<CR>"
|
|
||||||
|
|
||||||
function! s:check_back_space() abort
|
function! s:check_back_space() abort
|
||||||
let col = col('.') - 1
|
let col = col('.') - 1
|
||||||
return !col || getline('.')[col - 1] =~ '\s'
|
return !col || getline('.')[col - 1] =~ '\s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
inoremap <expr> <Tab> coc#pum#visible() ? coc#pum#next(1) : "\<Tab>"
|
||||||
|
inoremap <expr> <S-Tab> coc#pum#visible() ? coc#pum#prev(1) : "\<S-Tab>"
|
||||||
|
|
||||||
|
" <CR>: confirm completion, or insert <CR>
|
||||||
|
inoremap <expr> <CR> pumvisible() ? "\<C-Y>" : "\<CR>"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue