From 1c4b9b5420078efafad1e67a097aaee550d3c5e1 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 7 Apr 2016 15:12:46 +0100 Subject: Add shortcuts for fzf.vim --- vim/vimrc | 53 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/vim/vimrc b/vim/vimrc index ac8c579..437b7d6 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -3,6 +3,8 @@ call plug#begin('~/.vim/plugged') Plug 'airblade/vim-gitgutter' Plug 'altercation/vim-colors-solarized' Plug 'beloglazov/vim-online-thesaurus' +nnoremap K :OnlineThesaurusCurrentWord + Plug 'christoomey/vim-tmux-navigator' Plug 'embear/vim-localvimrc' let g:localvimrc_ask = 0 @@ -13,6 +15,26 @@ Plug 'honza/vim-snippets' Plug 'jamessan/vim-gnupg' Plug 'junegunn/fzf.vim' Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } +let g:fzf_buffers_jump = 1 +if has("nvim") + nnoremap :Buffers + nnoremap :Files + nnoremap :History + nnoremap :GitFiles + nnoremap :Colors + nnoremap :History: +else + nnoremap b :Buffers + nnoremap f :Files + nnoremap r :History + nnoremap g :GitFiles + nnoremap c :Colors + nnoremap h :History: +endif + +imap (fzf-complete-line) +imap (fzf-complete-file) + Plug 'junegunn/seoul256.vim' Plug 'junegunn/vim-easy-align' xmap ga (EasyAlign) @@ -52,12 +74,16 @@ let g:UltiSnipsListSnippets="" let g:UltiSnipsSnippetDirectories=['UltiSnips', 'mySnippets'] let g:UltiSnipsSnippetsDir="~/.vim/mySnippets" let g:UltiSnipsUsePythonVersion=3 +nnoremap es :UltiSnipsEdit Plug 'sjl/Gundo.vim', { 'on' : 'GundoToggle' } Plug 'terryma/vim-multiple-cursors' Plug 'tomasr/molokai' Plug 'tommcdo/vim-exchange' Plug 'ton/vim-bufsurf' +nnoremap (( :BufSurfBack +nnoremap )) :BufSurfForward + Plug 'tpope/vim-commentary' Plug 'tpope/vim-dispatch' Plug 'tpope/vim-eunuch' @@ -78,9 +104,15 @@ augroup myflags autocmd User Flags call Hoist("window", "SyntasticStatuslineFlag") autocmd User Flags call Hoist("window", "%{b:trailing?'[tw]':''}") autocmd User Flags call Hoist("window", "%{b:mixed?'[mixed]':''}") + autocmd User Flags call Hoist("window", "%{&paste?'[paste]':''}") augroup END Plug 'tpope/vim-fugitive' +nnoremap gs :Gstatus +nnoremap gr :Gread +nnoremap gd :Gdiff +nnoremap gv :Gitv + Plug 'tpope/vim-obsession' Plug 'tpope/vim-repeat' Plug 'tpope/vim-sensible' @@ -99,6 +131,7 @@ if has("nvim") \ 'args': '-ne', \ 'errorformat': ' Error line number %l\, in file %f\,%m', \ } + nnoremap gm :Neomake! Plug 'Shougo/deoplete.nvim' let g:deoplete#enable_at_startup = 1 @@ -198,6 +231,7 @@ elseif $COLORSCHEME=="dark" silent! colo solarized set background=dark elseif $COLORSCHEME=="seoul" + let g:seoul256_background = 239 silent! colo seoul256 elseif $COLORSCHEME=="molokai" silent! colo molokai @@ -225,24 +259,15 @@ nnoremap cpt :TagbarToggle nnoremap cpu :GundoToggle " File edits -nnoremap es :UltiSnipsEdit " Formatting nnoremap fw :%s/\s\+$// " Navigation -nnoremap (( :BufSurfBack -nnoremap )) :BufSurfForward nnoremap 3 nnoremap 3 nnoremap o -" Git -nnoremap gs :Gstatus -nnoremap gr :Gread -nnoremap gd :Gdiff -nnoremap gv :Gitv - " Misc nnoremap nnoremap Q :bd! @@ -250,27 +275,17 @@ nnoremap w :w nnoremap q :q! nnoremap h :e %:p:s,.hpp$,.X123X,:s,.cpp$,.hpp,:s,.X123X$,.cpp, nnoremap gm :Make -nnoremap m :Neomake! nnoremap J mzJ`z nnoremap Y y$ nnoremap + za -nnoremap K :OnlineThesaurusCurrentWord - " Neovim specific if has("nvim") tnoremap :ZoomWinTabOut nnoremap :ZoomWinTabIn:b termi inoremap :b termi - nnoremap :w nnoremap :q nnoremap :tabnew - - nnoremap :Buffers - nnoremap :Files - nnoremap :History - nnoremap :GitFiles - nmap h endif -- cgit v1.2.3