hkupty / nvimux

Neovim as a TMUX replacement
Apache License 2.0
445 stars 17 forks source link

Rename terminal buffer <prefix>, #2

Closed mcchrish closed 8 years ago

mcchrish commented 8 years ago

Or probably using a command like :NvimuxRename new-terminal-buffer-name-here. I see that this plugin was able to change the buffer name. Also, possibly preserving the prefix term:// in the name since some have auto commands to automatically enter insert mode when in a terminal buffer and they use the name to distinguish the terminal buffers.

hkupty commented 8 years ago

As far as this is a term-only, I'm ok with that. Renaming a file buffer may be dangerous. I'm also fine with keeping term://, but, just as a tip, instead if trying to match term:// on buffers name, it's better to check if &buftype == 'terminal'.

mcchrish commented 8 years ago

Oh, didn't know about that. Thanks for the tip!

Yes, it should be term-only.

mcchrish commented 8 years ago

I guess a different strategy is to allow nvimux to use Terminus (or any custom spawner) as terminal command similar to how it is done with neoterm integration.

hkupty commented 8 years ago

In a near future I plan to drop current implementation of neoterm and allow custom term wrappers into nvimux. This will allow Terminus, Neoterm, plain Nvimux or custom user functions to manipulate terminals..

hkupty commented 8 years ago

I didn't update the docs, but you can either <prefix>,, which will open an input asking for the name or NvimuxTermRename new-term-name. Both will prefix term:// on the new terminal name.

mcchrish commented 8 years ago

Oh, that was quick. Excellent. Just tested right now and just works. Thanks @hkupty

hkupty commented 8 years ago

No problem :)