-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_vimrc
63 lines (51 loc) · 1.46 KB
/
dot_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
call plug#begin()
Plug 'cocopon/iceberg.vim'
Plug 'nordtheme/vim'
Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/fzf'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'preservim/nerdtree'
Plug 'tpope/vim-surround'
Plug 'mattn/emmet-vim'
" Plug 'itchyny/lightline.vim'
" Plug 'ycm-core/YouCompleteMe'
call plug#end()
syntax on
set number
" set autoindent
set autowrite
set smartindent
set textwidth=100
set shell=/usr/bin/zsh
set background=dark
set timeoutlen=500
set tags=./tags,tags;$HOME
colorscheme iceberg
" set laststatus=2
" set statusline=%F
let mapleader = ","
let g:AutoPairsMapCh = 0
" Auto formatting and importing
let g:go_fmt_autosave=1
let g:go_fmt_command="goimports"
hi Normal guibg=NONE ctermbg=NONE
" In insert or command mode, move normally by using Ctrl
inoremap <C-h> <Left>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-l> <Right>
cnoremap <C-h> <Left>
cnoremap <C-j> <Down>
cnoremap <C-k> <Up>
cnoremap <C-l> <Right>
inoremap <expr> <cr> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
" noremap <C-p> :FZF<CR>
noremap <leader>w :w<CR>
noremap <leader>q :q<CR>
noremap <silent> <leader>b :NERDTreeToggle<CR>
noremap <leader>f :FZF<CR>
noremap <leader>gcc :!gcc -Wall -Wextra -o dist.out % && ./dist.out<CR>
noremap <leader>nb :!npm run build<CR>
autocmd FileType javascript,typescript,html,json setlocal shiftwidth=2 softtabstop=2 expandtab
autocmd BufWritePre *.json,*.go,*.c call CocAction('format')