Categories


Popular topics

The insert number command allows you to insert a sequential number into every selected line, or if no lines are selected, into every line from the active line to the last line of the file at the column position indicated by the caret. The dialog allows you to enter the initial value and the increment for each line. This provides an easy method to add line numbers into a text file, for example.

If any text is selected when insert number is invoked, the selected text will be replaced by the inserted numbers. The spacing required for the numbers is calculated automatically based on the number of lines that will have a number inserted, the initial value, and the increment. All numbers may be positive or negative non-decimal point numbers (32-bit signed = negative number in hexadecimal notation has 8 digits).

If the option for Leading zeros is checked, the appropriate number of leading zeros will be added to each number to pad the field to the same width (in characters) as the maximum number inserted. If this option is unchecked, trailing spaces will be used to make the number column widths equal across all lines.

You may select Decimal' or Hexadecimal to specify the format of the inserted numbers. For example, if you enter "62" is in the First Number field, and Hexadecimal is selected as the output format, then 3E (which is the hex representation of the number 62) will be the first value of the sequential numbers inserted.

Column mode must be activated in order to use this command.

MediaWiki spam blocked by CleanTalk.