-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
150 lines (139 loc) · 4.05 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
" _
" __ _(_)_ __ ___ _ __ ___
" \ \ / / | '_ ` _ \| '__/ __|
" \ V /| | | | | | | | | (__
" (_)_/ |_|_| |_| |_|_| \___|
"
" let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" Plug package manager
call plug#begin()
Plug 'ctrlpvim/ctrlp.vim'
Plug 'derekelkins/agda-vim'
Plug 'epdtry/neovim-coq'
Plug 'idris-hackers/idris-vim'
Plug 'lervag/vimtex'
Plug 'morhetz/gruvbox'
" Plug 'neovimhaskell/haskell-vim'
Plug 'ntpeters/vim-better-whitespace'
Plug 'parsonsmatt/intero-neovim'
Plug 'tpope/vim-surround'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()
"-------------------------------------------------------------------------------
" Global keys and such
let mapleader = ","
let localmapleader = "\\"
nnoremap <leader>ev :edit $MYVIMRC<cr>
nnoremap <leader>sv :source $MYVIMRC<cr>
"-------------------------------------------------------------------------------
" Terminal mode stuff
tnoremap <Esc> <C-\><C-n>
tnoremap <C-[> <C-\><C-n>
tnoremap <A-h> <C-\><C-n><C-w>h
tnoremap <A-j> <C-\><C-n><C-w>j
tnoremap <A-k> <C-\><C-n><C-w>k
tnoremap <A-l> <C-\><C-n><C-w>l
nnoremap <A-h> <C-w>h
nnoremap <A-j> <C-w>j
nnoremap <A-k> <C-w>k
nnoremap <A-l> <C-w>l
autocmd BufWinEnter,WinEnter term://* startinsert
autocmd BufLeave term://* stopinsert
" "-------------------------------------------------------------------------------
" " Simple tweaks
filetype plugin indent on
"
" "-------------------------------------------------------------------------------
" " Tabs & Indent
set textwidth=80
set expandtab
set softtabstop=4
set shiftwidth=4
set tabstop=4
set autoindent
autocmd FileType haskell setlocal shiftwidth=2 softtabstop=2
autocmd FileType idris setlocal shiftwidth=2 softtabstop=2
autocmd FileType html setlocal shiftwidth=2 softtabstop=2
autocmd BufWritePre * StripWhitespace
"
" "-------------------------------------------------------------------------------
" " Programming tool
" " set nowrap
" set backspace=indent,eol,start
" set nostartofline
" set hidden
" set autochdir
" set mouse=a
" set autoread
"
" "-------------------------------------------------------------------------------
" " Airline
let g:airline_powerline_fonts = 1
" let g:airline_left_sep=''
" let g:airline_right_sep=''
let g:airline_theme = 'base16'
"
" "-------------------------------------------------------------------------------
" " Haskell
" let g:haddock_browser="open"
"
" "-------------------------------------------------------------------------------
" " Searching
set ignorecase
set smartcase
set incsearch
"
" "-------------------------------------------------------------------------------
" " Wildmenu and Ctrl-P
" " let g:ctrlp_cache_dir = $HOME . '/.cache/ctrlp'
" " if executable('ag')
" " let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" " endif
" " set wildmenu
" " set wildmode=list:longest,full
" " let g:ctrlp_custom_ignore = {
" " \ 'dir': '\.git$\|\.svn$\|Library\|Music\|Pictures\|Downloads',
" " \ 'file': '\.so$\|\.hi$\|\.o$\|\.swp$\|.zip$'
" " \ }
" "
"
" "-------------------------------------------------------------------------------
" " GUI/Terminal specific tweaks
" if has("gui_running")
" set gfn=Source\ Code\ Pro:h18
" set guioptions-=T
" set guioptions-=r
" set guioptions-=L
" else
" set t_Co=16
" endif
" "-------------------------------------------------------------------------------
" " Colors
syntax on
" let g:solarized_italic=0
" "let g:solarized_bold=0
" "let g:solarized_termcolors=16
colorscheme base16-solarized
set background=light
" "-------------------------------------------------------------------------------
" " Aesthetics
" " hi StatusLine ctermbg=10
" hi Visual ctermbg=10
" set number
" set laststatus=2
" set ruler
" set showcmd
" set showmatch
"
"
" "-------------------------------------------------------------------------------
" " Keybindings
" nnoremap <silent> [b :bprevious<CR>
" nnoremap <silent> ]b :bnext<CR>
" nnoremap <silent> [a :previous<CR>
" nnoremap <silent> ]a :next<CR>
" nmap <leader>v :setlocal paste! paste?<cr>
"
" "-------------------------------------------------------------------------------
" " Haskell