I have accidently :set rl thinking it's for relative lines. I have activated right to left mode. The doc for rightleft doesn't say how to reverse rl mode without exiting vim.

How does one go left to right in vim?

:set norl


:set norightleft

Each boolean option in Vim has a corresponding no-option that turns it off.

The option you were originally looking for might have been relativenumber (rnu), which acts like number (nu) but adds line numbers that are relative to the current line rather than to the start of the editing buffer.

  • 1
    "Most (all?)" all the boolean options. – JoL Apr 12 '17 at 18:50
  • @JoL I wasn't 100% it was all of them, so I didn't want to make a definite statement, and I'm still not entirely certain :-) – Kusalananda Feb 22 at 10:25
  • I haven't tried them all either, but the documentation for :set describes it as a generic syntax rather than some convention: :se[t] no{option} Toggle option: Reset, switch it off.. It also has other syntaxes like :se[t] inv{option}, :se[t] {option}!, and :se[t] {option}?. – JoL Feb 22 at 16:46

Turn options on or off with !

set rightleft!

To quote the Vim help:

                                                           *:set-!* *:set-inv*
:se[t] {option}!   or
:se[t] inv{option}      Toggle option: Invert value. {not in Vi}

You can see this in the built-in Vim help by typing :help :set-! from inside Vim.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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