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

[RFC][WIP] vim module: support pkg and vimrc specification #19502

Closed
wants to merge 1 commit into from

Conversation

primeos
Copy link
Member

@primeos primeos commented Oct 13, 2016

Motivation for this change

Provide a way to select which vim derivation to use as the system-wide default editor (atm the package must contain ./bin/vim - don't know if something like neovim (./bin/nvim), etc. should be supported as well - but since other options might also be incompatible programs.neovim, etc. would probably make more sense).

Add an option to define a default configuration which is written to /etc/vim/vimrc (doesn't make much sense atm since pkgs.vim doesn't parse this file (not yet, anyway)). However vim_configurable does source /etc/vim/vimrc (and /etc/vimrc) so that works :)

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Add an option for selecting which vim package to use and another one to
define a system wide vimrc (/etc/vim/vimrc - currently ignored).

TODO (WIP):

  • Probably add support for gvim (gvimrc) as well
  • Use a modified vimrc for pkgs.vim that sources /etc/vim/vimrc? (we're currently using The ArchLinux global vimrc)
  • Use /etc/vim/vimrc or /etc/vimrc? (I personally prefer /etc/vim/vimrc since it keeps /etc cleaner if e.g. gvimrc is used as well)

cc @lovek323

@primeos primeos mentioned this pull request Oct 13, 2016
7 tasks
@jagajaga
Copy link
Member

👎

@primeos
Copy link
Member Author

primeos commented Oct 18, 2016

Hey @jagajaga thanks for your feedback but could you please elaborate a bit more on this?

Edit: To be clear I'm a bit confused, especially since I just figured out that you've been the one who merged my previous PR #19438...

I personally think that adding these options is a good idea but of course I could be wrong. If you didn't respond with the "thumb-down" reaction by accident I would be interested what you think is wrong with this so that I could hopefully improve it or understand why this change is a bad idea - Thanks 😄

From the new "Reviewing contributions" chapter (NixOS Manual):

When reviewing a pull request, please always be nice and polite. Controversial changes can lead to controversial opinions, but it is important to respect every community members and their work.

GitHub provides reactions, they are a simple and quick way to provide feedback to pull-requests or any comments. The thumb-down reaction should be used with care and if possible accompanied with some explanations so the submitter has directions to improve his contribution.

Add an option for selecting which vim derivation to use, one to define a
system-wide vimrc (/etc/vim/vimrc) and one to define a system-wide
gvimrc (/etc/vim/gvimrc).
@primeos primeos changed the title [WIP] vim module: support pkg and vimrc specification [RFC][WIP] vim module: support pkg and vimrc specification Oct 19, 2016
@jagajaga
Copy link
Member

Sorry I am angry because I'm learning colemak :)

We had lots of discussions about such configs for such kind of programs. And as a result it war decided that such configs are for services mostly. Vim is not a service.

@jagajaga jagajaga closed this Oct 24, 2016
@primeos
Copy link
Member Author

primeos commented Oct 25, 2016

Hey @jagajaga I guess you don't happen to still remember a link to that discussion, right?

If you do I'd be interested as I consider having a short discussion about that (at least in the IRC channel). And I guess there could've probably been some exceptions for programs like vim (imho having a customized system-wide vimrc could make sense). And looking at the other programs we still have "/etc/atoprc", "/etc/profile", "etc/bashrc", "etc/fish/config.fish", "/etc/screenrc", ... (not all of them are directly accessible via an option tho) - even "/etc/nanorc"!

PS: Good luck with learning colemak then :)

@nbp nbp mentioned this pull request Feb 26, 2017
4 tasks
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.

2 participants