#Vimovember Day 4 - Numbers

If you use CTRL-a and CTRL-x for increment/decrement numbers, do yourself a favor and add the following to your #Neovim configuration.

vim.opt.nrformats:append('blank')

or

set nrformats+=blank

for #Vim

Without this setting, Vim "increments" sprint-23 to sprint-22 (because it interprets -22 as negative)

With the setting, Vim differentiates between

sprint-23 (increments to sprint-24)

and

-23 (increments to -22)

See https://salferrarello.com/vim-increment-number-with-dash/

@salcode :O I didn't know about this option, I'm shocked it's not the default. Thanks!

@Olical Same.

When I went searching for a solution for the `sprint-22` increment I thought there might be plugin but then I was pleasantly surprised there was a setting.

But also disappointed it isn't the default (at least in Neovim). 🤷‍♂️