Editor to select text that is inside a rectangle - editor

Often I find myself with some text where I want to exclude a certain part of the text, say the first three characters of 40 lines. The fastest way I could think of to do this would be to draw a rectangle and copy the text. I am mostly using Windows, but I am sure grep or something similar could do this with a tiny bit of code. My best way of doing this is to open Command Prompt. Then run "Edit" (yes the good old one). Then paste the text in there (this actually takes a significant amount of time). Then I am able to select the rectangle I am after.
Is there any other editors that support this feature? I am familiar with Notepad++.

You can select a rectangular area to cut/copy in Visual Studio be pressing the Alt key prior to making your selection with the mouse or (Shift +) cursor keys. See How to: Select and Change Text.

The Zeus editor can do keyboard driven column cut/copy and paste.
Also the default Zeus mouse marking is in column mode.

If you use Vim, Ctrl + V will let you select a rectangular block of text.
The documentation says Ctrl + Q will let you do a rectangular select in mswin compatibility.

Emacs supports kill-rectangle (bound to C-x r k by default) and yank-rectagle (C-x r y) to achieve this. Also of possible interest is delete-extract-rectangle (no default binding, and intended for programming use).
You use it by navigating to one corner of the interesting area, hitting C-<space> to set the mark, navigating to the opposite corner, and invoking the desired function.

UltraEdit has a column mode (menu Column/Column Mode, keyboard
shortcut Alt + C). This makes it possible to make block selections, delete, insert column-wise, etc. using only the keyboard (the mouse works too).
For your example: make a zero width selection at column position 1 for the 40 lines and press Delete three times. Or simply make the 3 x 40 block select and press Delete.

You can do this with NEdit (which is available for Windows). Hold down Ctrl and drag the mouse (left-click) to select rectangles.
In Linux, you could also just use cut:
cut -b4- file
It will remove the first three characters from every line and print the result to standard output.

jEdit supports vertical selections (keyboard shortcut is Alt + \). It can also do multiple, non-continuous selections (keyboard shortcut is Ctrl + \). And when you type it affects all selections, so you can edit multiple lines at the same time, or the same line in more than place simultaneously. Or both.
Vertical pasting is also supported. This is a feature I use all the time. It makes editing columns a breeze.
If you have too many lines to select easily, then jEdit's Find And Replace is as good as it gets.
jEdit is a Java application, and so uses more system resources than most editors. But on the other hand it works on most systems, and it has loads of plug-ins to make editing text more efficient.

This can be done using JGSoft's Editpad which has a freeware lite version that is not crippled.

In IntelliJ, go to Edit and then click on Column Selection Mode. Or use the ALT+SHIFT+INSERT shortcut.

Related

Issue with Delphi Menu

I am Using RAD Studio 2010 and I have problem in Menu text
There are Z and Y texts in my menu and I want to remove it
This will happen when I use Non English text
This is because of TMainMenu.AutoHotkeys. By default, the value of this property is maAutomatic, which means that the menu will automatically choose accelerator keys for your menu items.
For instance, in a typical English application, you might get a menu like this:
Notice the underlined characters. These are used to access the menu using the keyboard. For instance, to open the File menu, I can press Alt+F. And once the File menu is open, I can press the key corresponding to the underlined character in the caption of the menu item I wish to invoke.
For keyboard users like myself, such accelerators are extremely important. I use them all the time. I could use the mouse instead, but that would slow me down tremendously. (For instance, in the application in the screenshot, I am very used to press Alt+E, O to open the Sort Lines dialog box. That takes about 0.2 seconds. If I had to use the mouse, it would take much longer!)
Now, in your case, there aren't any Latin letters to underline, so instead the RTL adds these parentheses (with the Latin letter being the accelerator), so you still can access the menus using the keyboard.
I have very little experience with non-Latin-based versions of Windows, but I do believe menus like these are standard. If I were a Chinese or Arabic user (for instance), I think I would refuse to use an application without these. If I cannot access GUI menus and controls with the keyboard, I get really annoyed.
Still, if you insist, you can set AutoHotkeys to maManual.

Select Text in vertical in Spyder text Editor

Is there a way for selecting text in vertical in Spyder3 Text Editor? What I mean is something equivalent to Alt + Shift in Atom text editor for example:
(Spyder maintainer here) No, there's no way to do that in Spyder, sorry. Unfortunately it's not so easy to implement it with our current editor code.
You can write text code in 'sublime' editor and perform all sorts of shortcuts there. to select matching text in the sublime editor, first select/highlight that text using the cursor and then press Ctrl+D as many times you want, sublime will keep highlighting matching text in the whole text file. To select all matching entries simply press Alt+F3 (in windows).

Replace selected found text in Delphi 10 RAD Studio editor

Requirements:
We have a text in Delphi RAD Studio editor and this text has been selected as a search result.
What happens
On any change (Del button or typing some text) changes are applied to the right of selection.
Expected
On any change (Del button or typing some text) the selected block is deleted and then the changes are applied.
Question
How?
The behaviour that you describe is simply how the IDE's search functionality is intended to work. You are expecting that when you search for text, the IDE will select occurrences of that text. However, it instead highlights occurrences.
There is no way (to the best of my knowledge) to alter this behaviour, short of writing an IDE plugin to implement your own search functionality.
To resolve this, use Ctrl + R.

Using Unicode characters with Delphi XE2

I'm looking at converting one of our applications to Delphi XE2 and generally take the opportunity to bring it up to date.
One of the features of the application is a StringGrid that displays a number of check marks in a couple of columns. To achieve this the grid is actually 2 aligned grids - the second of which is setup with the font as Wingdings in order to display the check marks.
Am I wrong in thinking that I should be able to use something like a TListView and use the checkmark char (U+2713) alongside the rest of the text... If so how the heck do I do this?
Do I need to set the font to Wingdings for that column? Does this need to be in OnDraw?
Am I barking up the wrong tree...
File->New->VCL Forms application
In the Component Palette, expand the Win32 tab and choose TListView, and drop it on the form.
Right-click the newly added TreeView1, and choose Items Editor... from the context menu.
Click New Item. Type in any text (for instance x Testing, using the 'x' as a placeholder for now).
Start the Windows Character Map application (Start button, type Chara in the search box, or Start->Programs->Accessories->Character Map). Change the font to Arial Unicode MS, and navigate to the character you want (it's in there).
Click the character, and then the Copy button. Switch back to the IDE, select the x placeholder you put in the edit, and hit Ctrl+V to paste the character you just chose from Character Map. You should now see your check mark (or whatever character you chose), followed by Testing.
(The steps above are the two-minute process I followed to find out how to do this, and that quick experiment showed that you could.)

Does RubyMine have TextMate-style multiple line editing?

Is there a shortcut key for editing multiple lines in RubyMine (Windows) as you can do with TextMate? I've seen it in TextMate where you can highlight multiple lines, and press a key code, then start typing. All text you type will appear at the end of all of the highlighted lines. I would love to do this with RubyMine as well.
Thanks!
Yes, this feature is called Column Mode and can be enabled via Edit menu or keyboard shortcut.
RubyMine version 6.3 and later has real multiple line editing. Simultaneously edited areas of text need not be vertically adjacent and vertically aligned (as they must be to use Column Selection Mode).
Briefly,
option-click (on Mac; alt-click on Windows or Linux) to create additional carets, edit as usual, then hit escape to revert to a single caret
select some text and control-G (on Mac; alt-J on Linux and Windows) to search for the next occurrence of that text and add a caret to it
There are also editor commands to add carets (Clone Caret Below, Clone Caret Above) that are not bound by default, but that you can bind to keys of your choice.
More here: What’s Mining: Multiple Cursors and Selection
(Column Selection Mode still works fine for areas of text that are vertically adjacent and aligned.)

Resources