Scripts to insert/fill strings from clipboard into selected columns in column mode

Scripts to insert/fill strings from clipboard into selected columns in column mode

6,603547
Grand MasterGrand Master
6,603547

    Feb 20, 2016#1

    InsertFillColumnsFromClipboard

    There is the command Insert/fill columns in menu Columns (traditional menus) or in menu Edit (contemporary menus) or ribbon tab Edit (ribbon mode) for inserting a string in column mode on all lines selected or on all lines from current caret position up to last line of file. See help page Insert/Fill Columns command in help of UltraEdit for details on this command. And see also Advanced - Settings or Configuration - Editor - Column mode where insert/overstrike behavior can be defined for column mode.

    The script InsertFillColumnsFromClipboard.js makes it possible to quickly insert a string in clipboard into all lines selected in column mode using this command with a single keystroke. It additionally extends the command. Read the comments at top of script file for details.

    This script can be downloaded from Macros & Scripts page being listed there with title Insert/Fill Columns with string from clipboard.

    InsertStringsInSelectedColumns

    The script InsertStringsInSelectedColumns.js is for inserting multiple strings/lines from clipboard into the lines selected in column mode similar to Paste command, but with some differences.
    • All characters of a currently existing rectangular selection are always deleted on executing this script.
    • The strings/lines in active clipboard are inserted at selected column in selected lines, but with removing all trailing spaces and tabs on each string before inserting into the file.
    • The script does not insert more strings/lines from clipboard than selected in file in column mode on starting the script.
    • The script never overwrites characters outside initial rectangular selection.
    • A thin column selection is made after the strings were inserted showing which lines were modified by the script.
    It does not matter if block copied to clipboard was a rectangular selection or a standard text selection on copying the block into the clipboard.

    This script can be downloaded from Macros & Scripts page being listed there with title Insert strings in selected columns from clipboard.

    The line and block comments can be removed from both script files by running a replace all (from top of file) searching with Perl regular expression for ^ *//.+[\r\n]+|^ */\*[\s\S]+?\*/[\r\n]+| +//.+$ and using an empty replace string. The first part in this OR expression with three arguments matches entire lines containing only a line comment, the second part matches block comments, and third part matches line comments right to code. Removal of the comments makes the usage of these scripts more efficient on using them often because of JavaScript interpreter has to interpret less characters and lines.
    Best regards from an UC/UE/UES for Windows user from Austria