-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
120 lines (102 loc) · 2.51 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
113
114
115
116
117
118
119
120
syntax on filetype plugin indent on
set relativenumber
set showmode
set nowrap
set tw=80
set smartcase
set smarttab
set smartindent
set autoindent
set autoread
set backspace=indent,eol,start
set softtabstop=4
set shiftwidth=4
set expandtab
set incsearch
set history=1000
set clipboard=unnamed,autoselect
set noswapfile
highlight Comment ctermfg=green
set ruler
set ai
set completeopt=menuone,menu,longest
let &t_ut=''
set t_RV=
set encoding=UTF-8
set wildignore+=*\\tmp\\*,*.swp,*.swo,*.zip,.git,.cabal-sandbox
set wildmode=longest,list,full
set wildmenu
set completeopt+=longest
set cmdheight=1
set mouse=nicr
set splitbelow splitright
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
Plug 'jaredgorski/spacecamp'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim'
Plug 'preservim/tagbar'
Plug 'kovisoft/slimv'
" Plug 'ctrlpvim/ctrlp.vim'
call plug#end()
" Customization
colorscheme spacecamp
let g:airline_theme = 'violet'
let g:airline_powerline_fonts = 1
let mapleader = " "
" ********************
" **** KEY REMAPS ****
" ********************
" INSERT
:imap jj <Esc>
" NORMAL
nnoremap <Leader>wj <C-W><C-J>
nnoremap <Leader>wk <C-W><C-K>
nnoremap <Leader>wh <C-W><C-H>
nnoremap <Leader>wl <C-W><C-L>
nnoremap <Leader>. :Explore<CR>
nnoremap <Leader><Tab> :bn<CR>
nnoremap <Leader><Backspace> :bp<CR>
nnoremap <Leader>wd :bd<CR>
nnoremap <Leader>d <Plug>(coc-definition)
nnoremap <Leader>t <Plug>(coc-type-definition)
nnoremap <Leader>p <Plug>(coc-diagnostic-prev)
nnoremap <Leader>n <Plug>(coc-diagnostic-next)
nnoremap <Leader>s :call ShowDoc()<CR>
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap <Left> <Nop>
noremap <Right> <Nop>
" DISABLED
inoremap <Up> <Nop>
inoremap <Down> <Nop>
inoremap <Left> <Nop>
inoremap <Right> <Nop>
" ***************
" *** Plugins ***
" ***************
" CoC
autocmd BufWritePost *.hs call CocActionAsync('format')
function! ShowDoc()
if CocAction('hasProvider', 'hover')
call CocActionAsync('doHover')
else
call feedkeys('s', 'in')
endif
endfunction
" Tagbar
nnoremap <Leader>tt :TagbarToggle<CR>
nnoremap gj :TagbarJump<CR>
nnoremap gn :TagbarJumpNext<CR>
let g:tagbar_map_showproto = 'p'
let g:tagbar_map_close = '<space>wd'
let g:tagbar_autofocus = 1
let g:tagbar_show_data_type = 1
" Fugitive
nnoremap <Leader>ga :Git add<CR>
nnoremap <Leader>gc :Git commit<CR>
nnoremap <Leader>gp :Git pull origin main<CR>
nnoremap <Leader>gs :Git status<CR>