Skip to content
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

Improvements to handing vim and vim plugins #3122

Closed
wants to merge 7 commits into from

Conversation

tailhook
Copy link
Contributor

This pull request consists of following:

  • Made vimPlugins discoverable by nix-env (just like Fix vimPlugins #2984)
  • Plugins are moved from vim-plugins into share/vim-plugins and added to pathsToLink (in analogy to share/emacs)
  • Added apropriate system vimrc, that populates runtimepath with all the plugin directories, according to NIX_PROFILES. This automatically enables plugins from systemPackages and from all the profiles installed by nix-env. The latest profile overrides earlier. I.e. you can install different version of plugin in user profile that in system. (This is included only in vim_configurable)
  • Removed wrapVim packages. It doesn't work well. And also it only adds vimrc, what's wrong with environment.etc."vimrc".text ? (this makes smaller number of vim versions needed, which is a good thing according to Vim huge nogui #2808)
  • Added few vim plugins: colorsamplerpack (nice color schemes), yankring, ctrlp, vim-a, those are super-useful and are packaged at least in archlinux, also they do not update very frequently. So I feel it's ok to add them to repository.

tailhook added 4 commits June 29, 2014 02:33
Added are:
* ctrlp
* vim-a
* colorsamplerpack
* yankring
I don't see a reason for having wrapVim function and vimWrapper and
vimHugeXWrapper packages. If you need a system vimrc, whats wrong with
``environment.etc."vimrc".text`` ?

Also strictly speaking ``vimHugeXWrapper`` didn't wrap, X-version
properly. I.e. running ``gvim`` have console vim version.
@bjornfor
Copy link
Contributor

bjornfor commented Jul 7, 2014

I'd like to merge this, except for the "Remove wrapVim" commit. I don't use the wrapper, and I agree that wrappers in general can be confusing to users (includes me). But I'd like @wizeman to get a say in this, as he wrote the wrapper. Also worth mentioning, the discussion of the wrapper and some alternatives to it, in issue #959.

@tailhook
Copy link
Contributor Author

tailhook commented Jul 9, 2014

Hm, #959 was helpful indeed. It seems that it was agreed that vimrc should be placed in /etc/vim/vimrc, but it hasn't been done. Also my mistake that I thought that vim would read both PREFIX/share/vim/vimrc and /etc/vimrc. It reads single one. So I've added a config to read /etc/vimrc or /etc/vim/vimrc (the first which exists).

I've also added set nocompatible and syntax on by default as its something that everyone wants in 2014. Also it's enabled in both ubuntu and archlinux (I believe debian, and many other distributions too). And upgraded vim to 7.4.335.

Feel free to apply this pull request without removing wrapVim, but it must be fixed if left in nixpkgs. (Also at least no need to add wrapVim into all-packages, because it's meaningless without customization of vimrc itself)

@wizeman
Copy link
Member

wizeman commented Jul 14, 2014

Since @tailhook's changes source /etc/vimrc (and /etc/vim/vimrc), I am fine with eliminating the wrapper.
Compared to the wrapper, this seems to be a preferred solution (as mentioned in #959).

I have applied these changes on my local nixpkgs and tested that vim compiles, runs and that my /etc/vimrc gets read.

@bjornfor
Copy link
Contributor

Pushed to master (including wrapVim removal). Thanks!

@bjornfor bjornfor closed this Jul 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants