-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc.txt
63 lines (54 loc) · 1.65 KB
/
vimrc.txt
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
set guifont=Monospace\ 9
syntax on
colorscheme gruvbox
if $TMUX == ''
set clipboard+=unnamed
endif
" set clipboard=unnamed
set background=dark
set term=screen-256color
" Strip trailing whitespace from file when saving
autocmd BufWritePre *.py,*.cc,*.hh normal m`:%s/\s\+$//e ``
autocmd BufWritePre *.py,*.cc,*.hh :%s/\s\+$//e
:set cursorline
:set cursorcolumn
imap jk <Esc>
nnoremap <C-L> :nh
set listchars=tab:>-,extends:>,precedes:<
set tabstop=2
set shiftwidth=2
set noexpandtab
set cindent
set list
set splitbelow
set splitright
set number
set hlsearch
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with spacebar
nnoremap <space> za
" Highlight bad indentation characters
highlight BadIndent ctermbg=gray guibg=wheat
au BufRead,BufNewFile *.cc,*.hh 2match BadIndent /^\t* [\t ]*/
autocmd BufWinEnter *.cc,*.hh 2match BadIndent /^\t* [\t ]*/
au BufRead,BufNewFile *.py,*.pyw 2match BadIndent /^ *\t[\t ]*/
autocmd BufWinEnter *.py,*.pyw 2match BadIndent /^ *\t[\t ]*/
" What to use for an indent.$
" This will affect Ctrl-T and 'autoindent'.$
" Python: 4 spaces$
" C: tabs (pre-existing files) or 4 spaces (new files)$
au BufRead,BufNewFile *.py,*pyw set shiftwidth=4
au BufRead,BufNewFile *.py,*pyw set tabstop=4
au BufRead,BufNewFile *.py,*.pyw set expandtab
au BufRead,BufNewFile *.py,*.pyw set autoindent
autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
execute pathogen#infect()
set syntax=snakemake
au BufNewFile,BufRead Snakefile set syntax=snakemake
au BufNewFile,BufRead *.rules set syntax=snakemake
au BufNewFile,BufRead *.snakefile set syntax=snakemake
au BufNewFile,BufRead Snakefile set syntax=snakemake
set hidden
set history=100