-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
75 lines (62 loc) · 1.77 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
" vim-plug
call plug#begin()
Plug 'alvan/vim-closetag'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'fatih/vim-go', {'do': 'GoUpdateBinaries'}
Plug 'untitled-ai/jupyter_ascending.vim'
Plug 'Luxed/ayu-vim'
Plug 'gabrieltassinari/vim-sunbather'
call plug#end()
" Mapping
nnoremap <silent>c, :CocDisable<CR>
nnoremap <silent>c. :CocEnable<CR>
map <silent>gd <Plug>(coc-definition)
" Replace increment key due to tmux bind C-a
nnoremap <C-b> <C-a>
xnoremap <C-b> <C-a>
xnoremap g<C-b> g<C-a>
" Create a new jupyter cell
noremap <silent> <C-s>c o# %%<Esc>
noremap <silent> <C-s>m o# %% [markdown]<Esc>
" General config
set encoding=utf-8
set number
set relativenumber
set guicursor=i:block
set wildmenu
" Remove *~ / *.un files
set nobackup
set noundofile
set noswapfile
" Tab indentation
set noexpandtab
set tabstop=8
set shiftwidth=8
set backspace=indent,eol,start
autocmd Filetype python set sw=4 ts=4 et
autocmd Filetype haskell set sw=4 ts=4 et
autocmd Filetype sh set sw=4 ts=4 noet
autocmd Filetype cpp set sw=4 ts=4 noet
autocmd Filetype css set sw=2 ts=2 noet
autocmd Filetype json set sw=2 ts=2 et
autocmd Filetype javascript set sw=2 ts=2 et
autocmd Filetype typescript set sw=2 ts=2 et
autocmd Filetype typescriptreact set sw=2 ts=2 et
autocmd Filetype html set sw=2 ts=2 et
" Enable mouse (to scroll works with tmux)
if !has('nvim')
set ttymouse=xterm2
endif
set mouse=a
" Colorscheme/Colors
syntax on
set background=dark
"colorscheme ayu
colorscheme sunbather
set t_Co=256
" Background transparency
hi signcolumn guibg=NONE ctermbg=NONE
hi Normal guibg=NONE ctermbg=NONE
"hi StatusLine guibg=NONE ctermbg=NONE
" Coc.nvim extensions
let g:coc_global_extensions = ['coc-tsserver', 'coc-pyright']