-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
112 lines (80 loc) · 2.64 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
set nocompatible
set wrap
set clipboard=unnamed,unnamedplus
syntax enable
set number
set incsearch
set hlsearch
nnoremap <esc> :noh<return><esc>
nnoremap <esc>^[ <esc>^[
set showmatch
set expandtab
set tabstop=2
set shiftwidth=2
set foldmethod=indent
set foldmarker={,},(,)
set smartindent
set autoindent
set encoding=UTF-8
let mapleader = " "
set fillchars+=eob:\
set backspace=indent,eol,start
set noswapfile
set smartcase
set mouse=a
set modifiable
command! -nargs=0 Prettier :CocCommand prettier.forceFormatDocument
au BufWritePost .vimrc so ~/.vimrc
let g:polyglot_disabled = ['markdown']
call plug#begin()
Plug 'preservim/NERDTree'
Plug 'vim-airline/vim-airline'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'vim-airline/vim-airline-themes'
Plug 'ryanoasis/vim-devicons'
Plug 'Yggdroot/indentLine'
Plug 'sheerun/vim-polyglot'
Plug 'junegunn/goyo.vim'
Plug 'dylanaraps/wal.vim'
call plug#end()
set runtimepath+=~/.vim/bundle/neobundle.vim/
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'tiagofumo/vim-nerdtree-syntax-highlight'
call neobundle#end()
NeoBundleCheck
let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
let g:airline_highlighting_cache = 1
let airline#extensions#tabline#show_buffers = 0
let g:airline#extensions#tabline#show_splits = 0
let g:airline#extensions#tabline#show_tab_type = 0
nnoremap <Leader>t :tabnew<CR>
nnoremap <Leader>c :tabclose<CR>
nnoremap <Leader>z :tabprev<CR>
nnoremap <Leader>x :tabnext<CR>
nnoremap <Leader>d :IndentLinesDisable<CR>
nnoremap <Leader>e :IndentLinesEnable<CR>
let g:indentLine_color_term = 2
let g:indentLine_char = '|'
let g:indentLine_defaultGroup = 'SpecialKey'
let g:indentLine_concealcursor = 'inc'
let g:indentLine_conceallevel = 2
nnoremap <silent> zc :normal! zc<CR>
nnoremap <silent> zo :normal! zo<CR>
nnoremap <silent> zM :normal! zM<CR>
nnoremap <silent> zR :normal! zR<CR>
vmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-a> :NERDTreeClose<CR>
nnoremap <C-f> :NERDTreeFind<CR>
let g:NERDTreeLimitedSyntax = 1
nnoremap <silent> <c-k> :wincmd k<CR>
nnoremap <silent> <c-j> :wincmd j<CR>
nnoremap <silent> <c-h> :wincmd h<CR>
nnoremap <silent> <c-l> :wincmd l<CR>
colorscheme wal
inoremap <silent><expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"