> But it would be useful if a name completion/intellisense would work for
> defined verbs. Like I would just load 'primitives.ijs' and all defined
> names/nouns/verbs would be part of name completion/intellisense.
> How would we go about this?

I'm doing this since ages.

When I edit scripts with vim, I complete against the tags collection
compiled from J's standard library (Ctrl-X Ctrl-], or, depending on
your vim version and setup, simply Ctrl-P).

When using the jconsole, I simply use xterm(1)'s auto-completion
against the screen buffer.  This is a lesser known facility in xterm
which may or may not be compiled into your distribution's xterm.
Where it is not, I compile xterm on my own, because it is tremendously
useful for me, for any and even across applications. (For example,
let "ls" list your files, and subsequently use completion to "rm"
some of those files.) The relevant configure option is "--enable-dabbrev".

Here is the snippet from the xterm man page:

ACTIONS
       It  is  possible  to  rebind  keys  (or sequences of keys) to arbitrary
       strings for input, by changing the translations resources for the vt100
       or  tek4014  widgets.   Changing  the  translations resource for events
       other than key and button events is not expected, and will cause unpre-
       dictable  behavior.   The following actions are provided for use within
       the vt100 or tek4014 translations resources: [...]

       dabbrev-expand()
               Expands  the  word  before cursor by searching in the preceding
               text on the screen and  in  the  scrollback  buffer  for  words
               starting  with  that  abbreviation.  Repeating dabbrev-expand()
               several times in sequence searches for an alternative expansion
               by looking farther back.  Lack of more matches is signaled by a
               beep().  Attempts to expand an empty word (i.e., when cursor is
               preceded  by  a  space)  yield successively all previous words.
               Consecutive identical expansions are ignored.  The word here is
               defined  as  a  sequence  of  non-whitespace  characters.  This
               feature partially emulates the behavior of  `dynamic  abbrevia-
               tion'  expansion  in  Emacs  (bound  there  to M-/).  Here is a
               resource setting for  xterm  which  will  do  the  same  thing:
               *VT100*translations:     #override  \n\         Meta <KeyPress>
               /:dabbrev-expand()

                                                                Martin
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to