kassio / neoterm

Wrapper of some vim/neovim's :terminal functions.
Other
1.32k stars 117 forks source link

Topen just changes current filetype to neoterm and doesn't switch buffer in neovim #229

Closed OliverKnights closed 5 years ago

OliverKnights commented 5 years ago

Apologies if I'm just using this wrong, but after using :Tnew to open a new terminal, changing to a normal buffer, say a .js file, then calling :Topen I expect the buffer the be changed back to the terminal if I'm understanding the documentation correctly, instead the filetype of the .js buffer is changed to neoterm and nothing else happens..

Steps to reproduce

let &runtimepath.=',~/.config/share/nvim/plugged/neoterm'

filetype plugin on


- use :Topen or :Tnew to create a new terminal (this works correctly)
- switch to any other text file (:e ~/random-file.js)
- call :Topen, the filetype changes and the buffer remains the same

Thanks very much!
kassio commented 5 years ago

What do you mean by nothing else happens? Can you add a gif, please?

OliverKnights commented 5 years ago

https://giphy.com/gifs/42CpuO3bzx5BmLrOb4

As the gif shows, the first call to :Topen works and opens a terminal, but if I open another file, and call :Topen again, I expect a new terminal to open? Instead the filetype changes to 'neoterm' and the buffer stays the same