b92a70549d55

Ooze stuff and more
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 12 Apr 2016 22:01:25 +0000
parents 08bb1b2895de
children 1b4778f1a32a
branches/tags (none)
files bin/myctags hgrc vim/bundle/ooze/plugin/ooze.vim vim/vimrc

Changes

--- a/bin/myctags	Tue Apr 12 16:35:09 2016 +0000
+++ b/bin/myctags	Tue Apr 12 22:01:25 2016 +0000
@@ -7,9 +7,6 @@
 mv tags tags1
 touch tags2
 
-ffind '.js' --literal | xargs jsctags -f tags2 2>/dev/null || echo > tags2
-
-
 echo '!_TAG_FILE_FORMAT	2	/extended format; --format=1 will not append ;" to lines/' > tags
 echo '!_TAG_FILE_SORTED	1	/0=unsorted, 1=sorted, 2=foldcase/' >> tags
 
--- a/hgrc	Tue Apr 12 16:35:09 2016 +0000
+++ b/hgrc	Tue Apr 12 22:01:25 2016 +0000
@@ -24,6 +24,10 @@
 histedit = ~/lib/dotfiles/mercurial/histedit/hg_histedit.py
 hggit    = ~/.hg-git/hggit
 
+[hooks]
+update = myctags >/dev/null 2>/dev/null || true &
+commit = myctags >/dev/null 2>/dev/null || true &
+
 [progress]
 delay = 1.0
 
--- a/vim/bundle/ooze/plugin/ooze.vim	Tue Apr 12 16:35:09 2016 +0000
+++ b/vim/bundle/ooze/plugin/ooze.vim	Tue Apr 12 22:01:25 2016 +0000
@@ -89,6 +89,18 @@
 \ 'on_exit': function('s:JobHandler')
 \ }
 
+function! OozeSendMessage(msg)
+    if !g:ooze_connection
+        throw "Not connected!"
+    endif
+    try
+        call jobsend(g:ooze_connection, bencode#Bencode(a:msg))
+    catch /E900/
+        echo "Ooze connection died!"
+        let g:ooze_connection = 0
+    endtry
+endfunction!
+
 " }}}
 
 function! OozeDisconnect() " {{{
@@ -105,11 +117,8 @@
 endfunction " }}}
 
 function! OozeMacroexpand(form) " {{{
-    if !g:ooze_connection
-        throw "Not connected!"
-    endif
     let msg = {"op": "macroexpand", "form": a:form}
-    call jobsend(g:ooze_connection, bencode#Bencode(msg))
+    call OozeSendMessage(msg)
 endfunction " }}}
 function! OozeMacroexpandSelection() " {{{
     let z = @z
@@ -119,11 +128,8 @@
 endfunction " }}}
 
 function! OozeDocument(symbol) " {{{
-    if !g:ooze_connection
-        throw "Not connected!"
-    endif
     let msg = {"op": "documentation", "symbol": a:symbol}
-    call jobsend(g:ooze_connection, bencode#Bencode(msg))
+    call OozeSendMessage(msg)
 endfunction " }}}
 function! OozeDocumentSelection() " {{{
     let z = @z
@@ -141,11 +147,10 @@
 function! OozeArglist(symbol) " {{{
     if !g:ooze_connection
         return
-        " throw "Not connected!"
     endif
     let msg = {"op": "arglist", "symbol": a:symbol}
     set noshowmode
-    call jobsend(g:ooze_connection, bencode#Bencode(msg))
+    call OozeSendMessage(msg)
 endfunction " }}}
 function! OozeArglistSelection() " {{{
     let z = @z
@@ -161,11 +166,8 @@
 endfunction " }}}
 
 function! OozeEval(code) " {{{
-    if !g:ooze_connection
-        throw "Not connected!"
-    endif
     let msg = {"op": "eval", "code": a:code}
-    call jobsend(g:ooze_connection, bencode#Bencode(msg))
+    call OozeSendMessage(msg)
 endfunction " }}}
 function! OozeEvalSelection() " {{{
     let z = @z
@@ -175,11 +177,8 @@
 endfunction " }}}
 
 function! OozeLoad(path) " {{{
-    if !g:ooze_connection
-        throw "Not connected!"
-    endif
     let msg = {"op": "load-file", "path": a:path}
-    call jobsend(g:ooze_connection, bencode#Bencode(msg))
+    call OozeSendMessage(msg)
 endfunction " }}}
 function! OozeLoadCurrent() " {{{
     call OozeLoad(expand('%:p'))
--- a/vim/vimrc	Tue Apr 12 16:35:09 2016 +0000
+++ b/vim/vimrc	Tue Apr 12 22:01:25 2016 +0000
@@ -2058,6 +2058,8 @@
     endif
 endfunction
 
+let g:airline#extensions#syntastic#enabled = 0
+
 let g:airline_left_sep = '⮀'
 let g:airline_left_alt_sep = '⮁'
 let g:airline_right_sep = '⮂'