Adds new keybinds and bash functions for git

This commit is contained in:
William Carroll 2016-10-21 11:51:35 -04:00
parent e3147857a0
commit f6efe8ca2b
2 changed files with 39 additions and 3 deletions

View file

@ -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 # download files to /tmp directory
function wdownload { function wdownload {
URL="$1" URL="$1"

View file

@ -46,6 +46,12 @@ filetype plugin indent on " required
" -- END: Vundle config -- " -- END: Vundle config --
set noswapfile
set grepprg=ack\ -k
" backspace settings " backspace settings
set backspace=2 set backspace=2
set backspace=indent,eol,start set backspace=indent,eol,start
@ -82,10 +88,28 @@ let g:UltiSnipsExpandTrigger="<c-x>"
" let g:UltiSnipsJumpBackwardTrigger="<c-k>" " let g:UltiSnipsJumpBackwardTrigger="<c-k>"
" keyword completion " keyword completion
inoremap ;; <C-n> inoremap ;; <C-n>
" tab movement bindings
nnoremap <C-h> gT
nnoremap <C-l> gt
" scrolling and maintaing mouse position
nnoremap <C-j> j<C-e>
nnoremap <C-k> k<C-y>
" reload file after git changes
nnoremap <C-r> :e<CR>
" resize vertical and horizontal splits
nnoremap <C-w><C-l> :vertical resize +3<CR>
nnoremap <C-w><C-h> :vertical resize -3<CR>
nnoremap <C-w><C-k> :resize +3<CR>
nnoremap <C-w><C-j> :resize -3<CR>
" -- Syntastic Settings -- " -- Syntastic Settings --
set statusline+=%#warningmsg# set statusline+=%#warningmsg#
@ -105,7 +129,7 @@ set number
set tabstop=2 set tabstop=2
set expandtab set expandtab
set shiftwidth=2 set shiftwidth=2
colorscheme monokai colorscheme elflord
set t_Co=255 set t_Co=255
@ -138,7 +162,7 @@ nnoremap <silent> <leader>xhh :execute 'match none'<CR> :execute '2match none'<C
" pasteboard copy & paste " pasteboard copy & paste
nnoremap <C-c> V"+y nnoremap <C-c> V"+y
vnoremap <C-c> "+y vnoremap <C-c> "+y
nnoremap <C-v> "+p nnoremap <C-v> o<Esc>"+p
vnoremap <C-v> "+p vnoremap <C-v> "+p