From 69421a7a61e8bceb9315c09a31182301fe828860 Mon Sep 17 00:00:00 2001 From: James Dixon Date: Sat, 7 Nov 2020 14:42:30 -0500 Subject: [PATCH] add fzf and keymaps for fzf and vim-fugitive --- files/vim/.vim/keybinds.vim | 28 +++++-------------------- files/vim/.vim/plugins.vim | 41 +++++++++++++++++++++++++++++++++++++ files/vim/.vim/vimrc | 2 +- 3 files changed, 47 insertions(+), 24 deletions(-) diff --git a/files/vim/.vim/keybinds.vim b/files/vim/.vim/keybinds.vim index 662b51e..da7782c 100644 --- a/files/vim/.vim/keybinds.vim +++ b/files/vim/.vim/keybinds.vim @@ -5,7 +5,7 @@ let mapleader=' ' "-------------{{{ "paste and search nnoremap :let @/ = "" -nnoremap p :set invpaste +nnoremap i :set invpaste "toggles nnoremap lb :call ToggleLineBreak() @@ -18,8 +18,11 @@ nnoremap dt :r !date "rc files nnoremap rc :vsplit $MYVIMRC +nnoremap rck :vsplit ~/.vim/keybinds.vim +nnoremap rcp :vsplit ~/.vim/plugins.vim +nnoremap rcf :vsplit $HOME/.vim/after/ftplugin/ + nnoremap so :source $MYVIMRC -nnoremap ft :vsplit $HOME/.vim/after/ftplugin/ "formatting tools nnoremap =j :%!python -m json.tool @@ -30,24 +33,3 @@ nnoremap =j :%!python -m json.tool "abbrevations inoreabbrev #!! "#!/usr/bin/env" "}}} - -"plugin keybinds -"{{{ -"netrw -nnoremap e :call ToggleNetrw() - -"openbrowser -nmap gx (openbrowser-smart-search) -vmap gx (openbrowser-smart-search) - -"ale -nnoremap at :ALEToggle -nmap af (ale_fix) -nmap aK (ale_hover) -nmap agd (ale_go_to_definition) -nmap agd (ale_go_to_definition) - -"vim-emmet -let g:user_emmet_leader_key = ',' - -"}}} diff --git a/files/vim/.vim/plugins.vim b/files/vim/.vim/plugins.vim index d7cc61d..1b17c9b 100644 --- a/files/vim/.vim/plugins.vim +++ b/files/vim/.vim/plugins.vim @@ -24,6 +24,10 @@ call plug#begin(pluginDir) Plug 'tpope/vim-repeat' "git Plug 'tpope/vim-fugitive' + "fzf + Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } + Plug 'junegunn/fzf.vim' + " syntax and colorscheme packs Plug 'flazz/vim-colorschemes' @@ -94,3 +98,40 @@ let g:vim_markdown_frontmatter = 1 let g:user_emmet_install_global = 0 "}}} + +"plugin keybinds +"{{{ +"netrw +nnoremap e :call ToggleNetrw() + +"vim-plug +nnoremap pi :source $MYVIMRC :PlugInstall +nnoremap pu :source $MYVIMRC :PlugUpdate +nnoremap pc :source $MYVIMRC :PlugClean + +"openbrowser +nmap gx (openbrowser-smart-search) +vmap gx (openbrowser-smart-search) + +"ale +nnoremap at :ALEToggle +nmap af (ale_fix) +nmap aK (ale_hover) +nmap agd (ale_go_to_definition) +nmap agd (ale_go_to_definition) + +"vim-emmet +let g:user_emmet_leader_key = ',' + +"vim-fugitive +nnoremap gl :Glog +nnoremap gs :Gstatus + +"fzf +nnoremap f :GitFiles +nnoremap b :Buffers +nnoremap F :Files +nnoremap H :Helptags +nnoremap M :Maps + +"}}} diff --git a/files/vim/.vim/vimrc b/files/vim/.vim/vimrc index b315019..e30bc4f 100644 --- a/files/vim/.vim/vimrc +++ b/files/vim/.vim/vimrc @@ -6,8 +6,8 @@ source ~/.vim/settings.vim source ~/.vim/functions.vim source ~/.vim/commands.vim -source ~/.vim/plugins.vim source ~/.vim/keybinds.vim +source ~/.vim/plugins.vim source ~/.vim/colorschemes.vim source ~/.vim/autocmds.vim source ~/.config/vimrc