I have a really great idea that i would really like TextPad to implement. The indent feature where you press down and it goes to the initially selected column is a great feature but i would like more. How about an indenting feature like MS Word, only the indenting works by column. That is, it moves the text on each line by one column (since the font is fixed width). Here is a pic (gif amination):
It can be configured to move comments, identifyers, etc. So you can align all comments on each line.
Also, i like how it converts tabs to spaces, but i would like it if it deleted 4 spaces (i.e the tab width) when backspace is pressed, as long as there is 4 spaces before the cursor.
I would really like to see these ideas implemented, there is so much more that you can do with text editing (especially for code) so why don't editors do it? TextPad can be much more powerful yet still be simple and fast.
Column indenting - Really great idea
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
Column indenting - Really great idea
Customer in computer shop: "Can you copy the Internet onto this disk for me?"
That's what i'm talking about. Everything would be done in spaces (unless the user selected to use tabs). If you move the indenting thing on the ruler up the top then it just adds spaces to each line in between the previous non-whitespace character and the ruler position. If there is a whole word in between ("SomeObject" in my pic) then it won't split it up and move it.
Furthermore, you can choose what to move. If it's comments, then it only moves lines with // (or whatever the syntax is).
It's brilliant! No longer would i have to sit there pressing spacebar on every line!
Furthermore, you can choose what to move. If it's comments, then it only moves lines with // (or whatever the syntax is).
It's brilliant! No longer would i have to sit there pressing spacebar on every line!
Customer in computer shop: "Can you copy the Internet onto this disk for me?"
The handling of tabs/spaces for indents is important, too.
Makefiles need tabs; Fortran77 needs spaces; most languages don't care.
I don't know if the // example you put in would be easy to implement. One thing that's nice to have is indents that honor block versus regular mode.... in block mode, you'd want to indent just the block you've selected.
Makefiles need tabs; Fortran77 needs spaces; most languages don't care.
I don't know if the // example you put in would be easy to implement. One thing that's nice to have is indents that honor block versus regular mode.... in block mode, you'd want to indent just the block you've selected.
Yes that would be good too. In either mode it would only indent the selection (is any).mattrix wrote:One thing that's nice to have is indents that honor block versus regular mode.... in block mode, you'd want to indent just the block you've selected.
I don't know how you would implement such a thing, i think it wouldn't be too hard.
Code: Select all
when indent ruler moved:
for each line selected { // or all lines
if cursor is at '//' {
add space (or tab);
}
}
Customer in computer shop: "Can you copy the Internet onto this disk for me?"