From f6efe8ca2b20e58a056d7b4d8092b4ede1f3291d Mon Sep 17 00:00:00 2001 From: William Carroll Date: Fri, 21 Oct 2016 11:51:35 -0400 Subject: [PATCH] Adds new keybinds and bash functions for git --- functions/misc_functions.sh | 12 ++++++++++++ usbify/vim/.vimrc | 30 +++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/functions/misc_functions.sh b/functions/misc_functions.sh index 17c13d7a6..ed7f6293c 100644 --- a/functions/misc_functions.sh +++ b/functions/misc_functions.sh @@ -1,3 +1,15 @@ +# fuzzily-find-file +function wgff { + echo $(find . -type f | fzf) +} + + +# fuzzily-find-branch +function wgfb { + echo $(git branch -a | fzf) +} + + # download files to /tmp directory function wdownload { URL="$1" diff --git a/usbify/vim/.vimrc b/usbify/vim/.vimrc index db8a40b4e..ce78f2100 100644 --- a/usbify/vim/.vimrc +++ b/usbify/vim/.vimrc @@ -46,6 +46,12 @@ filetype plugin indent on " required " -- END: Vundle config -- +set noswapfile + + +set grepprg=ack\ -k + + " backspace settings set backspace=2 set backspace=indent,eol,start @@ -82,10 +88,28 @@ let g:UltiSnipsExpandTrigger="" " let g:UltiSnipsJumpBackwardTrigger="" - " keyword completion inoremap ;; +" tab movement bindings +nnoremap gT +nnoremap gt + +" scrolling and maintaing mouse position +nnoremap j +nnoremap k + + +" reload file after git changes +nnoremap :e + + +" resize vertical and horizontal splits +nnoremap :vertical resize +3 +nnoremap :vertical resize -3 +nnoremap :resize +3 +nnoremap :resize -3 + " -- Syntastic Settings -- set statusline+=%#warningmsg# @@ -105,7 +129,7 @@ set number set tabstop=2 set expandtab set shiftwidth=2 -colorscheme monokai +colorscheme elflord set t_Co=255 @@ -138,7 +162,7 @@ nnoremap xhh :execute 'match none' :execute '2match none' V"+y vnoremap "+y -nnoremap "+p +nnoremap o"+p vnoremap "+p