Re: [RFC] vim-minimal in Base?
On 2013-05-14 05:19, Frank Fesevur wrote: It overrides the symlink from vi to vim.exe and so this breaks my current setup: $ vi Error detected while processing /home/Frank/.vimrc: line1: E319: Sorry, the command is not available in this version: syntax on Press ENTER or type command to continue Any thought other then fixing the symlink manually? Well, you could make your .vimrc more portable: if has(syntax) syntax on endif However, it looks like Fedora works around this by using ~/.virc (instead of vimrc) with the vi binary. I'll try to get that into a new release soon. Yaakov
Re: [RFC] vim-minimal in Base?
On 2013-05-14 06:27, Corinna Vinschen wrote: Er... what? Since when does syntax highlighting require perl? Not directly: syntax highlighting requires files from vim-common, which pulls in perl due to other perl scripts contained therein. The old vim package I compiled when I maintained it was built with the --with-features=huge setting but didn't pull in any of the possible dependencies. No perl, no python, no ruby. But syntax highlighting worked fine. The vim package still provides the huge feature set, now with the addition of lua/perl/python/python3/ruby support (dynamically loaded). Basically, if you want features, keep using vim. Otherwise, ex/vi (vim-minimal) provides the basic POSIX functionality. The big change is that vi != vim anymore. Apart from that, I guess calling vi (and that's what *many* users are used to) will now result in the same error Frank reported. The workaround will be to use ~/.virc with vi. Any chance to build vim-minimal with a bigger default set of features which is only based on avoiding external deps? The bigger feature sets require the support files in vim-common, and *that* is the dependency which needs to be avoided for a minimal, Base-worthy ex/vi. Yaakov
Re: [RFC] vim-minimal in Base?
2013/5/20 Yaakov (Cygwin/X): Basically, if you want features, keep using vim. Otherwise, ex/vi (vim-minimal) provides the basic POSIX functionality. The big change is that vi != vim anymore. Apart from that, I guess calling vi (and that's what *many* users are used to) will now result in the same error Frank reported. The workaround will be to use ~/.virc with vi. But why vi != vim? alternatives fixes this on Debian/Ubuntu. Why not use it on Cygwin? vim-7.3.762 used a update-alternative in its postinstall script when there was no conflict (at least not on my setup with X). But vim-7.3.943 doesn't have it anymore. alternatives is in base, it is made to solve these kinds of conflicts. Why did you stop using it now that the conflict really started to happen? Letting the postinstall scripts return with the proper priority fixes the problem. It works perfectly when I run it manually. The command vi is always available and automatically uses the best version of vim. My steps: renamed vi.exe to vim-minimal.exe renamed vim.exe to vim-nox.exe Run these commands: (add as postinstall scripts): /usr/sbin/update-alternatives \ --install /usr/bin/vim vim /usr/bin/vim-minimal.exe 10 \ --slave /usr/bin/vi vi /usr/bin/vim-minimal.exe \ --slave /usr/bin/view view /usr/bin/vim-minimal.exe \ --slave /usr/bin/vimdiff vimdiff /usr/bin/vim-minimal.exe \ --slave /usr/bin/rvim rvim /usr/bin/vim-minimal.exe \ --slave /usr/bin/rview rview /usr/bin/vim-minimal.exe /usr/sbin/update-alternatives \ --install /usr/bin/vim vim /usr/bin/vim-nox.exe 30 \ --slave /usr/bin/vi vi /usr/bin/vim-nox.exe \ --slave /usr/bin/view view /usr/bin/vim-nox.exe \ --slave /usr/bin/vimdiff vimdiff /usr/bin/vim-nox.exe \ --slave /usr/bin/rvim rvim /usr/bin/vim-nox.exe \ --slave /usr/bin/rview rview /usr/bin/vim-nox.exe Now vi links to the best vim available. $ /usr/sbin/update-alternatives --display vim vim - status is auto. link currently points to /usr/bin/vim-nox.exe /usr/bin/vim-minimal.exe - priority 10 slave rview: /usr/bin/vim-minimal.exe slave rvim: /usr/bin/vim-minimal.exe slave vi: /usr/bin/vim-minimal.exe slave view: /usr/bin/vim-minimal.exe slave vimdiff: /usr/bin/vim-minimal.exe /usr/bin/vim-nox.exe - priority 30 slave rview: /usr/bin/vim-nox.exe slave rvim: /usr/bin/vim-nox.exe slave vi: /usr/bin/vim-nox.exe slave view: /usr/bin/vim-nox.exe slave vimdiff: /usr/bin/vim-nox.exe Current `best' version is /usr/bin/vim-nox.exe. Add the corresponding preremove scripts: /usr/sbin/update-alternatives --remove vim /usr/bin/vim-minimal.exe /usr/sbin/update-alternatives --remove vim /usr/bin/vim-nox.exe Are there any reasons not to use this? Regards, Frank
Re: [RFC] vim-minimal in Base?
On 5/13/2013 21:28, Yaakov (Cygwin/X) wrote: As these utilities are required by POSIX[1], should the vim-minimal package be added to Base? As long as when I install vim-kitchensink setup.exe knows how to quietly replace vim-minimal, I'm happy to see Vim in Base. Yes, truly happy. Gone are the days when I forget to install an editor on a new Cygwin install, then have to go re-run setup to fix that. I expect I'll now find myself running vim-minimal for months on some boxes, purely because I got it by default and it's good enough.
Re: [RFC] vim-minimal in Base?
On May 14 01:07, Warren Young wrote: On 5/13/2013 21:28, Yaakov (Cygwin/X) wrote: As these utilities are required by POSIX[1], should the vim-minimal package be added to Base? As long as when I install vim-kitchensink setup.exe knows how to quietly replace vim-minimal, I'm happy to see Vim in Base. Yes, truly happy. Gone are the days when I forget to install an editor on a new Cygwin install, then have to go re-run setup to fix that. I expect I'll now find myself running vim-minimal for months on some boxes, purely because I got it by default and it's good enough. In theory I agree. Still... What bugs me with vim-minimal on Fedora is usually that it's lacking basic vim functionality, even if it does not rely on external packages. I'm not quite sure if I remember correctly, but in the past I think I even had problems with color settings for syntax decoration, which forced me to use the vim-enhanced package. And I'm really not using any complicated stuff, like text folding or so... So my question is, is vim-minimal at least more or less feature complete as far as the feature doesn't require external dependencies? Apart from that, yes, vim-minimal should be a Base package, finally ;) Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Re: [RFC] vim-minimal in Base?
2013/5/14 Warren Young wrote: On 5/13/2013 21:28, Yaakov (Cygwin/X) wrote: As these utilities are required by POSIX[1], should the vim-minimal package be added to Base? As long as when I install vim-kitchensink setup.exe knows how to quietly replace vim-minimal, I'm happy to see Vim in Base. And the other way around? On existing installations it should not replace the full vim with the minimal one when it is added to Base. I expect I'll now find myself running vim-minimal for months on some boxes, purely because I got it by default and it's good enough. I had to do a clean installation today and installed vim-minimal. It worked fine for the occasional editing I needed to do. Thanks! Regards, Frank
Re: [RFC] vim-minimal in Base?
On 2013-05-14 02:59, Corinna Vinschen wrote: What bugs me with vim-minimal on Fedora is usually that it's lacking basic vim functionality, even if it does not rely on external packages. I'm not quite sure if I remember correctly, but in the past I think I even had problems with color settings for syntax decoration, which forced me to use the vim-enhanced package. And I'm really not using any complicated stuff, like text folding or so... So my question is, is vim-minimal at least more or less feature complete as far as the feature doesn't require external dependencies? I followed Fedora's lead and compiled vim-minimal --with-features=small, which excludes many features and avoids the need for vim-common (which requires perl and xxd, the former of which being what started this discussion), which e.g. syntax highlighting would require. But this affects *only* ex/vi; vim/view/vimdiff/vimtutor and evim/gvim/etc. are fully loaded, and now more than ever with the (dynamically loaded) lua/perl/python/python3/ruby interfaces. Apart from that, yes, vim-minimal should be a Base package, finally ;) Done. Yaakov
Re: [RFC] vim-minimal in Base?
2013/5/14 Yaakov (Cygwin/X): Apart from that, yes, vim-minimal should be a Base package, finally ;) Done. It overrides the symlink from vi to vim.exe and so this breaks my current setup: $ vi Error detected while processing /home/Frank/.vimrc: line1: E319: Sorry, the command is not available in this version: syntax on Press ENTER or type command to continue Any thought other then fixing the symlink manually? Regards, Frank
Re: [RFC] vim-minimal in Base?
2013/5/14 Frank Fesevur: It overrides the symlink from vi to vim.exe and so this breaks my current setup: $ vi Error detected while processing /home/Frank/.vimrc: line1: E319: Sorry, the command is not available in this version: syntax on Press ENTER or type command to continue Raspbian and Ubuntu install vim.tiny and vi.basic executables and then use alternatives to avoid the conflict. I don't very little about alternatives, but I guess something similar must be possible on cygwin as well. Install them as vim.tiny.exe and vim.basic.exe (or whatever the right name is) and add a postinstall script to vim-minimal and update the existing postinstall script for vim. The /etc/postinstall/vim.sh.done currently on my system uses update-alternatives and refers to /usr/bin/vim-nox.exe but that is not in /usr/bin. The postinstall of vim.common refers to vim-nox.exe as well. And I assume the order of running the postinstall scripts is important. Regards, Frank
Re: [RFC] vim-minimal in Base?
On May 14 04:35, Yaakov (Cygwin/X) wrote: On 2013-05-14 02:59, Corinna Vinschen wrote: What bugs me with vim-minimal on Fedora is usually that it's lacking basic vim functionality, even if it does not rely on external packages. I'm not quite sure if I remember correctly, but in the past I think I even had problems with color settings for syntax decoration, which forced me to use the vim-enhanced package. And I'm really not using any complicated stuff, like text folding or so... So my question is, is vim-minimal at least more or less feature complete as far as the feature doesn't require external dependencies? I followed Fedora's lead and compiled vim-minimal --with-features=small, :( which excludes many features and avoids the need for vim-common (which requires perl and xxd, the former of which being what started this discussion), which e.g. syntax highlighting would require. Er... what? Since when does syntax highlighting require perl? The old vim package I compiled when I maintained it was built with the --with-features=huge setting but didn't pull in any of the possible dependencies. No perl, no python, no ruby. But syntax highlighting worked fine. Apart from that, I guess calling vi (and that's what *many* users are used to) will now result in the same error Frank reported. Any chance to build vim-minimal with a bigger default set of features which is only based on avoiding external deps? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat
Re: [RFC] vim-minimal in Base?
On 5/14/2013 04:19, Frank Fesevur wrote: Any thought other then fixing the symlink manually? I fixed it with alias vi=vim in my .bashrc. I've had to do that on assorted Linuxes before, too.
Re: [RFC] vim-minimal in Base?
On Mon, May 13, 2013 at 10:28:32PM -0500, Yaakov (Cygwin/X) wrote: As announced moments ago, I just moved ex/vi into a vim-minimal package, compiled with the 'small' feature set and not dependent on vim-common (hence nor perl). As these utilities are required by POSIX[1], should the vim-minimal package be added to Base? Sounds like they should be. I hope you made vim-minimal rely on a few latex packages at least... cgf