terminal-normal mode highlighting

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

terminal-normal mode highlighting

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

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

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: terminal-normal mode highlighting

Bram Moolenaar

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

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.

--
The startling truth finally became apparent, and it was this: Numbers
written on restaurant checks within the confines of restaurants do not follow
the same mathematical laws as numbers written on any other pieces of paper in
any other parts of the Universe.  This single statement took the scientific
world by storm.  So many mathematical conferences got held in such good
restaurants that many of the finest minds of a generation died of obesity and
heart failure, and the science of mathematics was put back by years.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- [hidden email] -- 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: terminal-normal mode highlighting

Jeremy Armstrong
On Thursday, November 23, 2017 at 2:52:37 PM UTC-7, Bram Moolenaar wrote:
> 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.
 

> --
> The startling truth finally became apparent, and it was this: Numbers
> written on restaurant checks within the confines of restaurants do not follow
> the same mathematical laws as numbers written on any other pieces of paper in
> any other parts of the Universe.  This single statement took the scientific
> world by storm.  So many mathematical conferences got held in such good
> restaurants that many of the finest minds of a generation died of obesity and
> heart failure, and the science of mathematics was put back by years.
> -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
>
>  /// Bram Moolenaar -- [hidden email] -- 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    ///
Thanks for implementing terminal mode vim!

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: terminal-normal mode highlighting

Bram Moolenaar

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 -- [hidden email] -- 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.