-
Notifications
You must be signed in to change notification settings - Fork 4
/
init.vim
64 lines (50 loc) · 1.41 KB
/
init.vim
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
"""""""""""""""""""""""""""""""""""
" plug-vim
call plug#begin("~/.cache/nvim/")
" Plugin Section
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'sbdchd/neoformat'
Plug 'jiangmiao/auto-pairs'
Plug 'mattn/emmet-vim'
Plug 'junegunn/fzf.vim'
Plug 'instant-markdown/vim-instant-markdown', {'for': 'markdown', 'do': 'npm install'}
call plug#end()
"""""""""""""""""""""""""""""""""""
" global
" For better readability
syntax enable
set number
" Tab size
set tabstop=2
set expandtab
set shiftwidth=2
" Nicer colors for EOF
hi EndOfBuffer ctermfg=black ctermbg=NONE
" auto remove trailing whitespace on save
autocmd BufWritePre * %s/\s\+$//e
let mapleader=" "
map <C-F> :wq<CR>
map <C-W> :q<CR>
map <C-S> :w<CR>
"""""""""""""""""""""""""""""""""""
" neoclide/coc.nvim
source ~/.config/nvim/coc.vim
"""""""""""""""""""""""""""""""""""
" mattn/emmet-vim
let g:user_emmet_mode='a'
let g:user_emmet_expandabbr_key = '<C-E>'
"""""""""""""""""""""""""""""""""""
" sbdchd/neoformat
" Autoformat using Prettier
filetype plugin indent on
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.html Neoformat prettier
"""""""""""""""""""""""""""""""""""
" junegunn/fzf.vim
noremap <C-p> :call fzf#run({
\ "sink": "tabedit",
\ "source": "find * -type f ! -path '**/.git/**'",
\ "down": "30%"
\ })<CR>
nnoremap <C-j> :tabprevious<CR>
nnoremap <C-i> :tablast<CR>
nnoremap <C-l> :tabnext<CR>