a1d25734af30

more
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sat, 02 Jul 2016 17:20:55 +0000
parents 54633d8bf6d8
children c0b7ab63d895
branches/tags (none)
files fish/functions/dump.fish vim/bundle/ooze/plugin/ooze.vim

Changes

--- 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
--- 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\<plug>(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() " {{{