Vim: Difference between revisions

Jopejoe1 (talk | contribs)
Improve translation support
Jopejoe1 (talk | contribs)
Marked this version for translation
Line 8: Line 8:
=== Basic Install === <!--T:3-->
=== Basic Install === <!--T:3-->


<!--T:73-->
On unstable:
On unstable:


Line 16: Line 17:
<translate>
<translate>


<!--T:74-->
or
or


Line 27: Line 29:
<translate>
<translate>


<!--T:75-->
On 24.05 or older:
On 24.05 or older:


Line 113: Line 116:
If you want a system wide "baseline" configuration for vim/nvim here are two examples:.
If you want a system wide "baseline" configuration for vim/nvim here are two examples:.


<!--T:76-->
On unstable:
On unstable:


Line 125: Line 129:
       name = "vim";
       name = "vim";
<translate>
<translate>
       # Install plugins for example for syntax highlighting of nix files
       <!--T:77-->
# Install plugins for example for syntax highlighting of nix files
</translate>
</translate>
       vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
       vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
Line 133: Line 138:
       vimrcConfig.customRC = ''
       vimrcConfig.customRC = ''
<translate>
<translate>
         " your custom vimrc
         <!--T:78-->
" your custom vimrc
</translate>
</translate>
         set nocompatible
         set nocompatible
         set backspace=indent,eol,start
         set backspace=indent,eol,start
<translate>
<translate>
         " Turn on syntax highlighting by default
         <!--T:79-->
" Turn on syntax highlighting by default
</translate>
</translate>
         syntax on
         syntax on
Line 149: Line 156:
<translate>
<translate>


<!--T:80-->
On 24.05 or older:
On 24.05 or older:


Line 160: Line 168:
       name = "vim";
       name = "vim";
<translate>
<translate>
       # Install plugins for example for syntax highlighting of nix files
       <!--T:81-->
# Install plugins for example for syntax highlighting of nix files
</translate>
</translate>
       vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
       vimrcConfig.packages.myplugins = with pkgs.vimPlugins; {
Line 168: Line 177:
       vimrcConfig.customRC = ''
       vimrcConfig.customRC = ''
<translate>
<translate>
         " your custom vimrc
         <!--T:82-->
" your custom vimrc
</translate>
</translate>
         set nocompatible
         set nocompatible
         set backspace=indent,eol,start
         set backspace=indent,eol,start
<translate>
<translate>
         " Turn on syntax highlighting by default
         <!--T:83-->
" Turn on syntax highlighting by default
</translate>
</translate>
         syntax on
         syntax on
Line 193: Line 204:
       customRC = ''
       customRC = ''
<translate>
<translate>
         " your custom vimrc
         <!--T:84-->
" your custom vimrc
</translate>
</translate>
         set nocompatible
         set nocompatible
Line 249: Line 261:
       name = "vim-with-plugins";
       name = "vim-with-plugins";
<translate>
<translate>
       # add here code from the example section
       <!--T:85-->
# add here code from the example section
</translate>
</translate>
     };
     };
Line 256: Line 269:
         customRC = ''
         customRC = ''
<translate>
<translate>
           # here your custom configuration goes!
           <!--T:86-->
# here your custom configuration goes!
</translate>
</translate>
         '';
         '';
         packages.myVimPackage = with pkgs.vimPlugins; {
         packages.myVimPackage = with pkgs.vimPlugins; {
<translate>
<translate>
           # see examples below how to use custom packages
           <!--T:87-->
# see examples below how to use custom packages
</translate>
</translate>
           start = [ ];
           start = [ ];
Line 288: Line 303:
   name = "vim-with-plugins";
   name = "vim-with-plugins";
<translate>
<translate>
   # add custom .vimrc lines like this:
   <!--T:88-->
# add custom .vimrc lines like this:
</translate>
</translate>
   vimrcConfig.customRC = ''
   vimrcConfig.customRC = ''
Line 308: Line 324:
   vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
   vimrcConfig.packages.myVimPackage = with pkgs.vimPlugins; {
<translate>
<translate>
     # loaded on launch
     <!--T:89-->
# loaded on launch
</translate>
</translate>
     start = [ YouCompleteMe fugitive ];
     start = [ YouCompleteMe fugitive ];
<translate>
<translate>
     # manually loadable by calling `:packadd $plugin-name`
     <!--T:90-->
# manually loadable by calling `:packadd $plugin-name`
</translate>
</translate>
     opt = [ phpCompletion elm-vim ];
     opt = [ phpCompletion elm-vim ];
<translate>
<translate>
     # To automatically load a plugin when opening a filetype, add vimrc lines like:
     <!--T:91-->
# To automatically load a plugin when opening a filetype, add vimrc lines like:
</translate>
</translate>
     # autocmd FileType php :packadd phpCompletion
     # autocmd FileType php :packadd phpCompletion
Line 487: Line 506:
   ps.python-language-server
   ps.python-language-server
<translate>
<translate>
   # the following plugins are optional, they provide type checking, import sorting and code formatting
   <!--T:92-->
# the following plugins are optional, they provide type checking, import sorting and code formatting
</translate>
</translate>
   ps.pyls-mypy ps.pyls-isort ps.pyls-black
   ps.pyls-mypy ps.pyls-isort ps.pyls-black