X-Git-Url: https://git.xinqibao.xyz/dotfiles.git/blobdiff_plain/a3f2577c11f186a01cedff3c9110e82266ac8db9..a5b430b863e4f060c3d798757b91f94c2d91d35a:/.vimrc?ds=inline diff --git a/.vimrc b/.vimrc index 2c9c1bd..32fc510 100644 --- a/.vimrc +++ b/.vimrc @@ -2,13 +2,22 @@ syntax enable "colorscheme wombat256mod set background=dark +"In order to display chinese in GBK +let &termencoding=&encoding +set fileencodings=utf-8,gbk +set fileformat=unix +set foldmethod=manual + set t_Co=256 "terminal color +set t_ut="" +"set term=xterm-256color set encoding=utf-8 "required for ycm set noerrorbells set tabstop=4 softtabstop=4 set shiftwidth=4 set expandtab set smartindent +set backspace=indent,eol,start set number set nowrap set smartcase @@ -31,7 +40,7 @@ set undodir=~/.vim/undodir set undofile "ColumnLimit -set colorcolumn=80 +set colorcolumn=120 highlight ColorColumn ctermbg=0 guibg=lightgrey set tags=tags~;,tags~ @@ -41,7 +50,8 @@ set path=.,lib;,include;,includes; set path+=/lib/modules/5.4.46-1-lts/build/include set path+=/lib/modules/5.4.46-1-lts/build/arch/x86/include set path+=/usr/include,/usr/include/c++/* - +set path+=/usr/local/include +set path+=~/lib " Writes to the unnamed register also writes to the * and + registers. This " makes it easy to interact with the system clipboard @@ -58,8 +68,11 @@ Plug 'vim-airline/vim-airline' Plug 'morhetz/gruvbox' Plug 'ycm-core/YouCompleteMe' -Plug 'kien/ctrlp.vim' Plug 'mbbill/undotree' +"Plug 'kien/ctrlp.vim' + +Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } +Plug 'junegunn/fzf.vim' Plug 'tpope/vim-fugitive' Plug 'preservim/nerdtree' @@ -68,6 +81,7 @@ Plug 'ludovicchabant/vim-gutentags' Plug 'plasticboy/vim-markdown' Plug 'christoomey/vim-tmux-navigator' +Plug 'Yggdroot/indentLine' call plug#end() colorscheme gruvbox @@ -87,7 +101,13 @@ autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] let g:ctrlp_use_caching = 0 +"mapping for fzf.vim +nnoremap :GFiles +"as default / pair used to page down/up entire page +nnoremap :Tags + let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py' +let g:ycm_confirm_extra_conf = 0 let g:ycm_enable_diagnostic_signs = 0 let g:ycm_always_populate_location_list = 1 "let g:ycm_show_diagnostics_ui = 0 @@ -98,6 +118,8 @@ let g:ycm_auto_hover = 'no' let mapleader = " " nnoremap J :tabprevious nnoremap K :tabnext +nnoremap J :tabmove -1 +nnoremap K :tabmove +1 nnoremap h nnoremap j nnoremap k @@ -105,7 +127,7 @@ nnoremap l nnoremap " viwa"bi"lel nnoremap ' viwa'bi'lel nnoremap u :UndotreeShow -nnoremap v :NERDTreeToggle +nnoremap n :NERDTreeToggle nnoremap + :resize +5 nnoremap - :resize -5 nnoremap v+ :vertical resize +5