Menu

column select mode

2006-05-12
2012-11-13
  • Nobody/Anonymous

    Hi,
    Is column select mode supported by notepad++?
    If not, I would like to request for the feature.

    thanks.

     
    • Nobody/Anonymous

      Alt+Shift Left Click will do rectangular (column) select mode.  Note that you have to press Alt+Shift before doing mouse left click.

       
    • Nobody/Anonymous

      All you need is Alt - no Shift required.

       
    • Nobody/Anonymous

      Alt Shift is extremely useful in a long file: Alt Shift leftclick at the top of a very long file, then scroll to the bottom and complete the 'rectangular' selection. Alt alone does not allow this.

       
    • bon ami

      bon ami - 2006-05-31

      i.e., it can't B done without mouse, which is not so perfect.

       
      • Don HO

        Don HO - 2006-06-01

        Alt+Shift+Arrow keys

         
        • bon ami

          bon ami - 2006-07-24

          i cannot imagine being forced to use keyboard instead of mouse to select. & i don't know what differences are b/t a-s-arrow and s-arrow.
          not seeing this problem CORRECTED, i'm afraid i cannot bear to use it.

           
    • Michael

      Michael - 2006-07-24

      with keyboard:
      Press Alt+Shif+Cursor-Keys (left, right, up, down)

      with mouse:
      1. Position Cursor at start of selecting area
      2. Alt+Shif+LeftMouseclick+MoveMouse
         (= Alt+Shif+Drag&Drop)

      If I don't position cursor first, it does not work by my.

       
      • Nobody/Anonymous

        One wonderfull missing feature is the ability to apply a TAB to the column-selected text. Currently (version 4.6), the TAB always apply to the whole lines starting from the beginning, and not from the selected text.

         
      • Nobody/Anonymous

        "with mouse:
        1. Position Cursor at start of selecting area
        2. Alt+Shif+LeftMouseclick+MoveMouse
        (= Alt+Shif+Drag&Drop) "

        That's a great tip.  Many people have complained about the difficulty in making very long block selections, so that solves that problem.  I've added it to the General FAQ at http://notepad-plus.wiki.sourceforge.net/FAQ . Thanks for that.

        The column block FAQ almost needs to be moved into its own file now.

         
      • Nobody/Anonymous

        Wow, never spotted that before :)
        Perhaps these column modes could be added to the
        menu, to alert users to the Column.DragSelect (Alt+ClkDrg)
        and this Column.CornerSelect : Set one corner, then move mouse to other and Alt.Sft.Click. Nice

        I can see another possible fix to the Scintilla EOL problems in Column mode, in the Corner mode, it could prompt for the EOL.Column number, if your
        click is past the EOL (with the click X as a prompt guess ).

        Then you can column select large blocks, with any
        last line EOL.

        jmg_

         
  • Philippe Verdy

    Philippe Verdy - 2009-11-05

    It's true that the block selection maode is not very accessible when it just works by dragging the mouse.

    I really suggest implementing a selection like the one suggested (though still only by using the mouse), but also allowing using the keyboard.

    So I would like block selection mode to work also with the **Alt** key modifier key and the same keys used for moving the caret :

    - **Alt+PageDown**: extends/reduces the current block selection by moving the end of block selection downto the next page (the ending column should not be modified, even if that line is shorter, the rectangular selection  should just include "empty" positions);

    - **Alt+PageUp**: extends/reduces the current block selection by moving the end of block selection upto the previous page (the ending column should not be modified, even if that line is shorter, the rectangular selection  should just include "empty" positions);

    - **Alt+Begin**: extends/reduces the current block selection by moving the end of block selection back to the first non blank character on the current line, or if this is already there, back to the beginning of line; this key will toggle between these two positions;

    - **Alt+End**: extends/reduces the current block selection by moving the end of block selection up to after the last non blank character on the current line, or if this is already there, up to the end of line, or if it is also already there up to the last column with characters in the currently selected lines (in the case where the selected lines don't all have the same length);

    - **Alt+ArrowUp**: extends/reduces the current block selection by moving the end of block selection downto the next line (even if the target line is shorter, in which case the ending column should be kept so that the existing block will keep its column width and will include empty positions);

    - **Alt+ArrowDown**: extends/reduces the current block selection by moving the end of block selection downto the next line (even if the target line is shorter, in which case the ending column should be kept so that the existing block will keep its column width and will include empty positions);

    - **Alt+ArrowLeft**: extends/reduces the current block selection by moving the end of block selection backto the previous column on the same line (no effect if already at begining of line);

    - **Alt+ArrowRight**: extends/reduces the current block selection by moving the end of block selection downto the next column on the same line (even after the end of line, because the block could include longer lines);

    Possible extensions could also include **Alt+Cltr** with **ArrowLeft** or **ArrowRight** to move to the end of block the next/previous word (on the current line of the end position), to be consistant with **Ctrl+ArrowLeft** and **Ctrl+ArrowRight** functions that also move the caret from word to word.

     
  • Philippe Verdy

    Philippe Verdy - 2009-11-05

    If this is too complicate for users, may be there should be a function key (and/or menu item and/or toolbar button) the change the current **selection mode**.

    In addition, the current Normal or Block selection mode should be displayed in the status bar by an indicator (in which case, no toolbar button may be redundant, as you could as well click on this indicator, unless the status bar has been disabled).

    Such behavior existed more than 20 years ago in various text editors for MS-DOS (long before Windows became widespread), and it was really smart for editing tabular data files. It was also present in various development tools. There still exists some editors that also implement this **block selection mode** (also with an indicator in their status bar).

     
  • Philippe Verdy

    Philippe Verdy - 2009-11-05

    Note also that some editors just use the current **insert/overwrite** mode to also activate the **normal/block** selection mode. This is also a good option, given that the overwrite mode is typically used when working on tabular data files, in which case the normal selection mode is really not very friendly.

    In this overwrite mode,

    - the backspace or delete functions do not change the column positions, which are filled with spaces when necessary to keep the remaining columns properly aligned.

    - the cut/copy/paste operations work by default also in column mode, by  replacing by spaces, or owerwriting columns, when appropriate.

    So on these editors, there's no need for a separate edit mode, and no need to use any key modifier: the same Shift+function keys can be used directly according to this mode to change the currently selected block.

    As well, the **Tab** and **Shift+Tab** keys can be used to insert/remove a column of blanks within the current block (and this is very useful when working on tabular data files, when one wants to insert columns of data (because almost all edits still maintain the current block selection, in a persistant way, and where the block selection can be unselected very simply by just toggling back to insert mode (in which case the two positions of the start of selection and end of selection are reinterpreted as including all contents between the two positions without taking the column numbers into consideration, and moving the caret or typing text will disable the selection completely).

    This extended **overwrite mode** is very intuitive, user friendly, and very accessible (easy to type without having to press multiple keys simultaneously) to work on tabular data files, or any parts of source code whose content is already tabulated (for example when commenting sources with a visual table of parameters or when describing their accepted enumerated values).

     
  • cchris

    cchris - 2009-11-06

    Those are several ideas to be put o IdeaTorrent. Can you do that?

    Thhere are some tricks about selection mode change you may want to (http://sourceforge.net/apps/mediawiki/notepad-plus/index.php?title=Moving_And_Selecting_Around)

    Binding the selection mode to the insert/overtype mode seems quite wrong to me in an editor which is primarily intended for source code editing. However, why not have this as a non default option, if users like it that way.

    Concerning some of the newkeyboard mapping you suggest:
    * some are not imlemented, it may be a good idea to do so;  * some already are, in which case the shortcut mapper will help you remap as you see fit. Remember that Alt+Left/Right are often used for horizontal scrolling. Unfortunately, yh shortcut mapper does not warn you when you assign a shortcut that's already assigned.

    CChris

     
  • Philippe Verdy

    Philippe Verdy - 2009-11-08

    It's not stupid, even in a source code editor, to bind the insert/overwrite mode to a block mode, because tabular data is quite frequent even in source code editing. I cited this because it already exists, and the overwrite mode is DEFINITELY NOT the preferred mode for source code editing, EXCEPT exactly when editing tabular data.

    Tabular data is really convenient for lots of things: like editing a long list of initializers for various kinds of data structures (tables, list of property names and values, hierarchical data, commenting parameters, editing highly structured data like long lists of coordinates in a SVG file.)

    You may even imagine, even when working in C/C++ to have some convenient macros that would allow reindenting selected parts of the source into a tabulated form, on which you coul apply (stilll in block mode), several edits like performing basic calculation, such as adding two colons together, incrementing counters, and so on). Then a reindeing command can reformat once again the source to revert back to the usually compact form (using indentation and minimum spaces).

    Some sources that contain complex datastructures are quite difficult to edit when they are presented in the basic indented style recommanded for the language, but they are really much easier to understand and work on, when these data are structured more visually, and this not only facilitates the editing, but also avoids common errors, or allows discovering them, such as wen you have forgotten a delimiter, or an item.

    Another common example would be the automated conversion between CSV files and tabulated files (in both directions). Because reading tabulated data is much easier as it looks like a visual report.

     
  • cchris

    cchris - 2009-11-08

    Again, I don't mean it's useless. It exists, but may seem unusual to quite a few people. Which is why I suggest making this interpretation of overstrike mode a non default alternate option.

    Could you make a feature request on IdeaTorrent?

    CChris

     
  • Philippe Verdy

    Philippe Verdy - 2009-11-09

    Your reply is not relevant, notably because "IdeaTorrent" is probaly a new area, as I have not seen it before, and it is documented nowhere from the Notepad++ interface or help.
    It would be much easier to forward a link to this discussion, or select any part you find convenient to there.
    Notably because I absolutely don't know where/what is "IdeaTorrent".
    (and if it uses the BitTorrent P2P protocol, I don't want it on my PC).

     
  • cchris

    cchris - 2009-11-10

    IdeaTorrent is not referenced in the help manual, because it is a place to post feature requests, not really to get help. So it wouldn't be relevant there.

    There is a reference to IdeaTorrent on the main wNpWiki++ page's diagram, and it is referred to a number of times on this forum. It is a new area, as it is 6 month old or so, which is probably why it is not yet referenced from Notepad++ website. Yoou can access  it from this page you are viewing, it is the first entry on the Hosted Apps black menu.

    Basically, it is a nicely decorated idea box with a vote facility for solutions (an idea has one or more solution). It is also more convenient to gather feature requests than finding them in the haystack of the forums, and there is more functionality than in the Feature Request SF tracker, which will retire some day anyway.

    And finally, IdeaTorrent does not use any protocol related to BitTorrent. It does use Ajax for its display and database requirements, that's the closest it comes to BitTorrent.

    CChris