" set x=y {{{ " set relativenumber set background=dark " set background=light " set t_Co=256 filetype plugin on syntax on set tabstop=4 set tw=80 set linebreak set colorcolumn=80 set shiftwidth=4 set autoindent set mouse=c set clipboard=unnamedplus set foldmethod=marker set linespace=5 " set listchars=tab:\|\ " set list set cursorcolumn set cursorline set timeoutlen=300 set hlsearch " }}} set x=y " autocmd VimResized * wincmd = autocmd BufNewFile,BufRead .* set syntax=sh " vim-plug {{{ " " plug auto-install if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif call plug#begin('~/.vim/plugged') Plug 'vim-scripts/L9' " Plug 'vim-scripts/FuzzyFinder' Plug 'whatyouhide/vim-gotham' Plug 'flazz/vim-colorschemes' Plug '907th/vim-auto-save' let g:auto_save = 1 Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } Plug 'lervag/vimtex' Plug 'Valloric/YouCompleteMe' Plug 'Kevin-Mok/vim-snippets' Plug 'SirVer/ultisnips' Plug 'ervandew/supertab' Plug 'scrooloose/nerdcommenter' let g:NERDTrimTrailingWhitespace = 1 let g:NERDSpaceDelims = 1 Plug 'xolox/vim-misc' Plug 'xolox/vim-colorscheme-switcher' Plug 'tpope/vim-surround' Plug 'easymotion/vim-easymotion' Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'dkarter/bullets.vim' " }}} vim-plug " " YCM/UltiSnips {{{ " " make YCM compatible with UltiSnips (using supertab) let g:ycm_key_list_select_completion = ['', ''] let g:ycm_key_list_previous_completion = ['', ''] let g:SuperTabDefaultCompletionType = '' " better key bindings for UltiSnipsExpandTrigger let g:UltiSnipsExpandTrigger = "" let g:UltiSnipsJumpForwardTrigger = "" let g:UltiSnipsJumpBackwardTrigger = "" " }}} YCM/UltiSnips " call plug#end() colorscheme gotham256 " Mappings {{{ " map :wa map :wqa map :qa! map :AutoSaveToggle map :LLPStartPreview nnoremap :set pastep:set nopaste map O " For splits. nnoremap nnoremap nnoremap nnoremap " Maximize height/width. nnoremap _ nnoremap | let mapleader="\" nnoremap e :e nnoremap ff :set foldmethod=marker zM nnoremap h :set hlsearch! hlsearch? nnoremap he :help nnoremap vhe :vert help nnoremap m :call cursor(0, len(getline('.'))/2) nnoremap nw :set nowrap nnoremap pli :PlugInstall nnoremap plc :PlugClean nnoremap plu :PlugUpdate nnoremap py :set tw=200 nnoremap r q:i.,.+s///gFsi nnoremap rl q:i.s///g nnoremap rv :source $MYVIMRC nnoremap R q:i%s///g2F/i nnoremap s :set syn=sh nnoremap w Vgq nnoremap ww Vjgq nnoremap z za " }}} Mappings " " Local Mappings {{{ " let maplocalleader="-" autocmd Filetype c inoremap s struct pixel autocmd Filetype tex inoremap e \exists autocmd Filetype tex inoremap fa \forall autocmd Filetype tex inoremap g \geq autocmd Filetype tex inoremap i \in autocmd Filetype tex inoremap l \leq autocmd Filetype tex inoremap lr \Leftrightarrow autocmd Filetype tex inoremap n \neg autocmd Filetype tex inoremap N \mathbb{N} autocmd Filetype tex inoremap R \Rightarrow autocmd Filetype tex inoremap st such that autocmd Filetype tex inoremap t \times autocmd Filetype tex inoremap T $T$ autocmd Filetype tex inoremap v \vee autocmd Filetype tex inoremap w \wedge autocmd Filetype tex inoremap x $x$-axis autocmd Filetype tex inoremap y $y$-axis autocmd Filetype tex inoremap Z \mathbb{Z} " }}} Local Mappings "