How do you increase a number *directly* under the cursor?

vim decrement number
vim increment letter
spacemacs increment number
vim macro

In vim et al, you can increase or decrease the number your cursor is on by using CTRLA and CTRLX. However, this increases the whole number but I would like to simply increase the number directly under the cursor. It's a little hard to describe so here's what I mean:

Ctrl+A usage, cursor is over the "6":
[6]5 -> 66

What I need:
[6]5 -> 75

or:
3[8]90 -> 3990

I hope that makes sense.

I've googled a bit but I'm not sure if such a shortcut exists so any tips are much appreciated!

In this case, I usually type r and then the digit I want.

Increasing or decreasing numbers | Vim Tips Wiki, The number can be at the cursor, or to the right of the cursor (on the same line). These Put the following script in your vimrc or in a file in your plugin directory. Steps to Change Default Cursor size (increase size of default cursor) in Windows 10. Open your computer, as an administrator, in which you able to access complete settings. In order to change Size of your Default Cursor, you need to choose Setting from start panel.

<C-a> and <C-x> work on whole numbers (1 or more digits) but not on "parts" of a number. However it takes a "count" so 10<C-a> turns [6]5 into 75.

Another option, since you only want to change one digit, would be to do r7 to turn [6]5 into 75.

Vim Editor: How To Increase or Decrease Date, Time, Roman , Ctrl+A to increase the number under cursor; Ctrl+X to decrease the ~/.vim # if the directory does not exist already $ cd ~/.vim/plugin/ $ cp  Position the cursor where you want to start your list. Click the Numbering option in the Paragraph group. Word adds 1. and positions the cursor a bit to the right. Enter your first list item and press Enter to wrap to the next line.

As I guess 3[9]42 shall become 4042 (otherwise, Xavier's solution is almost perfect (*)), I'd use the following:

s/\d*\%#\d/\=(submatch(0)+1)

Which could be mapped into:

nnoremap <silent> µ :<c-u>s/\d*\%#\d/\=(submatch(0)+v:count1)<cr>``

in order to accept a count. The only catch I see is that it cannot support repeat (as in :h .)

(*) In the sense that repeating the command won't help us to increment a series of different numbers by the same amount.

The Blackwell Encyclopedic Dictionary of Management Information , Depending on the key selected, the cursor can move as little as one character There is an increasing number of specialized keyboards available for Called light pens, these devices are placed directly on the screen at the desired location. This function is useful when we have a Ref-Cursor variable with an unknown return structure (A weakly typed Ref-Cursor). In the below example, a Ref-Cursor variable for which the names of the columns of their result set are known, but not their order or types, is converted into a DBMS_SQL cursor number using the TO_CURSOR_NUMBER function.

There's probably a better way, but you can make a macro or something that maps to this:

noremap <LEADER>a a <ESC>h<C-a>lxh
noremap <LEADER>z a <ESC>h<C-z>lxh

It basically makes the "65" "6 5", increments the 6 and removes the space. There is probably a shorter version of this that would work too.

Straight to the Point : 3ds Max 7, or interactively increase or decrease the value by clicking the arrows on the right. for changing the number of decimals displayed in spinners and the increment The Wrap Cursor Near Spinner option keeps the cursor close to the spinner  In vim et al, you can increase or decrease the number your cursor is on by using CTRLA and CTRLX. However, this increases the whole number but I would like to simply increase the number directly under the cursor.

In global command use Ctrlv to insert literal Ctrla that means in normal mode increase every number \d\+ by 10

:g/\d\+/norm! 10 Ctrl-v Ctrl-a

In normal mode you can simply do:

10 Ctrl-a

Using Computers in the Law Office, Entering Data—To enter data, type the text or number in a cell, then press the [​enter] The formula bar is directly under the ribbon and just to the right of the fx sign Drag the pointer to the right or left to increase or decrease the column width,  Clicking the Browse button brings up a list of every cursor installed on your hard drive. Select a cursor from the list and then click Open. After selecting a replacement mouse cursor, it's shown in the Mouse Properties window. In the image below, you can see that we've changed the Normal Select cursor. Click Apply and then OK to save the changes.

Using Computers in the Law Office, C. Entering Data—To enter data, type the text or number in a cell, then press the The formula bar is directly under the ribbon and just to the right of the fx sign Drag the pointer to the right or left to increase or decrease the column width,  To create a numbered list that also contains a letter list in Microsoft Word, follow the steps below. Position the cursor where you want to insert the number list. On the Home tab in the Ribbon, click the down arrow next to the number list button. In drop-down window that appears, select one of the numbered list options with letters.

Windows 8.1, Move the mouse pointer to the upper right hand corner of the screen to reveal the charms. Click on the 'Search' charm – the one with the magnification glass icon. Start studying Adobe Illustrator. Learn vocabulary, terms, and more with flashcards, games, and other study tools.

Power, as the force increases and permits the counterweight to rotate proportionally, The pointer, which moves under a properly calibrated index, moves a point to the with gas-engine direct-connected lighting units. method of connecting the belt the number, the root of which is required, is opposite the same number on the  If there are several files in your 'path' that match the name under the cursor, gf opens the first, while 2gf opens the second, and 3gf opens the third, etc. You can return to the previous buffer using Ctrl-^ or Ctrl-o. File name and line number Edit. Instead of just a file name, you may have a name followed by a line number.

Comments
  • apt and simplest soln for the problem at hand. +1!
  • You can do it with one key (after setting this up ;-)), see my answer.
  • Sweet... now I can go down a list of single digits and "." increasing each one along the way.
  • An even better solution would be to provide exactly what the question asks, in a shortcut: a command to apply to a single digit: that is, to apply the increment to a single digit. I would suggest a keymapping (I don't know how to do it, but here is an idea) that would use ctrl + X/A + another key (such as shift perhaps since it is nearby key easy to press) => changing only current digit. Does this help, as an idea? Good question!!
  • This is exactly what I needed. I'd rather mark Xavier's solution as the accepted answer because it answered my question exactly but this is a better solution for my specific problem. Thanks!
  • Can any one please explain this line ":nnoremap <F9> :exec 's@^(.\{' . (col(".")-1) . '\})(.)(.*)@\1' . (getline(".")[col(".")-1]+1) . '\3@'<CR>".
  • Because I executed this line in vim, it was worked perfectly(It increment the number based on the cursor). But I can't understand what exactly this line did.
  • Pretty funky. I had no idea there would be so many different solutions ;) Thanks!