11

I was trying to write a string with all chars from z to a and I thought this would be much easier if I could write backwards.

The idea would be like an INSERT mode in which the cursor doesn't step forward after every char inserted. I couldn't find anything like that so I'm wondering if this mode already exists or can be achieved in some way?

Note: I'm aware that I can reverse the text but this is not the point.

1 Answer 1

13

If you set :set revins you can insert backwards.

See also :h ins-reverse:

o  Typing backwards                                     ins-reverse
   ----------------
   In lieu of using full-fledged the 'rightleft' option, one can opt for
   reverse insertion.  When the 'revins' (reverse insert) option is set,
   inserting happens backwards.  This can be used to type right-to-left
   text.  When inserting characters the cursor is not moved and the text
   moves rightwards.  A <BS> deletes the character under the cursor.
   CTRL-W and CTRL-U also work in the opposite direction.  <BS>, CTRL-W
   and CTRL-U do not stop at the start of insert or end of line, no matter
   how the 'backspace' option is set.

   There is no reverse replace mode (yet).

   If the 'showmode' option is set, "-- REVERSE INSERT --" will be shown
   in the status line when reverse Insert mode is active.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.