Bug 844975 - RFE: add macros.vim with useful macros for vim plugin packaging
Summary: RFE: add macros.vim with useful macros for vim plugin packaging
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-01 11:43 UTC by Vít Ondruch
Modified: 2018-04-11 16:46 UTC (History)
4 users (show)

Fixed In Version: vim-7.4.1835-1.fc25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-24 11:58:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vít Ondruch 2012-08-01 11:43:13 UTC
I'd like to package some plug-ins for vim. However, there is not an easy way how to determine where the plug-in files should go.

According to a documentation [1], there should be possible to use VIM=`vim -e -T dumb --cmd 'exe "set t_cm=\<C-M>"|echo $VIM|quit' | tr -d '\015' ` to obtain the vim root folder, unfortunately this doesn't work in my .spec file building in Mock (probably some wrong interaction between Python and vim?).

Therefore, would you mind to introduce vim-devel package according to the FPG draft [2], which would provide %{vimfiles} macro? There are already some vim plug-ins which defines the macro by themselves and I believe, this could improve the situation a bit.


[1] http://vimdoc.sourceforge.net/htmldoc/starting.html#$VIM
[2] https://fedorahosted.org/fpc/ticket/196

Comment 1 Karsten Hopp 2012-08-28 12:30:08 UTC
There's no need for that. vim plugins that aren't part of the vim package shouldn't be installed in /usr/share/vim/vim73/plugins. They should be copied to /usr/share/vim/vimfiles/plugin like p.e. the vim-nerdtree package already does.
Vim will look for files in that directory during startup.

Comment 2 Vít Ondruch 2012-08-28 12:51:28 UTC
Yes, I fully agree that they should go into /usr/share/vim/vimfiles/plugin (I never wanted them to go anywhere else) and I'd like to have some macro, which would allow me to don't care about where exactly it goes and I could be sure that it goes wherever is the right location?

In other words, since you are referring to vim-nerdtree, the first line [1] should be removed from the .spec file and instead it would be provided by macros.vim file from vim-devel package, so there cannot be made mistake.



[1] http://pkgs.fedoraproject.org/cgit/vim-nerdtree.git/tree/vim-nerdtree.spec#n1

Comment 3 Bohuslav "Slavek" Kabrda 2012-08-28 13:07:21 UTC
+1 on macros.vim from me. Having hardcoded path in multiple specs is evil and might lead to errors, should this path ever change.

Comment 4 Matěj Cepl 2013-09-09 09:05:12 UTC
+1 (for a maintainer of vim-vimoutliner)

Comment 5 Vít Ondruch 2016-04-13 08:08:48 UTC
Where is this release? It is not build nor committed in dist-git ...

Comment 6 Karsten Hopp 2016-04-13 08:12:16 UTC
I'm currently fixing all those vim bugs, give me a little more time so that I won't have to build vim for every fix. This fix is already in my git repo and will be in the next version

Comment 7 Vít Ondruch 2016-05-24 12:29:06 UTC
Wonderful! Thx.

BTW are you aware, that you can do now something like:

%{?load:%{SOURCE16}}

That way you could reuse the very same macro across the vim.spec. I am using the similar approach in ruby.spec [1] to make sure the same macro is used on every place.


[1] http://pkgs.fedoraproject.org/cgit/rpms/ruby.git/tree/ruby.spec#n98


Note You need to log in before you can comment on or make changes to this bug.