tpope / vim-pathogen

pathogen.vim: manage your runtimepath

Home Page:http://www.vim.org/scripts/script.php?script_id=2332

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:V* commands blocking tab complete

Rycieos opened this issue · comments

As seen in commit b4f20ff and noted in that commits comments, the commands for V* are still in pathogen, only seeming to exist to explain that they are now in a different plugin. Because these commands are registered, they prevent autocompletion of the same builtin commands.

Ex: type :vsp<TAB>
Expected: vim completes to :vsplit
Actual: vim does not complete and prints two possibilities: Vsplit vsplit

Removing these commands would fix the problem.

How are you getting a capitalized command completed from a lowercase input?

I assumed that it was a default option, but after a search I discovered that it was the ignorecase option.

It seems weird to me that this applies to commands, but since the smartcase options does not seem to, I will use that instead. This does fix this problem for me, so unless you wanted to remove the warning commands, I will close the issue. Thanks for pointing it out.

@Rycieos, 'smartcase' just modifies behaviour of 'ignorecase' and does nothing if 'ignorecase' isn't set.

That would explain why it made the issue go away. I'll reopen this then, since having lazy search is extremely handy. Does anyone know why it is applying to command tab completion instead of just a search?

I think this code is responsible for the behaviour in question. But I don't understand whether it's planned or accidental, because documentation differs from the code. I personally find the behaviour useful sometimes (e.g. :gc<tab> expands to :Gcommit), but it looks strange and feels like too much for one option (a set-like option that gives more control would be more useful). Maybe this should become an issue in Vim repository?

That is a handy feature, I use vim-fugitive as well, and did not know that that was possible with ignorecase. I will leave it on for now, since the benefits outweigh the drawbacks.

I have removed the commands mentioned in this issue from my version of pathogen (Rycieos/vim-pathogen@90220d5e144ceee1b5d83a64703bdd120efe6968), which fixes the problem for me. I will leave it up to @tpope to resolve or close this issue.

As for the setting having weird reaching effects, I agree. I have created vim/vim#991 on this topic.

This is so annoying. I really hate tab completing incorrectly

The open PR #138 in 2014 says you are waiting for v3.0 to remove these commands. But then a year later in 2015 in 84a3dd0 the :Vsplit was removed. But then the very next commit Jan 2016 b4f20ff its added back in.

Which also means that the pathogen README is incorrect..

@tpope Are the :Vedit comamnds solely moved to scriptease or not?

I agree with @mmikeww, I think that if @tpope took a look at those 2 commits, he would agree with us and revert the revert.

I brought them back because I was trying to be diligent about semver and save the removal for 3.0. But it's a dumb user facing feature with a clear migration path so fine, y'all win.