2009-03-31
From time to time it annoyed me that the ...
From time to time it annoyed me that the double-click selection in XTerm/UXTerm on the Ubuntu desktop differed from what I was used to before: 1 click is a letter, 2 clicks is a word, 3 clicks is a line. The definition of 'word' seemed to differ a lot with mine, I want to be able to select parts separated by @ and : characters. Inspired by xterm Regex Matching for Cut Selection by Sean ReifschneiderI tried with 'regex' but that did not work as I wanted, because extending a selection fails unexpectedly in that mode. Solution: updating the definition of a 'word' by modifying the XTerm*charClass. My current settings:XTerm*on4Clicks: line XTerm*on3Clicks: regex [^ \n]+ XTerm*on2Clicks: word XTerm*charClass:That's a tab in the regex: now I can use triple-click to select a url, e-mail address or something likewise all at once, and double-click selects a word in the way I like it. Duplicated for class UXTerm.