Vim: Difference between revisions

Python 3 support for vim: delete obsolete section
Wrrrzr (talk | contribs)
Remove deprecated alias
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:


=== Basic Install === <!--T:3-->
=== Basic Install === <!--T:3-->
<!--T:73-->
On unstable:
</translate>
</translate>
<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix>
Line 21: Line 17:


</translate>
</translate>
<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix">
   programs.vim = {
   programs.vim = {
     enable = true;
     enable = true;
     package = pkgs.vim_configurable;
     package = pkgs.vim-full;
   };
   };
</syntaxhighlight>
</syntaxhighlight>
Line 33: Line 29:


</translate>
</translate>
<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix">
   environment.systemPackages = with pkgs; [ vim_configurable ];
   environment.systemPackages = with pkgs; [ vim-full ];
</syntaxhighlight>
</syntaxhighlight>
<translate>
<translate>
Line 62: Line 58:


<!--T:11-->
<!--T:11-->
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:


</translate>
</translate>
Line 111: Line 107:


</translate>
</translate>
<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
{ pkgs, ... }:
{ pkgs, ... }:
{
{
Line 117: Line 113:
     enable = true;
     enable = true;
     defaultEditor = true;
     defaultEditor = true;
     package = (pkgs.vim_configurable.override {  }).customize{
     package = (pkgs.vim-full.override {  }).customize{
       name = "vim";
       name = "vim";
<translate>
<translate>
Line 144: Line 140:
   };
   };
}
}
</syntaxHighlight>
</syntaxhighlight>
<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
{ pkgs, ... }:
{ pkgs, ... }:
Line 206: Line 202:


</translate>
</translate>
<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
{
{
   packageOverrides = pkgs: with pkgs; {
   packageOverrides = pkgs: with pkgs; {
     myVim = vim_configurable.customize {
     myVim = vim-full.customize {
       name = "vim-with-plugins";
       name = "vim-with-plugins";
<translate>
<translate>
Line 236: Line 232:
   };
   };
}
}
</syntaxHighlight>
</syntaxhighlight>
<translate>
<translate>


Line 250: Line 246:


</translate>
</translate>
<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
vim_configurable.customize {
vim-full.customize {
   name = "vim-with-plugins";
   name = "vim-with-plugins";
<translate>
<translate>
Line 262: Line 258:
   '';
   '';
}
}
</syntaxHighlight>
</syntaxhighlight>
<translate>
<translate>


Line 271: Line 267:


</translate>
</translate>
<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
vim_configurable.customize {
vim-full.customize {
   vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
   vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
<translate>
<translate>
Line 291: Line 287:
   }
   }
};
};
</syntaxHighlight>
</syntaxhighlight>
<translate>
<translate>


Line 333: Line 329:


</translate>
</translate>
<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
let
let
   vim-better-whitespace = pkgs.vimUtils.buildVimPlugin {
   vim-better-whitespace = pkgs.vimUtils.buildVimPlugin {
Line 346: Line 342:
in {
in {
   users.users.<yourNickname>.packages = [
   users.users.<yourNickname>.packages = [
     (pkgs.vim_configurable.customize {
     (pkgs.vim-full.customize {
       vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
       vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
         start = [ vim-better-whitespace ];
         start = [ vim-better-whitespace ];
Line 353: Line 349:
   ];
   ];
};
};
</syntaxHighlight>
</syntaxhighlight>
<translate>
<translate>


Line 415: Line 411:


<!--T:59-->
<!--T:59-->
The following snippet will make a full featured python IDE.
The following snippet will make a full featured [[python]] IDE.


==== Using language client ==== <!--T:60-->
==== Using language client ==== <!--T:60-->


</translate>
</translate>
<syntaxHighlight lang="nix">
<syntaxhighlight lang="nix">
vim_configurable.customize {
vim-full.customize {
   vimrcConfig = {
   vimrcConfig = {
     customRC = ''
     customRC = ''
Line 439: Line 435:
     }
     }
};
};
</syntaxHighlight>
</syntaxhighlight>
<translate>
<translate>


Line 481: Line 477:


<!--T:71-->
<!--T:71-->
<code>gvim</code> and <code>gview</code> may be installed using the <code>[https://search.nixos.org/packages/?query=vimHugeX vimHugeX]</code> attribute name (package name <code>[https://search.nixos.org/packages/?query=vim_configurable vim_configurable]</code>).
You can enable <code>guiSupport</code> to make <code>gvim</code> available, though this won't give you <code>gview</code>:


</translate>
</translate>
<syntaxhighlight lang=bash>
<syntaxhighlight lang="nix">
$ nix-env -iA nixos.vimHugeX
(pkgs.vim-full.customize {
</syntaxhighlight>
   guiSupport = true;
<translate>
})
 
<!--T:72-->
If you are using <code>vim_configurable.customize</code>, you can enable <code>wrapGui</code> to make <code>gvim</code> available, though this won't give you <code>gview</code>:
 
</translate>
<syntaxhighlight lang=nix>
vim_configured = pkgs.vim_configurable.customize {
   name = "vim";
  wrapGui = true;
};
</syntaxhighlight>
</syntaxhighlight>
<translate>
<translate>