--- a/.hgsubstate Wed Sep 19 11:00:34 2012 -0400
+++ b/.hgsubstate Sun Sep 23 18:16:09 2012 -0400
@@ -25,7 +25,7 @@
c6197a10ace82e0fe0c08e5cf5c017b7069a978e vim/bundle/sparkup
3a2ab096c039516a8f43e6acd0264d8a81cd0544 vim/bundle/splice
6eec2c131213850ed65fd6da494dfd1a0d620a4e vim/bundle/strftimedammit
-12f3dc40fdfa3572a5b923e7a174516d46f2f78c vim/bundle/supertab
+7ee7f774dd1288ea2e7c57b63cb069a07d425ca0 vim/bundle/supertab
1a73f607f8f5477d6942df2eb6e7245c4864f4d3 vim/bundle/surround
65091e5dc8006f252146390622b0e567f50346bd vim/bundle/syntastic
2dee007ddae8156735cbae7f0cd4e0a24ba7287b vim/bundle/tslime
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bash_profile Sun Sep 23 18:16:09 2012 -0400
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+# This file contains aliases and functions that duplicate some fish
+# functionality, because Vim will use bash as its external command shell.
+
+function a() {
+ if [ -f '.agignorevcs' ]; then
+ ag -U $*
+ else
+ ag $*
+ fi
+}
--- a/bin/bootstrap.sh Wed Sep 19 11:00:34 2012 -0400
+++ b/bin/bootstrap.sh Sun Sep 23 18:16:09 2012 -0400
@@ -42,5 +42,6 @@
ensure_link "lib/dotfiles/grc" ".grc"
ensure_link "lib/dotfiles/fish/config.fish" ".config/fish/config.fish"
ensure_link "lib/dotfiles/mutt/notmuch-config" ".notmuch-config"
+ensure_link "lib/dotfiles/bash_profile" ".bash_profile"
echo completed
--- a/fish/config.fish Wed Sep 19 11:00:34 2012 -0400
+++ b/fish/config.fish Sun Sep 23 18:16:09 2012 -0400
@@ -67,6 +67,14 @@
VBoxManage controlvm $argv poweroff
end
+function a -d "Run Ag with appropriate options."
+ if test -f '.agignorevcs'
+ ag -U $argv
+ else
+ ag $argv
+ end
+end
+
# }}}
# Bind Keys {{{
--- a/vim/vimrc Wed Sep 19 11:00:34 2012 -0400
+++ b/vim/vimrc Sun Sep 23 18:16:09 2012 -0400
@@ -33,7 +33,7 @@
set undoreload=10000
set list
set listchars=tab:▸\ ,eol:¬,extends:❯,precedes:❮
-set shell=/bin/bash
+set shell=/bin/bash\ --login
set lazyredraw
set matchtime=3
set showbreak=↪
@@ -62,6 +62,7 @@
set backupskip=/tmp/*,/private/tmp/*"
" Better Completion
+set complete=.,w,b,u,t
set completeopt=longest,menuone,preview
" Save when losing focus
@@ -986,7 +987,7 @@
" Ack {{{
nnoremap <leader>a :Ack!<space>
-let g:ackprg = 'ag --nogroup --nocolor --column'
+let g:ackprg = 'a --nogroup --nocolor --column'
" }}}
" Autoclose {{{
@@ -1334,9 +1335,31 @@
" }}}
" Next and Last {{{
-
-" Motion for "next/last object". For example, "din(" would go to the next "()"
-" pair and delete its contents.
+"
+" Motion for "next/last object". "Last" here means "previous", not "final".
+" Unfortunately the "p" motion was already taken for paragraphs.
+"
+" Next acts on the next object of the given type in the current line, last acts
+" on the previous object of the given type in the current line.
+"
+" Currently only works for (, [, {, b, r, B, ', and ".
+"
+" Some examples (C marks cursor positions, V means visually selected):
+"
+" din' -> delete in next single quotes foo = bar('spam')
+" C
+" foo = bar('')
+" C
+"
+" canb -> change around next parens foo = bar('spam')
+" C
+" foo = bar
+" C
+"
+" vil" -> select inside last double quotes print "hello ", name
+" C
+" print "hello ", name
+" VVVVVV
onoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr>
xnoremap an :<c-u>call <SID>NextTextObject('a', 'f')<cr>