✨ New post

Vim tip: more intuitive CTRL-A (adding) and CTRL-X (subtracting)

https://pawelgrzybek.com/vim-tip-more-intuitive-ctrl-a-adding-and-ctrl-x-subtracting/

#vim #neovim

Vim tip: more intuitive CTRL-A (adding) and CTRL-X (subtracting) | pawelgrzybek.com

Adding and subtracting numbers in Vim is something I use all the time. The default config for this feature is not the most intuitive for me, though.

pawelgrzybek.com
@pawelgrzybek why did noone tell me about this before!?!? but reading the documentation, it seems that what i want is really "blank", not "unsigned", as "unsigned" will prevent the number from going negative, which i will do from time to time. anyway, i'll be adding "blank" right away to my config!!

@emmanueltouzery Maybe it is also what I need! Hahaha, I didn't spent too much time reading about all the options. I found what I need in 12 seconds and published a blog post in another 12 seconds.

Thanks for reading and have a fab day Emmanuel

@pawelgrzybek i've now set it to `vim.o.nrformats = "bin,hex,blank"` since bin and hex are already there by default and seem useful. probably `+= "blank"` would also work but this is good enough. anyway, thanks again!