# HG changeset patch # User Steve Losh # Date 1447454760 0 # Node ID 1a09a1c137ff7c330eb2a6a2d875e773d212db3c # Parent 1da770d23a2168f0e0c2e50d0d3e84e5c6d38d27 oh christ diff -r 1da770d23a21 -r 1a09a1c137ff .hgsub --- a/.hgsub Sun Sep 20 14:50:41 2015 +0000 +++ b/.hgsub Fri Nov 13 22:46:00 2015 +0000 @@ -15,6 +15,7 @@ vim/bundle/fireplace = [git]git://github.com/tpope/vim-fireplace.git vim/bundle/fugitive = [git]git://github.com/tpope/vim-fugitive.git vim/bundle/gnupg = [git]git://github.com/jamessan/vim-gnupg.git +vim/bundle/gnuplot = [git]git://github.com/vim-scripts/gnuplot.vim.git vim/bundle/gundo = [hg]https://bitbucket.org/sjl/gundo.vim/ vim/bundle/html5 = [git]git://github.com/othree/html5.vim.git vim/bundle/indent-object = [git]git://github.com/michaeljsmith/vim-indent-object.git diff -r 1da770d23a21 -r 1a09a1c137ff .hgsubstate --- a/.hgsubstate Sun Sep 20 14:50:41 2015 +0000 +++ b/.hgsubstate Fri Nov 13 22:46:00 2015 +0000 @@ -15,6 +15,7 @@ 3a843cb1b183bd853b843fbaef89af27b726ac25 vim/bundle/fireplace 935a2cccd3065b1322fb2235285d42728600afdf vim/bundle/fugitive 6e9f52a160e3d15060848a8f453bd1b5bfa70db2 vim/bundle/gnupg +0d57b080f9fae8573c688b6679b31eb1666edc4c vim/bundle/gnuplot eb9fc8676b8959c3c2c95bf6b6e8f0f44317c5c0 vim/bundle/gundo 34b407d2344a3c2a94b56e9d443e18e01e8544d9 vim/bundle/html5 78fffa609b3e6b84ef01ee4c9aba6d7435d7b18e vim/bundle/indent-object diff -r 1da770d23a21 -r 1a09a1c137ff vim/vimrc --- a/vim/vimrc Sun Sep 20 14:50:41 2015 +0000 +++ b/vim/vimrc Fri Nov 13 22:46:00 2015 +0000 @@ -1090,6 +1090,15 @@ augroup END " }}} +" gnuplot {{{ + +augroup ft_gnuplot + au! + + au BufNewFile,BufRead *.gp setlocal filetype=gnuplot +augroup END + +" }}} " Haskell {{{ augroup ft_haskell @@ -1305,6 +1314,29 @@ " }}} " Python {{{ +function! SelectTopLevelPythonHunk() "{{{ + " oh darling what have I done + + " if we're on toplevel line that ends in a :, drop down one line before + " we move on. this is bad and i feel bad. + let line = getline(".") + if len(line) > 0 && line[0] != " " && line[len(line) - 1] == ":" + normal! j + endif + + normal! v + + " use the non-bang version of normal here because we need to use the + " indentation script. this is also bad and i still feel bad. + normal ai + + " keep chomping upwards in the indentation stack til we get to something + " that's at the top level. its bad. + while getline(".")[0] == " " + normal ai + endwhile +endfunction "}}} + function! OpenPythonRepl() "{{{ "fucking kill me NeoRepl fish @@ -1327,18 +1359,13 @@ endfunction "}}} function! SendPythonTopLevelHunk() "{{{ let view = winsaveview() - - " TODO: This is horseshit, ugh - - " If we're on the first char of the form, calling PareditFindDefunBck will - " move us to the previous form, which we don't want. So instead we'll just - " always move a char to the right. - silent! normal! l - - call PareditFindDefunBck() - execute "normal! vab\" - call NeoReplSendSelection() - + let old_z = @z + + call SelectTopLevelPythonHunk() + normal! gv"zy + call NeoReplSendRaw("%cpaste\n" . @z . "\n--\n") + + let @z = old_z call winrestview(view) endfunction "}}} function! SendPythonSelection() "{{{ @@ -1394,7 +1421,7 @@ au FileType python nnoremap p :call SendPythonParagraph() " " Send the current top-level hunk to the REPL - " au FileType python nnoremap e :call SendPythonTopLevelHunk() + au FileType python nnoremap e :call SendPythonTopLevelHunk() " Send the current selection to the REPL au FileType python vnoremap e :call SendPythonSelection() @@ -1896,7 +1923,7 @@ " Python-Mode {{{ let g:pymode_doc = 1 -let g:pymode_doc_key = 'M' +let g:pymode_doc_bind = 'M' let g:pydoc = 'pydoc' let g:pymode_syntax = 1 let g:pymode_syntax_all = 0 diff -r 1da770d23a21 -r 1a09a1c137ff weechat/script.conf --- a/weechat/script.conf Sun Sep 20 14:50:41 2015 +0000 +++ b/weechat/script.conf Fri Nov 13 22:46:00 2015 +0000 @@ -43,7 +43,7 @@ [scripts] autoload = on cache_expire = 60 -dir = "%h/script" hold = "" +path = "%h/script" url = "http://www.weechat.org/files/plugins.xml.gz" url_force_https = on