Post

Editeur nano syntaxe highlight

Editeur nano syntaxe highlight

Editeur nano syntaxe highlight

nano syntaxe highlight

Archlinux

1
yaourt -s nano-syntax-highlight
1
2
3
4
5
6
# To install you should add the languages you want to your nano configuration file, system-wide or user-specific
# system-wide: $ echo "include /usr/share/nano-syntax-highlighting/*.nanorc" >> /etc/nanorc
# user-specific: $ echo "include /usr/share/nano-syntax-highlighting/*.nanorc" >> ~/.nanorc

sudo -s
echo "include /usr/share/nano-syntax-highlighting/*.nanorc" >> /etc/nanorc

Debian Jessie

Il faut installer une version plus récente de nano, on va installer celui de la distribution “buster”
Ajouter la distribution au fichier /etc/apt/sources.list

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
sudo -s 
echo "
deb http://ftp.fr.debian.org/debian/ buster main
deb-src http://ftp.fr.debian.org/debian/ buster main
" >> /etc/apt/sources.list

exécuter 

    apt update

Puis

    apt install nano/buster

On copie nano dans le bon chemin

    cp /bin/nano /usr/bin/

Interdire la mise à jour de nano

    echo "nano hold" | dpkg --set-selections

Liste des paquets bloqués

    dpkg --get-selections | grep hold

Supprimer le dépot buster (2 lignes) dans **/etc/apt/sources.list** et mise à jour des dépôts  

    apt update

Version nano

    nano --version

GNU nano, version 2.9.4 (C) 1999-2011, 2013-2018 Free Software Foundation, Inc. (C) 2014-2018 les contributeurs de nano Adr. él. : nano@nano-editor.org Site : http://nano-editor.org/ Compilé avec les options : –disable-libmagic –disable-wrapping-as-root –enable-utf8

1
2
3
Ajout **nano-syntax-highlight**

git clone https://github.com/scopatz/nanorc /tmp/nano-syntax-highlighting mv /tmp/nano-syntax-highlighting /usr/share/nano-syntax-highlighting echo “include /usr/share/nano-syntax-highlighting/*.nanorc” » /etc/nanorc ```

Cet article est sous licence CC BY 4.0 par l'auteur.