|
Packit |
1470ea |
|
|
Packit |
1470ea |
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" xmlns:xi="http://www.w3.org/2001/XInclude" type="topic" style="task" id="set-up-gedit.js" xml:lang="fr">
|
|
Packit |
1470ea |
<info>
|
|
Packit |
1470ea |
<link type="guide" xref="beginner.js#tutorials"/>
|
|
Packit |
1470ea |
<revision version="0.1" date="2012-07-17" status="draft"/>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<credit type="author copyright">
|
|
Packit |
1470ea |
<name>Taryn Fox</name>
|
|
Packit |
1470ea |
<email its:translate="no">jewelfox@fursona.net</email>
|
|
Packit |
1470ea |
<years>2012</years>
|
|
Packit |
1470ea |
</credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Luc Rebert,</mal:name>
|
|
Packit |
1470ea |
<mal:email>traduc@rebert.name</mal:email>
|
|
Packit |
1470ea |
<mal:years>2011</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Alain Lojewski,</mal:name>
|
|
Packit |
1470ea |
<mal:email>allomervan@gmail.com</mal:email>
|
|
Packit |
1470ea |
<mal:years>2011-2012</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Luc Pionchon</mal:name>
|
|
Packit |
1470ea |
<mal:email>pionchon.luc@gmail.com</mal:email>
|
|
Packit |
1470ea |
<mal:years>2011</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Bruno Brouard</mal:name>
|
|
Packit |
1470ea |
<mal:email>annoa.b@gmail.com</mal:email>
|
|
Packit |
1470ea |
<mal:years>2011-12</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
|
|
Packit |
1470ea |
<mal:name>Luis Menina</mal:name>
|
|
Packit |
1470ea |
<mal:email>liberforce@freeside.fr</mal:email>
|
|
Packit |
1470ea |
<mal:years>2014</mal:years>
|
|
Packit |
1470ea |
</mal:credit>
|
|
Packit |
1470ea |
</info>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<title>Configuration de gedit pour le développement en JavaScript</title>
|
|
Packit |
1470ea |
This tutorial will show you how to set up <link href="http://projects.gnome.org/gedit/">gedit</link>, GNOME's basic text editor, so that it has a handful of extra features which are useful for writing JavaScript code.
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="view">
|
|
Packit |
1470ea |
<title>Clarification du code</title>
|
|
Packit |
1470ea |
Click on <gui>Edit</gui> in gedit's menu bar, then click on <gui>Preferences</gui>. You should see something like this:
|
|
Packit |
1470ea |
<media type="image" mime="image/png" src="media/geditview.png"/>
|
|
Packit |
1470ea |
Voici les options à activer.
|
|
Packit |
1470ea |
<steps>
|
|
Packit |
1470ea |
<item><gui>Afficher les numéros de ligne</gui> va vous aider à comparer votre code avec l'original et trouver plus facilement la ligne qui provoque une erreur s'il y a un bogue. </item>
|
|
Packit |
1470ea |
<item><gui>Surligner la ligne actuelle</gui> vous permet de retrouver plus facilement votre ligne active quand vous vous déplacez souvent. </item>
|
|
Packit |
1470ea |
<item><gui>Surligner les parenthèses correspondantes</gui> vous permet de penser à refermer la parenthèse. </item>
|
|
Packit |
1470ea |
</steps>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
<section id="edit">
|
|
Packit |
1470ea |
<title>Faciliter l'édition</title>
|
|
Packit |
1470ea |
Dans les <gui>Préférences</gui> de gedit, ouvrez l'onglet <gui>Éditeur</gui>. Cette boîte de dialogue s'affiche :
|
|
Packit |
1470ea |
<media type="image" mime="image/png" src="media/gediteditor.png"/>
|
|
Packit |
1470ea |
Cochez la case <gui>Activer l'indentation automatique</gui>. Cela oblige le curseur à rester sur le même indent qu'à la ligne précédente lorsque vous pressez sur la touche <key>Entrée</key>. Cela est très important en JavaScript car ce langage utilise l'indentation pour clarifier les fonctions de chaque partie du programme.
|
|
Packit |
1470ea |
<note style="tip">If you want to share code with other people who write GNOME JavaScript applications, you'll also want to set <gui>Tab width</gui> to 4 and turn on <gui>Insert spaces instead of tabs</gui>. </note>
|
|
Packit |
1470ea |
</section>
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
|
|
Packit |
1470ea |
</page>
|