set autoindent
set modeline
set background=dark
set encoding=utf-8
set history=1000
set showcmd
set laststatus=2
set virtualedit=block
set hidden
set suffixes+=.pdf
set listchars=eol:$,tab:⊫—,trail:␣,extends:»,precedes:«,nbsp:·
if has("syntax")
set statusline=%<[#%n]\ %f%y%H%M%R%W\ %=U+%04B\ %{synIDattr(synID(line('.'),col('.'),1),'name')}\ %-10.(%l,%c%V%)\ %P
else
set statusline=%<[#%n]\ %f%y%H%M%R%W\ %=%-14.(%l,%c%V%)\ %P
endif
if 1
let c_comment_strings=1
let g:EnhCommentifyUserBindings='Yes'
endif
if has("syntax")
syntax on
filetype plugin indent on
let g:is_posix = 1
endif
if exists("+termpalette")
set termpalette=xterm
endif
if has("extra_search")
set hlsearch
set incsearch
nnoremap <C-l> :nohl<CR><C-l>
if !&insertmode
inoremap <C-l> <C-O>:nohl<CR>
endif
endif
highlight Tab ctermbg=Blue
if has("syntax")
match Tab /\t/
endif
if 1
command! SW exe "w !sudo dd of=%" | e!
endif
if 1
command! -bar -bang -count=1 NN if argidx() < argc()-<count> | <count>n<bang> | else | q<bang> | endif
command! -bar -bang -count=1 PP if argidx() >= <count> | <count>N<bang> | else | q<bang> | endif
endif
if 1
command! -nargs=+ -complete=shellcmd Run new | set buftype=nofile | r ! <args>
endif
if has("insert_expand")
if has("autocmd")
autocmd Filetype * if &omnifunc == "" | setlocal omnifunc=syntaxcomplete#Complete | endif
endif
set cot+=longest
inoremap <expr> <C-Space> pumvisible() ? "\<C-n>" : "\<C-x>\<C-o>"
endif
nnoremap <C-Up> :cp<CR>
nnoremap <C-Down> :cn<CR>
inoremap <C-Up> <C-o>:cp<CR>
inoremap <C-Down> <C-o>:cn<CR>
runtime! ftplugin/man.vim
if 1
let tex_flavor="latex"
endif
nnoremap <F7> :wa<CR>:!make<CR>
nnoremap <silent> <F12> :!ctags -R .<CR>:redr!<CR>
if 1
command! -bar -complete=file -nargs=* Make silent! make <args> | cw | redr!
nnoremap <F7> :wa<CR>:Make<CR>
nnoremap <F12> :silent! !ctags -R .<CR>:redr!<CR>
endif
if 1
nnoremap @;; "pyy:@p<CR>
nnoremap @; m':silent set opfunc=ExecRegion<CR>g@
vnoremap @; :<C-u>call ExecRegion('vis')<CR>
function! ExecRegion(type, ...)
if a:type == "vis"
:'<,'> y p
@p
else
let l:origbuf = bufnr("%")
:'[,'] y p
@p
if bufnr("%") == l:origbuf && has("ex_extra")
norm g``
endif
endif
endfun
endif
if 1
nnoremap g\j :silent! set opfunc=JoinOp<CR>g@
vnoremap g\j J
function! JoinOp(type)
'[,'] j
endfun
endif
if $VIM_PAGER_MODE != ""
nnoremap q :q<CR>
nnoremap Q q<CR>
nnoremap <C-Up> ?^commit \x\+$<CR>zt
nnoremap <C-Down> /^commit \x\+$<CR>zt
endif
nnoremap <C-c>a :VCSAdd<CR>
nnoremap <C-c>A :VCSAnnotate<CR>
nnoremap <C-c>c :VCSCommit<CR>
nnoremap <C-c>d :VCSDiff<CR>
nnoremap <C-c>D :VCSVimDiff<CR>
nnoremap <C-c>l :VCSLog<CR>
nnoremap <C-c>o :VCSGotoOriginal<CR>
nnoremap <C-c>R :VCSRevert<CR>
nnoremap <C-c>s :VCSStatus<CR>
nnoremap <C-c>u :VCSUpdate<CR>
nnoremap <C-c><C-c> :VCSGotoOriginal!<CR>
if has("textobjects")
vnoremap iT itk$oj^O
nmap gqP viTJ==Vgq
vnoremap ai :<C-u>. <bar> let ai_re='[^[:space:]].*\%' . virtcol(".") . 'v'<CR>gv?<C-r>=ai_re<CR><CR>j^o/<C-r>=ai_re<CR><CR>k$
endif
if has("digraphs")
digr ee 601
digr Ee 399
digr EE 398
endif
if 1
nnoremap <Leader>o :let b:ospaces=virtcol(".")-1<CR>o<Esc>:exe "norm " . b:ospaces . "i "<CR>:.retab!<CR>A
nnoremap <Leader>O :let b:ospaces=virtcol(".")-1<CR>O<Esc>:exe "norm " . b:ospaces . "i "<CR>:.retab!<CR>A
endif
if 1
let g:csapprox_no_warn=1
let g:CSApprox_verbose_level=0
endif