Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " Vundle
- filetype off
- set nocompatible
- set rtp+=~/.vim/bundle/vundle/
- call vundle#rc()
- Bundle "Zenburn"
- Bundle "xoria256.vim"
- Bundle "gmarik/vundle"
- Bundle "godlygeek/tabular"
- Bundle "tpope/vim-fugitive"
- Bundle "surround.vim"
- Bundle "repeat.vim"
- Bundle "ervandew/supertab"
- Bundle "fholgado/minibufexpl.vim"
- "Bundle "bufexplorer.zip"
- Bundle "https://github.com/jcf/vim-latex.git"
- Bundle "plasticboy/vim-markdown"
- Bundle "cypok/vim-ledger"
- " General
- filetype plugin indent on
- "set autochdir
- set autoindent
- set autoread
- set autowrite
- set bg=dark
- set backspace=2
- set backup
- set backupdir=~/.vim/backup
- " Unamed clipboard
- set cb=autoselet,exclude:\\\|linux
- " Command height"
- set ch=1
- set nocompatible
- set nocursorline
- set dictionary= " /usr/dict/words
- set directory=~/.vim/tmp " Directories for swap files
- set dy=lastline " Display as much as possible of last line instead of '@'
- set encoding=utf-8
- set noeb " error bells
- set expandtab
- set fdm=manual " no folding
- set ff=unix " file format
- set fileencoding=utf-8
- set nofoldenable
- set nogd " no greedy substitute
- set grepprg=grep\ -nH\ $*
- set hidden
- set nohls " highlight search
- set incsearch
- set ic " ignore case when searching
- set ls=2
- "set lz " lazy redraw
- set magic
- set mps=(:),[:],{:},<:> " pairs matched by %
- set nomodeline
- set nowb " Don't backup before overwriting
- set number
- set pa=.,,~/data/school/*/,~/data/apps/*/ " Path to search
- set ruler
- set secure
- set shiftwidth=3
- set shm=atIT " shortmess, message lengths
- set sr " round indent to multiple of shiftwidth
- set sc " showcmd in status line
- set showmatch
- set showmode
- set smartcase
- set smarttab
- set softtabstop=3
- set nospell
- set spl=en
- set statusline=%f%m%r%h%w\ %{&ff}\ %Y\ [0x\%02.2B]\ %{fugitive#statusline()}\ %=%l/%L,%03.3v\ %p%%
- set tabstop=3
- set t_Co=256
- set term=$TERM
- set terse
- set undolevels=1000
- set updatecount=150 " write swap file after each 150 chars
- set updatetime=5000 " write swap file after 5 inactive seconds
- try
- set undodir=~/.vim/undodir
- set undofile
- catch
- endtry
- set ve=block " virtual edit
- set wildchar=<TAB>
- set wildignore+=.git,*.aux,*.out,*.toc,*.jpg,*.bmp,*.gif,*.png,*.jpeg,*.DS_Store,*.spl,*.sw?,*.pyc
- set wildmenu
- set wildmode=list:longest,full
- let mapleader = ","
- let g:mapleader = ","
- colorscheme xoria256
- filetype plugin on
- filetype indent on
- syntax on
- command! Bclose call <SID>BufcloseCloseIt()
- function! <SID>BufcloseCloseIt()
- let l:currentBufNum = bufnr("%")
- let l:alternateBufNum = bufnr("#")
- if buflisted(l:alternateBufNum)
- buffer #
- else
- bnext
- endif
- if bufnr("%") == l:currentBufNum
- new
- endif
- if buflisted(l:currentBufNum)
- execute("bdelete! ".l:currentBufNum)
- endif
- endfunction
- set completeopt="longest"
- "function! Tab_Or_Complete()
- " if col('.')>1 && strpart( getline('.'), col('.')-2, 3 ) =~ '^\w'
- " return "\<C-P>"
- " else
- " return "\<Tab>"
- " endif
- "endfunction
- " Spell checking
- map <leader>ss :setlocal spell!<cr>
- map <leader>sn ]s
- map <leader>sp [s
- map <leader>sa zg
- map <leader>s? z=
- nmap <leader>w :w!<cr>
- " Moving around
- map <C-j> <C-W>j
- map <C-k> <C-W>k
- map <C-h> <C-W>h
- map <C-l> <C-W>l
- " Buffers
- map <leader>bd :Bclose<cr>
- map <leader>be :MiniBufExplorer<cr>
- nnoremap <silent> k gk
- nnoremap <silent> j gj
- " Cope
- map <leader>cc :botright cope<cr>
- map <leader>n :cn<cr>
- map <leader>p :cp<cr>
- " Autocommands
- "autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ')
- autocmd! bufwritepost .vimrc source ~/.vimrc
- " Misc
- map <leader>pp :setlocal paste!<cr>
- map Y y$
- nmap <leader>e :e ~/.vimrc <cr>
- nmap <leader>x :x <cr>
- "inoremap <Tab> <C-R>=Tab_Or_Complete()<CR>
- " Create new blank lines and stay out of insert
- nnoremap <silent> zj o<Esc>
- nnoremap <silent> zk O<Esc>
- " git
- nmap <leader>gs :Gstatus<cr>
- nmap <leader>gc :Gcommit<cr>
- nmap <leader>gp :Git push<cr>
- nmap <leader>gf :Git pull<cr>
- " Tabular
- map <leader>= :Tabularize
- " latex
- let g:tex_flavor='latex'
- let g:Tex_MultipleCompileFormats='pdf'
- let g:Tex_DefaultTargetFormat='pdf'
- let g:Tex_PromptedEnvironments='eqnarray*,eqnarray,equation,equation*,\[,$$,align,align*,inner-list'
- let g:Tex_HotKeyMappings='inner-list,align*,definition,theorem'
- "let g:Tex_CompileRule_pdf='pdflatex --interaction=nonstopmode $*'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement