Vim: Difference between revisions

Wow, what? Citation needed.
Haruki7049 (talk | contribs)
Prepared the page for translation
Line 1: Line 1:
<languages/>
<translate>
[https://www.vim.org/ Vim] (vi improved) is a highly configurable modal text editor program for the terminal.   
[https://www.vim.org/ Vim] (vi improved) is a highly configurable modal text editor program for the terminal.   
== Installation ==
== Installation ==


Line 16: Line 19:
=== Using Home Manager ===
=== Using Home Manager ===


Vim can easily be set up using [[Home Manager]]. Here's a minimal example:
Vim can easily be set up using [[Special:MyLanguage/Home Manager|Home Manager]]. Here's a minimal example:
<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix>
   programs.vim = {
   programs.vim = {
Line 31: Line 34:


=== Vim Spell Files ===
=== Vim Spell Files ===
You can configure home-manager to install spelling files into your user directory by packaging individual spell files.  Here' an example for neovim and French:
You can configure home-manager to install spelling files into your user directory by packaging individual spell files.  Here' an example for neovim and French:


Line 135: Line 139:


== Custom setup without using Home Manager ==
== Custom setup without using Home Manager ==
</translate>
{{note|To get a general overview about how to set up your vim in nix, refer to [https://www.mpscholten.de/nixos/2016/04/11/setting-up-vim-on-nixos.html mpscholten's blog] }}
{{note|To get a general overview about how to set up your vim in nix, refer to [https://www.mpscholten.de/nixos/2016/04/11/setting-up-vim-on-nixos.html mpscholten's blog] }}
<translate>
Vim plugins can be installed with the help of nix. You can omit using vim plugin managers and do everything in your <code>.nixpkgs/config</code>.
Vim plugins can be installed with the help of nix. You can omit using vim plugin managers and do everything in your <code>.nixpkgs/config</code>.


Line 208: Line 215:


=== Using Pathogen as manager ===
=== Using Pathogen as manager ===
There is a pathogen implementation as well, but its startup is slower and [VAM] has more features.  
There is a pathogen implementation as well, but its startup is slower and [VAM] has more features.  
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 235: Line 243:


=== Add a new custom plugin to the users packages  ===
=== Add a new custom plugin to the users packages  ===
Sometimes you do not want to change upstream plugins, for this you can use  <code>vimUtils.buildVimPlugin</code> to create your own:
Sometimes you do not want to change upstream plugins, for this you can use  <code>vimUtils.buildVimPlugin</code> to create your own:


Line 358: Line 367:


=== YouCompleteMe ===
=== YouCompleteMe ===
Currently the youcompleteme plugin uses [https://github.com/NixOS/nixpkgs/blob/8e7b1f2ac2e261d5a644fef860a0d050ea227c06/pkgs/misc/vim-plugins/default.nix#L695 unwrapped clang on linux]. This causes it to not find <code>stdlib.h</code>. There is a [https://github.com/andrewrk/genesis/blob/5f49cd9a8c2b61b9859a22102bc3f732add9461a/.ycm_extra_conf.py workaround] you can put in your <code>.ycm_extra_conf.py</code> file, which works by executing the C/C++ compiler and getting it to output the list of search paths - which includes the search path to find <code>stdlib.h</code>.
Currently the youcompleteme plugin uses [https://github.com/NixOS/nixpkgs/blob/8e7b1f2ac2e261d5a644fef860a0d050ea227c06/pkgs/misc/vim-plugins/default.nix#L695 unwrapped clang on linux]. This causes it to not find <code>stdlib.h</code>. There is a [https://github.com/andrewrk/genesis/blob/5f49cd9a8c2b61b9859a22102bc3f732add9461a/.ycm_extra_conf.py workaround] you can put in your <code>.ycm_extra_conf.py</code> file, which works by executing the C/C++ compiler and getting it to output the list of search paths - which includes the search path to find <code>stdlib.h</code>.


Line 387: Line 397:
</syntaxhighlight>
</syntaxhighlight>


</translate>
[[Category:Applications]]
[[Category:Applications]]
[[Category:Text Editor]]
[[Category:Text Editor{{#translation:}}]]