Pregunta

I'm a hardcore VIM-user. However, I wonder whether it's possible to configure VIM to provide a lone-line handling like Nano. Imagine the following text file:

1 This is a short line
2 This is a much much much much much much much (...) much longer line

When I open it in VIM, and like to get to the end of the second line, it's displayed like this (with ■ being where the cursor is):

1 ort line
2 ch much much much much much much (...) much longer line■

When I open in Nano, and navigate to the end of the second line, only this specific line is displayed "shifted", like so:

1 This is a short line
2 >h much much much much much much (...) much longer line■

Can I do this with VIM too?

¿Fue útil?

Solución

Vim is a fixed-width text editor. The problem with your suggested visualization is that when moving to a previous / next line (e.g. via k / j), the cursor would "jump" horizontally on the screen, instead of going straight up.

One could get accustomed to that (the cursor already jumps when the new line is shorter (unless 'virtualedit' is set)), but how would a blockwise visual selection be represented? With jagged edges on both sides?

That's why it's unlikely to be accepted, but don't let this discourage anyone from writing the (non-trivial) patch :-)

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top