Nvim-R
Nvim-R copied to clipboard
indentation should not indent Roxygen comments
I may be doing things incorrectly, because I've been using vim mode for many years and therefore might have a messed-up .vimrc
file, but what I'm finding is that Roxygen comments, which have #'
as the first two characters on a line, get space added to the left when I indent. Is there a setting that will avoid that? I ask because I use indentation quite frequently, and every time, I have to do a %s/^[ ]+#'/#'/
to fix the problem. Obviously, that's not hard to do, but it would be great if I could put something in my ~/.vimrc
to prevent my having to do that.
PS. Another thing I'd love would be if indentation would not break within a quoted string.
Can you try this
:h si
When typing '#' as the first character in a new line, the indent for
that line is removed, the '#' is put in the first column. The indent
is restored for the next line. If you don't want this, use this
mapping: ":inoremap # X^H#", where ^H is entered with CTRL-V CTRL-H.
When using the ">>" command, lines starting with '#' are not shifted
right.