sponsor Vim development Vim logo Vim Book Ad

cmdline-increment.vim : increment, decrement commandline number.

 script karma  Rating 9/3, Downloaded by 1116  Comments, bugs, improvements  Vim wiki

created by
omi taku
 
script type
utility
 
description
Increment last appearing number in commandline-mode command with Control-a ,
and decrement with Control-x .

    <C-a> increment commandline last appearing number.
    <C-x> decrement commandline last appearing number.


------------------------------------------------------------------------------
[Usage]

1.  Enter commandline mode.
2.  Enter next command.

    :edit workfile_1.txt

3.  And Press Control-a , or press Control-x .


------------------------------------------------------------------------------
[Customized Mapping]

If you will customize increment, decrement mapping,
add put these code to your vimrc .

    " (for example)
    " increment with Shift-Up
    cmap <S-Up> <Plug>IncrementCommandLineNumber
    " decrement with Shift-Down
    cmap <S-Down> <Plug>DecrementCommandLineNumber
 
install details
copy cmdline-increment.vim to your plugin directory.
 

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
cmdline-increment.vim 0.2 2009-09-18 7.0 omi taku - plugin is now not using 'l' register.
- below 0 number decrement is newly not supported.
  minial value is 0.
- default mapping is switched to <c-a>, <c-x>.
- custom mapping is supported.
cmdline-increment.vim 0.1 2009-09-17 7.2 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