set nu in my
.vimrc which shows line numbers on the left side of current buffer. I would like to see line numbers on the right side. How to achieve this?
UPDATE: This should also work for
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There's no way, unless you switch the complete UI to right-left mode via
:set rightleft or
$ vim -H. Even common workarounds such as using the signs column (which a plugin used to implement
'relativenumber' before that was built-in) won't do, as those appear on the left as well. The only, very clumsy hack would be a thin scratch buffer in a vertical split on the right, but updating that and maintaining the rightmost position will be a royal pain.
I don't know how hard it would be to modify the source code to do this, but I guess it isn't trivial, and Bram is unlikely to accept such a patch. So, better get over it, sorry.
Hebrew Mode will put the line numbers on the right, with
Hebrew Mode use
Warning: It does reverse your text to rightleft as well