coyot:
--------------------------------------------------------------------------------
Column mode would have to be implemented directly in SynEdit (the core
component on which PSPad is built)
--------------------------------------------------------------------------------


I disagree here - MrSpock pointed out the ALT+I functionality (insert text into
lines).

As long as PSPad knows the editor is in column mode and the start and end
positions of the current selection, I see no reason it couldn't use exactly the
same behaviour as the ALT+I functionality but without the user needing to
manually specify where to insert the characters. It could calculate the start
position and number of lines from the selection position. It then just needs to
re-select the correct characters after editing.

The way I see it, there are multiple parts that need to be implemented for
column mode to function in a fashion similar to other programmers editors:

_1_. When in block mode and the selection is 0 columns wide, any characters
typed should be inserted at the position of the selection (using similar
functionality to the ALT+I code already in use) and then the selection should be
moved right 1 character to account for the newly-inserted character.

_2_. When in block mode and the selection is 0 columns wide, if backspace
is pressed then the selection should be expanded left by 1 character and the
contents deleted (backspace already works for 1 or more columns wide). The
selection should then be re-created with the same start/end position as it
previously had. 

_3_. When in block mode with a selection larger than 0 columns and a
character key is typed, the selection contents should be deleted then the ALT+I
functionality used insert the  character typed. The original selection height
then needs to be re-selected but with 0 width. This is less sophisticated than
UEdit's behaviour but should be easier to implement.

_4_. When the TAB key is pressed or clipboard contents are pasted (even
UEdit doesn't handle that one correctly). Once again, the selected chars should
be deleted and the typed/pated chars need to be inserted for each line though
re-selecting afterwards is harder now as it will probably have increased by more
than 1 char. This is really just an extension of part 3 though.

I'd have said implementation of parts 1 and 2 were vital to editing of indented
code or column-aligned data. Parts 3 and 4 ares far less important but 3 has
been handy in UEdit when I needed to edit column-aligned files.

That said, I'm sure Jan has a busy life already and doesn't have infinite time
to constantly tinker with PSPad. I certainly don't want to suggest it's a bad
editor just because these small features don't work. 

PSPad is a lovely configurable editor and it's still my primary code editor. I
only paste into UEdit when I need to do column-mode work). 

It would be lovely to hear of column-mode enhancements being added to the
feature requests for a future version though, even if only low priority.

-- 
<http://forum.pspad.com/read.php?2,38689,39706>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem