diff --git a/vim/.vimrc b/vim/.vimrc index 6035e5a..3cc82e7 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -39,12 +39,7 @@ call plug#begin('~/.vim/plugged') " ======== Languages / Textobjects ======================= Plug 'sheerun/vim-polyglot' -Plug 'mxw/vim-jsx' -Plug 'jtratner/vim-flavored-markdown', { 'for': 'markdown' } Plug 'kana/vim-textobj-user' -Plug 'kana/vim-textobj-datetime' -Plug 'kana/vim-textobj-entire' -Plug 'kana/vim-textobj-function' Plug 'nelstrom/vim-textobj-rubyblock' Plug 'austintaylor/vim-indentobject' Plug 'lucapette/vim-textobj-underscore' @@ -58,7 +53,8 @@ Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } Plug 'gregsexton/gitv', { 'on': 'Gitv' } Plug 'junegunn/vim-easy-align', { 'on': ['(EasyAlign)', 'EasyAlign'] } Plug 'gregsexton/MatchTag', { 'for': 'html' } -" Plug 'ctrlpvim/ctrlp.vim' +Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +Plug 'junegunn/fzf.vim' Plug 'AndrewRadev/splitjoin.vim' Plug 'mattn/gist-vim' | Plug 'mattn/webapi-vim' Plug 'Raimondi/delimitMate' @@ -69,6 +65,9 @@ Plug 'dyng/ctrlsf.vim' Plug 'terryma/vim-expand-region' Plug 'terryma/vim-multiple-cursors' Plug 'bogado/file-line' +Plug 'ngmy/vim-rubocop' +Plug 'neomake/neomake' +Plug 'vim-utils/vim-interruptless' " ======== Snippets & Autocomplete ====================== @@ -80,6 +79,7 @@ Plug 'altercation/vim-colors-solarized' Plug 'itchyny/lightline.vim' Plug 'airblade/vim-gitgutter' Plug 'mhinz/vim-startify' +Plug 'machakann/vim-highlightedyank' " ======== tpope <3 ==================================== @@ -90,7 +90,6 @@ Plug 'tpope/vim-surround' Plug 'tpope/vim-commentary' Plug 'tpope/vim-repeat' Plug 'tpope/vim-git' -Plug 'tpope/vim-unimpaired' Plug 'tpope/vim-vinegar' " ========= Some of my stuff =========================== @@ -100,19 +99,6 @@ Plug 'madundead/vim-madundead' " ======== Experimental ================================= -Plug 'vim-utils/vim-interruptless' " prevents [O]K, [L]oad interuption -Plug 'ngmy/vim-rubocop' -Plug 'junegunn/goyo.vim' -Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } -Plug 'junegunn/fzf.vim' -Plug 'neomake/neomake' -Plug 'slashmili/alchemist.vim' -Plug 'dylanaraps/crayon' -Plug 'machakann/vim-highlightedyank' -Plug 'rhysd/clever-f.vim' -Plug 'majutsushi/tagbar' -Plug 'darfink/vim-plist' - call plug#end() @@ -139,25 +125,9 @@ let NERDTreeDirArrows = 1 let NERDTreeAutoDeleteBuffer = 1 let NERDTreeHijackNetrw = 1 -" --- CtrlP - -" let g:ctrlp_max_height = 10 -" let g:ctrlp_show_hidden = 0 -" let g:ctrlp_follow_symlinks = 1 -" let g:ctrlp_max_files = 20000 -" let g:ctrlp_reuse_window = 'startify' -" let g:ctrlp_extensions = ['funky'] -" let g:ctrlp_user_command = 'rg --files %s' -" let g:ctrlp_status_func = -" \ { -" \ 'main': 'madundead#ctrlp_main_status', -" \ 'prog': 'madundead#ctrlp_prog_status', -" \ } -" let g:ctrlp_custom_ignore = -" \ { -" \ 'dir': '\v[\/]\.(git|hg|svn|idea)$', -" \ 'file': '\v\.DS_Store$' -" \ } +" --- highlightedyank +" +let g:highlightedyank_highlight_duration = 400 " --- Ultisnips @@ -336,10 +306,6 @@ set mat=2 set gcr=a:blinkon0 " hide the mouse pointer while typing set mousehide -" vim requires a POSIX-compliant shell. fish isn't -if $SHELL =~ 'bin/fish' - set shell=/bin/sh -endif @@ -366,7 +332,7 @@ set langmap=ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯЖ;ABCDEFGHIJKLM " W invokes sudo command! W w !sudo tee % > /dev/null -" Use the OS clipboard by default (on versions compiled with `+clipboard`) +" Use the OS clipboard by default (requires `+clipboard`) set clipboard=unnamed " Dunno @@ -389,7 +355,7 @@ set noswapfile " Doesn't select lines number in vim set mouse=a -" Facny whitespace characters +" Fancy whitespace characters set list listchars=tab:→\ ,trail:· " Abbrev. of messages (avoids 'hit enter') @@ -411,6 +377,11 @@ set diffopt+=vertical " Reduce delay between modes set timeoutlen=1000 ttimeoutlen=0 +" Delete comment character when joining commented lines +if v:version > 703 || v:version == 703 && has("patch541") + set formatoptions+=j +endif + " ======================================================== @@ -586,6 +557,23 @@ vnoremap K :m '<-2gv=gv " Keep the cursor in place while joining lines nnoremap J mzJ`z +" Keep old vim-commentary hotkeys +xmap \\ Commentary +nmap \\ Commentary +nmap \\\ CommentaryLine +nmap \\u CommentaryUndo + +" git +noremap ga :Gwrite +noremap gc :Gcommit +noremap gp :Gpush +noremap gup :Gpull +noremap gs :Gstatus +noremap gd :Gvdiff + +" CtrlP -> fzf +nnoremap :Files + " TODO: Space should be used for something more useful " Folding on @@ -603,42 +591,3 @@ nnoremap J mzJ`z " gx -- opens url in browser " ctrl + e -- emmet " ctrl + n -- vim-multiple-cursor - -" EXPERIMENTAL: - -" Toggle wrap -nnoremap W :set wrap! - -" Keep old vim-commentary hotkeys -xmap \\ Commentary -nmap \\ Commentary -nmap \\\ CommentaryLine -nmap \\u CommentaryUndo - -" git -noremap ga :Gwrite -noremap gc :Gcommit -noremap gsh :Gpush -noremap gll :Gpull -noremap gs :Gstatus -noremap gb :Gblame -noremap gd :Gvdiff -noremap gr :Gremove - -map :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" - -map y (highlightedyank) - -let g:highlightedyank_highlight_duration = 400 - -" Delete comment character when joining commented lines -if v:version > 703 || v:version == 703 && has("patch541") - set formatoptions+=j -endif - -map Sneak_; -map Sneak_, - -au FileType markdown vmap :EasyAlign* - -nnoremap :Files