Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching from/to Neoterm split #53

Closed
FuzzOli87 opened this issue Nov 30, 2015 · 17 comments
Closed

Switching from/to Neoterm split #53

FuzzOli87 opened this issue Nov 30, 2015 · 17 comments
Labels

Comments

@FuzzOli87
Copy link

When there is a neoterm controlled terminal split open, switching to it and from it causes a new buffer to open up leading to a bunch of empty buffers.

@FuzzOli87
Copy link
Author

Might actually be an issue with one of my configs that put's terminals into "insert" mode.

au BufEnter * if &buftype == 'terminal' | :startinsert | endif

@kassio
Copy link
Owner

kassio commented Nov 30, 2015

I wasn't able to replicate this problem. I tried to use this config you mentioned, but even though wasn't able to replicate. Can you give me more information, please?

@trinhanhngoc
Copy link

Reproduce:

:Topen
:Tclose
:Topen

@kassio
Copy link
Owner

kassio commented Dec 30, 2015

Using those steps I still not able to reproduce:

topenclose

What's your neoterm and neovim's version?

@trinhanhngoc
Copy link

neoterm

Neovim 0.1.1

@kassio
Copy link
Owner

kassio commented Jan 3, 2016

By default neoterm keeps the terminal buffer in the background. If you want to change this behaviour you must unset the g:neoterm_keep_term_open.

@kassio kassio closed this as completed Jan 3, 2016
@trinhanhngoc
Copy link

No. As you can see in my gif, Topen and Tclose many times cause creating many empty buffers (show as [* No Name] in ctrlp).

@kassio
Copy link
Owner

kassio commented Jan 3, 2016

My bad, I didn't see it before. I'll investigate more.

@kassio kassio added bug and removed needs more info labels Jan 3, 2016
@kassio
Copy link
Owner

kassio commented Jan 3, 2016

Investigating a little bit better I found that this is a bug on vim, not even neovim since vim has the same bug. To reopen a neoterm buffer I use the :new +buffer<id> command, but this creates an empty buffer:

empty_buffer

I created an issue on vim repository to fix this problem. As soon as the vim creates a patch for it, I'll open an issue on neovim to update with the patch.

@kassio kassio closed this as completed Jan 3, 2016
kassio added a commit that referenced this issue Jan 3, 2016
Related with #53.

This will not fix the problem of create an empty
buffer with many `Topen`/`Tclose`, since this is a bug on vim
(vim/vim#546). However when vim/neovim fix the
problem it'll be automatically fixed on neoterm.
@kassio kassio reopened this Jan 3, 2016
@kassio kassio closed this as completed in 34a3fd6 Jan 3, 2016
@trinhanhngoc
Copy link

With last commit, i can not reopen term buffer.

Topen
Tclose
Topen -> open current buffer instead of term buffer in split window

@kassio kassio reopened this Jan 4, 2016
@FuzzOli87
Copy link
Author

I'm experiencing the same bug as well. I should of looked here before spending an hour going through each and every one of my keybindings.

1 similar comment
@FuzzOli87
Copy link
Author

I'm experiencing the same bug as well. I should of looked here before spending an hour going through each and every one of my keybindings.

@FuzzOli87 FuzzOli87 reopened this Jan 4, 2016
@FuzzOli87
Copy link
Author

Sorry, my phone froze and I pressed the wrong button.

@kassio
Copy link
Owner

kassio commented Jan 4, 2016

Sorry people, on my refactoring step I wrongly removed the buffer reference from the command. It's working now (I hope 🙏)

@kassio kassio closed this as completed in a606979 Jan 4, 2016
@luofish
Copy link

luofish commented May 10, 2017

hi, @kassio. I find Topen&Tclose working now, but use Ttoggle will produce one empty buffer

@kassio
Copy link
Owner

kassio commented May 11, 2017

@luofish can you give more information, or a gif, please?

@luofish
Copy link

luofish commented May 15, 2017

hi, @kassio I use latest neovim version 0.2.1dev. map F4 to Ttoggle.
neoterm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants