Thursday, September 21, 2017

Re: :terminal command in Vim 8

2017-09-21 22:16 GMT+02:00, Bram Moolenaar <Bram@moolenaar.net>:
>
> Marco Restelli wrote:
>
>> Dear all,
>> I am experimenting with the :terminal command in Vim 8 after
>> reading about it on this list. The feature is great!
>>
>> I have a couple of questions about it:
>>
>> 1) to enter Terminal-Normal mode I would like to use <ESC> instead of
>> the combination CTRL-W N . I see I can use termkey to define
>> something else as CTRL-W but it would still a combination of two
>> keys. What I would like is using just plain <ESC>
>
> tnoremap <Esc> <C-W>N

Yes, thanks!

>> 2) I would like to automatically set it
>> setlocal bufhidden=hide
>> for each terminal. How could I do this?
>
> This doesn't work very well yet. I'll look into triggering BufWinEnter
> after setting 'buftype'. Once that is done then this will work:
>
> au BufWinEnter * if &buftype == 'terminal' | setlocal bufhidden=hide |
> endif

OK.

Thank you,
Marco

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