<?xml version="1.0" encoding="utf-8"?>
<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="pt-BR">
  <info>
    <link type="guide" xref="beginner.js#tutorials"/>
    <revision version="0.1" date="2012-07-17" status="draft"/>

    <credit type="author copyright">
      <name>Taryn Fox</name>
      <email its:translate="no">jewelfox@fursona.net</email>
      <years>2012</years>
    </credit>

  
    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Rafael Fontenelle</mal:name>
      <mal:email>rafaelff@gnome.org</mal:email>
      <mal:years>2013, 2018</mal:years>
    </mal:credit>
  </info>

  <title>Set up gedit for JavaScript development</title>
  <p>This tutorial will show you how to set up <link href="https://wiki.gnome.org/Apps/Gedit">gedit</link>, GNOME's basic text editor, so that it has a handful of extra features which are useful for writing JavaScript code.</p>

  <section id="view">
    <title>Making code clearer</title>
    <p>Click on <gui>Edit</gui> in gedit's menu bar, then click on <gui>Preferences</gui>. You should see something like this:</p>
    <media type="image" mime="image/png" src="media/geditview.png"/>
    <p>Here are the options you want to make sure are turned on.</p>
    <steps>
      <item><p><gui>Display line numbers</gui> will help you compare the code you type in with the original, and make it easier to see which line is causing an error if there is a bug.</p></item>
      <item><p><gui>Highlight current line</gui> makes it easier to see which line you're on, when you have to go back and forth a lot.</p></item>
      <item><p><gui>Highlight matching brackets</gui> helps you make sure you didn't leave out a bracket by accident.</p></item>
    </steps>
  </section>

  <section id="edit">
    <title>Making editing easier</title>
    <p>In gedit's <gui>Preferences</gui> dialog, click on the <gui>Editor</gui> tab. You should see something like this:</p>
    <media type="image" mime="image/png" src="media/gediteditor.png"/>
    <p>Here, you want to have <gui>Enable automatic indentation</gui> turned on. This means that when you hit <key>Enter</key> the cursor stays indented as far as the last line was. This is extremely useful when writing JavaScript code, since it uses indentation to make it clearer which parts do what.</p>
    <note style="tip"><p>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>.</p></note>
  </section>






</page>
