-
Notifications
You must be signed in to change notification settings - Fork 4
/
vimrc.after
133 lines (105 loc) · 4.47 KB
/
vimrc.after
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
" Force some filetypes to load
au BufRead,BufNewFile Dockerfile* set filetype=dockerfile
au BufRead,BufNewFile *.html,*.njk set filetype=htmljinja
au BufRead,BufNewFile *.wsgi set filetype=python
au BufRead,BufNewFile *.json,.babelrc,.eslintrc,.jshintrc set filetype=json
au BufRead,BufNewFile *.vcl set filetype=vcl
au BufRead,BufNewFile *.scss set filetype=scss
au BufRead,BufNewFile *.pde,*.ino set filetype=arduino
au BufRead,BufNewFile *.jbuilder set filetype=ruby
au BufRead,BufNewFile *nginx* set filetype=nginx
au BufRead,BufNewFile *apache* set filetype=apache
au BufRead,BufNewFile Pipfile set filetype=toml
" Make sure our tabbing rules are enforced
au BufRead,BufNewFile * set tw=0 textwidth=0
au BufEnter *.php setlocal noexpandtab shiftwidth=4 tabstop=4
au BufEnter *.py setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
au BufEnter *.wsgi setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
au BufEnter *.md setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=4
au BufEnter *.css,*.scss setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
au BufEnter *.js setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
au BufEnter *.json setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
au BufEnter *.html setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
au BufEnter *.rb setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=2
" Make sure to reload the .editorconfig in case things have changed
au BufEnter * EditorConfigReload
set wrap
let g:ackprg="ack -H --nocolor --nogroup --column --type-add sass=.sass,.scss --ignore-dir=.bundle --ignore-dir=.sass-cache --ignore-dir=.git --ignore-dir=public/cache"
" global ignores
set wildignore+=*.o,*.pyc,*.swp,*/.bundle/*,*/.git/*,*.DS*,*/.sass-cache/*,*/__pycache__/*
" This makes the cmd-t feature work more good
let g:ctrlp_working_path_mode = 'rwa'
let g:ctrlp_use_caching = 1
let g:ctrlp_clear_cache_on_exit = 1
let g:ctrlp_cache_dir = $HOME.'/.cache/ctrlp'
" Use ag if available
if executable('ag')
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
endif
" ignores for cmd+t/ctrl-p
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/](node_modules|build|working|cache|tmp)$',
\ 'file': '\v\.(exe|so|dll|jpg|jpeg|png|gif|psd|bz2|gz|zip|ico|tgz)$'
\ }
" ignores for NERDTree
let NERDTreeIgnore=['^\.bundle$','^\.sass-cache$','^\.git$','^\.DS.*$','\.pyc$','__pycache__']
let NERDTreeShowHidden=1
" Use the fancy symbols. You need to use one of the hacked fonts. Works in Terminal and over ssh.
let g:airline_powerline_fonts = 1
"let g:airline_theme=solarized
" Dunno why I have to specify these
let g:airline_left_sep = ''
let g:airline_left_alt_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
let g:airline_symbols.branch = ''
let g:airline_symbols.readonly = ''
let g:airline_symbols.linenr = ''
" Enable spell check
au BufEnter * setlocal nospell
au BufEnter *.html,*.html.* setlocal spell spelllang=en_us
au BufEnter *.md,*.md.* setlocal spell spelllang=en_us
au BufEnter *.txt,*.txt.* setlocal spell spelllang=en_us
au BufEnter *.json,*.json.* setlocal spell spelllang=en_us
au BufEnter *.xml,*.xml.* setlocal spell spelllang=en_us
au BufEnter *.yml,*.yml.* setlocal spell spelllang=en_us
au BufEnter *.ini,*.ini.* setlocal spell spelllang=en_us
au BufEnter *.csv,*.csv.* setlocal spell spelllang=en_us
set sessionoptions-=options
" Enable mouse in the terminal and over ssh (if it's setup properly)
set mouse=a
" Moar pretty
set t_Co=256
" Set terminal title
let &titlestring=fnamemodify(getcwd(), ":t")
set t_ts=]1;
set t_fs=
set title
" HTML Indenting
"filetype plugin indent on
" Format CSS
autocmd filetype css setlocal equalprg=csstidy\ -\ --silent=true\ --sort_properties=true
"make esc deselect everything
"nnoremap <esc> :noh<return><esc>
" Automatically load .lvimrc files
let g:localvimrc_ask=0
" Syntax checking
" Check on save
let g:syntastic_mode_map = { "mode": "active" }
" Don't show error location list by default
let g:syntastic_auto_loc_list = 0
" Disable line length warnings
"let g:syntastic_python_flake8_args="--ignore=E501"
" Use rubocop
let g:syntastic_ruby_checkers = ['rubocop']
" User EditorConfig
let g:EditorConfig_exclude_patterns = ['fugitive://.*']
" Use eslint
let g:syntastic_javascript_eslint_exe = 'npx eslint'
let g:syntastic_javascript_checkers = ['eslint']
" Assuming solarized colorscheme
colorscheme solarized
" Set line length coloring
"execute "set colorcolumn=" . join(range(81,335), ',')
execute "set colorcolumn=81,101"
highlight ColorColumn guibg=#194550