-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
150 lines (120 loc) · 3.75 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
" Pathogen execution on startup
let g:pathogen_disabled = [ 'YouCompleteMe', 'omnisharp-vim' ]
if !&diff
" Diff mode
" execute pathogen#infect()
else
diffopt+=iwhite
set cursorline
map ] ]c
map [ [c
hi DiffAdd ctermfg=233 ctermbg=LightGreen guifg=#003300 guibg=#DDFFDD gui=none cterm=none
hi DiffChange ctermbg=white guibg=#ececec gui=none cterm=none
hi DiffText ctermfg=233 ctermbg=yellow guifg=#000033 guibg=#DDDDFF gui=none cterm=none
" :diffg RE " get from REMOTE
" :diffg BA " get from BASE
" :diffg LO " get from LOCAL
endif
syntax on
filetype plugin indent on
filetype plugin on
" Allow nerdTree to modify
set modifiable
map <C-n> : NERDTreeToggle<CR>
let g:NERDTreeHijackNetrw=0
let mapleader = ","
" Goconfiguration
au FileType go nmap <leader>r <Plug>(go-run)
au FileType go nmap <leader>b <Plug>(go-build)
au FileType go nmap <leader>t <Plug>(go-test)
au FileType go nmap <leader>c <Plug>(go-coverage)
au FileType go nmap <Leader>ds <Plug>(go-def-split)
au FileType go nmap <Leader>dv <Plug>(go-def-vertical)
au FileType go nmap <Leader>dt <Plug>(go-def-tab)
au FileType go nmap <Leader>gd <Plug>(go-doc)
au FileType go nmap <Leader>gv <Plug>(go-doc-vertical)
au FileType go nmap <Leader>s <Plug>(go-implements)
au FileType go nmap <Leader>e <Plug>(go-rename)
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_fmt_command = "goimports"
" Python Configuration
au BufNewFile,BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
" SimpylFold
let g:SimpylFold_docstring_preview = 1
autocmd BufWinEnter *.py setlocal foldexpr=SimpylFold(v:lnum) foldmethod=expr
autocmd BufWinLeave *.py setlocal foldexpr< foldmethod<
" Fix indentation to 2 spaces
set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
set nu
set nocompatible
set backspace=2
set laststatus=2 " Always show the statusline
set encoding=utf-8 " Necessary to show Unicode glyphs
set t_Co=256 " Explicitly tell Vim that the terminal supports 256 colors
set splitbelow
set splitright
set foldmethod=indent
set foldlevel=99
set background=dark
color peachpuff
" Mapping
no <down> ddp
no <up> ddkP
no <left> gT
no <right> gt
noremap <space> za
noremap <C-q> <C-v>
" Window navigation
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
" CTRL-X is Cut
vnoremap <C-X> "+x
" CTRL-C is Copy
vnoremap <C-C> "+y
" adding syntax highlighting for all *.md files
au BufRead,BufNewFile *.md set filetype=markdown
" Mapping VisualStudio commands
"nnoremap <Leader>i :vsc Resharper.Resharper_GoToImplementation<CR>
"nnoremap <Leader>f :vsc Resharper.Resharper_GoToFile<CR>
"nnoremap <Leader>u :vsc Resharper.Resharper_FindUsages<CR>
"nnoremap <Leader>d :vsc Resharper.Resharper_GoToDeclaration<CR>
"nnoremap <Leader>gb :vsc Resharper.Resharper_NavigateBackward<CR>
"nnoremap <Leader>rt :vsc Resharper.Resharper_RefactorThis<CR>
nnoremap <Leader>p "0p
inoremap jj <ESC>
if has("gui_running")
"let g:Powerline_symbols = 'fancy'
"autocmd Vimenter * NERDTreeTabsToggle
let g:Powerline_symbols = 'fancy'
" Change initial window size
set lines=50 columns=150
" Set colours
set background=dark
colorscheme solarized
set guifont=Courier_New:h11
else
let g:airline_powerline_fonts=1
let g:Powerline_symbols='unicode'
set encoding=utf-8
let g:airline_powerline_fonts=1
"set guifont=Source\ Code\ Pro\ for\ Powerline:h11
set guifont=Courier_New:h11
endif