UPDATED: LineTools module - Added select from, after, upto and to specified char actions
I have updated the Line Tools Module on my NetBeans update center described here.
What is new
Char Actions
| Action |
Key binding | Screenshot
|
| From Char |
Ctrl+Alt+, On MacOS Ctrl+Option+, | 
|
| After Char |
Ctrl+Alt+Shift+, On MacOS Ctrl+Option+Shift+, | 
|
| Upto Char |
Ctrl+Alt+Shift+. On MacOS Ctrl+Option+. | 
|
| To Char |
Ctrl+Alt+. On MacOS Ctrl+Option+Shift+. | 
|
The char actions help you in selecting text from, after, upto or to the specified char (in a text field in the sidebar at the bottom of the editor) on the current line from the current caret position. You can use the char actions to either delete text (DELETE key), or modifying the text - uppercase (Alt+u u) or lowercase (Alt+u l) following the char action. These actions work somewhat like the t, T, f and F commands of Vi. You can type a numeric prefix nn, to find the nnth occurence of the char. If you are trying to operate on a digit you have to type ENTER key.
With the following text on the current line and caret at |
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ|
invoking From Char
Ctrl+Alt+, On MacOS
Ctrl+Option+,, specifying
c and
Match Case selected results in:
abcdefghijklmnopqrstuvwxyzAB|CDEFGHIJKLMNOPQRSTUVWXYZ
invoking From Char
Ctrl+Alt+, On MacOS
Ctrl+Option+,, specifying
c and
Match Case unselected results in:
ab|cdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
invoking After Char
Ctrl+Alt+Shift+, On MacOS
Ctrl+Option+Shift+,, specifying
c and
Match Case selected results in:
abcdefghijklmnopqrstuvwxyzABC|DEFGHIJKLMNOPQRSTUVWXYZ
invoking After Char
Ctrl+Alt+Shift+, On MacOS
Ctrl+Option+Shift+,, specifying
c and
Match Case unselected results in:
abc|defghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
With the following text on the current line and caret at |
|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
invoking Upto Char
Ctrl+Alt+Shift+. On MacOS
Ctrl+Option+., specifying
v and
Match Case selected results in:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstu|vwxyz
invoking Upto Char
Ctrl+Alt+Shift+. On MacOS
Ctrl+Option+., specifying
v and
Match Case unselected results in:
ABCDEFGHIJKLMNOPQRSTU|VWXYZabcdefghijklmnopqrstuvwxyz
invoking To Char
Ctrl+Alt+. On MacOS
Ctrl+Option+Shift+., specifying
v and
Match Case selected results in:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv|wxyz
invoking To Char
Ctrl+Alt+. On MacOS
Ctrl+Option+Shift+., specifying
v and
Match Case unselected results in:
ABCDEFGHIJKLMNOPQRSTUV|WXYZabcdefghijklmnopqrstuvwxyz
Sources
DISCLAIMER: This module is experimental. So no guarantees. Use the module at your own risk.
Posted by sandipchitale
( Jan 28 2007, 08:18:58 PM PST ) Permalink
Trackback URL: http://blogs.sun.com/scblog/entry/updated_linetools_module
It would be cool if you could find a way to do incremental selection similar to your incremental search.
Maybe <Ctrl>+<Alt>+/ to select from the cursor to the end of a string in the text field.
And <Ctrl>+<Shift>+? to select from the cursor backwards to the to the start of a string in the text field.
Kind of like what 'v/' and 'v?' does in Vim.Thanks again! :)
Posted by Jay Logan on January 28, 2007 at 09:56 PM PST #
Posted by Johnny Tolliver on February 19, 2007 at 06:04 AM PST #
Thanks for pointing this out. I faintly recall seeing this somewhere, may be on the page you pointed out. At minimum, I knew that they are trying to unify/revamp the key bindings.
Not to worry, some (important) parts of Line Tools functionality (and for that matter some of my other modules) is going to become part of core NetBeans. In any case, I will bring up this issue with the HIE (or whoever is working on the new key bindings).
Posted by Sandip on February 19, 2007 at 09:21 AM PST #
I would like to point 2 enhancements:
It would be nice to
- be able to set the case sensitivity when sorting.
- sort resource bundles also (easy when multiple developers update the same resource bundle using SVN, it avoids merge conflicts )
Best regards,Thierry
Posted by De Leeuw on March 19, 2007 at 02:56 AM PDT #
Thanks.
About 1 - Good suggestion. I will look into it. About 2 - I think raw sorting should work. No? However if one needs to worry about correctly retaining comments and blank separator lines between groups of properties that is a more complex issue. May be able to do it by sorting such property groups.
Posted by Sandip on March 19, 2007 at 06:28 AM PDT #
Posted by Johnny Tolliver on March 19, 2007 at 07:10 AM PDT #
I have added ability to control case sensitivity of sorting in Line Tools module. Enjoy!
Posted by Sandip, on March 25, 2007 at 04:30 PM PDT #