-
-
Save encima/56ebcd3b1200ef3b19f6b572f0b483c4 to your computer and use it in GitHub Desktop.
Minimal Configs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
call plug#begin('~/.vim/plugged') | |
Plug 'junegunn/fzf.vim' | |
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
call plug#end() | |
set hidden | |
nnoremap <Leader>f :Files<CR> | |
nnoremap <Leader>b :buffers<CR>:buffer<Space> | |
inoremap <silent><expr> <TAB> | |
\ pumvisible() ? "\<C-n>" : | |
\ <SID>check_back_space() ? "\<TAB>" : | |
\ coc#refresh() | |
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" | |
function! s:check_back_space() abort | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~# '\s' | |
endfunction | |
" Use <c-space> to trigger completion. | |
if has('nvim') | |
inoremap <silent><expr> <c-space> coc#refresh() | |
else | |
inoremap <silent><expr> <c-@> coc#refresh() | |
endif | |
" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current | |
" position. Coc only does snippet and additional edit on confirm. | |
" <cr> could be remapped by other vim plugin, try `:verbose imap <CR>`. | |
if exists('*complete_info') | |
inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>" | |
else | |
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment