<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Another Home Page Blog - Vim</title><link href="https://blog.anotherhomepage.org/" rel="alternate"></link><link href="https://blog.anotherhomepage.org/feed/tag/Vim/atom" rel="self"></link><id>https://blog.anotherhomepage.org/</id><updated>2015-02-06T09:30:00+01:00</updated><entry><title>vimrc global à son système</title><link href="https://blog.anotherhomepage.org/post/2015/02/06/vimrc-global-pour-le-syst%C3%A8me/" rel="alternate"></link><published>2015-02-06T09:30:00+01:00</published><updated>2015-02-06T09:30:00+01:00</updated><author><name>Nils Ratusznik</name></author><id>tag:blog.anotherhomepage.org,2015-02-06:/post/2015/02/06/vimrc-global-pour-le-système/</id><summary type="html">&lt;p&gt;Quand on utilise Vim, on a tendance à personnaliser sa configuration en ajoutant ses options préférées dans son fichier &lt;em&gt;\~/.vimrc&lt;/em&gt;. Sur un système GNU/Linux (mon expérience porte principalement sur RHEL/CentOS/Fedora), il est possible d'étendre cette personnalisation à tous les utilisateurs d'un système en modifiant &lt;em&gt;/etc/vimrc&lt;/em&gt;. En …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Quand on utilise Vim, on a tendance à personnaliser sa configuration en ajoutant ses options préférées dans son fichier &lt;em&gt;\~/.vimrc&lt;/em&gt;. Sur un système GNU/Linux (mon expérience porte principalement sur RHEL/CentOS/Fedora), il est possible d'étendre cette personnalisation à tous les utilisateurs d'un système en modifiant &lt;em&gt;/etc/vimrc&lt;/em&gt;. En revanche, côté NetBSD, le chemin n'est pas le même. On pourrait naïvement penser qu'il suffit d'utiliser le préfixe &lt;em&gt;/usr/pkg&lt;/em&gt;, hein ? Bein non, loupé : le fichier par défaut pour tous les utilisateurs est &lt;em&gt;/usr/pkg/share/vim/vimrc&lt;/em&gt;. Heureusement, rien d'insurmontable, et quelques liens symboliques bien placés permettront d'harmoniser les configurations sur tous les systèmes.&lt;/p&gt;</content><category term="Logiciels libres"></category><category term="Linux"></category><category term="NetBSD"></category><category term="Vim"></category></entry><entry><title>Coloration syntaxique de fichiers de configuration Apache sous Vim</title><link href="https://blog.anotherhomepage.org/post/2009/11/13/Coloration-syntaxique-de-fichiers-de-configuration-Apache-sous-Vim/" rel="alternate"></link><published>2009-11-13T10:35:00+01:00</published><updated>2009-11-13T10:35:00+01:00</updated><author><name>Nils Ratusznik</name></author><id>tag:blog.anotherhomepage.org,2009-11-13:/post/2009/11/13/Coloration-syntaxique-de-fichiers-de-configuration-Apache-sous-Vim/</id><summary type="html">&lt;p&gt;Une petite astuce qui peut s'avérer pratique si comme moi on apprécie beaucoup la coloration syntaxique de Vim. Je scinde mes virtual hosts en plusieurs fichiers de configuration, en général un par domaine. Or, contrairement au reste des fichiers de configuration classiques d'Apache, et des fichiers de configuration d'applications web …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Une petite astuce qui peut s'avérer pratique si comme moi on apprécie beaucoup la coloration syntaxique de Vim. Je scinde mes virtual hosts en plusieurs fichiers de configuration, en général un par domaine. Or, contrairement au reste des fichiers de configuration classiques d'Apache, et des fichiers de configuration d'applications web (comme phpMyAdmin, Cacti ou Nagios), mes fichiers de virtual hosts ne sont pas colorés. J'ai remarqué que le fichier de configuration Apache de phpMyAdmin sous NetBSD possédait l'en-tête suivante :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;&lt;span class="nv"&gt;NetBSD&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;phpmyadmin&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;conf&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nv"&gt;v&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1.3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2008&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;05&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;03&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;adrianp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Exp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;$&lt;/span&gt;
&lt;span class="o"&gt;#&lt;/span&gt;
&lt;span class="o"&gt;#&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;phpmyadmin&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;configuration&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;fragment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Apache&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;J'ai donc ajouté à mon fichier de virtual host l'en-tête suivante :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;#&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Another&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Home&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Page&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;configuration&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;fragment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Apache&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Et voici mon fichier tout coloré ! A noter qu'au préalable, j'avais activé la coloration syntaxique. Voici un fichier de configuration basique de Vim pour la coloration syntaxique à enregistrer dans &lt;em&gt;\~/.vimrc&lt;/em&gt; :&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;syntax on
set bg=dark
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Si vous utilisez un terminal à fond blanc/clair, remplacez &lt;em&gt;dark&lt;/em&gt; par &lt;em&gt;light&lt;/em&gt;.&lt;/p&gt;</content><category term="Logiciels libres"></category><category term="Apache"></category><category term="Vim"></category></entry></feed>