# HG changeset patch # User Steve Losh # Date 1394638296 14400 # Node ID 4fae0d3611397904704fc8205fd2e9e9fe01bc30 # Parent 021398e3fd15394e194f62ae3e0c68555bb7da18 Minor stuff diff -r 021398e3fd15 -r 4fae0d361139 agignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/agignore Wed Mar 12 11:31:36 2014 -0400 @@ -0,0 +1,6 @@ +tags +tags.bak +*.wsdl +target +*.public.key +*.private.key diff -r 021398e3fd15 -r 4fae0d361139 bin/bootstrap.sh --- a/bin/bootstrap.sh Wed Mar 05 14:10:40 2014 -0500 +++ b/bin/bootstrap.sh Wed Mar 12 11:31:36 2014 -0400 @@ -43,6 +43,7 @@ ensure_link "lib/dotfiles/hgignore" ".hgignore" ensure_link "lib/dotfiles/gitignore" ".gitignore" ensure_link "lib/dotfiles/ffignore" ".ffignore" +ensure_link "lib/dotfiles/agignore" ".agignore" ensure_link "lib/dotfiles/ctags" ".ctags" ensure_link "lib/dotfiles/grc" ".grc" ensure_link "lib/dotfiles/bash_profile" ".bash_profile" diff -r 021398e3fd15 -r 4fae0d361139 fish/config.fish --- a/fish/config.fish Wed Mar 05 14:10:40 2014 -0500 +++ b/fish/config.fish Wed Mar 12 11:31:36 2014 -0400 @@ -1,6 +1,7 @@ # Useful functions {{{ function ef; vim ~/.config/fish/config.fish; end +function eff; vim ~/.config/fish/functions; end function ev; vim ~/.vimrc; end function ed; vim ~/.vim/custom-dictionary.utf-8.add; end function eo; vim ~/Dropbox/Org; end diff -r 021398e3fd15 -r 4fae0d361139 fish/functions/ag.fish --- a/fish/functions/ag.fish Wed Mar 05 14:10:40 2014 -0500 +++ b/fish/functions/ag.fish Wed Mar 12 11:31:36 2014 -0400 @@ -22,6 +22,9 @@ # that little tidbit and can we please get a shell without complete # bullshit as a scripting language syntax? if grep -q 'pragma: skipvcs' '.agignore' + # If .agignore contains pragma: skipvcs, then we'll run ag in + # "disregard .gitignore/.hgignore/svn:ignore" mode. This lets us + # still search in files the VCS has ignored. actual_ag --search-files -U $argv else actual_ag --search-files $argv diff -r 021398e3fd15 -r 4fae0d361139 vim/vimrc --- a/vim/vimrc Wed Mar 05 14:10:40 2014 -0500 +++ b/vim/vimrc Wed Mar 12 11:31:36 2014 -0400 @@ -459,6 +459,10 @@ " This should preserve your last yank/delete as well. nnoremap zl :let @z=@"x$p:let @"=@z +" Ranger +nnoremap r :silent !ranger %:h:redraw! +nnoremap R :silent !ranger:redraw! + " Insert Mode Completion {{{ inoremap @@ -1805,16 +1809,26 @@ xnoremap iN :call NumberTextObject(1) function! s:NumberTextObject(whole) - normal! v - - while getline('.')[col('.')] =~# '\v[0-9]' + let num = '\v[0-9]' + + " If the current char isn't a number, walk forward. + while getline('.')[col('.') - 1] !~# num normal! l endwhile + " Now that we're on a number, start selecting it. + normal! v + + " If the char after the cursor is a number, select it. + while getline('.')[col('.')] =~# num + normal! l + endwhile + + " If we want an entire word, flip the select point and walk. if a:whole normal! o - while col('.') > 1 && getline('.')[col('.') - 2] =~# '\v[0-9]' + while col('.') > 1 && getline('.')[col('.') - 2] =~# num normal! h endwhile endif