I am trying to implement name completion for jwd. The one where
you type incomplete name, then hit tab and it completes it with
next good name from current directory. Except, instead filename
from directory I want a name from locale.
 
I have figured out that 'tab' key is out of the question, but, say, F4
would work equally well for me.
 
So far I've got:
 
leftword=:3 : 0
if. ''-:y do. y=.<,'0' end.
>{:;: utf8 (ucp e__y){~(-(-i.)80) +{: _1".e_select__y
)
 
liststarting=:3 : 0
y (({...@e. > )"_ 0 # ]) ;(3 : '<nl__y ''''')"> (,copath) coname ''
)
 
pickrest=:3 : 0
try.
(#y)}. ,> (((0{::]) # (1 {:: ]) { [) wdselect) liststarting y
catch.
end.
)
 
Then if I go to Edit|Configure and enter the following code for
F4 key (make it "quiet"):
 
pickrest leftword ''
 
then if I type wd and hit F4 it will show me all available names that start 
with wd.
 
Now I need to put the rest of the selected word at the current cursor position.
How do I do that?
                                          
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to