Omnicomplete in VIM

https://code.kx.com/trac/browser/contrib/rtripathi/omnicomplete/1.pnghttps://code.kx.com/trac/browser/contrib/rtripathi/omnicomplete/2.pnghttps://code.kx.com/trac/browser/contrib/rtripathi/omnicomplete/3.pnghttps://code.kx.com/trac/browser/contrib/rtripathi/omnicomplete/4.pngI started working on this in March, but never managed to make it user-friendly.It borrows ideas from ctags and utilizes q’s omniscience to generatetags on the fly using context traversal.https://code.kx.com/trac/browser/contrib/rtripathi/omnicomplete/omnitags.qAnother script that can prove useful is (inspired from Aaaron’s 2008wtf function!):https://code.kx.com/trac/browser/contrib/rtripathi/mutation/identifiers.qI think getting Omnicomplete would be great for vim friendlycustomized-tickerplant shops who use elaborate nested contexts foreverything possible.Any help or advice in moving this Old Testament project forward willbe appreciated.-rohitP.S. what a great operating system EMACS is!

On Oct 30, 2011, at 1:52 PM, Rohit Tripathi wrote:

> Another script that can prove useful is (inspired from Aaaron’s 2008
> wtf function!):
>
https://code.kx.com/trac/browser/contrib/rtripathi/mutation/identifiers.q

needs a minor patch

objs:flip[idtypdef!($‘b@i;type each v[i];v[i:where not null
v:@[value;;0N]’[b:(“c”$32+til 95) except "",.Q.an except
“_”]])],raze{flip[idtypdef!($[x~.q;k;id];t;v)],raze .z.s each id
where(not type each v)&99h=t:type each v:value each id:raze sv'x,/:k:key x}'[ sv’,'key];

otherwise crashes if you have help.q loaded

actually should probably be

objs:flip[idtypdef!($‘b@i;type each v[i];v[i:where not null
v:@[value;;0N]’[b:(“c”$32+til 95) except "",.Q.an except
“_”]])],raze{flip[idtypdef!($[x~.q;k;id];t;v)],raze .z.s each id
where(11h=type each k)&(not type each v)&99h=t:type each v:value
each id:raze sv'x,/:k:key x}'[ sv’,'key];

a directory is defined as a dictionary having sym vector key and general
value

a few possible style improvements

i find using both ’ and each weird

objs:flip[idtypdef!($‘b@i;type each v[i];v[i:where not null
v:@[value;;0N]’[b:(“c”$32+til 95) except "",.Q.an except
“_”]])],raze{flip[idtypdef!($[x~.q;k;id];t;v)],raze .z.s each id
where(11h=type each k)&(not type each v)&99h=t:type each v:value
each id:raze sv'x,/:k:key x}each sv’,'key;

and you have too much punctuation and space :)

objs:flip[idtypdef!($‘b i;type each v i;v i:where not null
v:@[value;;0N]each b:(“c”$32+til 95)except"",.Q.an
except"_")],raze{flip[idtypdef!($[x~.q;k;id];t;v)],raze .z.s each id
where(11=type each k)&(not type each v)&99h=t:type each v:value each
id:raze sv'x,/:k:key x}each sv’,'key

and if you feel comfortable using .Q stuff, the sv',’ pattern is
canned:

objs:flip[idtypdef!($'b i;type each v i;v i:where not null
v:@[value;;0N]each b:(“c”$32+til 95)except"",.Q.an
except"_")],raze{flip[idtypdef!($[x~.q;k;id];t;v)],raze .z.s each id
where(11=type each k)&(not type each v)&99h=t:type each v:value each =
id:raze x .Q.dd’k:key x}each .Q.dd'key

Aaron Davies
aaron.davies@gmail.com