How to paste columns with Ctrl+Alt+V even with column mode not enabled?

How to paste columns with Ctrl+Alt+V even with column mode not enabled?

1
NewbieNewbie
1

    Feb 26, 2018#1

    Hi!

    I used an older version of UltraEdit in my old company and would like to push UltraEdit in my new environment. I installed UltraEdit V18. One feature I really liked was pressing Alt and selecting with the mouse would select in column mode. If I kept Alt while doing Ctrl+V, everything would be like pasting in column mode. (I added Ctrl+Alt+V to edit paste settings.) In the new version it seems I can't paste in column mode anymore that way. I have to switch to column mode (Alt+C), then paste. Do I miss a configuration setting somewhere?

    Thanks
    dich vu ruthamcau.vn

    6,613548
    Grand MasterGrand Master
    6,613548

      Feb 27, 2018#2

      The feature to make a rectangular selection with pointing device (mouse) while holding key Alt with column mode currently not enabled for copying, cutting or deleting the rectangular selection was introduced with UltraEdit for Windows v16.00.

      In all UltraEdit versions 16.00 and 16.10 it was also possible to assign Ctrl+Alt+V to command EditPaste and get the before copied rectangular selection pasted as columns even with column mode not being enabled at the moment. But that was not a feature. It was a bug which was fixed with UE v16.20.

      There are two possibilities to use Ctrl+Alt+V to paste a block in column mode without manually enabling column mode before and disabling it after pasting the block:
      1. Create a macro for example with name PasteColumns with the macro properties Show cancel dialog for this macro and Continue if search string not found both not checked and with Ctrl+Alt+V assigned as hotkey to this command with following macro code:

        Code: Select all

        InsertMode
        ColumnModeOn
        Paste
        ColumnModeOff
        This macro must be saved (together with other often needed macros) into a macro file which is configured at Macro - Set Auto Load for being loaded on startup of UltraEdit. I suggest to save the macro(s) into macro file %APPDATA%\IDMComp\UltraEdit\Macros\AutoLoaded.mac whereby the subdirectory Macros must be first created in the application data directory of UltraEdit.
         
      2. Create a new ASCII/ANSI file with DOS line endings and paste into this file following script code:

        Code: Select all

        if (UltraEdit.document.length > 0)  // Is any file opened?
        {
           var bColumnMode = false;
           // The column mode property is a property of the UltraEdit object in
           // UltraEdit for Windows and UEStudio, but a property of the document
           // object in UltraEdit for Linux and for Mac.
           if (typeof(UltraEdit.columnMode) == "boolean")
           {
              // Get state of column mode.
              bColumnMode = UltraEdit.columnMode;
              // Enable insert mode.
              UltraEdit.insertMode();
              // Enable column mode.
              UltraEdit.columnModeOn();
              // Paste content from active clipboard into file.
              UltraEdit.activeDocument.paste();
              // Disable column mode if not enabled on starting script.
              if (!bColumnMode) UltraEdit.columnModeOff();
           }
           else if (typeof(UltraEdit.activeDocument.columnMode) == "boolean")
           {
              // Get state of column mode.
              bColumnMode = UltraEdit.activeDocument.columnMode;
              // Enable insert mode.
              UltraEdit.insertMode();
              // Enable column mode.
              UltraEdit.activeDocument.columnModeOn();
              // Paste content from active clipboard into file.
              UltraEdit.activeDocument.paste();
              // Disable column mode if not enabled on starting script.
              if (!bColumnMode) UltraEdit.activeDocument.columnModeOff();
           }
        }
        
        Save this UltraEdit script file for example as %APPDATA%\IDMComp\UltraEdit\Scripts\PasteColumns.js whereby the subdirectory Scripts must be first created in the application data directory of UltraEdit.

        Open Scripting - Scripts and Add this script to Script List with a suitable description and hotkey Ctrl+Alt+V.
      Last the existing key mapping of Ctrl+Alt+V with command EditPaste must be removed from key mapping configuration.

      Then Ctrl+Alt+V can be used to execute the macro or script which pastes the active clipboard content into active file at current caret position in column mode.
      Best regards from an UC/UE/UES for Windows user from Austria