dotfiles/init.vim

43 lines
1 KiB
VimL
Raw Normal View History

2021-11-25 03:41:20 +01:00
"Plug"
source $HOME/.config/nvim/vim-plug/plugins.vim
"Sets"
set encoding=utf-8
set guicursor=i:block
set backupdir=~/.private/vimtmp/
set directory=~/.private/vimtmp/
set nobackup
set nowritebackup
set number
set cmdheight=2
set updatetime=200
set shortmess+=c
set signcolumn=yes
set hidden
set noerrorbells
set smartcase
2021-12-19 17:54:38 +01:00
set termguicolors
set background=dark
colorscheme melange
2021-11-25 03:41:20 +01:00
set nowrap
set tabstop=2
set ls=2
set ai
"Mappings"
nmap <F3> :NERDTreeToggle<CR>
nmap <F2> :NERDTree-CD
2021-11-29 17:24:36 +01:00
nmap <C-l> :bn<cr>
nmap <C-h> :bp<cr>
nmap <A-;> :Rg<cr>
2021-11-25 03:41:20 +01:00
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
inoremap <silent><expr> <c-space> coc#refresh()
inoremap <silet><expr> <cr> pumvisible() ? coc#_select_confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col-1] =~# '\s'
endfunction