After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 101590 - RFE: column blocks for gedit
RFE: column blocks for gedit
Status: RESOLVED DUPLICATE of bug 96436
Product: gedit
Classification: Applications
Component: general
2.0.2
Other All
: Normal enhancement
: ---
Assigned To: Gedit maintainers
gedit QA volunteers
Depends on:
Blocks:
 
 
Reported: 2002-12-19 10:00 UTC by Roman Polach
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Roman Polach 2002-12-19 10:00:28 UTC
Feature request:
Column blocks operations like "Alt-C mode" in UltraEdit-for-Windows
Comment 1 Andrew Sobala 2002-12-19 16:13:53 UTC
Can you elaborate on what you mean, please?
Comment 2 Roman Polach 2003-01-13 20:50:24 UTC
That means similar to VIM Ctrl+V column mode,


but more powerfull. I'll try to explain what "column selections" are:


(Please excuse me for my English)




Lets leftkey mousedown on (line=Y1, position/column=X1),


move to (line=Y2, position/column=X2) holding down leftkey


and then mouseup.


Lets assume Y2>Y1, X2>X1 for simplicity of explanation.


In "normal" selection mode we will have selected:


  - part of line Y1 from position X1 to the end


  - all lines between Y1 and Y2


  - part of line Y1 from beginning to X2.


In "column" mode we will have selected rectangular area:


  - from position X1 to X2 on all lines from Y1 and Y2 (including)


    (so the selection has X2-X1 "width" and Y2+1-Y1 "height")


It is also possible a special case: block of width of zero and height 
of nonzero (height cannot be zero), this is useful for some purpose 
described below(*)... (Note this is imposible with VIM because VIM


has carret ON the glyph position and Gedit BETWEEN two glyphs...)




Need:


1) kbd shortcut + menu item for switching "normal" selection


   mode and "column" selection mode.


2) "copy to clipboard" operation on "column" selection:


   this also needs ability to select (and copy) part or whole


   of "blank area on the right of End-Of-Line"! Lets call


   "characters" beyond End-Of-Lines "nulls".(**)


3) "cut to clipboard": like "copy" but remove the selected block


   and shift text on the right to the left.


4) "paste from clipboard - when there is nothing selected":


   block of text is inserted at current carret position and NO


   text is overwriten (it is shifted to the right) on all


   relevant lines


5) "paste from clipboard into the selection": text in selection


   is overwriten by clipboard content.


   - if selection has same width and height as the one in clipboard:


     selection just fit


   - if width and/or height of selection is greater than the one


     in clipboard, selection will be "tiled" horizontaly and/or


     verticaly


   - if width and/or height of selection is less than the one


     in clipboard, selection will be cut - no text outside selection


     will be overwritten


   - if clipboard is empty, selection will be cleared, no text


     will shifted on that blanked selection


**) pasting "null" characters:


  - when pasted beyond End-Of-Lines


    (beyond any not-null characters),


    they are not really pasted (so EOL characters do not "change


    position");


  - when pasted before EOL,


    they are converted to SPACE characters.


  - when pasting not-null characters beyond EOL,


    EOL is moved to position after last not-null character pasted.


    Spaces are inserted between "last EOL" and newly inserted


    characters as needed.




*) Selection of width "0":


  - when typing, characters are inserted to ALL lines that selection


    is over, and selection moves to the right...


  - on "backspace": selection moves to the left and deletes character


    on position X1-1 in all lines Y1 to Y2


  - on "delete" 1 character to right from selection is deleted on


    all lines Y1 to Y2


  - "copy" and "cut" do empty clipboard only


  - "paste": clipboard content is inserted to all lines Y1 to Y2,


    nothing is overwritten, text is shifted to the left by "width of


    block in clipboard"




This is the concept of "column mode" used in UltraEdit for Windows.


It is VERY powerfull so it would be nice to see it in Gedit too


(I do not know if it could be implemented in plugin or needs to be


part of "core").




Roman Polach


Comment 3 Andrew Sobala 2003-01-13 21:05:40 UTC

*** This bug has been marked as a duplicate of 96436 ***