Closed keks24 closed 1 year ago
Hey, and thanks for opening a pull request!
Couple of things:
1) Some of the changes are not exactly backwards compatible (for example, #?{version}
was introduced in tmux 2.4, some versions of Debian still use Tmux 2.3).
2) I fail to see why you want to duplicate the Vim check command in so many places. I'm not quite sure if that is even 'better' or faster in any way (I notice that Tmux itself is now checking if a pane is Vim or not, instead of spawning a shell process, however this needs to be tested, might not work in all cases, one such case might be over ssh, though, again, it's just pure speculation without trying anything). I do like that we wouldn't have to rely on the external command, but I am not really willing to switch to it unless tested (since the benefits to the user would literally be close to zero).
3) Is there any noticeable performance improvement/any bugs that the PR solves? The PR you mentioned additionally mentioned a 30 second freeze bug. Is this pull request also fixing that? If that's the case, I would kindly ask of you to open a separate pull request just with the fix of the bug, and then we can discuss the changes in this PR further.
Very much appreciated for all the help!
Thank you for quick reply and taking your time!
To answer your concerns:
$is_vim
is always executed and spawns at least four avoidable subshells, when pressing CTRL+hjkl
.
Therefore, I optimised it to use only two subshells and a pseudo substring match, using internal macros only. All commands are executed in a /bin/sh
subshell, so [[ <some_string> == *<some_substring>* ]]
, which is Bash only
does not work.
It is working via ssh
, but I did not test any edge cases.should
fix the freezing issue, since the ps
command caused issues.Anyway, I am going to close this pull-request and let it be for educational purposes.
Hey,
Again, thank you for taking the time to write the improvement. I like the idea of having tmux do all the work, however it needs thorough testing. I might return to this in the future at some point, when I get some free time to test.
Have a good one!
Sure thing!
See https://github.com/christoomey/vim-tmux-navigator/pull/321.