# HG changeset patch # User Steve Losh # Date 1467480055 0 # Node ID a1d25734af30b5c8bf1ac9e0486a7ec3f8064d72 # Parent 54633d8bf6d8de84a8f4cf2a7317958109d9c994 more diff -r 54633d8bf6d8 -r a1d25734af30 fish/functions/dump.fish --- a/fish/functions/dump.fish Thu Jun 30 13:06:28 2016 +0000 +++ b/fish/functions/dump.fish Sat Jul 02 17:20:55 2016 +0000 @@ -1,5 +1,6 @@ function dump -d "dump to/from the internet" hg -R ~/.plan push + hg -R ~/.plan push git hg -R ~/src/bones push hg -R ~/src/bones push git diff -r 54633d8bf6d8 -r a1d25734af30 vim/bundle/ooze/plugin/ooze.vim --- a/vim/bundle/ooze/plugin/ooze.vim Thu Jun 30 13:06:28 2016 +0000 +++ b/vim/bundle/ooze/plugin/ooze.vim Sat Jul 02 17:20:55 2016 +0000 @@ -9,6 +9,7 @@ let g:ooze_connection = 0 endif + function! s:IsString(a) " {{{ return type(a:a) == 1 endfunction " }}} @@ -103,6 +104,23 @@ " }}} +function! s:FindPackage() " {{{ + let view = winsaveview() + + let package = '' + call cursor(1, 1) + if search('\v^\(in-package>\s*(\n\s*)?.', 'e', 40) + execute "normal v\(sexp_inner_element)" + let old_z = @z + normal! "zy + let package = @z + let @z = old_z + endif + + call winrestview(view) + return package +endfunction " }}} + function! OozeDisconnect() " {{{ if g:ooze_connection call jobstop(g:ooze_connection) @@ -173,6 +191,12 @@ function! OozeEval(code) " {{{ let msg = {"op": "eval", "code": a:code} + + let package = s:FindPackage() + if package != "" + let msg["in-package"] = package + endif + call OozeSendMessage(msg) endfunction " }}} function! OozeEvalSelection() " {{{