""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Sections: " -> Plug Setup " -> Brief Config " -> Plugs & Configure " """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " PlugSetup: " -> Auto Install Plug " -> Auto Add Missing Plugs " -> Add Conditional Helper " -> Has Async " Install vim-plug if not found 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 endif " Run PlugInstall if there are missing plugins autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) \| PlugInstall --sync | source $MYVIMRC \| endif " Convenience function for arbitrary conditional loading " See https://github.com/junegunn/vim-plug/wiki/tips#conditional-activation for more. function! Cond(cond, ...) let opts = get(a:000, 0, {}) return a:cond ? opts : extend(opts, { 'on': [], 'for': [] }) endfunction """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Brief Config: " -> Sane Config Base " -> Leader Key " -> Has Async Var " Sane Config Based on Tpope's Vim-Sensible " https://github.com/tpope/vim-sensible source ~/.vim/vimrc.d/sensible.vim " Take me to your leader let mapleader="," " Added Async Var let g:has_async = v:version >= 800 || has('nvim') """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Plugs_Configure: " -> Molokai Theme " -> Deoplete Completion Framework " -> Git Gutter " -> Rainbow Parens " -> Auto Pair " -> Vim Surround " -> Vim Airline " -> Vim Eunuch " -> Nerdtree " -> Incsearch " -> EasyMotion " -> Incsearch + EasyMotion " -> Fzf " -> ALE call plug#begin('~/.vim/plugged') " Theme Plug 'tomasr/molokai' autocmd VimEnter * colorscheme molokai hi LineNr ctermfg=245 ctermbg=235 let g:molokai_original=1 let g:rehash256=1 match ErrorMsg '\%>120v.\+' match ErrorMsg '\s\+$' " Deoplete : Fancy vim8+/nvim autocomplete framework if (has('python3') || has('nvim')) Plug 'Shougo/deoplete.nvim' " completion source Plug 'Shougo/neco-syntax' " running on non-nvim instances requires the following " See https://github.com/Shougo/deoplete.nvim#install for more Plug 'roxma/nvim-yarp', Cond(! has('nvim')) Plug 'roxma/vim-hug-neovim-rpc', Cond(! has('nvim')) let g:deoplete#enable_at_startup=1 endif " GitGutter : Letting you know whats changed Plug 'airblade/vim-gitgutter' " Rainbow Parens : making at color term more useful Plug 'kien/rainbow_parentheses.vim' " Auto Pair : Vim plugin, insert or delete brackets, parens, quotes in pair Plug 'jiangmiao/auto-pairs' " Vim Surround : quoting/parenthesizing made simple Plug 'tpope/vim-surround' " Vim Airline : Modeline support Plug 'vim-airline/vim-airline' " Vim Eunuch : Helpers for UNIX Plug 'tpope/vim-eunuch' " Nerdtree : A tree explorer plugin for vim. Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " Incsearch : Improved incremental searching for Vim Plug 'haya14busa/incsearch.vim' " EasyMotion : Vim motions on speed! Plug 'easymotion/vim-easymotion' let g:EasyMotion_smartcase = 1 map f (easymotion-bd-f2) nmap f (easymotion-overwin-f2) " Incsearch & EasyMotion : peanut butter & chocolate Plug 'haya14busa/incsearch-easymotion.vim' map / (incsearch-easymotion-/) map ? (incsearch-easymotion-?) map g/ (incsearch-easymotion-stay) " FZF : Fuzzy was he found Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } Plug 'junegunn/fzf.vim' let g:fzf_layout = { 'down': '40%' } map :History map b :Buffers " ALE : Asynchronous Lint Engine Plug 'dense-analysis/ale', Cond(g:has_async) if g:has_async map = :ALEFix endif let g:ale_fixers = {'*': ['remove_trailing_lines', 'trim_whitespace']} let g:ale_fix_on_save = 1 let g:ale_completion_enabled = 1 call plug#end() " vim: set filetype=vim: " -*- mode: vim -*-