From 4b441163d7d1190d2f61a1f4262bb64c379e3b36 Mon Sep 17 00:00:00 2001 From: Eric Fode Date: Tue, 1 Oct 2013 21:16:01 -0700 Subject: [PATCH 01/13] testing out ninja mode --- indent/.hoon.vim.swp | Bin 0 -> 12288 bytes indent/hoon.vim | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 indent/.hoon.vim.swp diff --git a/indent/.hoon.vim.swp b/indent/.hoon.vim.swp new file mode 100644 index 0000000000000000000000000000000000000000..1f69f92225faf879f4a0ab91e76d63396033c1ba GIT binary patch literal 12288 zcmeI2O>7%Q7>1|ZC=^h+a`@te+Hqn#AyPpG7Yekcf=Cd4E)9hJ89Rg5GtSOz68=Ja z?72mP0>>T^hy!qgD_oGc@pI&efLpJ;k-n9mtoNO7#-E?vl@ev+mDet= z)1%Ebf$aeyc0PN4><2(v&V?9cqHm2V=tMX=Mk|+!3 z9ZVK%HFwpZ6&E_qWNX_PJvvr8mD-iZ;Y@zd2H3zI87N%0@z@Em_Q>jrUuV8DM-QHS z^^TV0$!vfPumLu}2G{@_U;}J`4IC{4Zg@<5fR^tXw|#EBKlY#f_>gyOfDNz#Hoykh z02^QfY=8~00XDz}*uW7q5T!z#J}yM}9yE{t|4;t@|L1-oeg(gP@4(mKOYjA_0X_yF zfgKQmb?^dM19h+f=E2?I)_p?!27UnFfSceNxC}Jd0H?tMI0*#!>x2-$gCD`S;3l{V z_J9O0gR`Io9s!Y17s>_v-k$P{rV6jgDUl&(qdM zrMeg_VsJb@o=vuhty8XWveuI>Q(8`|m#gh|6H6{v{mW0D_Brl<1>vL@d;oPidej?5S^MSO3e;YB`k6>A$l`R z{E4HbFi8v+S`HHzXB?jNSJ=2Kwjrdbvn&?X``F@xrQWHHKCRX)` z4#K4GmA)G$NfZ-pg^BemzaA#r5~rp?`1%xb=L$h5=hD{Vb&8=ZsAyr`J3+vT*z`?S!Zk2UfVyDzNM9ZE5emu zUXER*mE8_1EA{EMTS1}4P2?YXr>Jn|@b;T#+GNTOr^koma(|e2rmNI;M>h!868<)d v+o?*o4l8jht=_Jeu+}$Ip=WZLDn}QLwB!tp9_6pli$$ENgq}5nNNMpe#O1pA literal 0 HcmV?d00001 diff --git a/indent/hoon.vim b/indent/hoon.vim index d642929ab..29cda4008 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -16,6 +16,41 @@ if exists("*HoonIndent") finish endif +if exists('g:hoon_ninja') + inoremap bar \| + inoremap gal < + inoremap per ) + inoremap gar > + inoremap sel [ + inoremap bas \ + inoremap hax # + inoremap sem ; + inoremap buc $ + inoremap hep - + inoremap ser ] + inoremap cab _ + inoremap kel { + inoremap sig ~ + inoremap cen % + inoremap ker } + inoremap soq ' + inoremap col : + inoremap ket ^ + inoremap tar * + inoremap com , + inoremap lus + + inoremap tec ` + inoremap doq " + inoremap pam & + inoremap tis = + inoremap dot . + inoremap pat @ + inoremap wut ? + inoremap fas / + inoremap pel ( + inoremap zap ! +endif + function! HoonIndent(lnum) let prevlnum = prevnonblank(a:lnum-1) if prevlnum == 0 From bc3d9af7466c13ef50ea06eb82eedb36f717b874 Mon Sep 17 00:00:00 2001 From: Eric Fode Date: Wed, 2 Oct 2013 01:26:43 -0700 Subject: [PATCH 02/13] second test of ninja mode --- .indent.swp | Bin 0 -> 12288 bytes ftplugin/.hoon.vim.swp | Bin 0 -> 12288 bytes ftplugin/hoon.vim | 41 +++++++++++++++++++++++ indent/.hoon.vim.swp | Bin 12288 -> 12288 bytes indent/hoon.vim | 72 ++++++++++++++++++++++------------------- 5 files changed, 80 insertions(+), 33 deletions(-) create mode 100644 .indent.swp create mode 100644 ftplugin/.hoon.vim.swp create mode 100644 ftplugin/hoon.vim diff --git a/.indent.swp b/.indent.swp new file mode 100644 index 0000000000000000000000000000000000000000..ba3e8a25750d8dd33aede76effee5441c5dd418a GIT binary patch literal 12288 zcmeI&zi-n(6bJAtTZaNF5(~>C1gWL*j}Qcs)l>qN3Is)JAze5I`+RMVxIS}s`eP}7 z6XFkGU}EL3;4kRRvq_?g0T?nA>3h=i-Sgc&pFWwaI0^TjZ_^{cC%9b~;{5xI-L<_P z(SIX^c1G>nRM%5~YEOBcx5W!fZ#z~`tQ~oejq@|B;_TwSvuVM=KQf0wGS1UX2SaP~ zCO3Ji^XlRTj3EGlISMQddiT3wUGPrpHr-er%&|5~K>z{}fB*y_009U<00Ng?peh!` zM?U10$w3z<{lahkBt-`S2tWV=5P$##AOHafKmY;|fWUt!5T`M+2noQnS8%V%VVCDeiDzkJ8RFLqf@G%Ubp&4&HZ3dYF7sT t^g(-zUg^pm)24A+Ro0!-OH)=RKloMi@7I;Q*?-i15U%pm=lIL?#ZUH5z=;3= literal 0 HcmV?d00001 diff --git a/ftplugin/.hoon.vim.swp b/ftplugin/.hoon.vim.swp new file mode 100644 index 0000000000000000000000000000000000000000..cb516bce644fbb8407f6e43badbd79ac8c773bc4 GIT binary patch literal 12288 zcmeI2J#5oJ6vtmd&_Y|jS0pzrO#@BbQVCFLMT-Pdg}PM0QcCd0B{|~QCbrv(k1{Z@ zFtEbNhy)8vh!qJI7|X`Wir5$s@6IWzNK*P#fmG>P`o&4?zwhqnceSh79=SR*Yn(2O z0WJps-mG4ld-PxqCNBesx^zl`E7YcqmJ7IF{vz%e|>!=T_DZ zXciV_&9oEW^@Ldo0$+bF#i5s!rT_bz^;v$;2H3z>4fMj;$SVgarn@ctsao` zY=8~00XDz}*Z><~18jf|Y$F44*a7#kzdIUz&NbE@f2<~18jf|Y(oQ<3-G-Y;8hoP9)JH|`~Uy*et=KN2jo5S5_y3vBGX6@vbqo88B#;e zAUlzdy#P-T7cr3^Jpk{J$H+V~hM>1{LZMYtV;Urd+~Af9 zWk{h|I4X356!H>1rW2%)6X-DwlR~joSKT{K3RQ(ZPuEEyC(s2uP6|a@c_y1_bH!*` z!Ed-MdB#Md^8(Cxy!Ce3~GI!t^}lNTIT&=M$|ZJMG@xrj~>s zi+XWM#+9~rZ>E_wa2o21XL)?>PB4}=5hO9*3F0HY!gpl}45K7{8C5`*46!VuI2y{d JzlY4^;1_GxX1M?W literal 0 HcmV?d00001 diff --git a/ftplugin/hoon.vim b/ftplugin/hoon.vim new file mode 100644 index 000000000..fa093394b --- /dev/null +++ b/ftplugin/hoon.vim @@ -0,0 +1,41 @@ +if exists("b:hoon_did_submode_mapping") + finish +endif + +let g:submode_timeout = 0 + +call submode#enter_with('hoon_ninja', 'i', '', '//' ) +call submode#map('hoon_ninja', 'i', '', 'bar', '|') +call submode#map('hoon_ninja', 'i', '', 'gal', '<') +call submode#map('hoon_ninja', 'i', '', 'per', ')') +call submode#map('hoon_ninja', 'i', '', 'gar', '<') +call submode#map('hoon_ninja', 'i', '', 'sel', '[') +call submode#map('hoon_ninja', 'i', '', 'bas', '\') +call submode#map('hoon_ninja', 'i', '', 'hax', '#') +call submode#map('hoon_ninja', 'i', '', 'sem', ';') +call submode#map('hoon_ninja', 'i', '', 'buc', '$') +call submode#map('hoon_ninja', 'i', '', 'hep', '-') +call submode#map('hoon_ninja', 'i', '', 'ser', ']') +call submode#map('hoon_ninja', 'i', '', 'cab', '_') +call submode#map('hoon_ninja', 'i', '', 'kel', '{') +call submode#map('hoon_ninja', 'i', '', 'sig', '~') +call submode#map('hoon_ninja', 'i', '', 'cen', '%') +call submode#map('hoon_ninja', 'i', '', 'ker', '}') +call submode#map('hoon_ninja', 'i', '', 'soq', "'") +call submode#map('hoon_ninja', 'i', '', 'col', ':') +call submode#map('hoon_ninja', 'i', '', 'ket', '^') +call submode#map('hoon_ninja', 'i', '', 'tar', '*') +call submode#map('hoon_ninja', 'i', '', 'com', ',') +call submode#map('hoon_ninja', 'i', '', 'lus', '+') +call submode#map('hoon_ninja', 'i', '', 'tec', '`') +call submode#map('hoon_ninja', 'i', '', 'doq', '"') +call submode#map('hoon_ninja', 'i', '', 'pam', '&') +call submode#map('hoon_ninja', 'i', '', 'tis', '=') +call submode#map('hoon_ninja', 'i', '', 'dot', '.') +call submode#map('hoon_ninja', 'i', '', 'pat', '@') +call submode#map('hoon_ninja', 'i', '', 'wut', '?') +call submode#map('hoon_ninja', 'i', '', 'fas', '/') +call submode#map('hoon_ninja', 'i', '', 'pel', '(') +call submode#map('hoon_ninja', 'i', '', 'zap', '!') +let b:hoon_did_submode_mapping = 1 + diff --git a/indent/.hoon.vim.swp b/indent/.hoon.vim.swp index 1f69f92225faf879f4a0ab91e76d63396033c1ba..a941e60ab371b7aef5a9af313c1fd228edddf9b3 100644 GIT binary patch delta 493 zcmc)HyGud=6vy$OnPvH2tnuPh+{oU7TQo&Q6xb+|dduY+q7VdSjjeZRXsgzSxDYM9 zAgD!Xh`=pcTY?@_LEj?!7dr6a95{!=fm6@bbMeK2g~=Hs)jupEDqY@B&F^d-#hYGF z#(nl0K~KVsMPDMJxsddR@1cYfGiEpZ5$Pc;HE@9wtYZyXjKf4XqKKdc@4uTG7%Q7>1|ZC=^h+a`@te+Hqn#AyPpG7Yekcf=Cd4E)9hJ89Rg5GtSOz68=Ja z?72mP0>>T^hy!qgD_oGc@pI&efLpJ;k-n9mtoNO7#-E?vl@ev+mDet= z)1%Ebf$aeyc0PN4><2(v&V?9cqHm2V=tMX=Mk|+!3 z9ZVK%HFwpZ6&E_qWNX_PJvvr8mD-iZ;Y@zd2H3zI87N%0@z@Em_Q>jrUuV8DM-QHS z^^TV0$!vfPumLu}2G{@_U;}J`4IC{4Zg@<5fR^tXw|#EBKlY#f_>gyOfDNz#Hoykh z02^QfY=8~00XDz}*uW7q5T!z#J}yM}9yE{t|4;t@|L1-oeg(gP@4(mKOYjA_0X_yF zfgKQmb?^dM19h+f=E2?I)_p?!27UnFfSceNxC}Jd0H?tMI0*#!>x2-$gCD`S;3l{V z_J9O0gR`Io9s!Y17s>_v-k$P{rV6jgDUl&(qdM zrMeg_VsJb@o=vuhty8XWveuI>Q(8`|m#gh|6H6{v{mW0D_Brl<1>vL@d;oPidej?5S^MSO3e;YB`k6>A$l`R z{E4HbFi8v+S`HHzXB?jNSJ=2Kwjrdbvn&?X``F@xrQWHHKCRX)` z4#K4GmA)G$NfZ-pg^BemzaA#r5~rp?`1%xb=L$h5=hD{Vb&8=ZsAyr`J3+vT*z`?S!Zk2UfVyDzNM9ZE5emu zUXER*mE8_1EA{EMTS1}4P2?YXr>Jn|@b;T#+GNTOr^koma(|e2rmNI;M>h!868<)d v+o?*o4l8jht=_Jeu+}$Ip=WZLDn}QLwB!tp9_6pli$$ENgq}5nNNMpe#O1pA diff --git a/indent/hoon.vim b/indent/hoon.vim index 29cda4008..e1c1d963f 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -16,41 +16,47 @@ if exists("*HoonIndent") finish endif -if exists('g:hoon_ninja') - inoremap bar \| - inoremap gal < - inoremap per ) - inoremap gar > - inoremap sel [ - inoremap bas \ - inoremap hax # - inoremap sem ; - inoremap buc $ - inoremap hep - - inoremap ser ] - inoremap cab _ - inoremap kel { - inoremap sig ~ - inoremap cen % - inoremap ker } - inoremap soq ' - inoremap col : - inoremap ket ^ - inoremap tar * - inoremap com , - inoremap lus + - inoremap tec ` - inoremap doq " - inoremap pam & - inoremap tis = - inoremap dot . - inoremap pat @ - inoremap wut ? - inoremap fas / - inoremap pel ( - inoremap zap ! +if exists("b:hoon_did_submode_mapping") + finish endif +set g:submode_timeout = 0 + +call submode#enter_with('hoon_ninja', 'i', '', '/ninja') +call submode#enter_with('hoon_ninja', 'i', '', '//') +call submode#map('hoon_ninja', 'i', '', 'bar', '|') +call submode#map('hoon_ninja', 'i', '', 'gal', '<') +call submode#map('hoon_ninja', 'i', '', 'per', ')') +call submode#map('hoon_ninja', 'i', '', 'gar', '<') +call submode#map('hoon_ninja', 'i', '', 'sel', '[') +call submode#map('hoon_ninja', 'i', '', 'bas', '\') +call submode#map('hoon_ninja', 'i', '', 'hax', '#') +call submode#map('hoon_ninja', 'i', '', 'sem', ';') +call submode#map('hoon_ninja', 'i', '', 'buc', '$') +call submode#map('hoon_ninja', 'i', '', 'hep', '-') +call submode#map('hoon_ninja', 'i', '', 'ser', ']') +call submode#map('hoon_ninja', 'i', '', 'cab', '_') +call submode#map('hoon_ninja', 'i', '', 'kel', '{') +call submode#map('hoon_ninja', 'i', '', 'sig', '~') +call submode#map('hoon_ninja', 'i', '', 'cen', '%') +call submode#map('hoon_ninja', 'i', '', 'ker', '}') +call submode#map('hoon_ninja', 'i', '', 'soq', "'") +call submode#map('hoon_ninja', 'i', '', 'col', ':') +call submode#map('hoon_ninja', 'i', '', 'ket', '^') +call submode#map('hoon_ninja', 'i', '', 'tar', '*') +call submode#map('hoon_ninja', 'i', '', 'com', ',') +call submode#map('hoon_ninja', 'i', '', 'lus', '+') +call submode#map('hoon_ninja', 'i', '', 'tec', '`') +call submode#map('hoon_ninja', 'i', '', 'doq', '"') +call submode#map('hoon_ninja', 'i', '', 'pam', '&') +call submode#map('hoon_ninja', 'i', '', 'tis', '=') +call submode#map('hoon_ninja', 'i', '', 'dot', '.') +call submode#map('hoon_ninja', 'i', '', 'pat', '@') +call submode#map('hoon_ninja', 'i', '', 'wut', '?') +call submode#map('hoon_ninja', 'i', '', 'fas', '/') +call submode#map('hoon_ninja', 'i', '', 'pel', '(') +call submode#map('hoon_ninja', 'i', '', 'zap', '!') +let b:hoon_did_submode_mapping = 1 function! HoonIndent(lnum) let prevlnum = prevnonblank(a:lnum-1) if prevlnum == 0 From 243f5b39ede9f433f1332423768db1ba11202e5d Mon Sep 17 00:00:00 2001 From: Eric Fode Date: Wed, 2 Oct 2013 01:41:08 -0700 Subject: [PATCH 03/13] added gitignore --- .gitignore | 1 + ftplugin/.hoon.vim.swp | Bin 12288 -> 0 bytes ftplugin/hoon.vim | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .gitignore delete mode 100644 ftplugin/.hoon.vim.swp diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..1377554eb --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.swp diff --git a/ftplugin/.hoon.vim.swp b/ftplugin/.hoon.vim.swp deleted file mode 100644 index cb516bce644fbb8407f6e43badbd79ac8c773bc4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2J#5oJ6vtmd&_Y|jS0pzrO#@BbQVCFLMT-Pdg}PM0QcCd0B{|~QCbrv(k1{Z@ zFtEbNhy)8vh!qJI7|X`Wir5$s@6IWzNK*P#fmG>P`o&4?zwhqnceSh79=SR*Yn(2O z0WJps-mG4ld-PxqCNBesx^zl`E7YcqmJ7IF{vz%e|>!=T_DZ zXciV_&9oEW^@Ldo0$+bF#i5s!rT_bz^;v$;2H3z>4fMj;$SVgarn@ctsao` zY=8~00XDz}*Z><~18jf|Y$F44*a7#kzdIUz&NbE@f2<~18jf|Y(oQ<3-G-Y;8hoP9)JH|`~Uy*et=KN2jo5S5_y3vBGX6@vbqo88B#;e zAUlzdy#P-T7cr3^Jpk{J$H+V~hM>1{LZMYtV;Urd+~Af9 zWk{h|I4X356!H>1rW2%)6X-DwlR~joSKT{K3RQ(ZPuEEyC(s2uP6|a@c_y1_bH!*` z!Ed-MdB#Md^8(Cxy!Ce3~GI!t^}lNTIT&=M$|ZJMG@xrj~>s zi+XWM#+9~rZ>E_wa2o21XL)?>PB4}=5hO9*3F0HY!gpl}45K7{8C5`*46!VuI2y{d JzlY4^;1_GxX1M?W diff --git a/ftplugin/hoon.vim b/ftplugin/hoon.vim index fa093394b..5b5c39319 100644 --- a/ftplugin/hoon.vim +++ b/ftplugin/hoon.vim @@ -3,7 +3,7 @@ if exists("b:hoon_did_submode_mapping") endif let g:submode_timeout = 0 - +let g:submode_keyseqs_to_leave = ['"'] call submode#enter_with('hoon_ninja', 'i', '', '//' ) call submode#map('hoon_ninja', 'i', '', 'bar', '|') call submode#map('hoon_ninja', 'i', '', 'gal', '<') From e7e0842eaa4cea284b6a204b24e74126bed960d5 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 2 Oct 2013 09:40:58 -0700 Subject: [PATCH 04/13] Experiments with fork checkpoint. --- v/unix.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/v/unix.c b/v/unix.c index e0dfb2648..57e8f75aa 100644 --- a/v/unix.c +++ b/v/unix.c @@ -1187,6 +1187,7 @@ _unix_sign_cb(uv_signal_t* sil_u, c3_i num_i) break; case SIGINT: u2_term_ef_ctlc(); break; case SIGWINCH: u2_term_ef_winc(); break; + case SIGCHLD: u2_save_ef_chld(); break; } } u2_lo_shut(u2_yes); @@ -1259,6 +1260,16 @@ u2_unix_io_init(void) sig_u->nex_u = unx_u->sig_u; unx_u->sig_u = sig_u; } + { + u2_usig* sig_u; + + sig_u = malloc(sizeof(u2_usig)); + uv_signal_init(u2L, &sig_u->sil_u); + + sig_u->num_i = SIGCHLD; + sig_u->nex_u = unx_u->sig_u; + unx_u->sig_u = sig_u; + } u2_unix_ef_move(); } From 178da26a008df97be4f8f8dbbff3c4f1f2988c46 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Wed, 2 Oct 2013 11:15:27 -0700 Subject: [PATCH 05/13] Fixed a couple of bugs, namely bar and gar rendered incorrectly. --- indent/hoon.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/indent/hoon.vim b/indent/hoon.vim index e1c1d963f..7c373fd62 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -20,14 +20,14 @@ if exists("b:hoon_did_submode_mapping") finish endif -set g:submode_timeout = 0 +let g:submode_timeout = 0 -call submode#enter_with('hoon_ninja', 'i', '', '/ninja') +"call submode#enter_with('hoon_ninja', 'i', '', '/ninja') call submode#enter_with('hoon_ninja', 'i', '', '//') -call submode#map('hoon_ninja', 'i', '', 'bar', '|') +call submode#map('hoon_ninja', 'i', '', 'bar', '\|') call submode#map('hoon_ninja', 'i', '', 'gal', '<') call submode#map('hoon_ninja', 'i', '', 'per', ')') -call submode#map('hoon_ninja', 'i', '', 'gar', '<') +call submode#map('hoon_ninja', 'i', '', 'gar', '>') call submode#map('hoon_ninja', 'i', '', 'sel', '[') call submode#map('hoon_ninja', 'i', '', 'bas', '\') call submode#map('hoon_ninja', 'i', '', 'hax', '#') @@ -57,6 +57,7 @@ call submode#map('hoon_ninja', 'i', '', 'fas', '/') call submode#map('hoon_ninja', 'i', '', 'pel', '(') call submode#map('hoon_ninja', 'i', '', 'zap', '!') let b:hoon_did_submode_mapping = 1 + function! HoonIndent(lnum) let prevlnum = prevnonblank(a:lnum-1) if prevlnum == 0 From eaebf7fde83a473b8181709b058e6105d3a7f2f4 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Wed, 2 Oct 2013 12:12:22 -0700 Subject: [PATCH 06/13] Added reverse ninja mode (ajnin mode?). --- indent/hoon.vim | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/indent/hoon.vim b/indent/hoon.vim index 7c373fd62..2e88ccbbf 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -56,6 +56,40 @@ call submode#map('hoon_ninja', 'i', '', 'wut', '?') call submode#map('hoon_ninja', 'i', '', 'fas', '/') call submode#map('hoon_ninja', 'i', '', 'pel', '(') call submode#map('hoon_ninja', 'i', '', 'zap', '!') + +call submode#enter_with('hoon_ajnin', 'i', '', '??') +call submode#map('hoon_ajnin', 'i', '', '\|', 'bar') +call submode#map('hoon_ajnin', 'i', '', '<', 'gal') +call submode#map('hoon_ajnin', 'i', '', ')', 'per') +call submode#map('hoon_ajnin', 'i', '', '>', 'gar') +call submode#map('hoon_ajnin', 'i', '', '[', 'sel') +call submode#map('hoon_ajnin', 'i', '', '\', 'bas') +call submode#map('hoon_ajnin', 'i', '', '#', 'hax') +call submode#map('hoon_ajnin', 'i', '', ';', 'sem') +call submode#map('hoon_ajnin', 'i', '', '$', 'buc') +call submode#map('hoon_ajnin', 'i', '', '-', 'hep') +call submode#map('hoon_ajnin', 'i', '', ']', 'ser') +call submode#map('hoon_ajnin', 'i', '', '_', 'cab') +call submode#map('hoon_ajnin', 'i', '', '{', 'kel') +call submode#map('hoon_ajnin', 'i', '', '~', 'sig') +call submode#map('hoon_ajnin', 'i', '', '%', 'cen') +call submode#map('hoon_ajnin', 'i', '', '}', 'ker') +call submode#map('hoon_ajnin', 'i', '', '"', 'soq') +call submode#map('hoon_ajnin', 'i', '', ':', 'col') +call submode#map('hoon_ajnin', 'i', '', '^', 'ket') +call submode#map('hoon_ajnin', 'i', '', '*', 'tar') +call submode#map('hoon_ajnin', 'i', '', ',', 'com') +call submode#map('hoon_ajnin', 'i', '', '+', 'lus') +call submode#map('hoon_ajnin', 'i', '', '`', 'tec') +call submode#map('hoon_ajnin', 'i', '', '"', 'doq') +call submode#map('hoon_ajnin', 'i', '', '&', 'pam') +call submode#map('hoon_ajnin', 'i', '', '=', 'tis') +call submode#map('hoon_ajnin', 'i', '', '.', 'dot') +call submode#map('hoon_ajnin', 'i', '', '@', 'pat') +call submode#map('hoon_ajnin', 'i', '', '?', 'wut') +call submode#map('hoon_ajnin', 'i', '', '/', 'fas') +call submode#map('hoon_ajnin', 'i', '', '(', 'pel') +call submode#map('hoon_ajnin', 'i', '', '!', 'zap') let b:hoon_did_submode_mapping = 1 function! HoonIndent(lnum) From 719e9e0c4555bc324af61d41301ce309fec369fb Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Wed, 2 Oct 2013 13:24:55 -0700 Subject: [PATCH 07/13] Added ability to use unshifted numbers for symbols in ajnin mode. --- indent/.hoon.vim.swp | Bin 12288 -> 0 bytes indent/hoon.vim | 14 +++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) delete mode 100644 indent/.hoon.vim.swp diff --git a/indent/.hoon.vim.swp b/indent/.hoon.vim.swp deleted file mode 100644 index a941e60ab371b7aef5a9af313c1fd228edddf9b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2J7^R^7{|W^)cD8)Ewr3mg7?Z@a!H{aY!Txtn1BXj6(W1Lb7sh9=G;dT5F%RI zrtsCNt!O1SzCh3>U?s##Y;7#mO2Pl$BX6J(tylAbD-j3cA2_1X!<~18jf| zumLu}2G{@_U<2FGfb9^SYbW{!qW}NvzyH5<5`6%x;01UB9)m~V4!8|&fy=-K<6sO7 zffVQkJ)jMI>>yeJFTqo=1g?N-FbvY*5a#O$+p?64sslGen@dGKlg- z+7gHT&Eza_QdJ&{sNF>@f<^rPy~1|{-x2@ij@aB>6U}q$&4<-d*T!Dk`TOKrnK?Ha z*F3{6P?Q=IZs_ABOj&w%U_6{vB~kX|yeq6F5l^S5{M6J!3h%vfbk=8SE1IjZygN|| z)!|$cowfd2w(!G(AE+Pl1t}2S-X3kccegS4^Le>BP diff --git a/indent/hoon.vim b/indent/hoon.vim index 2e88ccbbf..6363fe1e6 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -1,5 +1,7 @@ " Public Domain " Credit Goes to fode +" +" With contributions from Philip C Monk if exists("b:did_indent") finish @@ -58,7 +60,7 @@ call submode#map('hoon_ninja', 'i', '', 'pel', '(') call submode#map('hoon_ninja', 'i', '', 'zap', '!') call submode#enter_with('hoon_ajnin', 'i', '', '??') -call submode#map('hoon_ajnin', 'i', '', '\|', 'bar') +call submode#map('hoon_ajnin', 'i', '', '|', 'bar') call submode#map('hoon_ajnin', 'i', '', '<', 'gal') call submode#map('hoon_ajnin', 'i', '', ')', 'per') call submode#map('hoon_ajnin', 'i', '', '>', 'gar') @@ -90,6 +92,16 @@ call submode#map('hoon_ajnin', 'i', '', '?', 'wut') call submode#map('hoon_ajnin', 'i', '', '/', 'fas') call submode#map('hoon_ajnin', 'i', '', '(', 'pel') call submode#map('hoon_ajnin', 'i', '', '!', 'zap') +call submode#map('hoon_ajnin', 'i', '', '1', 'zap') +call submode#map('hoon_ajnin', 'i', '', '2', 'pat') +call submode#map('hoon_ajnin', 'i', '', '3', 'hax') +call submode#map('hoon_ajnin', 'i', '', '4', 'buc') +call submode#map('hoon_ajnin', 'i', '', '5', 'cen') +call submode#map('hoon_ajnin', 'i', '', '6', 'ket') +call submode#map('hoon_ajnin', 'i', '', '7', 'pam') +call submode#map('hoon_ajnin', 'i', '', '8', 'lus') +call submode#map('hoon_ajnin', 'i', '', '9', 'pel') +call submode#map('hoon_ajnin', 'i', '', '0', 'per') let b:hoon_did_submode_mapping = 1 function! HoonIndent(lnum) From ae4e3a33c6a68d7072b4ec12738df0ae53c11c1b Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Wed, 2 Oct 2013 14:06:54 -0700 Subject: [PATCH 08/13] Added ability to omit vowel in ninja mode. --- indent/hoon.vim | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/indent/hoon.vim b/indent/hoon.vim index 6363fe1e6..3ee9bbc82 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -59,8 +59,41 @@ call submode#map('hoon_ninja', 'i', '', 'fas', '/') call submode#map('hoon_ninja', 'i', '', 'pel', '(') call submode#map('hoon_ninja', 'i', '', 'zap', '!') +call submode#map('hoon_ninja', 'i', '', 'br', '\|') +call submode#map('hoon_ninja', 'i', '', 'gl', '<') +call submode#map('hoon_ninja', 'i', '', 'pr', ')') +call submode#map('hoon_ninja', 'i', '', 'gr', '>') +call submode#map('hoon_ninja', 'i', '', 'sl', '[') +call submode#map('hoon_ninja', 'i', '', 'bs', '\') +call submode#map('hoon_ninja', 'i', '', 'hx', '#') +call submode#map('hoon_ninja', 'i', '', 'sm', ';') +call submode#map('hoon_ninja', 'i', '', 'bc', '$') +call submode#map('hoon_ninja', 'i', '', 'hp', '-') +call submode#map('hoon_ninja', 'i', '', 'sr', ']') +call submode#map('hoon_ninja', 'i', '', 'cb', '_') +call submode#map('hoon_ninja', 'i', '', 'kl', '{') +call submode#map('hoon_ninja', 'i', '', 'sg', '~') +call submode#map('hoon_ninja', 'i', '', 'cn', '%') +call submode#map('hoon_ninja', 'i', '', 'kr', '}') +call submode#map('hoon_ninja', 'i', '', 'sq', "'") +call submode#map('hoon_ninja', 'i', '', 'cl', ':') +call submode#map('hoon_ninja', 'i', '', 'kt', '^') +call submode#map('hoon_ninja', 'i', '', 'tr', '*') +call submode#map('hoon_ninja', 'i', '', 'cm', ',') +call submode#map('hoon_ninja', 'i', '', 'ls', '+') +call submode#map('hoon_ninja', 'i', '', 'tc', '`') +call submode#map('hoon_ninja', 'i', '', 'dq', '"') +call submode#map('hoon_ninja', 'i', '', 'pm', '&') +call submode#map('hoon_ninja', 'i', '', 'ts', '=') +call submode#map('hoon_ninja', 'i', '', 'dt', '.') +call submode#map('hoon_ninja', 'i', '', 'pt', '@') +call submode#map('hoon_ninja', 'i', '', 'wt', '?') +call submode#map('hoon_ninja', 'i', '', 'fs', '/') +call submode#map('hoon_ninja', 'i', '', 'pl', '(') +call submode#map('hoon_ninja', 'i', '', 'zp', '!') + call submode#enter_with('hoon_ajnin', 'i', '', '??') -call submode#map('hoon_ajnin', 'i', '', '|', 'bar') +call submode#map('hoon_ajnin', 'i', '', '\|', 'bar') call submode#map('hoon_ajnin', 'i', '', '<', 'gal') call submode#map('hoon_ajnin', 'i', '', ')', 'per') call submode#map('hoon_ajnin', 'i', '', '>', 'gar') From f6db3e920057b44209ff55266910bf51490d065c Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Wed, 2 Oct 2013 14:13:16 -0700 Subject: [PATCH 09/13] Added jnn mode. --- indent/hoon.vim | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/indent/hoon.vim b/indent/hoon.vim index 3ee9bbc82..88fc2215d 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -92,7 +92,7 @@ call submode#map('hoon_ninja', 'i', '', 'fs', '/') call submode#map('hoon_ninja', 'i', '', 'pl', '(') call submode#map('hoon_ninja', 'i', '', 'zp', '!') -call submode#enter_with('hoon_ajnin', 'i', '', '??') +call submode#enter_with('hoon_ajnin', 'i', '', '/?') call submode#map('hoon_ajnin', 'i', '', '\|', 'bar') call submode#map('hoon_ajnin', 'i', '', '<', 'gal') call submode#map('hoon_ajnin', 'i', '', ')', 'per') @@ -135,6 +135,50 @@ call submode#map('hoon_ajnin', 'i', '', '7', 'pam') call submode#map('hoon_ajnin', 'i', '', '8', 'lus') call submode#map('hoon_ajnin', 'i', '', '9', 'pel') call submode#map('hoon_ajnin', 'i', '', '0', 'per') + +call submode#enter_with('hoon_jnn', 'i', '', '/?') +call submode#map('hoon_jnn', 'i', '', '\|', 'br') +call submode#map('hoon_jnn', 'i', '', '<', 'gl') +call submode#map('hoon_jnn', 'i', '', ')', 'pr') +call submode#map('hoon_jnn', 'i', '', '>', 'gr') +call submode#map('hoon_jnn', 'i', '', '[', 'sl') +call submode#map('hoon_jnn', 'i', '', '\', 'bs') +call submode#map('hoon_jnn', 'i', '', '#', 'hx') +call submode#map('hoon_jnn', 'i', '', ';', 'sm') +call submode#map('hoon_jnn', 'i', '', '$', 'bc') +call submode#map('hoon_jnn', 'i', '', '-', 'hp') +call submode#map('hoon_jnn', 'i', '', ']', 'sr') +call submode#map('hoon_jnn', 'i', '', '_', 'cb') +call submode#map('hoon_jnn', 'i', '', '{', 'kl') +call submode#map('hoon_jnn', 'i', '', '~', 'sg') +call submode#map('hoon_jnn', 'i', '', '%', 'cn') +call submode#map('hoon_jnn', 'i', '', '}', 'kr') +call submode#map('hoon_jnn', 'i', '', '"', 'sq') +call submode#map('hoon_jnn', 'i', '', ':', 'cl') +call submode#map('hoon_jnn', 'i', '', '^', 'kt') +call submode#map('hoon_jnn', 'i', '', '*', 'tr') +call submode#map('hoon_jnn', 'i', '', ',', 'cm') +call submode#map('hoon_jnn', 'i', '', '+', 'ls') +call submode#map('hoon_jnn', 'i', '', '`', 'tc') +call submode#map('hoon_jnn', 'i', '', '"', 'dq') +call submode#map('hoon_jnn', 'i', '', '&', 'pm') +call submode#map('hoon_jnn', 'i', '', '=', 'ts') +call submode#map('hoon_jnn', 'i', '', '.', 'dt') +call submode#map('hoon_jnn', 'i', '', '@', 'pt') +call submode#map('hoon_jnn', 'i', '', '?', 'wt') +call submode#map('hoon_jnn', 'i', '', '/', 'fs') +call submode#map('hoon_jnn', 'i', '', '(', 'pl') +call submode#map('hoon_jnn', 'i', '', '!', 'zp') +call submode#map('hoon_jnn', 'i', '', '1', 'zp') +call submode#map('hoon_jnn', 'i', '', '2', 'pt') +call submode#map('hoon_jnn', 'i', '', '3', 'hx') +call submode#map('hoon_jnn', 'i', '', '4', 'bc') +call submode#map('hoon_jnn', 'i', '', '5', 'cn') +call submode#map('hoon_jnn', 'i', '', '6', 'kt') +call submode#map('hoon_jnn', 'i', '', '7', 'pm') +call submode#map('hoon_jnn', 'i', '', '8', 'ls') +call submode#map('hoon_jnn', 'i', '', '9', 'pl') +call submode#map('hoon_jnn', 'i', '', '0', 'pr') let b:hoon_did_submode_mapping = 1 function! HoonIndent(lnum) From fdf68275eda1b182b6b3278d57f77d874d210e3c Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Thu, 3 Oct 2013 13:38:37 -0700 Subject: [PATCH 10/13] Hub before clay/ze refactor. --- include/v/vere.h | 6 ++++++ v/save.c | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/include/v/vere.h b/include/v/vere.h index ffd78e45f..6cdb7f003 100644 --- a/include/v/vere.h +++ b/include/v/vere.h @@ -170,6 +170,7 @@ typedef struct _u2_save { uv_timer_t tim_u; // checkpoint timer c3_w ent_w; // event number, XX 64 + c3_w pid_w; // pid of checkpoint process } u2_save; /* u2_ubuf: unix tty i/o buffer. @@ -821,6 +822,11 @@ /** Autosave. **/ + /* u2_save_ef_chld(): report SIGCHLD. + */ + void + u2_save_ef_chld(void); + /* u2_save_io_init(): initialize autosave. */ void diff --git a/v/save.c b/v/save.c index 72f56e850..a2245ea50 100644 --- a/v/save.c +++ b/v/save.c @@ -24,15 +24,51 @@ _save_time_cb(uv_timer_t* tim_u, c3_i sas_i) { u2_save* sav_u = &u2_Host.sav_u; + if ( sav_u->pid_w ) { + return; + } + if ( u2A->ent_w > sav_u->ent_w ) { + c3_w pid_w; + // uL(fprintf(uH, "autosaving... ent_w %d\n", u2A->ent_w)); u2_cm_purge(); // u2_ve_grab(0); +#ifdef FORKPT + if ( 0 == (pid_w = fork()) ) { + u2_loom_save(u2A->ent_w); + exit(0); + } + else { + uL(fprintf(uH, "checkpoint: process %d\n", pid_w)); + + sav_u->ent_w = u2A->ent_w; + sav_u->pid_w = pid_w; + } +#else u2_loom_save(u2A->ent_w); sav_u->ent_w = u2A->ent_w; - } +#endif + } +} + +/* u2_save_ef_chld(): report save termination. +*/ +void +u2_save_ef_chld(void) +{ + u2_save* sav_u = &u2_Host.sav_u; + c3_i loc_i; + c3_w pid_w; + + c3_assert(0 != sav_u->pid_w); + uL(fprintf(uH, "checkpoint: complete %d\n", sav_u->pid_w)); + pid_w = wait(&loc_i); + c3_assert(pid_w == sav_u->pid_w); + + sav_u->pid_w = 0; } /* u2_save_io_init(): initialize autosave. @@ -43,6 +79,8 @@ u2_save_io_init(void) u2_save* sav_u = &u2_Host.sav_u; sav_u->ent_w = 0; + sav_u->pid_w = 0; + uv_timer_init(u2L, &sav_u->tim_u); uv_timer_start(&sav_u->tim_u, _save_time_cb, 5000, 5000); } From 8e0dbaed410c290ff96ff2dd7197fcb2083ad10b Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Thu, 3 Oct 2013 18:50:00 -0700 Subject: [PATCH 11/13] Only allow ninja modes if hoon_ninja exists and is not 0. --- indent/hoon.vim | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/indent/hoon.vim b/indent/hoon.vim index 88fc2215d..0e04b6689 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -18,13 +18,28 @@ if exists("*HoonIndent") finish endif -if exists("b:hoon_did_submode_mapping") +function! HoonIndent(lnum) + let prevlnum = prevnonblank(a:lnum-1) + if prevlnum == 0 + return 0 + endif + let prevl = substitute(getline(prevlnum),'::.*$','','') + + let ind = indent(prevlnum) + if prevl =~ '++\s*\w*\s*$' + " luslus operator + let ind += &sw + endif + + return ind +endfunction + +if exists("b:hoon_did_submode_mapping") || !exists("g:hoon_ninja") || g:hoon_ninja == 0 finish endif let g:submode_timeout = 0 -"call submode#enter_with('hoon_ninja', 'i', '', '/ninja') call submode#enter_with('hoon_ninja', 'i', '', '//') call submode#map('hoon_ninja', 'i', '', 'bar', '\|') call submode#map('hoon_ninja', 'i', '', 'gal', '<') @@ -181,19 +196,3 @@ call submode#map('hoon_jnn', 'i', '', '9', 'pl') call submode#map('hoon_jnn', 'i', '', '0', 'pr') let b:hoon_did_submode_mapping = 1 -function! HoonIndent(lnum) - let prevlnum = prevnonblank(a:lnum-1) - if prevlnum == 0 - return 0 - endif - let prevl = substitute(getline(prevlnum),'::.*$','','') - - let ind = indent(prevlnum) - if prevl =~ '++\s*\w*\s*$' - " luslus operator - let ind += &sw - endif - - return ind -endfunction - From df1679951578d6478ce33815da4d9c1e35090845 Mon Sep 17 00:00:00 2001 From: Philip Monk Date: Thu, 3 Oct 2013 19:04:54 -0700 Subject: [PATCH 12/13] Moved ninja mode functionality to ftplugin/hoon.vim --- ftplugin/hoon.vim | 131 +++++++++++++++++++++++++++++++++++-- indent/hoon.vim | 162 ---------------------------------------------- 2 files changed, 126 insertions(+), 167 deletions(-) diff --git a/ftplugin/hoon.vim b/ftplugin/hoon.vim index 5b5c39319..f89a67cec 100644 --- a/ftplugin/hoon.vim +++ b/ftplugin/hoon.vim @@ -1,14 +1,14 @@ -if exists("b:hoon_did_submode_mapping") +if exists("b:hoon_did_submode_mapping") || !exists("g:hoon_ninja") || g:hoon_ninja == 0 finish endif let g:submode_timeout = 0 -let g:submode_keyseqs_to_leave = ['"'] -call submode#enter_with('hoon_ninja', 'i', '', '//' ) -call submode#map('hoon_ninja', 'i', '', 'bar', '|') + +call submode#enter_with('hoon_ninja', 'i', '', '//') +call submode#map('hoon_ninja', 'i', '', 'bar', '\|') call submode#map('hoon_ninja', 'i', '', 'gal', '<') call submode#map('hoon_ninja', 'i', '', 'per', ')') -call submode#map('hoon_ninja', 'i', '', 'gar', '<') +call submode#map('hoon_ninja', 'i', '', 'gar', '>') call submode#map('hoon_ninja', 'i', '', 'sel', '[') call submode#map('hoon_ninja', 'i', '', 'bas', '\') call submode#map('hoon_ninja', 'i', '', 'hax', '#') @@ -37,5 +37,126 @@ call submode#map('hoon_ninja', 'i', '', 'wut', '?') call submode#map('hoon_ninja', 'i', '', 'fas', '/') call submode#map('hoon_ninja', 'i', '', 'pel', '(') call submode#map('hoon_ninja', 'i', '', 'zap', '!') + +call submode#map('hoon_ninja', 'i', '', 'br', '\|') +call submode#map('hoon_ninja', 'i', '', 'gl', '<') +call submode#map('hoon_ninja', 'i', '', 'pr', ')') +call submode#map('hoon_ninja', 'i', '', 'gr', '>') +call submode#map('hoon_ninja', 'i', '', 'sl', '[') +call submode#map('hoon_ninja', 'i', '', 'bs', '\') +call submode#map('hoon_ninja', 'i', '', 'hx', '#') +call submode#map('hoon_ninja', 'i', '', 'sm', ';') +call submode#map('hoon_ninja', 'i', '', 'bc', '$') +call submode#map('hoon_ninja', 'i', '', 'hp', '-') +call submode#map('hoon_ninja', 'i', '', 'sr', ']') +call submode#map('hoon_ninja', 'i', '', 'cb', '_') +call submode#map('hoon_ninja', 'i', '', 'kl', '{') +call submode#map('hoon_ninja', 'i', '', 'sg', '~') +call submode#map('hoon_ninja', 'i', '', 'cn', '%') +call submode#map('hoon_ninja', 'i', '', 'kr', '}') +call submode#map('hoon_ninja', 'i', '', 'sq', "'") +call submode#map('hoon_ninja', 'i', '', 'cl', ':') +call submode#map('hoon_ninja', 'i', '', 'kt', '^') +call submode#map('hoon_ninja', 'i', '', 'tr', '*') +call submode#map('hoon_ninja', 'i', '', 'cm', ',') +call submode#map('hoon_ninja', 'i', '', 'ls', '+') +call submode#map('hoon_ninja', 'i', '', 'tc', '`') +call submode#map('hoon_ninja', 'i', '', 'dq', '"') +call submode#map('hoon_ninja', 'i', '', 'pm', '&') +call submode#map('hoon_ninja', 'i', '', 'ts', '=') +call submode#map('hoon_ninja', 'i', '', 'dt', '.') +call submode#map('hoon_ninja', 'i', '', 'pt', '@') +call submode#map('hoon_ninja', 'i', '', 'wt', '?') +call submode#map('hoon_ninja', 'i', '', 'fs', '/') +call submode#map('hoon_ninja', 'i', '', 'pl', '(') +call submode#map('hoon_ninja', 'i', '', 'zp', '!') + +call submode#enter_with('hoon_ajnin', 'i', '', '??') +call submode#map('hoon_ajnin', 'i', '', '\|', 'bar') +call submode#map('hoon_ajnin', 'i', '', '<', 'gal') +call submode#map('hoon_ajnin', 'i', '', ')', 'per') +call submode#map('hoon_ajnin', 'i', '', '>', 'gar') +call submode#map('hoon_ajnin', 'i', '', '[', 'sel') +call submode#map('hoon_ajnin', 'i', '', '\', 'bas') +call submode#map('hoon_ajnin', 'i', '', '#', 'hax') +call submode#map('hoon_ajnin', 'i', '', ';', 'sem') +call submode#map('hoon_ajnin', 'i', '', '$', 'buc') +call submode#map('hoon_ajnin', 'i', '', '-', 'hep') +call submode#map('hoon_ajnin', 'i', '', ']', 'ser') +call submode#map('hoon_ajnin', 'i', '', '_', 'cab') +call submode#map('hoon_ajnin', 'i', '', '{', 'kel') +call submode#map('hoon_ajnin', 'i', '', '~', 'sig') +call submode#map('hoon_ajnin', 'i', '', '%', 'cen') +call submode#map('hoon_ajnin', 'i', '', '}', 'ker') +call submode#map('hoon_ajnin', 'i', '', '"', 'soq') +call submode#map('hoon_ajnin', 'i', '', ':', 'col') +call submode#map('hoon_ajnin', 'i', '', '^', 'ket') +call submode#map('hoon_ajnin', 'i', '', '*', 'tar') +call submode#map('hoon_ajnin', 'i', '', ',', 'com') +call submode#map('hoon_ajnin', 'i', '', '+', 'lus') +call submode#map('hoon_ajnin', 'i', '', '`', 'tec') +call submode#map('hoon_ajnin', 'i', '', '"', 'doq') +call submode#map('hoon_ajnin', 'i', '', '&', 'pam') +call submode#map('hoon_ajnin', 'i', '', '=', 'tis') +call submode#map('hoon_ajnin', 'i', '', '.', 'dot') +call submode#map('hoon_ajnin', 'i', '', '@', 'pat') +call submode#map('hoon_ajnin', 'i', '', '?', 'wut') +call submode#map('hoon_ajnin', 'i', '', '/', 'fas') +call submode#map('hoon_ajnin', 'i', '', '(', 'pel') +call submode#map('hoon_ajnin', 'i', '', '!', 'zap') +call submode#map('hoon_ajnin', 'i', '', '1', 'zap') +call submode#map('hoon_ajnin', 'i', '', '2', 'pat') +call submode#map('hoon_ajnin', 'i', '', '3', 'hax') +call submode#map('hoon_ajnin', 'i', '', '4', 'buc') +call submode#map('hoon_ajnin', 'i', '', '5', 'cen') +call submode#map('hoon_ajnin', 'i', '', '6', 'ket') +call submode#map('hoon_ajnin', 'i', '', '7', 'pam') +call submode#map('hoon_ajnin', 'i', '', '8', 'lus') +call submode#map('hoon_ajnin', 'i', '', '9', 'pel') +call submode#map('hoon_ajnin', 'i', '', '0', 'per') + +call submode#enter_with('hoon_jnn', 'i', '', '/?') +call submode#map('hoon_jnn', 'i', '', '\|', 'br') +call submode#map('hoon_jnn', 'i', '', '<', 'gl') +call submode#map('hoon_jnn', 'i', '', ')', 'pr') +call submode#map('hoon_jnn', 'i', '', '>', 'gr') +call submode#map('hoon_jnn', 'i', '', '[', 'sl') +call submode#map('hoon_jnn', 'i', '', '\', 'bs') +call submode#map('hoon_jnn', 'i', '', '#', 'hx') +call submode#map('hoon_jnn', 'i', '', ';', 'sm') +call submode#map('hoon_jnn', 'i', '', '$', 'bc') +call submode#map('hoon_jnn', 'i', '', '-', 'hp') +call submode#map('hoon_jnn', 'i', '', ']', 'sr') +call submode#map('hoon_jnn', 'i', '', '_', 'cb') +call submode#map('hoon_jnn', 'i', '', '{', 'kl') +call submode#map('hoon_jnn', 'i', '', '~', 'sg') +call submode#map('hoon_jnn', 'i', '', '%', 'cn') +call submode#map('hoon_jnn', 'i', '', '}', 'kr') +call submode#map('hoon_jnn', 'i', '', '"', 'sq') +call submode#map('hoon_jnn', 'i', '', ':', 'cl') +call submode#map('hoon_jnn', 'i', '', '^', 'kt') +call submode#map('hoon_jnn', 'i', '', '*', 'tr') +call submode#map('hoon_jnn', 'i', '', ',', 'cm') +call submode#map('hoon_jnn', 'i', '', '+', 'ls') +call submode#map('hoon_jnn', 'i', '', '`', 'tc') +call submode#map('hoon_jnn', 'i', '', '"', 'dq') +call submode#map('hoon_jnn', 'i', '', '&', 'pm') +call submode#map('hoon_jnn', 'i', '', '=', 'ts') +call submode#map('hoon_jnn', 'i', '', '.', 'dt') +call submode#map('hoon_jnn', 'i', '', '@', 'pt') +call submode#map('hoon_jnn', 'i', '', '?', 'wt') +call submode#map('hoon_jnn', 'i', '', '/', 'fs') +call submode#map('hoon_jnn', 'i', '', '(', 'pl') +call submode#map('hoon_jnn', 'i', '', '!', 'zp') +call submode#map('hoon_jnn', 'i', '', '1', 'zp') +call submode#map('hoon_jnn', 'i', '', '2', 'pt') +call submode#map('hoon_jnn', 'i', '', '3', 'hx') +call submode#map('hoon_jnn', 'i', '', '4', 'bc') +call submode#map('hoon_jnn', 'i', '', '5', 'cn') +call submode#map('hoon_jnn', 'i', '', '6', 'kt') +call submode#map('hoon_jnn', 'i', '', '7', 'pm') +call submode#map('hoon_jnn', 'i', '', '8', 'ls') +call submode#map('hoon_jnn', 'i', '', '9', 'pl') +call submode#map('hoon_jnn', 'i', '', '0', 'pr') let b:hoon_did_submode_mapping = 1 diff --git a/indent/hoon.vim b/indent/hoon.vim index 0e04b6689..6193812da 100644 --- a/indent/hoon.vim +++ b/indent/hoon.vim @@ -34,165 +34,3 @@ function! HoonIndent(lnum) return ind endfunction -if exists("b:hoon_did_submode_mapping") || !exists("g:hoon_ninja") || g:hoon_ninja == 0 - finish -endif - -let g:submode_timeout = 0 - -call submode#enter_with('hoon_ninja', 'i', '', '//') -call submode#map('hoon_ninja', 'i', '', 'bar', '\|') -call submode#map('hoon_ninja', 'i', '', 'gal', '<') -call submode#map('hoon_ninja', 'i', '', 'per', ')') -call submode#map('hoon_ninja', 'i', '', 'gar', '>') -call submode#map('hoon_ninja', 'i', '', 'sel', '[') -call submode#map('hoon_ninja', 'i', '', 'bas', '\') -call submode#map('hoon_ninja', 'i', '', 'hax', '#') -call submode#map('hoon_ninja', 'i', '', 'sem', ';') -call submode#map('hoon_ninja', 'i', '', 'buc', '$') -call submode#map('hoon_ninja', 'i', '', 'hep', '-') -call submode#map('hoon_ninja', 'i', '', 'ser', ']') -call submode#map('hoon_ninja', 'i', '', 'cab', '_') -call submode#map('hoon_ninja', 'i', '', 'kel', '{') -call submode#map('hoon_ninja', 'i', '', 'sig', '~') -call submode#map('hoon_ninja', 'i', '', 'cen', '%') -call submode#map('hoon_ninja', 'i', '', 'ker', '}') -call submode#map('hoon_ninja', 'i', '', 'soq', "'") -call submode#map('hoon_ninja', 'i', '', 'col', ':') -call submode#map('hoon_ninja', 'i', '', 'ket', '^') -call submode#map('hoon_ninja', 'i', '', 'tar', '*') -call submode#map('hoon_ninja', 'i', '', 'com', ',') -call submode#map('hoon_ninja', 'i', '', 'lus', '+') -call submode#map('hoon_ninja', 'i', '', 'tec', '`') -call submode#map('hoon_ninja', 'i', '', 'doq', '"') -call submode#map('hoon_ninja', 'i', '', 'pam', '&') -call submode#map('hoon_ninja', 'i', '', 'tis', '=') -call submode#map('hoon_ninja', 'i', '', 'dot', '.') -call submode#map('hoon_ninja', 'i', '', 'pat', '@') -call submode#map('hoon_ninja', 'i', '', 'wut', '?') -call submode#map('hoon_ninja', 'i', '', 'fas', '/') -call submode#map('hoon_ninja', 'i', '', 'pel', '(') -call submode#map('hoon_ninja', 'i', '', 'zap', '!') - -call submode#map('hoon_ninja', 'i', '', 'br', '\|') -call submode#map('hoon_ninja', 'i', '', 'gl', '<') -call submode#map('hoon_ninja', 'i', '', 'pr', ')') -call submode#map('hoon_ninja', 'i', '', 'gr', '>') -call submode#map('hoon_ninja', 'i', '', 'sl', '[') -call submode#map('hoon_ninja', 'i', '', 'bs', '\') -call submode#map('hoon_ninja', 'i', '', 'hx', '#') -call submode#map('hoon_ninja', 'i', '', 'sm', ';') -call submode#map('hoon_ninja', 'i', '', 'bc', '$') -call submode#map('hoon_ninja', 'i', '', 'hp', '-') -call submode#map('hoon_ninja', 'i', '', 'sr', ']') -call submode#map('hoon_ninja', 'i', '', 'cb', '_') -call submode#map('hoon_ninja', 'i', '', 'kl', '{') -call submode#map('hoon_ninja', 'i', '', 'sg', '~') -call submode#map('hoon_ninja', 'i', '', 'cn', '%') -call submode#map('hoon_ninja', 'i', '', 'kr', '}') -call submode#map('hoon_ninja', 'i', '', 'sq', "'") -call submode#map('hoon_ninja', 'i', '', 'cl', ':') -call submode#map('hoon_ninja', 'i', '', 'kt', '^') -call submode#map('hoon_ninja', 'i', '', 'tr', '*') -call submode#map('hoon_ninja', 'i', '', 'cm', ',') -call submode#map('hoon_ninja', 'i', '', 'ls', '+') -call submode#map('hoon_ninja', 'i', '', 'tc', '`') -call submode#map('hoon_ninja', 'i', '', 'dq', '"') -call submode#map('hoon_ninja', 'i', '', 'pm', '&') -call submode#map('hoon_ninja', 'i', '', 'ts', '=') -call submode#map('hoon_ninja', 'i', '', 'dt', '.') -call submode#map('hoon_ninja', 'i', '', 'pt', '@') -call submode#map('hoon_ninja', 'i', '', 'wt', '?') -call submode#map('hoon_ninja', 'i', '', 'fs', '/') -call submode#map('hoon_ninja', 'i', '', 'pl', '(') -call submode#map('hoon_ninja', 'i', '', 'zp', '!') - -call submode#enter_with('hoon_ajnin', 'i', '', '/?') -call submode#map('hoon_ajnin', 'i', '', '\|', 'bar') -call submode#map('hoon_ajnin', 'i', '', '<', 'gal') -call submode#map('hoon_ajnin', 'i', '', ')', 'per') -call submode#map('hoon_ajnin', 'i', '', '>', 'gar') -call submode#map('hoon_ajnin', 'i', '', '[', 'sel') -call submode#map('hoon_ajnin', 'i', '', '\', 'bas') -call submode#map('hoon_ajnin', 'i', '', '#', 'hax') -call submode#map('hoon_ajnin', 'i', '', ';', 'sem') -call submode#map('hoon_ajnin', 'i', '', '$', 'buc') -call submode#map('hoon_ajnin', 'i', '', '-', 'hep') -call submode#map('hoon_ajnin', 'i', '', ']', 'ser') -call submode#map('hoon_ajnin', 'i', '', '_', 'cab') -call submode#map('hoon_ajnin', 'i', '', '{', 'kel') -call submode#map('hoon_ajnin', 'i', '', '~', 'sig') -call submode#map('hoon_ajnin', 'i', '', '%', 'cen') -call submode#map('hoon_ajnin', 'i', '', '}', 'ker') -call submode#map('hoon_ajnin', 'i', '', '"', 'soq') -call submode#map('hoon_ajnin', 'i', '', ':', 'col') -call submode#map('hoon_ajnin', 'i', '', '^', 'ket') -call submode#map('hoon_ajnin', 'i', '', '*', 'tar') -call submode#map('hoon_ajnin', 'i', '', ',', 'com') -call submode#map('hoon_ajnin', 'i', '', '+', 'lus') -call submode#map('hoon_ajnin', 'i', '', '`', 'tec') -call submode#map('hoon_ajnin', 'i', '', '"', 'doq') -call submode#map('hoon_ajnin', 'i', '', '&', 'pam') -call submode#map('hoon_ajnin', 'i', '', '=', 'tis') -call submode#map('hoon_ajnin', 'i', '', '.', 'dot') -call submode#map('hoon_ajnin', 'i', '', '@', 'pat') -call submode#map('hoon_ajnin', 'i', '', '?', 'wut') -call submode#map('hoon_ajnin', 'i', '', '/', 'fas') -call submode#map('hoon_ajnin', 'i', '', '(', 'pel') -call submode#map('hoon_ajnin', 'i', '', '!', 'zap') -call submode#map('hoon_ajnin', 'i', '', '1', 'zap') -call submode#map('hoon_ajnin', 'i', '', '2', 'pat') -call submode#map('hoon_ajnin', 'i', '', '3', 'hax') -call submode#map('hoon_ajnin', 'i', '', '4', 'buc') -call submode#map('hoon_ajnin', 'i', '', '5', 'cen') -call submode#map('hoon_ajnin', 'i', '', '6', 'ket') -call submode#map('hoon_ajnin', 'i', '', '7', 'pam') -call submode#map('hoon_ajnin', 'i', '', '8', 'lus') -call submode#map('hoon_ajnin', 'i', '', '9', 'pel') -call submode#map('hoon_ajnin', 'i', '', '0', 'per') - -call submode#enter_with('hoon_jnn', 'i', '', '/?') -call submode#map('hoon_jnn', 'i', '', '\|', 'br') -call submode#map('hoon_jnn', 'i', '', '<', 'gl') -call submode#map('hoon_jnn', 'i', '', ')', 'pr') -call submode#map('hoon_jnn', 'i', '', '>', 'gr') -call submode#map('hoon_jnn', 'i', '', '[', 'sl') -call submode#map('hoon_jnn', 'i', '', '\', 'bs') -call submode#map('hoon_jnn', 'i', '', '#', 'hx') -call submode#map('hoon_jnn', 'i', '', ';', 'sm') -call submode#map('hoon_jnn', 'i', '', '$', 'bc') -call submode#map('hoon_jnn', 'i', '', '-', 'hp') -call submode#map('hoon_jnn', 'i', '', ']', 'sr') -call submode#map('hoon_jnn', 'i', '', '_', 'cb') -call submode#map('hoon_jnn', 'i', '', '{', 'kl') -call submode#map('hoon_jnn', 'i', '', '~', 'sg') -call submode#map('hoon_jnn', 'i', '', '%', 'cn') -call submode#map('hoon_jnn', 'i', '', '}', 'kr') -call submode#map('hoon_jnn', 'i', '', '"', 'sq') -call submode#map('hoon_jnn', 'i', '', ':', 'cl') -call submode#map('hoon_jnn', 'i', '', '^', 'kt') -call submode#map('hoon_jnn', 'i', '', '*', 'tr') -call submode#map('hoon_jnn', 'i', '', ',', 'cm') -call submode#map('hoon_jnn', 'i', '', '+', 'ls') -call submode#map('hoon_jnn', 'i', '', '`', 'tc') -call submode#map('hoon_jnn', 'i', '', '"', 'dq') -call submode#map('hoon_jnn', 'i', '', '&', 'pm') -call submode#map('hoon_jnn', 'i', '', '=', 'ts') -call submode#map('hoon_jnn', 'i', '', '.', 'dt') -call submode#map('hoon_jnn', 'i', '', '@', 'pt') -call submode#map('hoon_jnn', 'i', '', '?', 'wt') -call submode#map('hoon_jnn', 'i', '', '/', 'fs') -call submode#map('hoon_jnn', 'i', '', '(', 'pl') -call submode#map('hoon_jnn', 'i', '', '!', 'zp') -call submode#map('hoon_jnn', 'i', '', '1', 'zp') -call submode#map('hoon_jnn', 'i', '', '2', 'pt') -call submode#map('hoon_jnn', 'i', '', '3', 'hx') -call submode#map('hoon_jnn', 'i', '', '4', 'bc') -call submode#map('hoon_jnn', 'i', '', '5', 'cn') -call submode#map('hoon_jnn', 'i', '', '6', 'kt') -call submode#map('hoon_jnn', 'i', '', '7', 'pm') -call submode#map('hoon_jnn', 'i', '', '8', 'ls') -call submode#map('hoon_jnn', 'i', '', '9', 'pl') -call submode#map('hoon_jnn', 'i', '', '0', 'pr') -let b:hoon_did_submode_mapping = 1 - From abac35c6eba4273fc54e85e82af669ac2e793671 Mon Sep 17 00:00:00 2001 From: David Nadle Date: Fri, 4 Oct 2013 03:07:47 -0400 Subject: [PATCH 13/13] Handle autosave SIGCHLD with no stored pid --- v/save.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/v/save.c b/v/save.c index a2245ea50..f32385a1a 100644 --- a/v/save.c +++ b/v/save.c @@ -29,14 +29,13 @@ _save_time_cb(uv_timer_t* tim_u, c3_i sas_i) } if ( u2A->ent_w > sav_u->ent_w ) { - c3_w pid_w; - // uL(fprintf(uH, "autosaving... ent_w %d\n", u2A->ent_w)); u2_cm_purge(); // u2_ve_grab(0); #ifdef FORKPT + c3_w pid_w; if ( 0 == (pid_w = fork()) ) { u2_loom_save(u2A->ent_w); exit(0); @@ -63,10 +62,18 @@ u2_save_ef_chld(void) c3_i loc_i; c3_w pid_w; - c3_assert(0 != sav_u->pid_w); + /* modified for cases with no pid_w + */ uL(fprintf(uH, "checkpoint: complete %d\n", sav_u->pid_w)); pid_w = wait(&loc_i); - c3_assert(pid_w == sav_u->pid_w); + if (0 != sav_u->pid_w) + { + c3_assert(pid_w == sav_u->pid_w); + } + else + { + c3_assert(pid_w > 0); + } sav_u->pid_w = 0; }