-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
111 lines (90 loc) · 2.74 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
" statusline & pathogen loading
set statusline =%f\ %h%m%r\ -\ buf#:\ %n\ %=%{fugitive#statusline()}\ \ line:\ %l/%L\ -\ col:\ %c%V\ \
execute pathogen#infect()
set binary " tbh don't remember why
" indentation
set autoindent
set smartindent
set tabstop=4
set et
set shiftwidth=4
set backspace=2
" syntax basics
syntax on
filetype plugin on
" line numbers
set number
set relativenumber
" search settings
set hlsearch
set incsearch
set ignorecase
set smartcase
au InsertEnter * set nohlsearch
au InsertLeave * set hlsearch
"split location defaults
set splitbelow
set splitright
" enforce hjkl movement
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" lagniappe
set laststatus=2
set t_Co=256
source ~/.regexlist.vim
set ruler
set wildmenu
au Filetype html setlocal tabstop=2 shiftwidth=2
" au BufRead,BufNewFile *.less set filetype=css "only if no less highlighting :P
au BufRead,BufNewFile *.swig set filetype=htmldjango
" django/mybox specific
au Filetype htmldjango setlocal tabstop=2 shiftwidth=2
au Filetype css setlocal tabstop=2 shiftwidth=2
au Filetype scss setlocal tabstop=2 shiftwidth=2
au Filetype javascript setlocal tabstop=2 shiftwidth=2
" pylint chokes a bit on django :(
" let g:syntastic_python_pylint_args = "--load-plugins django_pylint"
let g:ale_python_pylint_options = '--load-plugins pylint_django'
" always populate error list for :lnext, :lprev
" let g:syntastic_always_populate_loc_list = 1
" correctly highlight JSX in .js files
let g:jsx_ext_required = 0
" use eslint, not jshint
" let g:syntastic_javascript_checkers = ['eslint']
let g:ale_linters = {
\ 'javascript': ['eslint'],
\ 'python': ['flake8'],
\}
" Tell vim to remember certain things when we exit
" '20 : marks will be remembered for up to 20 previously edited files
" "100 : will save up to 100 lines for each register
" :20 : up to 20 lines of command-line history will be remembered
" % : saves and restores the buffer list
" n... : where to save the viminfo files
set viminfo='20,\"100,:20,%,n~/.viminfo
" actual stuff that does the cursor-position mambo
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
" do the cursor-position mambo
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
set background=light
colorscheme solarized
" deploy shortcut
command DW w | AsyncRun deploy water
nnoremap ; :
vnoremap ; :
" aurora/vesper specific - notebook md template
au BufNewFile /home/noah/projects/notebook/**.md r /home/noah/.vim/templates/notes.md
" vimwiki settings
au Filetype vimwiki setlocal tabstop=2 shiftwidth=2 background=dark
au Filetype vimwiki colorscheme gruvbox
let g:vimwiki_list = [{'path':'~/wiki/','path_html':'~/wiki_export/','syntax':'markdown'}]