I have been using Text Editor (gedit) for quite some time to take simple notes and write basic documents. Sometimes I’ll write a blog post in Text Editor to save for later, or when I’m actually able to get online. Today, however, I found that Text Editor has some great features that I was never aware of. I may even come out of my hermit-like use of vim and use this as a replacement.

/me ducks and hides from the barrage of vim lovers.

At first glance Text Editor (Applications > Accessories > Text Editor) looks like a basic text editor. Nothing fancy, nothing out of the ordinary. Some of the base features that are lacking in other editors (or have been lacking) are:

  • Tabs and Tab re-ordering
  • Spell Check
  • Document Stats (number of words, characters, etc)

Some of the awesome features that I wasn’t previously aware of however are outlined below. I hope I’m not the only person that has been in the dark about these or else I’m going to feel like quite the idiot. In any event, to find some of the cooler features you can navigate to Edit > Preferences.

The first tab you’ll see is the View tab. The default settings here are:

  • Enable Text Wrapping
  • Do not split words over two lines

The other options, and I think these would be really useful if you’re working with code are listed below. I now have activated these options:

  • Display line numbers
  • Highlight current line
  • Highlight matching bracket

It is always nice to know the line numbers within your file, particularly if you’re doing any kind of coding. Errors come up in code even for the best of us and finding the guilty line number is the key. Displaying or highlighting the current line is nice, for me, to know where my cursor is. After hours of staring at text and code some days things can become a bit of a blur. Also,highlighting matching brackets sure is nice to make sure you’ve closed that last div or ended that if statement.

The next thing that I’m really excited about is the Syntax Highlighting tab. This is on by default but you can define the language that you’d like it to specifically highlight. I saw just about everything in this list from Ada to XML. Perfect for when I’m working on PHP or perl (which I’ve just decided to try and learn).

Tomorrow I’ll outline one more of the features that really bring this editor above the rest. Enjoy the editor you never knew you had… and great work to the dev team for gedit. This is far more than I expected in a tiny, lightweight package.

If this site has been useful, please consider participating in the Fundraiser.

Other Points of Interest

  • No Related Post

Comments

12 Responses to “How To Make The Best Of Ubuntu Text Editor (gedit)”

  1. Ubuntu | Christer Edwards: How To Make The Best Of Ubuntu Text Editor (gedit) on March 7th, 2007 3:17 pm

    [...] (more&#823 Previous Post: Dennis Kaarsemaker: Nice mail! » Next Post: Mirco Müller: bzr has such a nice gtk+-frontend (olive), but git… *sigh* » Related Reading: [...]

  2. Jason Brower on March 7th, 2007 4:21 pm

    Don’t for get the key strokes…
    I found this one by accident…
    crtl-k inline search
    control f is nice but k comes in handy much more often for me. try it

  3. mathew on March 7th, 2007 4:32 pm

    Just so you’re not tempted away from vim too much:

    * Tabs and Tab re-ordering

    :tabnew

    * Spell Check

    :set spell

    * Document Stats (number of words, characters, etc)

    :set statusline=…

    * Enable Text Wrapping

    :set wrap

    * Do not split words over two lines

    Default vim behavior

    * Display line numbers

    :set nu

    * Highlight current line

    :set cursorline

    * Highlight matching bracket

    Default in vim 7

  4. mathew on March 7th, 2007 4:34 pm

    Just so you’re not tempted away from vim too much:

    * Tabs and Tab re-ordering

    :tabnew

    * Spell Check

    :set spell

    * Document Stats (number of words, characters, etc)

    :set statusline=…

    * Enable Text Wrapping

    :set wrap

    * Do not split words over two lines

    Default vim behavior

    * Display line numbers

    :set nu

    * Highlight current line

    :set cursorline

    * Highlight matching bracket

    Default in vim 7.

    Share and enjoy!

  5. Paul Kishimoto on March 7th, 2007 8:37 pm

    Re: #2 - Ctrl-I opens a similar “go to line” box I also find very useful.

    I depend on the “Indent Lines” plugin (Enable in Edit > Preferences > Plugins). Select multiple lines and use (Shift-)Tab to (un)indent the whole lot. If the lines are tabbed irregularly, Shift-Tab will eventually bring them all flush with the left margin. Very useful when reorganizing code or formatting text!

  6. Yuriy on March 7th, 2007 10:41 pm

    If you like gedit, I hope you tried kate during your stint in KDE.

  7. Lane on March 8th, 2007 8:40 am

    The thing I really miss from other editors (never vim) is the ability to display nonprinting characters (tab, crlf). Or are you going to tell us how to do that?

  8. JayM on March 8th, 2007 12:00 pm

    What about all the plugins?

    With plugins gedit can be a near Visual Studio clone, with Class Browser, an embedded Terminal, and File Manager pane.

    The only thing truly missing is better ctags integration so that one can highlight a function name and find the tag for it.

    There are a couple projects that claim to do this but one requires you to recompile gedit, and the other fails to initialize.

    Once there’s one you can just download then gedit will be in the big leagues!

  9. Stoffe on March 8th, 2007 1:08 pm

    Snippets. Just wish there were more by default, especially for Ruby.

  10. tenco on March 8th, 2007 2:13 pm

    > (…) with Class Browser (…)

    Never knew that such a plugin for gedit existed. o_O wow. Thanks.

  11. max on June 4th, 2007 8:31 pm

    Gedit is OK but what distrubs me about it is that it violates middle-click-paste. You can mcp selections from other programs into a gedit window, but if you select text in gedit and then try mcp it inside the gedit window, nothing happens. However, if you go to a different program, you can actually mcp the text you had selected in the gedit document. That’s just weird and frustrating.

  12. Micah on November 27th, 2007 12:08 pm

    I use Gedit for web development as described here: http://www.micahcarrick.com/09-29-2007/gedit-html-editor.html

    Using plugins, I have the following features
    Work on remote files over SSH and FTP
    Snippets
    Symbol Browser Pane
    File Browser Pane
    XHTML, CSS, and PHP tag list pane
    Syntax Highlighting
    Bracket Matching
    Smart Indenting
    Tidy Validation and Cleanup

Leave a Comment




    Subscribe to the RSS feed!


    subscribe to the ubuntu tutorials RSS feed

    Ubuntu Tutorials Fundraiser


    Please Donate to
    Server Improvement

    Target amount: USD1,000.00
    Total Donations: USD328.00
    Amount Needed: USD672.00

    Thank you for your support!

    Click to Donate

    Polls



  • Blogroll

  • Ads by Google