I'm looking for a way to make a line be only logically broken at the end of the available space. Here's an example: let's suppose I have a really long line (i.e. a string without any
\n in it), and to render it on the screen, ViM must split it, so, by turning on line numbers I see
1: This is the beginning of my very very very long line that does not fit ViM's window and therefore it must be split into two lines. 2: And this is another line of text
Now, if I'm in normal mode, I can move from line 1 to line 2 by using
j, but I have no ways to move from the word "beginning" to the word "therefore", apart from
gj which I find slow. I tried to remap
gj, only for the filetypes I'm interested in (I wouldn't ever do this with C source files for example), but this gives me another issue: relative numbers do not work anymore. If I'm on line 1 and type
d1j only the first two "logical lines" are deleted (which in my example they correspond to the whole line 1). So I'm looking for a way to move inside the lines pretending they're logical lines (i.e. by
gking) and work with the physical lines.
I tried with the
textwidth option, but it physically breaks the lines, so it's not exactly what I'm looking for.
Thanks in advance.