hkupty / nvimux

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

nvimux maps to default prefix as well as customized prefix #14

Closed hneutr closed 6 years ago

hneutr commented 6 years ago

Hello again! First I'd like to say I appreciate your work on this plugin — I've been off tmux for about a month now and haven't missed it.

I'm on nvim and have a plugin file at plugin/nvimux.vim which defines my prefix as <c-space>. When I run verbose map <c-space>, everything looks peachy — all maps are set up correctly. However, when I run verbose map <c-b> (the default prefix), I find that it is also mapped to all of the nvimux commands. This is a bummer for me, as I dig the default behavior of <c-b>.

This seems like a bug, as when I run scriptnames, I see that the settings at plugin/nvimux.vim are being executed before the nvimux plugin. Unsure what's going on, but it seems to me that if the default prefix is overwritten, it should not be mapped to.

hkupty commented 6 years ago

I've been off tmux for about a month now and haven't missed it.

I'm glad you're enjoying it. This is important to me, thanks.

This seems like a bug, as when I run scriptnames, I see that the settings at plugin/nvimux.vim are being executed before the nvimux plugin.

Hum.. I see what heppens here. Shouldn't actually be a problem as well, because that file only sets up a few commands that, when fired, would call lua, requiring nvimux. I'll try to understand this race condition.

Thanks for the issue!

Cheers, Henry

hkupty commented 6 years ago

I found the reason and fixed it. Now it should have fixed the problem.

Thanks a lot for the issue!

Cheers, Henry

hneutr commented 6 years ago

Hey Henry! This did work but did require a change to my config file for the plugin — namely, that custom bindings defined in nvimux.bindings.bind_all need to be called set before calling nvimux.config.set_all. I bring this up because this was I copied the format of my config from the project's readme.

Thanks again!

hkupty commented 6 years ago

Thanks for the insight! I'll update the Readme.

Cheers!