set an option for terminal buffer

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

set an option for terminal buffer

Marcin Szamotulski
Hello,

I was trying to find out a way how to set options for a terminal buffer
and there seems to be no way to to that. BufAdd and BufEnter trigger to
early (buftype not yet set) and OptionSet autocommand is not triggered.
Is there other way?

Best regards,
Marcin

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

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: set an option for terminal buffer

Bram Moolenaar

Marcin Szamotulski wrote:

> I was trying to find out a way how to set options for a terminal buffer
> and there seems to be no way to to that. BufAdd and BufEnter trigger to
> early (buftype not yet set) and OptionSet autocommand is not triggered.
> Is there other way?

It's in the help:

After opening the terminal window and setting 'buftype' to "terminal" the
BufWinEnter autocommand event is triggered.  This makes it possible to set
options specifically for the window and buffer.  Example: >
   au BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide | endif



--
Married is a three ring circus:
First comes the engagement ring.
Then comes the wedding ring.
Then comes the suffering.

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