-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
160 lines (148 loc) · 4.32 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
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
set nocompatible
filetype off
if isdirectory("/Library/TeX/texbin")
let $PATH=$PATH.":/Library/TeX/texbin"
endif
"source ~/.vim/bundles/vim-pathogen/autoload/pathogen.vim
"execute pathogen#infect('bundles/{}')
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'bling/airline'
Plugin 'tomasr/molokai'
Plugin 'tpope/vim-vinegar'
Plugin 'tpope/vim-surround'
Plugin 'blerins/flattown'
Plugin 'airblade/vim-gitgutter'
Plugin 'chrostoomey/vim-tmux-navigator'
Plugin 'rhysd/vim-crystal'
call vundle#end()
filetype plugin indent on
syntax on
syntax enable
set updatetime=200
set modeline
set expandtab
set encoding=utf-8
set scrolloff=3
set autoindent
set showmode
set showcmd
set hidden
set wildmenu
set cursorline
set ttyfast
set ruler
set backspace=indent,eol,start
set laststatus=2
set number
set relativenumber
set nofoldenable
set nojoinspaces
set ignorecase
set smartcase
set gdefault
set incsearch
set showmatch
set hlsearch
set nowrap
set autoread
set textwidth=79
set formatoptions=qrn1
set pastetoggle=<F2>
set list
set listchars=tab:→\ ,trail:·
set backup
set backupdir=$HOME/.vim/backup,/tmp/backups,/var/tmp/backups,.
set dir=~/.vim/swap,~/local/tmp,/var/tmp,.
set tags=./tags;./TAGS;$HOME
set mouse=
if exists('+colorcolumn')
set colorcolumn=80
endif
if exists('+undofile')
set undofile
set undodir=$HOME/.vim/undo,/tmp/undos,/var/tmp/undos,.
endif
set guifont=Inconsolata-dz\ for\ Powerline:h12
" Remove annoying scrollbars in macvim
set guioptions=
let mapleader = ","
imap jk <Esc>
nnoremap / /\v
vnoremap / /\v
nnoremap <leader><space> :noh<cr>
nnoremap ; :
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<cr>
nnoremap <leader>q gqip
nnoremap <leader>v V`]
nnoremap <leader>R :RainbowParenthesesToggle<cr>
"nnoremap <leader>N :NERDTreeToggle<cr>
nnoremap <leader>B :buffers<cr>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" COLORS@@#@!!!!
set t_Co=256
set background=dark
"colorscheme flattown
colorscheme molokai
" Tabbing defaults
set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
" Custom tabbing for filetypes
autocmd FileType make,Makefile,mk setlocal tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab
autocmd FileType python,py,wsgi setlocal tabstop=4 softtabstop=4 shiftwidth=4 expandtab
autocmd FileType yaml,yml setlocal filetype=yaml.ansible
autocmd BufNewFile,BufRead SCons* set filetype=python
autocmd BufNewFile,BufRead Jenkinsfile,*.dsl set filetype=groovy
" Open NERDTree on startup if no files specified
"autocmd vimenter * if !argc() | NERDTree | endif
"autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
"let NERDTreeIgnore=['__pycache__[[dir]]','\.pyc$[[file]]','\.class$[[file]]','\.[oa]$[[file]]','\.orig$']
"
let g:vim_markdown_folding_disabled=1
"let g:solarized_termcolors=256
let g:airline_powerline_fonts=1
let g:netrw_browse_split=4
let g:netrw_altv=1
"let g:netrw_liststyle=3
let g:netrw_banner=0
let g:netrw_winsize=28
let g:go_fmt_command = "goimports"
"let g:go_fmt_autosave = 0 " Disable formats on save
"let g:ycm_autoclose_preview_window_after_completion = 1
"let g:ycm_autoclose_preview_window_after_insertion = 1
let g:neocomplete#enable_at_startup = 1
let g:SexyScroller_DetectPendingKeys = 1
let g:SexyScroller_EasingStyle = 2
let g:SexyScroller_CursorTime = 5
let g:vimtex_latexmk_options = "-pdf -verbose -file-line-error -synctex=1 -interaction=nonstopmode -latex=xelatex"
"let g:vimtex_view_general_viewer = '/Applications/Skim.app/Contents/SharedSupport/displayline'
"let g:vimtex_view_general_options = '-r @line @pdf @tex'
" This adds a callback hook that updates Skim after compilation
let g:vimtex_latexmk_callback_hooks = ['UpdateSkim']
function! UpdateSkim(status)
if !a:status | return | endif
let l:out = b:vimtex.out()
let l:tex = expand('%:p')
let l:cmd = [g:vimtex_view_general_viewer, '-r']
if !empty(system('pgrep Skim'))
call extend(l:cmd, ['-g'])
endif
if has('nvim')
call jobstart(l:cmd + [line('.'), l:out, l:tex])
elseif has('job')
call job_start(l:cmd + [line('.'), l:out, l:tex])
else
call system(join(l:cmd + [line('.'), shellescape(l:out), shellescape(l:tex)], ' '))
endif
endfunction
set wildignore+=*/tmp/*,*.so,*.swp,*.zip
let g:ctrlp_custom_ignore = {
\ 'dir': '\v[\/]\.(git|hg|svn)$',
\ 'file': '\v\.(exe|so|dll|a|o)$',
\ }