"source /home/stonewareslord/.vim/autoload/plug.vim if has('conceal') set conceallevel=2 concealcursor=i endif nnoremap autoformat! :%s/, /,:%s/ \/ /\/:%s/ {/{:%s/} /}:%s/ = /= command! WW %!sudo tee > /dev/null % "TODO: Fix this "let g:rbpt_loadcmd_toggle = 1 "autocmd BufRead,BufNewFile * RainbowParenthesesActivate ""autocmd BufRead,BufNewFile * RainbowParenthesesToggle ""autocmd BufRead,BufNewFile * RainbowParenthesesLoadBraces "autocmd BufRead,BufNewFile * RainbowParenthesesLoadRound "autocmd BufRead,BufNewFile * RainbowParenthesesLoadSquare "autocmd BufRead,BufNewFile * RainbowParenthesesLoadChevrons let g:indent_guides_auto_colors = 0 autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=red ctermbg=8 autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=8 "match Error /\s\+$/ "nnoremap s xa "nnoremap :UndotreeToggle "inoremap pumvisible() ? "\" : "\" imap \ neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : pumvisible() ? "\" : "\" smap \ neosnippet#expandable_or_jumpable() ? "\(neosnippet_expand_or_jump)" : "\" nnoremap \| vl nnoremap - sj nnoremap q nnoremap G G$ vnoremap G G$ nnoremap :GundoToggle nnoremap + nnoremap - nnoremap Q nnoremap nnoremap a :!git st:!ls:!git a nnoremap up :!git pull origin nnoremap st :!git st nnoremap ci :!git st:!git ci "" nnoremap log :!git hist nnoremap br :!git br nnoremap gb :ls:b nnoremap d :bd nnoremap q :q nnoremap W :%s/\s\+$//:let @/='' nnoremap o m`o`` nnoremap O m`O`` nnoremap go %m`%x`` nnoremap if m"Oif(){jo}`"v>k^wa nnoremap else m"kAelse{jo}`"v> nnoremap for m"Ofor(){jo}`"v>k^wa nnoremap while m"Owhile(){jo}`"v>k^wa nnoremap rm m"kddjddkv<`" nnoremap # O#{{{jo#}}}kk^a vnoremap # ``>o#}}}`{ O//{{{jo//}}}kk^la vnoremap { ``>o//}}}`if ``>o}gv>`else ``>o}gv> vnoremap for ``>o}gv>`while ``>o}gv>`rm `<kdd`>jddgv< vnoremap * :call VisualSelection('f') vnoremap # :call VisualSelection('b') "nnoremap zo:set hlsearch! hlsearch? "nnoremap :nohlsearchgzo nnoremap :nohlsearchgzo nnoremap U nnoremap K ik$ nnoremap :up:silent! call sy#start() vnoremap gj j vnoremap gk k vnoremap j gj vnoremap k gk vnoremap H ^ vnoremap L $h vnoremap ; : nnoremap gj j nnoremap gk k nnoremap j gj nnoremap k gk nnoremap H ^ nnoremap L $ nnoremap h nnoremap j nnoremap k nnoremap l map , (easymotion-prefix) nnoremap ! :! nnoremap ; m"A;`" nnoremap J Jx vnoremap < >gv nnoremap inoremap vnoremap nnoremap ** yyPv$r*jyypv$r* nnoremap = yypv$r= nnoremap - yypv$r- nnoremap ^ yypv$r^ nnoremap " yypv$r" "inoremap '' '' "inoremap "" "" "inoremap () () "inoremap <> <> "inoremap {} {}O "inoremap {% {% %} "inoremap [] [] inoremap ;; m`A;``a inoremap ;; A;o "nnoremap ;; m"A;`" "nnoremap ;; A;o inoremap inoremap inoremap inoremap nnoremap Y y$ nnoremap w nnoremap W nnoremap :bp nnoremap :bn nnoremap z _\| "nnoremap bun G?Plug yyjp$hdi'"+gP0Wl3d/\/xjyyP$"+gp:nohlsearch:up:PluginInstall nnoremap bun G?Plug yyjp$hdi'"+gPo " \| "+gp:nohlsearch:up:PlugInstall nnoremap :CtrlPFunky nnoremap :set invpaste "nnoremap [e "nnoremap ]e "vnoremap [egv "vnoremap ]egv nnoremap / /\v vnoremap / /\v inoremap jk A inoremap kj A set guicursor+=n-v-c:blinkon0 set ttimeout set ttimeoutlen=0 set notimeout set formatoptions-=r set formatoptions-=o set diffopt+=iwhite set noesckeys set mouse-=a set shiftwidth=2 set tabstop=2 set modeline set softtabstop=2 set expandtab set history=1000 set hidden set cursorline set incsearch set showmatch set hlsearch set scrolloff=3 set scrolljump=5 set autoindent set backup set backupdir=~/.vim/backup set directory=~/.vim/tmp set undolevels=1000 set history=500 set ttyfast set fileformat=unix set encoding=utf-8 set laststatus=2 set foldmethod=indent set foldnestmax=10 set foldlevel=2 set relativenumber set number set ts=2 sw=2 et set background=dark set t_Co=256 set gdefault set nocompatible "set rtp+=~/.vim/bundle/vundle/ set ignorecase set textwidth=0 syntax on let g:ctrlp_root_markers = ['.cproot'] let g:ctrlp_custom_ignore = { \ 'dir': '\v[\/](\.git|\.hg|\.svn|vendor)$', \ 'file': '\v\.(exe|so|dll)$', \ 'link': 'SOME_BAD_SYMBOLIC_LINKS', \ } let g:airline_left_sep='▶' let g:airline_right_sep='◀' let g:airline#extensions#syntastic#enabled=0 let g:airline#extensions#whitespace#enabled=0 let g:airline#extensions#whitespace#show_message=0 let g:airline#extensions#tmuxline#enabled=1 let g:formatprg_cpp="astyle" let g:formatprg_args_expr_cpp=" --mode=c --style=1tbs -xe -k1 -j" " These flags don't work for some reason " -xn -xc -xl -S "let g:airline#extensions#tabline#enabled=1 let g:Powerline_symbols='fancy' let g:indent_guides_start_level=1 let g:indent_guides_guide_size=1 let g:indent_guides_enable_on_vim_startup=1 "let g:neocomplcache_enable_at_startup=1 "let g:neocomplcache_enable_camel_case_completion=1 "let g:neocomplcache_enable_smart_case=1 "let g:neocomplcache_enable_underbar_completion=1 "let g:neocomplcache_enable_auto_delimiter=1 "let g:neocomplcache_max_list=20 "let g:neocomplcache_force_overwrite_completefunc=1 "let g:neocomplcache_min_syntax_length=2 "let g:neocomplcache_enable_auto_select=1 let g:neocomplete#enable_at_startup = 1 let g:neocomplete#enable_smart_case = 1 let g:neocomplete#sources#syntax#min_keyword_length = 2 let g:php_refactor_command='php /usr/local/bin/refactor.phar' let g:ctrlp_extensions=['funky'] "inoremap neocomplcache#smart_close_popup()."\" function! g:UltiSnips_Complete() call UltiSnips#ExpandSnippet() if g:ulti_expand_res == 0 if pumvisible() return "\" else call UltiSnips#JumpForwards() if g:ulti_jump_forwards_res == 0 return "\" endif endif endif return "" endfunction au BufEnter * exec "inoremap " . g:UltiSnipsExpandTrigger . " =g:UltiSnips_Complete()" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsListSnippets="" inoremap pumvisible() ? "\" : "\u\" let loaded_matchit=1 let g:UltiSnipsEditSplit="vertical" filetype off if has("win32") call plug#begin('~/vimfiles/plugged') else call plug#begin('~/.vim/plugged') endif "Plug 'Floobits/floobits-vim' "Plug 'tsaleh/vim-matchit' "Plug 'Shougo/neosnippet' "Plug 'msanders/snipmate.vim' "Plug 'vim-scripts/YankRing.vim' Plug 'Chiel92/vim-autoformat' "Adds autoformat command | https://github.com/Chiel92/vim-autoformat Plug 'tpope/vim-surround' "Surround selection in ({\"' or HTML tags | https://github.com/tpope/vim-surround Plug 'scrooloose/syntastic' "Syntax checker | https://github.com/scrooloose/syntastic Plug 'nathanaelkane/vim-indent-guides' "Indentation guides | https://github.com/nathanaelkane/vim-indent-guides Plug 'elzr/vim-json' "JSON highlighting | https://github.com/elzr/vim-json Plug 'groenewege/vim-less' "LESS highlighting | https://github.com/groenewege/vim-less Plug 'pangloss/vim-javascript' "JS syntax and indentation | https://github.com/pangloss/vim-javascript "Plug 'Lokaltog/powerline-fonts' " "Better powerline fonts | https://github.com/Lokaltog/powerline-fonts Plug 'bling/vim-airline' "Bottom status bar | https://github.com/bling/vim-airline Plug 'terryma/vim-multiple-cursors' "Multicursor functionality like Coda | https://github.com/terryma/vim-multiple-cursors Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } "File browser | https://github.com/scrooloose/nerdtree "Plug 'altercation/vim-colors-solarized' " "Theme | https://github.com/altercation/vim-colors-solarized Plug 'stonewareslord/vim-colors' "Theme pack | https://github.com/spf13/vim-colors "Plug 'spf13/PIV' " "PHP tools | https://github.com/spf13/PIV "Plug 'vim-scripts/AutoTag' " "Generates taglist with ctags | https://github.com/vim-scripts/AutoTag Plug 'Lokaltog/vim-easymotion' "Move around quickly in a document | https://github.com/Lokaltog/vim-easymotion Plug 'sjl/gundo.vim' "Visual undo | https://github.com/sjl/gundo.vim Plug 'tommcdo/vim-exchange' "Exchange two selections of text | https://github.com/tommcdo/vim-exchange Plug 'tpope/vim-repeat' "Repeat last tpope command with . | https://github.com/tpope/vim-repeat "Plug 'tpope/vim-commentary' " "Comment selection | https://github.com/tpope/vim-commentary "Plug 'vim-php/vim-php-refactoring' " "PHP refactoring | https://github.com/vim-php/vim-php-refactoring Plug 'tpope/vim-fugitive' "Great Vim-Git compatibility | https://github.com/tpope/vim-fugitive "Plug 'tpope/vim-unimpaired' " "Bracket shortcuts | https://github.com/tpope/vim-unimpaired Plug 'kien/ctrlp.vim' "Fuzzy file search | https://github.com/kien/ctrlp.vim "Plug 'tacahiroy/ctrlp-funky' " "Fuzzy function search | https://github.com/tacahiroy/ctrlp-funky Plug 'godlygeek/tabular' "Quickly make tables in vim | https://github.com/godlygeek/tabular "Plug 'tpope/vim-abolish' " "Better abbrivation | https://github.com/tpope/vim-abolish Plug 'godlygeek/csapprox' "256 color vim in terminal | https://github.com/godlygeek/csapprox Plug 'sirver/UltiSnips' "Adds snippets | https://github.com/sirver/UltiSnips Plug 'honza/vim-snippets' "More snippets | https://github.com/honza/vim-snippets "if has("lua") " Plug 'Shougo/neocomplete.vim' " "Autocompletes | https://github.com/Shougo/neocomplete.vim "endif Plug 'othree/eregex.vim' "Real regexes in vim | https://github.com/othree/eregex.vim "Plug 'vim-scripts/sessionman.vim' " "Session manager | https://github.com/vim-scripts/sessionman.vim Plug 'mattn/flappyvird-vim' "The amazing Flappy Bird game | https://github.com/mattn/flappyvird-vim "Plug 'morhetz/gruvbox' " "Colorscheme | https://github.com/morhetz/gruvbox Plug 'superbrothers/vim-vimperator' "Vimperator for vim | https://github.com/superbrothers/vim-vimperator Plug 'Rykka/colorv.vim' "Color selection in vim | https://github.com/Rykka/colorv.vim "Plug 'Townk/vim-autoclose' " "Autoclose brackets | https://github.com/Townk/vim-autoclose Plug 'mhinz/vim-signify' "Git information inline | https://github.com/mhinz/vim-signify Plug 'jamessan/vim-gnupg' "GPG support | https://github.com/jamessan/vim-gnupg Plug 'stonewareslord/zeavim.vim' "Zeal support | https://github.com/stonewareslord/zeavim.vim Plug 'vim-scripts/DirDiff.vim' "Directory diff | https://github.com/vim-scripts/DirDiff.vim Plug 'vim-scripts/DoxygenToolkit.vim' "Doxygen | https://github.com/vim-scripts/DoxygenToolkit.vim Plug 'vim-scripts/SyntaxRange' "Range of syntaxes | https://github.com/vim-scripts/SyntaxRange Plug 'PotatoesMaster/i3-vim-syntax' "i3 syntax | https://github.com/PotatoesMaster/i3-vim-syntax Plug 'https://github.com/fatih/vim-go' "go syntax | https://github.com/fatih/vim-go Plug 'https://github.com/kien/rainbow_parentheses.vim' "Colored parenthesis | https://github.com/kien/rainbow_parentheses.vim Plug 'https://github.com/jiangmiao/auto-pairs' "Automatic pairs | https://github.com/jiangmiao/auto-pairs "Plug 'https://github.com/Valloric/YouCompleteMe' " "Autocompletion | https://github.com/Valloric/YouCompleteMe Plug 'https://github.com/evidens/vim-twig' "Twig highlighting | https://github.com/evidens/vim-twig Plug 'https://github.com/joonty/vdebug' " | https://github.com/joonty/vdebug call plug#end() filetype plugin indent on if exists("+undofile") if isdirectory($HOME . '/.vim/undo')==0 :silent !mkdir -p ~/.vim/undo > /dev/null 2>&1 endif set undodir=./.vim-undo// set undodir+=~/.vim/undo// set undofile endif augroup vimrc au! au BufWritePost .vimrc,vimrc source % augroup END augroup vimrcEx au! " When editing a file, always jump to the last known cursor position. autocmd BufReadPost * \ if line("'\"") > 0 && line("'\"") <=line("$") | \ exe "normal g`\"" | \ endif augroup END if has('gui_running') set guioptions-=T else if &term=='xterm' || &term=='screen' set t_Co=256 endif "colorscheme torte endif silent! colorscheme fruity nnoremap W :%s/\s\+$//:let @/='' function! Initialize() if has("win32") if empty(glob("~/_vim/autoload/plug.vim")) cd ~ silent !mkdir vimfiles cd vimfiles silent !mkdir autoload silent !mkdir plugin silent !mkdir backup silent !mkdir undo silent !mkdir tmp cd autoload silent !powershell -command "& { iwr https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -OutFile plug.vim }" silent! so ~/_vimrc silent! PlugInstall q endif else if empty(glob("~/.vim/autoload/plug.vim")) silent !mkdir -p ~/.vim/autoload silent !mkdir -p ~/.vim/plugin silent !mkdir -p ~/.vim/backup silent !mkdir -p ~/.vim/undo silent !mkdir -p ~/.vim/tmp silent !curl -fLo ~/.vim/autoload/plug.vim https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim silent! so ~/.vimrc silent! PlugInstall q endif endif endfunction