sponsor Vim development Vim logo Vim Book Ad

catn.vim : insert formatted numbering text.

 script karma  Rating 1/1, Downloaded by 835  Comments, bugs, improvements  Vim wiki

created by
omi taku
 
script type
utility
 
description
Insert formatted text with number at selected area.
You can select "text format", "starting number", and "insert area".

Default value of option are
text format     : "%d "
starting number : 1
insert area     : current line only

------------------------------------------------------------------------------

[command format]

:'<,'>Catn {text format} {starting number}

:'<,'>Catn [{starting number}]

({text format} ... see ":help printf()", available format is written there.)

------------------------------------------------------------------------------

[command example]

(Insert number at selected area. 1, 2, 3, ....)
:'<,'>Catn

(Insert number at selected area. 1000, 1001, 1002, ....)
:'<,'>Catn 1000

(Insert formatted number text at selected area. 0000500, 0000501, 0000502, ....)
:'<,'>Catn %08d\  500

 
install details
1. Copy the catn.vim script to
   $HOME/vimfiles/plugin or $HOME/.vim/plugin directory.
   Refer to ':help add-plugin', ':help add-global-plugin' and
   ':help runtimepath' for more details about Vim plugins.

2. Restart Vim.

 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
catn.vim 0.5 2008-08-02 7.0 omi taku Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github