Friday, November 24, 2017

Re: terminal-normal mode highlighting

Jeremy Armstrong wrote:

> > > Is it possible to preserve coloring from the shell (seen in TERMINAL mode) when in TERMINAL-NORMAL mode?
> > > e.g.
> > > 1. In TERMINAL mode (with an interactive shell) issue 'ls --color' and notice the colorized output
> > > 2. <c-\><c-n> and notice the SHELL's coloring is lost
> >
> > Doesn't happen for me, color remains.
> >
>
> Sorry, I should have tested with '-u NONE', ft was getting set to
> text. It works now, thanks.
>
> > > Also, is it possible to see vim's :hls highlighting from TERMINAL mode in TERMINAL-NORMAL mode?
> > > e.g.
> > > 1. in TERMINAL-NORMAL mode do ':set hls ' then search for a string that gets highlighted
> > > 2. <c-n><c-\> and notice the search string is no longer highlighted
> >
> > I assume you use "a" here to go back to Terminal-Job mode.
> Yes.
> >
> > Once you are back in Terminal-Job mode the window will display the
> > contents of the terminal. It would be confusing if mixing with other
> > highlighting.
> >
>
> How about a setting for this? Something like ':set keeptermhls' that defaults to 0?
>
> Konsole has persistent search highlighting ( <ctrl-shift-f> ...search string... <esc> ) and it is very useful for watching for important strings scroll by in stuff like strace output or 'tail -f /var/log/syslog' etc.
>
> Therefore, this feature in terminal mode vim could be greatly
> appreciated by people who prefer lightweight systems.

I'm afraid this is not easy. The searching happens in a buffer, but
what is displayed in the terminal window comes directly from the
terminal emulator. This would require searching in the terminal screen
(difficult and a lot of code) or transfering the text to a buffer,
locating matches and then applying the positions to the terminal window.
That's quite complicated.

--
Tips for aliens in New York: Land anywhere. Central Park, anywhere.
No one will care or indeed even notice.
-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: