[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: xterm double-click to select words like "cups-bsd", "/var/log"



On Fri, Mar 19, 2004 at 11:51:13PM -0500, Jameson C. Burt wrote:
} I frequently double-click with the left mouse button from a previous
} xterm displayed result like
}    ii  cupsys
}    ii  cupsys-bsd
} Here, double-clicking "cupsys" highlights the whole word,
} but double-clicking "cupsys-bsd" highlights only "cupsys",
} since double-clicking sees a word boundary at characters like
}    -
}    /
}    space
} As a result, I must left-click and drag my mouse over the word 
}    cupsys-bsd
} which is several times slower (perhaps 2 seconds).
} HOW CAN I GET DOUBLE-CLICKED WORDS TO HIGHLIGHT EVERYTHING BETWEEN
} SPACES; eg, all of "cupsys-bsd" or all of "/var/log/messages"?
[...]

Some of us prefer this behavior, but it is configurable. You need to get
the following X resource to be noticed by xterm:

XTerm*charClass: 0-32:1,33-126:2,127-160:3,161-255:2

There are many ways of going about it, but the simplest is to put it in
you ~/.Xdefaults (or maybe it's ~/.Xresources; I forget which is
standard these days) and run xrdb -load ~/.Xdefaults somewhere in your
.xinitrc (or whatever else you use for starting X). Another option is to
put it on xterm's commandline:

xterm -xrm "XTerm*charClass: 0-32:1,33-126:2,127-160:3,161-255:2"

If you want to understand what's going on, read the CHARACTER CLASSES
section of the xterm man page.

} Jameson C. Burt, NJ9L   Fairfax, Virginia, USA
--Greg



Reply to: