# HG changeset patch # User Steve Losh # Date 1308321698 14400 # Node ID 7eae993ccc657289bf4fe62a995778643285c2d7 # Parent e93c240fe42c32ed916ddc6d1f1097f39a53a850# Parent f1808d07caa01a84acc6c67cd6207426d1637e1c Merge. diff -r f1808d07caa0 -r 7eae993ccc65 .hgrc --- a/.hgrc Tue Jun 14 22:27:55 2011 -0400 +++ b/.hgrc Fri Jun 17 10:41:38 2011 -0400 @@ -2,6 +2,7 @@ username = Steve Losh editor = vim commitsubrepos = False +ignore = ~/.hgignore [extensions] transplant = diff -r f1808d07caa0 -r 7eae993ccc65 .hgsubstate --- a/.hgsubstate Tue Jun 14 22:27:55 2011 -0400 +++ b/.hgsubstate Fri Jun 17 10:41:38 2011 -0400 @@ -17,4 +17,4 @@ 4995b244e11d5aaa9956bba061c32140e6af8705 vim/bundle/threesome b9b4407a19acc4eb344cca0cc5beea75e9ff5491 vim/bundle/vim-coffee-script c2df2e430d7d5fe645aa40e36079ab51f082e06b vim/bundle/vim-javascript -3d1692f635579e718b85dd8f24ac7fbd52a444f6 vim/bundle/vim-orgmode +24c00fcb00145bd283fc6d2b4494ab02a46941f6 vim/bundle/vim-orgmode diff -r f1808d07caa0 -r 7eae993ccc65 hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hgignore Fri Jun 17 10:41:38 2011 -0400 @@ -0,0 +1,5 @@ +syntax: glob + +.DS_Store +*.pyc +tags diff -r f1808d07caa0 -r 7eae993ccc65 keyremap4macbook/private.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/keyremap4macbook/private.xml Fri Jun 17 10:41:38 2011 -0400 @@ -0,0 +1,74 @@ + + + + + Shift_R to Backspace + private.shift_r_to_backspace + --KeyToKey-- KeyCode::SHIFT_R, KeyCode::DELETE + + + + + Option+CR to something that actually works + private.alt_cr + --KeyToKey-- KeyCode::RETURN, VK_OPTION, KeyCode::DOT, ModifierFlag::OPTION_L + + + + + Ctrl+; to something that actually works (Ctrl+G) + private.ctrl_semicolon_to_ctrl_g + --KeyToKey-- KeyCode::SEMICOLON, VK_CONTROL, KeyCode::G, ModifierFlag::CONTROL_L + + + + + + Swap parens and brackets + private.swap_parens_and_brackets + --KeyToKey-- KeyCode::BRACKET_LEFT, ModifierFlag::NONE, KeyCode::KEY_9, ModifierFlag::SHIFT_R + --KeyToKey-- KeyCode::BRACKET_RIGHT, ModifierFlag::NONE, KeyCode::KEY_0, ModifierFlag::SHIFT_R + --KeyToKey-- KeyCode::KEY_9, ModifierFlag::SHIFT_L, KeyCode::BRACKET_LEFT + --KeyToKey-- KeyCode::KEY_0, ModifierFlag::SHIFT_L, KeyCode::BRACKET_RIGHT + + + + + + Use the correct goddamed shift keys. + private.fucking_shift_keys_how_do_they_work + + --KeyToKey-- KeyCode::Q, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::W, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::E, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::R, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::T, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::S, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::D, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::F, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::G, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::Z, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::X, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::C, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + --KeyToKey-- KeyCode::V, ModifierFlag::SHIFT_L, KeyCode::VK_NONE + + --KeyToKey-- KeyCode::Y, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::U, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::I, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::O, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::P, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::H, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::J, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::K, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::L, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::SEMICOLON, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::N, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::M, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::COMMA, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::DOT, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + --KeyToKey-- KeyCode::QUOTE, ModifierFlag::SHIFT_R, KeyCode::VK_NONE + + + + diff -r f1808d07caa0 -r 7eae993ccc65 vim/.vimrc --- a/vim/.vimrc Tue Jun 14 22:27:55 2011 -0400 +++ b/vim/.vimrc Fri Jun 17 10:41:38 2011 -0400 @@ -641,10 +641,12 @@ if len( swanks ) == 0 " Try to find SWANK in the standard SLIME installation locations - if g:slimv_windows || g:slimv_cygwin - let swanks = split( globpath( 'c:/slime/,c:/*lisp*/slime/,c:/*lisp*/site/lisp/slime/,c:/Program Files/*lisp*/site/lisp/slime/', 'start-swank.lisp' ), '\n' ) - else - let swanks = split( globpath( '/usr/share/common-lisp/source/slime/', 'start-swank.lisp' ), '\n' ) + if exists('g:slimv_windows') + if g:slimv_windows || g:slimv_cygwin + let swanks = split( globpath( 'c:/slime/,c:/*lisp*/slime/,c:/*lisp*/site/lisp/slime/,c:/Program Files/*lisp*/site/lisp/slime/', 'start-swank.lisp' ), '\n' ) + else + let swanks = split( globpath( '/usr/share/common-lisp/source/slime/', 'start-swank.lisp' ), '\n' ) + endif endif endif diff -r f1808d07caa0 -r 7eae993ccc65 vim/ftplugin/python/folding.vim --- a/vim/ftplugin/python/folding.vim Tue Jun 14 22:27:55 2011 -0400 +++ b/vim/ftplugin/python/folding.vim Fri Jun 17 10:41:38 2011 -0400 @@ -47,6 +47,8 @@ setlocal foldmethod=expr setlocal foldexpr=GetPythonFold(v:lnum) setlocal foldtext=PythonFoldText() +nnoremap D :setlocal foldtext=PythonFoldTextDocstrings() +nnoremap d :setlocal foldtext=PythonFoldText() function! PythonFoldText() " ignore decorators @@ -68,6 +70,33 @@ return line . '…' . repeat(" ",fillcharcount) . foldedlinecount . '…' . ' ' endfunction +function! PythonFoldTextDocstrings() + " ignore decorators + let fs = v:foldstart + while getline(fs) =~ '^\s*@' | let fs = nextnonblank(fs + 1) + endwhile + + " add docstrings + let line = getline(fs) + if getline(fs + 1) =~ '^\s*"""' + let line = line . " (" . getline(fs + 1) . ")" + let line = substitute(line, '\s*"""', '', 'g') + let line = substitute(line, '"""', '', 'g') + endif + + let nucolwidth = &fdc + &number * &numberwidth + let windowwidth = winwidth(0) - nucolwidth - 3 + let foldedlinecount = v:foldend - v:foldstart + + " expand tabs into spaces + let onetab = strpart(' ', 0, &tabstop) + let line = substitute(line, '\t', onetab, 'g') + + let line = strpart(line, 0, windowwidth - 2 -len(foldedlinecount)) + let fillcharcount = windowwidth - len(line) - len(foldedlinecount) + return line . '…' . repeat(" ",fillcharcount) . foldedlinecount . '…' . ' ' +endfunction + function! GetBlockIndent(lnum) " Auxiliary function; determines the indent level of the surrounding def/class " "global" lines are level 0, first def &shiftwidth, and so on