set nocompatible
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
map <C-t> :NERDTreeToggle<CR>
Plug 'junegunn/vim-easy-align'
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
Plug 'aperezdc/vim-template'
Plug 'tpope/vim-commentary' " comment quickly
xmap <C-_> <Plug>Commentary
" nmap <C-_> <Plug>Commentary
omap <C-_> <Plug>Commentary
nmap <C-_> <Plug>CommentaryLine
Plug 'ctrlpvim/ctrlp.vim'
let g:ctrlp_show_hidden=1
Plug 'joshdick/onedark.vim'
if !exists('$TMUX')
let g:onedark_terminal_italics=1
endif
" comment color
" ListCharS color
" line number color
let g:onedark_color_overrides = {
\ "comment_grey": { "gui": "#808080", "cterm": "59", "cterm16": "15" },
\ "special_grey": { "gui": "#808080", "cterm": "238", "cterm16": "15" },
\ "gutter_fg_grey": { "gui": "#666666", "cterm": "238", "cterm16": "15" }
\}
Plug 'vim-airline/vim-airline'
let g:airline#extensions#whitespace#enabled=0
let g:airline#extensions#tabline#enabled=1
let g:airline_section_z='%p%% | %l:%c | %L'
Plug 'airblade/vim-gitgutter'
set updatetime=100
Plug 'jiangmiao/auto-pairs'
let g:AutoPairsMultilineClose=0
Plug 'majutsushi/tagbar' " show code struct, need install ctags
" autocmd VimEnter * nested :call tagbar#autoopen(1)
let g:tagbar_foldlevel=2
let g:tagbar_autoshowtag=1
let g:tagbar_sort=0
map <C-s> :TagbarToggle<CR>
call plug#end()
syntax on
set nu rnu
set nowrap
set modeline
set hls " HighLight Search
set et " ExpandTab, make tab change to space
set ts=4 " TabStop, 1 tab = n space
set sw=4 " ShiftWidth, operations (<< and >>)
set tw=79 " TextWidth
set cc=79 " ColorColumn
" set si " SmartIndent
set list lcs=tab:▸\ ,trail:·,nbsp:_ " ListCharS
set exrc secure " secure enable per-directory config file, recommend .exrc, compatible bewteen Vim and Neovim
" nvim setting
set dir=. " set swap file location
set guicursor=
"""
""" map
" map <C-p> :bN<CR>
" map <C-n> :bn<CR>
"""
set termguicolors
colorscheme onedark
用的是nvim