# HG changeset patch # User Steve Losh # Date 1365434128 14400 # Node ID fb1a2de86f11bad193d38f924df5a046d863645c # Parent e2adcd899a6e4c6321a4ce8200d50e2adbaadda6 More. diff -r e2adcd899a6e -r fb1a2de86f11 fish/config.fish --- a/fish/config.fish Thu Mar 14 17:29:44 2013 -0400 +++ b/fish/config.fish Mon Apr 08 11:15:28 2013 -0400 @@ -48,7 +48,7 @@ function weechat; weechat-curses $argv; end function collapse; sed -e 's/ */ /g'; end -function cuts; cut -d' '; end +function cuts; cut -d' ' $argv; end function v; vim $argv; end function V; vim . $argv; end @@ -122,8 +122,8 @@ bind \cn accept-autosuggestion # Ignore iterm2 escape sequences. Vim will handle them if needed. - bind \e\[I true - bind \e\[O true + # bind \e\[I true + # bind \e\[O true # ]] end diff -r e2adcd899a6e -r fb1a2de86f11 gitconfig --- a/gitconfig Thu Mar 14 17:29:44 2013 -0400 +++ b/gitconfig Mon Apr 08 11:15:28 2013 -0400 @@ -70,6 +70,8 @@ ksdiff = difftool -y -t Kaleidoscope ksshow = "!sh -c 'git ksdiff $1^..$1;' -" + sl = "!sh -c 'git show --color=always $1 | less -R' -" + [push] default = current diff -r e2adcd899a6e -r fb1a2de86f11 hgrc --- a/hgrc Thu Mar 14 17:29:44 2013 -0400 +++ b/hgrc Mon Apr 08 11:15:28 2013 -0400 @@ -180,9 +180,11 @@ # hg n . -- show a summary of rev . without diff. # hg show . -- show a summary of rev . with diff. +# hg sl . -- show a summary of rev . with diff, piped to less nlog = log --style=$HOME/lib/dotfiles/mercurial/templates/map-cmdline.nlog n = nlog -vr show = nlog --color=always -vpr +sl = !"$HG" nlog --color=always -vpr $@ | less -R # Simple glog command that doesn't look bad and doesn't require my CLI templates. gl = glog -l10 --template='\033[0;33m{rev}\033[0m {desc|firstline|strip} \033[0;35m{branches}\033[0m \033[0;33m{tags}\033[0m\n\033[1;30m({date|age} by {author|person})\033[0m\n\n' diff -r e2adcd899a6e -r fb1a2de86f11 inputrc --- a/inputrc Thu Mar 14 17:29:44 2013 -0400 +++ b/inputrc Mon Apr 08 11:15:28 2013 -0400 @@ -1,2 +0,0 @@ -\e[O: '' -\e[I: '' diff -r e2adcd899a6e -r fb1a2de86f11 vim/vimrc --- a/vim/vimrc Thu Mar 14 17:29:44 2013 -0400 +++ b/vim/vimrc Mon Apr 08 11:15:28 2013 -0400 @@ -71,6 +71,10 @@ " Resize splits when the window is resized au VimResized * :wincmd = +" Leader +let mapleader = "," +let maplocalleader = "\\" + " Cursorline {{{ " Only show cursorline in the current window and in normal mode. @@ -92,16 +96,6 @@ " }}} " Trailing whitespace {{{ -" Save {{{ - -" augroup its2012justfuckingsavealready -" au! -" au InsertLeave * :silent! wa -" au CursorHold * :silent! wa -" au CursorHoldI * :silent! wa -" augroup END - -" }}} " Only shown when not in insert mode so I don't go insane. augroup trailing @@ -163,7 +157,7 @@ " Backups {{{ set backup " enable backups -set noswapfile " It's 2012, Vim. +set noswapfile " it's 2013, Vim. set undodir=~/.vim/tmp/undo// " undo files set backupdir=~/.vim/tmp/backup// " backups @@ -181,12 +175,6 @@ endif " }}} -" Leader {{{ - -let mapleader = "," -let maplocalleader = "\\" - -" }}} " Color scheme {{{ syntax on @@ -242,8 +230,8 @@ " Convenience mappings ---------------------------------------------------- {{{ " Fuck you, help key. -noremap :set invfullscreen -inoremap :set invfullscreena +noremap +inoremap " Stop it, hash key. inoremap # X# @@ -270,8 +258,10 @@ " For some reason Vim no longer wants to talk to the OS X pasteboard through "*. " Computers are bullshit. function! g:FuckingCopyTheTextPlease() - normal! gv - silent '<,'>w !pbcopy + let old_z = @z + normal! gv"zy + call system('pbcopy', @z) + let @z = old_z endfunction noremap p :silent! set paste"*p:set nopaste noremap p :r!pbpaste @@ -282,10 +272,7 @@ vnoremap u vnoremap gu u -" For some reason ctags refuses to ignore Python variables, so I'll just hack -" the tags file with sed and strip them out myself. -" -" Sigh. +" Rebuild Ctags (mnemonic RC -> CR -> ) nnoremap :silent !myctags:redraw! " Highlight Group(s) @@ -296,17 +283,9 @@ " Clean trailing whitespace nnoremap w mz:%s/\s\+$//:let @/=''`z -" Send visual selection to gist.github.com as a private, filetyped Gist -" Requires the gist command line too (brew install gist) -" vnoremap G :w !gist -p -t %:e \| pbcopy -" vnoremap UG :w !gist -p \| pbcopy - " Send visual selection to paste.stevelosh.com vnoremap :w !curl -sF 'sprunge=<-' 'http://paste.stevelosh.com' \| tr -d '\n ' \| pbcopy && open `pbpaste` -" Insert the directory of the current buffer in command line mode -cnoremap %% getcmdtype() == ':' ? expand('%:h').'/' : '%%' - " Select entire buffer nnoremap vaa ggvGg_ nnoremap Vaa ggVG @@ -340,10 +319,6 @@ " Panic Button nnoremap mzggg?G`z -" Emacs bindings in command line mode -cnoremap -cnoremap - " Diffoff nnoremap D :diffoff! @@ -366,7 +341,7 @@ nnoremap S i^mwgk:silent! s/\v +$//:noh`w " HTML tag closing -inoremap :call InsertCloseTag()a +inoremap :call InsertCloseTag()a " Source vnoremap S y:execute @@:echo 'Sourced selection.' @@ -396,7 +371,6 @@ command! -bang WQ wq " I suck at typing. -nnoremap = == vnoremap - = " Toggle paste @@ -411,17 +385,6 @@ " Unfuck my screen nnoremap U :syntax sync fromstart:redraw! -" Drag Lines {{{ - -" and to drag lines in any mode -noremap ∆ :m+ -noremap ˚ :m-2 -inoremap ∆ :m+ -inoremap ˚ :m-2 -vnoremap ∆ :m'>+gv -vnoremap ˚ :m-2gv - -" }}} " Easy filetype switching {{{ nnoremap _md :set ft=markdown @@ -518,6 +481,8 @@ " Heresy inoremap I inoremap A +cnoremap +cnoremap " gi already moves to "last place you exited insert mode", so we'll map gI to " something similar: move to last change @@ -535,7 +500,7 @@ " Directional Keys {{{ -" It's 2012. +" It's 2013. noremap j gj noremap k gk noremap gj j @@ -1072,7 +1037,7 @@ " Ack {{{ nnoremap a :Ack! -let g:ackprg = 'ag --nogroup --nocolor --column' +let g:ackprg = 'ag --smart-case --nogroup --nocolor --column' " }}} " Autoclose {{{