# HG changeset patch # User Steve Losh # Date 1440671165 0 # Node ID 25ffd1bd10929d8e049a14c35ccbf9244dc40266 # Parent 9a20baa633dbc2003939492b116b01bea12b5743 Update mutt config. diff -r 9a20baa633db -r 25ffd1bd1092 bin/pb --- a/bin/pb Thu Aug 27 10:25:52 2015 +0000 +++ b/bin/pb Thu Aug 27 10:26:05 2015 +0000 @@ -2,9 +2,9 @@ set -e -curl -F 'sprunge=<-' http://paste.stevelosh.com | tr -d '\n' | pbcopy +curl -F 'sprunge=<-' http://paste.stevelosh.com | tr -d '\n' | sed -e 's_sprunge-stevelosh.herokuapp.com_http://paste.stevelosh.com_' | pbcopy echo curl -s "`pbpaste`" tput bold echo "" -echo "`pbpaste`" +echo "Copied URL `pbpaste` to clipboard" diff -r 9a20baa633db -r 25ffd1bd1092 mutt/muttrc --- a/mutt/muttrc Thu Aug 27 10:25:52 2015 +0000 +++ b/mutt/muttrc Thu Aug 27 10:26:05 2015 +0000 @@ -42,6 +42,7 @@ set pipe_decode # strip headers and eval mimes when piping set thorough_search # strip headers and eval mimes before searching set send_charset="us-ascii:utf-8:iso-8859-1" +set use_from # respect the From: address the editor sends back # }}} # PGP {{{ @@ -230,6 +231,9 @@ macro pager \' "+steve-stevelosh.com/INBOX" "go to INBOX" macro pager \" "+steve-stevelosh.com/archive" "go to archive" +# Translate from Icelandic +macro pager T "trans -b -u firefox | less" "translate message from Icelandic" + # }}} # Compose {{{ diff -r 9a20baa633db -r 25ffd1bd1092 vim/custom-dictionary.utf-8.add --- a/vim/custom-dictionary.utf-8.add Thu Aug 27 10:25:52 2015 +0000 +++ b/vim/custom-dictionary.utf-8.add Thu Aug 27 10:26:05 2015 +0000 @@ -171,3 +171,4 @@ realtime carabiner monopod +gmail diff -r 9a20baa633db -r 25ffd1bd1092 vim/vimrc --- a/vim/vimrc Thu Aug 27 10:25:52 2015 +0000 +++ b/vim/vimrc Thu Aug 27 10:26:05 2015 +0000 @@ -296,7 +296,11 @@ " Wrap nnoremap W :set wrap! -" Copying text to the system clipboard. +" Inserting blank lines +" I never use the default behavior of and this saves me a keystroke... +nnoremap o + +" Copying/pasting text to the system clipboard. " " For some reason Vim no longer wants to talk to the OS X pasteboard through "*. " Computers are bullshit. @@ -306,11 +310,14 @@ call system('pbcopy', @z) let @z = old_z endfunction -noremap p :silent! set paste"*p:set nopaste +noremap p "*p " noremap p mz:r!pbpaste`z vnoremap y :call g:FuckingCopyTheTextPlease() nnoremap y VV:call g:FuckingCopyTheTextPlease() +" Reselect last-pasted text +nnoremap gp `[v`] + " I constantly hit "u" in visual mode when I mean to "y". Use "gu" for those rare occasions. " From https://github.com/henrik/dotfiles/blob/master/vim/config/mappings.vim vnoremap u @@ -1251,21 +1258,27 @@ " }}} " Python {{{ -function! OpenPythonRepl() +function! OpenPythonRepl() "{{{ "fucking kill me NeoRepl fish -endfunction - -function! SendPythonLine() +endfunction "}}} +function! SendPythonLine() "{{{ let view = winsaveview() execute "normal! ^vg_\" call NeoReplSendSelection() call winrestview(view) -endfunction - -function! SendPythonTopLevelHunk() +endfunction "}}} +function! SendPythonParagraph() "{{{ + let view = winsaveview() + + execute "normal! ^vip\" + call NeoReplSendSelection() + + call winrestview(view) +endfunction "}}} +function! SendPythonTopLevelHunk() "{{{ let view = winsaveview() " TODO: This is horseshit, ugh @@ -1280,9 +1293,8 @@ call NeoReplSendSelection() call winrestview(view) -endfunction - -function! SendPythonSelection() +endfunction "}}} +function! SendPythonSelection() "{{{ let view = winsaveview() let old_z = @z @@ -1291,9 +1303,8 @@ let @z = old_z call winrestview(view) -endfunction - -function! SendPythonBuffer() +endfunction "}}} +function! SendPythonBuffer() "{{{ let view = winsaveview() execute "normal! ggVG\" @@ -1302,7 +1313,7 @@ call NeoReplSendRaw("%cpaste\n" . @z . "\n--\n") call winrestview(view) -endfunction +endfunction "}}} augroup ft_python au! @@ -1313,21 +1324,27 @@ " override this in a normal way, could you? au FileType python if exists("python_space_error_highlight") | unlet python_space_error_highlight | endif + " Strip REPL-session marks from just-pasted text + au FileType python nnoremap s mz`[v`]:v/\v^(\>\>\>\|[.][.][.])/dgv:s/\v^(\>\>\> \|[.][.][.] \|[.][.][.]$)//:noh`z + " Set up some basic neorepl mappings. " " key desc mnemonic - " \p - connect neorepl [p]ython + " \p - connect neorepl [o]pen repl " \l - send current line [l]ine " \e - send top-level hunk [e]val " \e - send selected hunk [e]val " \r - send entire file [r]eload file " \c - send ctrl-l [c]lear - au FileType python nnoremap p :call OpenPythonRepl() + au FileType python nnoremap o :call OpenPythonRepl() " Send the current line to the REPL au FileType python nnoremap l :call SendPythonLine() + " Send the current paragraph to the REPL + au FileType python nnoremap p :call SendPythonParagraph() + " " Send the current top-level hunk to the REPL " au FileType python nnoremap e :call SendPythonTopLevelHunk() @@ -1559,6 +1576,7 @@ nmap c CommentaryLine xmap c Commentary +nmap t OTODO: CommentaryLineA augroup plugin_commentary au! @@ -1844,6 +1862,8 @@ let g:syntastic_stl_format = '[%E{%e Errors}%B{, }%W{%w Warnings}]' let g:syntastic_jsl_conf = '$HOME/.vim/jsl.conf' let g:syntastic_scala_checkers = ['fsc'] +let g:syntastic_python_checkers = ['python'] +let g:syntastic_python_python_exec = '/Users/sjl/bin/py3' nnoremap C :SyntasticCheck