-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
executable file
·140 lines (108 loc) · 3.49 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
color Tomorrow-Night
syntax on
runtime bundle/vim-pathogen/autoload/pathogen.vim
call pathogen#infect()
let g:lightline = {
\ 'colorscheme': 'wombat',
\ }
set noshowmode
set expandtab
set shiftwidth=4
set tabstop=4
set autoindent
set smartindent
nmap <C-j> jzz
nmap <C-k> kzz
" (vim-unimpaired)
map ]d ]cz+
map [d [cz+
" edit file in the same directory
map ,e :e <C-R>=expand("%:p:h") . "/" <CR>
" saveas file in the same directory
map ,s :saveas <C-R>=expand("%:p:h") . "/" <CR>
" find tag
map ,, :tag <C-R>="" <CR>
" (taglist.vim)
nmap <silent> <F2> :TlistToggle<CR>
let Tlist_WinWidth=60
" (eclim)
imap <C-i> <C-o>:JavaImport<CR><C-o>A
nmap <C-i> :JavaImport<CR>
let g:EclimCompletionMethod = 'omnifunc'
set wildmode=longest,list
" nmap j gj
" nmap k gk
hi Visual ctermfg=black ctermbg=gray
hi Pmenu ctermfg=black ctermbg=brown
set completeopt=menu,longest
map gt :HdevtoolsType<CR>
map gh :HdevtoolsClear<CR>
map gi :HdevtoolsInfo<CR>
map gl :GhcModLint<CR>
map tt :TagbarToggle<CR>
" (sytanstic)
let g:syntastic_auto_loc_list=1
let g:haskell_conceal_wide = 0
let g:haskell_conceal_enumerations = 0
let g:haskell_conceal = 0
let g:syntastic_enable_highlighting = 0
let g:syntastic_haskell_checkers=['hdevtools']
let g:syntastic_lhaskell_checkers=['hdevtools']
let g:syntastic_check_on_wq=0
let g:syntastic_echo_current_error=0
let g:tsuquyomi_disable_quickfix = 1
let g:syntastic_typescript_checkers = ['tsuquyomi']
set nrformats=octal,hex,alpha
" set iskeyword=a-z,A-Z,_,.,39 " breaks fugitive diff
set shortmess+=A
set t_Co=256
" highlighting group under the curosr
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
imap <C-x>/ <C-x>/<BS>
nmap <Leader>s :source ~/.vimrc
autocmd Filetype gitcommit setlocal spell textwidth=72
" no folding
au WinEnter * set nofen "no folding in vimdiff
au WinLeave * set nofen "no folding in vimdiff
set nofoldenable
au BufRead,BufNewFile *.xjb setfiletype xml
" spread out and insert (unimpaired)
map []<space> [<space>k]<space>o
map ][<space> ]<space>j[<space>O
" vimdiff colors
highlight DiffAdd cterm=none ctermfg=fg ctermbg=darkCyan gui=none guifg=fg guibg=Blue
highlight DiffDelete cterm=none ctermfg=fg ctermbg=darkCyan gui=none guifg=fg guibg=Blue
highlight DiffChange cterm=none ctermfg=fg ctermbg=darkCyan gui=none guifg=fg guibg=Blue
highlight DiffText cterm=none ctermfg=bg ctermbg=White gui=none guifg=bg guibg=White
set diffopt+=vertical
let g:jedi#popup_on_dot = 0
let g:vim_json_syntax_conceal = 0
" invert comments (tcomment.vab)
let @i = 'gcc'
map gi :normal @i<CR>
set wildmode=longest,list,full
set expandtab
map tt :TagbarToggle<CR>
let loaded_matchparen = 2
set incsearch
highlight Search ctermbg=black ctermfg=gray
highlight Visual ctermfg=black ctermfg=white
highlight Normal ctermfg=black ctermfg=gray
let g:syntastic_haskell_hdevtools_args = '-g-fdefer-type-errors -g-isrc -g-Wall'
set tags=tags;/,codex.tags;/
set laststatus=0
set noswapfile
set hidden
autocmd BufNewFile,BufRead fugitive://* set bufhidden=delete
" switch back-and-forth between Code.java and CodeTest.java
function! Test()
if @% =~ 'Test.java$'
let l:test = substitute(substitute(@%, '/test/', '/main/', ''), 'Test.java$', '.java', '')
else
let l:test = substitute(substitute(@%, '/main/', '/test/', ''), '.java$', 'Test.java', '')
endif
execute 'edit' l:test
endfunction
:command! Test :call Test()