-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
95 lines (79 loc) · 2.09 KB
/
vimrc
File metadata and controls
95 lines (79 loc) · 2.09 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
let g:pathogen_disabled = ["vim-pathogen"]
call pathogen#infect()
if has('unix')
let s:unix=1
let s:vimdir=expand("$HOME/.vim")
else
let s:unix=0
let s:vimdir=expand("$USERPROFILE/vimfiles")
endif
" Many syntax highlighters require efficient regexp due to pathological
" specifications. Setting this to 0 chooses NFA (the new mode) by default and
" falls back to the old engine if necessary.
set regexpengine=0
syntax on
filetype plugin indent on
" indent and expansion rules
set smartindent
set expandtab
set shiftwidth=4
set tabstop=4
set smarttab
set textwidth=80
set colorcolumn=+1
" miscellaneous options
set number
set ruler
set modeline
set shellslash
set backspace=indent,eol,start
set laststatus=2
set wildmenu
" search options
set hlsearch
set incsearch
" use utf-8 encoding by default
set encoding=utf-8
" make Y behavior consistent with other capital motions
map Y y$
" set spell settings (:spell on still must be used to enable per-buffer)
set spelllang=en_us
" viminfo settings
" save marks for 10 files, 100 lines apiece, 50 lines of command history
set viminfo='10,\"100,:50
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
" filetype associations
autocmd BufRead,BufNewFile *.gradle set filetype=groovy
" colorscheme settings
if has('gui_running')
set background=light
else
if $TERMINAL_SOLARIZED != 1
" terminal does not support native solarized colors
let g:solarized_termcolors=256
else
" reveal terminal background if it supports solarized theme
let g:solarized_termtrans=1
endif
set background=dark
endif
colorscheme solarized
" airline settings
let g:airline_theme = "tomorrow"
" vim-signify settings
" Solarized does not properly set SignColumn. Since this is used by Sy to
" indicate unchanged lines, it should be cleared to play well with the rest of
" the colorscheme.
highlight clear SignColumn
let g:signify_vcs_list = ['git', 'hg']
" ctrlp settings
let g:ctrlp_working_path_mode = 0