--- 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"
--- 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 \' "<exit><change-folder>+steve-stevelosh.com/INBOX<enter>" "go to INBOX"
macro pager \" "<exit><change-folder>+steve-stevelosh.com/archive<enter>" "go to archive"
+# Translate from Icelandic
+macro pager T "<pipe-message>trans -b -u firefox | less" "translate message from Icelandic"
+
# }}}
# Compose {{{
--- 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
--- 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 <leader>W :set wrap!<cr>
-" Copying text to the system clipboard.
+" Inserting blank lines
+" I never use the default behavior of <cr> and this saves me a keystroke...
+nnoremap <cr> o<esc>
+
+" 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 <leader>p :silent! set paste<CR>"*p:set nopaste<CR>
+noremap <leader>p "*p
" noremap <leader>p mz:r!pbpaste<cr>`z
vnoremap <leader>y :<c-u>call g:FuckingCopyTheTextPlease()<cr>
nnoremap <leader>y VV:<c-u>call g:FuckingCopyTheTextPlease()<cr>
+" 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 <nop>
@@ -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_\<esc>"
call NeoReplSendSelection()
call winrestview(view)
-endfunction
-
-function! SendPythonTopLevelHunk()
+endfunction "}}}
+function! SendPythonParagraph() "{{{
+ let view = winsaveview()
+
+ execute "normal! ^vip\<esc>"
+ 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\<esc>"
@@ -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 <localleader>s mz`[v`]:v/\v^(\>\>\>\|[.][.][.])/d<cr>gv:s/\v^(\>\>\> \|[.][.][.] \|[.][.][.]$)//<cr>:noh<cr>`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 <buffer> <silent> <localleader>p :call OpenPythonRepl()<cr>
+ au FileType python nnoremap <buffer> <silent> <localleader>o :call OpenPythonRepl()<cr>
" Send the current line to the REPL
au FileType python nnoremap <buffer> <silent> <localleader>l :call SendPythonLine()<cr>
+ " Send the current paragraph to the REPL
+ au FileType python nnoremap <buffer> <silent> <localleader>p :call SendPythonParagraph()<cr>
+
" " Send the current top-level hunk to the REPL
" au FileType python nnoremap <buffer> <silent> <localleader>e :call SendPythonTopLevelHunk()<cr>
@@ -1559,6 +1576,7 @@
nmap <leader>c <Plug>CommentaryLine
xmap <leader>c <Plug>Commentary
+nmap <leader>t OTODO: <esc><Plug>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 <leader>C :SyntasticCheck<cr>