-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
190 lines (137 loc) · 3.83 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
let g:python_host_prog='/usr/bin/python2.7'
" Vundle
set nocompatible " be iMproved, required
filetype off
" set the runtime path to include Vundle and initialize
if has('nvim')
set rtp+=~/.nvim/bundle/Vundle.vim
call vundle#begin('~/.nvim/bundle')
else
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
endif
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" youcompleteme doesn't seem to work. Some python-version-problem
"Plugin 'Valloric/YouCompleteMe'
"and neocomplete requires lua, which isn't in the default macvim
"Bundle 'Shougo/neocomplete'
" graphical undo-tree
Plugin 'vim-scripts/Gundo'
"disabled because it messes with too many things...
"Plugin 'raimondi/delimitmate'
Plugin 'b4winckler/vim-angry'
Plugin 'vim-scripts/Mark'
Plugin 'fholgado/minibufexpl.vim'
Plugin 'mfukar/robotframework-vim'
" trying something out with this...temporary
Plugin 'bfredl/nvim-ipy'
Bundle 'altercation/vim-colors-solarized'
if has('nvim')
Bundle 'https://github.com/freeo/vim-kalisi'
endif
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" python spaces
set smartindent
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set colorcolumn=80
set showcmd
set ruler
" numbers
set nu
" syntax highlighting
syntax on
syn sync fromstart
" auto-indent
filetype indent on
set autoindent
" line wrapping
set lbr
" color scheme
" colorscheme delek
" colorscheme murphy
" colorscheme desert
if has('nvim')
colorscheme kalisi
set background=light
else
colorscheme solarized
" when running macvim this happens automatically, but in my terminal it
" doesn't...
set background=light
endif
" pattern matching while typing
set incsearch
" highlight matches
set hlsearch
" LaTeX plugin
filetype plugin on
set grepprg=grep\-nH\ $*
" MiniBufExplorer
" based on http://blog.dispatched.ch/2009/05/24/vim-as-python-ide/
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
" set MBE on top even though I'm setting splitbelow
let g:miniBufExplSplitBelow = 0
" code completion
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType C set fdm=syntax
" have bash-style tab-completion on files
" based on http://blog.sanctum.geek.nz/vim-filename-completion/
if has("wildmenu")
set wildmenu
set wildmode=longest,list
endif
set splitright
set splitbelow
" seen at https://bitbucket.org/sjl/dotfiles/src/cbbbc897e9b3/vim/vimrc
set list
set listchars=tab:▸\
" Cursorline
" Only show cursorline in the current window and in normal mode.
set cursorline
augroup cline
au!
au WinLeave * set nocursorline
au WinEnter * set cursorline
"au InsertEnter * set nocursorline
"au InsertLeave * set cursorline
augroup END
set scrolloff=3
set hidden
" It's 2012.
noremap j gj
noremap k gk
noremap gj j
noremap gk k
" Easy buffer navigation
noremap <C-h> <C-w>h
noremap <C-j> <C-w>j
noremap <C-k> <C-w>k
noremap <C-l> <C-w>l
" Stamping http://vim.wikia.com/wiki/Replace_a_word_with_yanked_text
nnoremap S "_diwP
" based on http://vim.wikia.com/wiki/Make_Vim_completion_popup_menu_work_just_like_in_an_IDE
" set completeopt=longest,menuone
" autocompletion shouldn't hijack my enter-key - http://stackoverflow.com/questions/17043699/how-can-i-remap-autocompletion-in-vim
inoremap <expr> <CR> pumvisible() ? '<C-e><CR>' : '<CR>'
" TODO try out plugin 'endwise'
if has('nvim')
function StartTerminal()
terminal bash -l
set fdm=marker
set scrolloff=0
endfunction
command Term call StartTerminal()
tnoremap <Esc> <C-\><C-n>
let g:terminal_scrollback_buffer_size=100000
endif
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
" check out gitgutter