>Rather than reinventing the wheel, have you tried using the :options >command?
I think I tried the :options by directly edit the vimrc files and test the followings as well: :setlocal nowrap :echo "....long text (longer then window)" Also I seach a lot of books about echo and echohl, etc, but I don't find anything about echo-nowrap, etc > While the command window is a (special kind of) window, the output of :echo > goes > to the command line and 'cmdheight' applies to the command line, too. Since > there is no window (and no buffer), settings like 'wrap' do not apply, and > there's no scrollbar. > > If you don't want your long output to wrap, just :echo that many characters > that > fit into a single line. Functions like strdisplaywidth() and the \%v regexp > atom > will help you make the cut at the correct location, as the width depends on > the > character (think unprintables like ^C, double-width Kanji and the dynamically > sized <Tab>), so a naive use of strlen() (which returns the number of bytes, > not > the width) will only work for a very limited number of characters. > > On the other hand, depending on your use case it may make more sense to > actually > open a "scratch buffer" (:split bufname, then :setlocal buftype=nofile > bufhidden=wipe nobuflisted noswapfile), and use setline() instead of :echo to > display the contents. Many plugins use that approach. That is the point--this means it is just a direct output on the screen...and it cannot be scrolled. I would try the "scratch buffer" first (more difficult for me :/ ). If fail, then I think I have to shorten the length of the text to fit in the window. Anyway, thankyou for your help. -- You received this message from the "vim_dev" 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
