jEdit Community - Resources for users of the jEdit Text Editor
indent block selections
Submitted by coolcat on Thursday, 9 August, 2007 - 03:30
In visual studio, if I 'block' select and hit tab, the whole block tabs over. In jedit, the whole block is deleted and replaced with a tab.

In visual studio I use this feature all the time, for aligning columns in text-based data tables (c/c++).

Thanks

ps. If this is already possible, my apologies, I'm new to the program.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
don't block select
by AlexCory on Wed, 29/08/2007 - 19:01
if your trying to fix tabs on code, you shouldn't block select.

instead just click and drag to select each line of code normally using the mouse only. Then press Tab to push lines of code over or shift+tab to pull the lines of code backwards.

The tabbing doesn't work when you block select. But it does with normal select.
 
would prefer if I could
by coolcat on Wed, 26/09/2007 - 22:16
Block selecting is brilliant if you can indent in and out, multiple lines at the same time. Visual Studio does it, Textpad does it, and probably others. But hey, it's just a feature request.

Note, even tabbing single lines seems a little odd to me:

If I go to the middle of a line and hit tab, it indents the remainder of the line. If I hit shift tab, it un-indents the *entire line*, which is counter-intuitive for me.

I’m starting to use jEdit for everything. It really is excellent.
 
Is Rectangular Selection on?
by elberry on Thu, 27/09/2007 - 20:05
In jEdit if you "block" select, meaning you just drag and select multiple lines. Hitting tab, or shift+tab will indent or unindent respectively.

Block Selection: http://www.idc-productions.com/images/block_selection.png

However, jEdit has a featured called Rectangular Selection (shortcut is usually alt+\), if you use that to select a "block" of text, and hit tab it'll replace that text with the tab. If you're in rectangular selection mode, an 'R' will appear in the lower right hand corner of the editor.

Rectangular Selection: http://www.idc-productions.com/images/rect_selection.png

Make sure you don't have rectangular selection on.

Learn from the past. Live in the present. Plan for the future.
 
re: Is Rectangular Selection On?
by coolcat on Wed, 03/10/2007 - 20:54
Hi, thank you very much for commenting.

The feature I'm requesting is to be able to indent/unindent rectangular selected blocks. The editors I'm used to using as I've mentioned above all support manipulating a rectangular selected block.

For example, say you have a table like so:

s_people [] = {
{ "Trent", 37, FRIEND },
{ "Doug", 30, ENEMY },
{ "Tammy", 55, RULER },
};

Quite often I find myself wanting to add new columns, wanting to indent columns, remove columns... all this becomes easy with rectangular block selection, copying, pasting, and intelligent indenting. None of this works in Jedit. If I select the number column above and hit tab, the entire {...} portion indents.

Anyway, it's just a feature request.

Cheers.
 
Rectangular Selection should do this.
by elberry on Fri, 05/10/2007 - 05:25
Yes, you should definitely be able to do this. I do it all the time, using Rectangular Selection.

http://www.idc-productions.com/images/rect_selection.mov
(Sorry for the demo words)

Rectangular Selection acts like it would when editing a single selection, only it happens across the multiple lines.

At the end there, I had selected a single column across 3 lines, when I hit tab it put a tab at that position on all 3 lines. I then just hit backspace and it deleted a tab each time across each line.

If I had selected text across the 3 lines, it would have replaced the text with the tab, just like you'd expect it to if you had just selected some text in the middle of the a single line.

Rectangular selection should do what you want, but it may not do it in quite the same way you're used to, this always happens when you switch tools. Smiling

Hope that helps.


Learn from the past. Live in the present. Plan for the future.
 
thank you, and thank jedit
by coolcat on Tue, 09/10/2007 - 18:30
That's about the coolest thing I've seen this month. (Do I sound like a geek or what?)

Thanks so much for clarifying. I never thought to not select any text before trying to tab(like you've demonstrated). Awesome! And the way you can type text in multiple lines simultaneously is pretty darn cool too!

I official retract this feature request! Smiling
 
::grin::
by elberry on Tue, 09/10/2007 - 20:01
You're welcome.

Puzzled You mean your previous tool doesn't have the ability to type across multiple lines?? hehe Eye-wink

Glad I could help, happy j-editing!

Learn from the past. Live in the present. Plan for the future.
 
Have you tried Edit>More Sele
by thebugslayer on Thu, 04/10/2007 - 17:05
Have you tried Edit>More Selection>Rectangular Selection?
 
Hello !!!! I want to know
by caballosweb on Fri, 23/11/2007 - 23:16
Hello !!!!

I want to know more of all this. It´s incredible , but I dont know much more. Please help me with links and info

Thanks a lot

Bye



_______________________
Submited by : Caballos
User login
Browse archives
« April 2024  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293