2

What is a good way to extend the functionality of the ~ (tilde) key in Vim to invert 1s and 0s in text in addition to toggling case?

That is to say, if my cursor is on a 0 or 1 in normal mode and I want ~ to transform it into a 1 or 0 (respectively), what is a good way to accomplish this without changing the normal behavior for alphabetic characters (uppercase/lowercase swap)?

4

1 に答える 1