-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consideration of 'as' (or 'name') option #371
Comments
Thanks for the suggestion. But why do you care? Let vim-plug do what it has to do and just forget about the gritty details. The only reason one would need the option is when two plugins share the same name, but it never happens in practice. vim-plug tries to be a product that just works ™️, so basically I don't recommend changing the directory but if you really must, here's a slightly simpler version: Plug 'kien/ctrlp.vim', {'dir': g:plug_home.'/ctrlp'} |
@zydxhs Side note, if you are going to use ctrlp, note that kien's repo has been dead for a while. There is an active fork made by ctrlpvim organization. You may also want to make use of the faster pymatcher. In your vimrc: As for the issue, I'm likewise puzzled why you want to bother naming things. Don't like the .vim suffix on the directories? |
thanks everyone. |
Can you tell us why? If there is no practical reason you must use different names and if it's just a matter of aesthetics, we're probably not going to add it to vim-plug. Actually this topic was discussed before and we decided not to do it. See #331 |
@zackhsi I'm guessing here but is your use case that you say develop a few plugins and regularly cd into the plugins folders to work on them. I can see that being a nuisance given the name collisions on completion due to common vim- prefix. I'd suggest instead of abusing the dir feature, use local plugs. Example: Plugin comes from URI, you want name x, plugins name is actually vim-x.
|
Hey @starcraftman, think you meant to mention @zydxhs. I'm quite happy with my |
Hehe, little too fast on that completion of names. Anyway, @zydxhs see my above comment. If your desire for naming things is purely cosmetic and not related to dev, well, I just don't think we are going to put such a thing in. |
I'm a typical completist, and I dislike plugin's name which with .vim, and on the other hand, is also in order to resolve the name conflict. |
Yes, but without some real-world examples, the point is moot. I'll leave this issue open. Let's see if we can get some feedbacks from other users. |
ok. |
Heya all and specially @junegunn! I just ended here because I was actually looking for how to resolve a naming conflict. I'm using So yeah, a Edit: after a quick try, So for now, I'll just rename my repository, but the fact that repos with identical names should be managed remains, some day I'm not be owner of one of the repos and forking it then renaming it is not really a viable solution. FYI: here is the used configuration:
|
@chadrien You are correct, in your use case the if a:0 == 1 && has_key(a:1, 'as')
let name = a1['as']
else
let name = fnamemodify(repo, ':t:s?\.git$??')
endif |
Just pushed the implementation to |
I think it would be fine to add it. From a code point of view all it gets added is a |
@junegunn I'm like you kinda on the fence, its not super important but a few people have wanted it. I think I am in favour though, because it is a simple change and lines 453-5 seem cleaner to me. |
@vheon @starcraftman Alright, thanks for the review. |
|
Hi,
I read the readme.md, and find that the "dir" option is the same as vundle's "name" option, but the "dir" option is very difficult to use.
I hope this feature will be improved int the next version. If I am wrong, please add an option like vundle.
for vundle, I Write:
for vim-plug, I must write:
The text was updated successfully, but these errors were encountered: