syntax on set number set cursorline set expandtab tabstop=4 shiftwidth=4 softtabstop=4 set autoindent set spelllang=vi,en " Fold set foldmethod=syntax set foldlevel=1 set foldnestmax=1 set encoding=utf8 " Search set hlsearch nnoremap i :nohlsi " Plugin call plug#begin() Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'preservim/nerdtree' Plug 'preservim/nerdcommenter' Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'kevinhwang91/nvim-bqf' Plug 'morhetz/gruvbox' Plug 'tpope/vim-fugitive' Plug 'ynkdir/vim-diff' call plug#end() "Color scheme colorscheme gruvbox let g:gruvbox_contrast_light = 'hard' set background=dark " Comments let mapleader = "," "Open NERDTree :nnoremap g:NERDTree.IsOpen() ? "\:NERDTreeClose" : bufexists(expand('%')) ? "\:NERDTreeFind" : "\:NERDTree" "Coc.nvim inoremap \ coc#pum#visible() ? coc#_select_confirm() : \ coc#expandableOrJumpable() ? "\=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\" : \ CheckBackSpace() ? "\" : \ coc#refresh() inoremap coc#pum#visible() ? coc#_select_confirm() : coc#refresh() function! CheckBackSpace() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' endfunction let g:coc_snippet_next = '' " remap save nnoremap :w " moving between windows nnoremap h nnoremap j nnoremap k nnoremap l nnoremap h nnoremap j nnoremap k nnoremap l nnoremap to :tabonly nnoremap o :only nnoremap :tabn nnoremap :tabp "set clipboard+=unnamedplus " " Copy to clipboard vnoremap y "+y nnoremap Y "+yg_ nnoremap y "+y nnoremap yy "+yy " " Paste from clipboard nnoremap p "+p nnoremap P "+P " FZF key mapping nnoremap b :Buffers nnoremap r :Rg nnoremap f :Files nnoremap g :GFiles nnoremap w :Rg filetype plugin on set splitright set splitbelow