On 2010-03-16, Conker wrote: > Teemu Likonen-2 wrote: > > > > Your original question is quite common on this list but unfortunately > > Vim just can't operate optimally with very long, wrapped lines. > > > > I just can't believe, that there is no way to customize that. I've not used > vim before, so I'm quite noobish too it, but I liked it, since I first saw > it. I'm probably gonna stick with it - also because I don't want to learn > all different keystrokes again - but this one thing is really bugging me. > Every other editor I know, once I scroll onto a wrapped line, scrolls down > the display for just one screen line and displays only the beginning of > line, the cursor is beeing place on, if it is wrapped - and not all the rest > of it, too, resulting in being pushed out of the current view into a new > view, several screen lines further down. This does not only make reading > continuesly very hard, because your eyes have to move up several lines, but > also is it possible, that in case of very long lines, that don't even fit on > screen when they're wrapped, I will never actually see the last line before > the long one and the long one itsself on screen together, which makes > editing very hard, too. I don't know a lot editors I admit, but this seem > the most unnatural thing to do and I don't see, why it would not be > implemented - at least as an optional view if not as the default. > > > Teemu Likonen-2 wrote: > > > > Option "set display=lastline" is useful, though. > > > > That option I have set but it only effects the display in that way, that the > line is displayed, even though it does not fit on screen. Vim still wants to > show the whole line once you're on it. Also I noticed 'scrolloff', which > specifies, how many text lines to display from the cursor position. Set to > 0, you won't see any line under the cursor, if it is on the last line of the > screen. I guess, if this value was settable to a negative value, vim would > not even insist on displaying the very one line, the cursor is on - but it > is'nt. However, a single option to tell vim, that the value of scrolloff is > too be taken for display lines and not for text lines, would be, what makes > me happy. > > I'm now using a very unsatisfying workaround by setting a value to > 'textwidth', so I don't even get long lines. But this is only applieable to > text passages (like in a tex file) and not to any syntax related stuff (like > also in tex files). > > Still hoping, that there is another more effictive way of doing this.
Vim is basically a graphical line editor. It is designed for editing files containing lines of text that are relatively short. It considers a line to be a fundamental unit of text. A lot of its commands are oriented toward manipulating lines and navigating by lines. This paradigm works really well for files that are structured that way, as most files in Vim's application domain are. Some editors consider a text file to contain one long stream of characters, some of which happen to be end-of-line characters. That's a valid model but it's not Vim's model. One of the consequences of Vim's model is that it can be awkward to edit extremely long lines of text or even lines that are long enough to wrap. A number of commands have been added to Vim to make such editing easier, but you can't get away completely from some restrictions. I'm not aware of any compelling advantages to maintaining text as very long lines, so I don't think there's been a lot of motivation to change that aspect of Vim's behavior. It may not _have_ to be that way, and I don't know Bram's plans for the future, but for now, it _is_ that way. The best solution is probably to adapt your editing style to match Vim's paradigm. For the text portion of TeX files the line length shouldn't matter since TeX ignores the length and type of white space (except for blank lines) anyway. I can't think of any TeX commands that would be so long as to fill an entire screen. Regards, Gary -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
