-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.vimrc
More file actions
195 lines (165 loc) · 6.66 KB
/
.vimrc
File metadata and controls
195 lines (165 loc) · 6.66 KB
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
191
192
193
194
195
" An example for a vimrc file.
"
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2008 Dec 17
"
" To use it, copy it to
" for Unix and OS/2: ~/.vimrc
" for Amiga: s:.vimrc
" for MS-DOS and Win32: $VIM\_vimrc
" for OpenVMS: sys$login:.vimrc
"###########################################################
"########## Settings for Vundle to work. ###################
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" Julia syntax highlighting.
Plugin 'JuliaEditorSupport/julia-vim'
Plugin 'VundleVim/Vundle.vim'
" let Vundle manage Vundle, required
" You need to do `:PluginInstall syntastic` before uncommenting this line, I've found.
Plugin 'syntastic'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
" Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
" Plugin 'L9'
" Git plugin not hosted on GitHub
" Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
" Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
" Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Install L9 and avoid a Naming conflict if you've already installed a
" different version somewhere else.
" Plugin 'ascenator/L9', {'name': 'newL9'}
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
" snakemake
au BufNewFile,BufRead Snakefile set syntax=snakemake
au BufNewFile,BufRead *.smk set syntax=snakemake
"########### End of settings for Vundle to work ############
"###########################################################
"
"###########################################################
"####### Syntatic settings #################################
" Recommended settings.
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" python3 mode.
"let g:syntastic_python_python_exec = 'python3'
let g:syntastic_python_checkers = ['pyflakes'] " Last I checked, you need version 2.1.1, 2.3.1 doesn't work.
"let g:syntastic_quiet_messages = { "type": "style" }
" problem with includes.
"let g:syntastic_cpp_include_dirs = [ '../include', 'include','./include','/mnt/home/bbusemeyer/lib/afqmclab-gcc/include','/mnt/home/bbusemeyer/lib/gtest/include' ]
let g:syntastic_cpp_remove_include_errors=1
"####### End Syntatic settings #############################
"###########################################################
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" Don't use Ex mode, use Q for formatting
map Q gq
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
" so that you can undo CTRL-U after inserting a line break.
inoremap <C-U> <C-G>u<C-U>
" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
"set mouse=a
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
"autocmd BufWinLeave * mkview
"autocmd BufWinEnter * silent loadview
" # Function to permanently delete views created by 'mkview'
function! MyDeleteView()
let path = fnamemodify(bufname('%'),':p')
" vim's odd =~ escaping for /
let path = substitute(path, '=', '==', 'g')
if empty($HOME)
else
let path = substitute(path, '^'.$HOME, '\~', '')
endif
let path = substitute(path, '/', '=+', 'g') . '='
" view directory
let path = &viewdir.'/'.path
call delete(path)
echo "Deleted: ".path
endfunction
" # Command Delview (and it's abbreviation 'delview')
command Delview call MyDeleteView()
" Lower-case user commands: http://vim.wikia.com/wiki/Replace_a_builtin_command_using_cabbrev
cabbrev delview <c-r>=(getcmdtype()==':' && getcmdpos()==1 ? 'Delview' : 'delview')<CR>
" Julia filetype detection.
if v:version < 704
" NOTE: this line fixes an issue with the default system-wide lisp ftplugin
" which didn't define b:undo_ftplugin on older Vim versions
" (*.jl files are recognized as lisp)
autocmd BufRead,BufNewFile *.jl let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp<"
endif
autocmd BufRead,BufNewFile *.jl set filetype=julia
set omnifunc=LaTeXtoUnicode#omnifunc
" Fix python fuck around.
function! SetupPython()
" Here, you can have the final say on what is set. So
" fixup any settings you don't like.
setlocal softtabstop=2
setlocal tabstop=2
setlocal shiftwidth=2
endfunction
command! -bar SetupPython call SetupPython()
filetype plugin indent on
autocmd FileType tex setlocal wrap spell
autocmd FileType text setlocal wrap spell
autocmd FileType markdown setlocal wrap spell
set nobackup
set nowrap " turn off the fucking wrap around
set linebreak " if the wrap around is on, don't break words
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set tabstop=2 " makes tabs of width 2
set shiftwidth=2 " indents by 2
set expandtab " use spaces instead of tabs
set number " numbers the lines
set wildmenu " tab completion
set fdm=indent " Folding mode
set tw=0 " Textwidth=0 means no width.
set t_Co=256 " Number of colors available.
set background=light
colorscheme mydelek