Linux

Gedit: No more text-based editor for you!

29 Apr/10

If you have been reading Ghacks long enough you know I am partial to the Nano text based editor. For many users that editor (or one like it) is all they need. Because of the simplicity of the tools, why slow down your work with a GUI right? But for some, those GUI-less editors are a big turn off. It’s like they are the command line equivalent for text editing. Fortunately, for those, there are alternatives to the text-based editor. In the next few articles I will address this by introducing you to some of the better GUI-fied text editors. In this particular instance, I will introduce you to the GNOME default editor Gedit.

Features

Although simple to use Gedit does not lack power and features. Gedit features:

  • Tools for editing source code as well as mark up languages.
  • Offers syntax highlighting.
  • Uses tabs so you can have more than one file open at a time in the same window.
  • Can edit remote files.
  • Full undo/redo support.
  • Has a flexible plugin system.
  • And much more.

So Gedit should appeal to just about any type of user – no matter your skill level. So now, let’s take a look at this tool.

The GUI

Figure 1

To fire up Gedit click on Applications > Accessories > Gedit Text Editor which will quickly bring up the Gedit main window (see Figure 1). You will notice Gedit looks like your standard text editor. And with this “standard-type” text editor you could easily open any configuration file (some you will need root or sudo access in order to open). Say, for instance, you wanted to edit you wanted to edit your /etc/samba/smb.conf file with this editor. To do this you would have to open Gedit from command like so:

sudo gedit /etc/samba/smb.conf

Figure 2

The above command would allow you to enter your sudo password so you could have read AND write access to the smb.conf file. When you open such a file in Gedit, it will look like what you see in Figure 2. Using this tool will allow you to easily search the file (without using a command like grep) undo/redo any mistakes, easily copy/paste, and more.

But what of that syntax highlighting? You do not get to see it in action when editing a flat .conf file. Let’s take a look at a bash script using Gedit.

Figure 3

Yes, that’s correct, Gedit even does syntax highlighting for scripting. Figure 2 shows a very simple script (one that creates my .sig file for email) open using syntax highlighting for sh scripting.  When you open this file, if the syntax highlighting does not appear by default (or if you want to switch the highlighting style) you can turn it on by clicking View > Highlight Mode > Scripts > sh. If you click on View > Highlight Mode you will see the number of different types of modes available.

If you look at the Tools menu you will also notice Gedit offers a spell check, language set option, and document statistics. Finally, if you click on Edit > Preferences > Plugins you will see the available plugins for Gedit. By default Gedit ships with twelve plugins, not all of which are activated. If you want more you can search your package management system (such as Synaptic) for “gedit” (no quotes) and find more available plugins for installation.

Final thoughts

If you are one that prefers not to use text-based editors, and you use the GNOME desktop, Gedit might be just the tool for you. In the next article I will introduce you to the KDE equivalent Kate.


© for gHacks technology news, 2010. | Permalink | Add to del.icio.us, digg, facebook, reddit, twitter
Post tags: , , , ,

Feed enhanced by Better Feed from Ozh

Continua a leggere – Original Link: Gedit: No more text-based editor for you!

Technorati Tags: , , , , , , ,

Realizzazione Sito Gestionale Immobiliare

Leggi Anche

Condividi
Condividi in DeliciousCondividi in DiggCondividi in RedditCondividi in StumbleCondividi in MixxCondividi in TecnoratiCondividi in Ok Notizie

Commenti

I commenti sono disabilitati per questo articolo.

I commenti sono chiusi.

Autore

    Spina Rosario
    Inserito da

Archivio

Iscrizione Newsletter

    Tieniti informato con tutte le novità del mondo informatico con la nostra newsletter
    Email:

    Nome:

    Auto Shop Italia
    Web Burning Blog
    Info Privacy

Meta