10

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?

wildeyes
  • 1,145
  • 1
  • 9
  • 19

2 Answers2

13
:set norl

or

: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.

Kusalananda
  • 320,670
  • 36
  • 633
  • 936
  • 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 '19 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 '19 at 16:46
4

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.

Wildcard
  • 35,316
  • 26
  • 130
  • 258
m0dular
  • 1,231
  • 7
  • 8