Incremental paste plugin?

I know that often using a for loop to create duplicate content is a better way than pasting something 20 times and manually changing each paste to the correct number. But let me say, for cases where the content is hard-coded and I just need a list of 1-20.

I need a text editor with a smart paste command that takes any number nested on a line in the clipboard and increments it every time it is pasted. If it does not exist, I will create a plugin.

I am trying to come up with a nice 2-stroke key combinator to do this, next to ctrl-V. Maybe ctrl-g or numpad_ + (in the application without scaling).

He exists?

+3
source share
3 answers

In Zeus, this can be done as follows:

  • The column marks the area that will be converted to a number
  • Use the Macros, Run Script menu
  • Enter numbers to run numbers Lua macro
  • Enter the first sequence number

The marked area will be replaced by the incremental sequence of the number, starting with the first number specified in step 4.

I'm trying to think of a nice 2-stroke keyboard shortcut for this,

Turning this into a table key action is as simple as binding numbers Lua macro to the keyboard.

Here is an example of how this works. If 1 text in the text below is marked with a column, and the macro is executed with an initial number of 1000:

Field_1
Field_1
Field_1
Field_1

:

Field_1000
Field_1001
Field_1002
Field_1003
+3

J , , , .

+1

TextPad is another text editor with the Fill Region function, for filling with a character, line or extension (starting with X, left or right justified and filled with a space or zero).

I used Notepad ++ now, but I have to keep TextPad only for this number padding function.

+1
source

Source: https://habr.com/ru/post/1702592/


All Articles