65

I was wondering the difference between these text editors and which is best used with Ubuntu?

What are each of them good for? Are there better ones?

Cristiana Nicolae
  • 4,460
  • 9
  • 30
  • 46
myusuf3
  • 33,569
  • 41
  • 88
  • 103

17 Answers17

60

I love Vim. It's so powerful and effective and perfect in every way. However, most of the time I just use gedit, because I'm not as powerful and effective as Vim.

DLH
  • 2,437
  • 4
  • 22
  • 26
  • 6
    how can you call vim "perfect in every way" if you are more "powerful and effective" in gedit? – Bala Clark Aug 05 '10 at 13:54
  • 40
    My own personal weaknesses do not in any way diminish the perfection of Vim. – DLH Aug 05 '10 at 14:51
  • 32
    Is a fine wine any less fine if tasted by someone who prefers the sweetness of grape soda? – DLH Aug 05 '10 at 15:15
  • 11
    Is 2001: A Space Odyssey any less an artistic masterpiece if watched by someone who prefers the fast pacing of Transformers? – DLH Aug 05 '10 at 15:17
  • 7
    You Sir/Madam, made my day! – Paul Hänsch Oct 27 '12 at 23:31
  • 4
    @DLH i have not found a more profound set of statements made in the realm of software tools. I think you just triggered an epiphany. – faizal Aug 12 '14 at 17:08
57

Nano is the easiest to use and learn. A lot of people will swear by Vim and Emacs but Nano is a very good text editor. Nano is good for editing a config file but if you are going to program you'll be better off using Vim or Emacs. Nano supports highlighting. But this is very subjective.

Everyone is going to have their favorite editors for some reason. Find the one that you like the best and use it.

Cody Harlow
  • 1,422
  • 1
  • 16
  • 18
  • 19
    There is an important difference between "easy to use" and "easy to learn". In general, powerful editors like Vim and Emacs are easier to use than a simpler editor, once you have learnt how to use them. Thus, it's a matter of return on investment. Are you going to do a sufficient amount of text editing to justify investing time in learning a more powerful editor? – Jeromy Anglim May 14 '11 at 07:09
  • 2
    https://micro-editor.github.io/ could be a better replacement for user-friendly. If only it was packaged for Ubuntu.. – anatoly techtonik Dec 26 '16 at 09:57
  • @anatolytechtonik very useful, but how to check the installed version? `~$ micro --version` and shows `Version: 0.0.0-unknown` https://github.com/zyedidia/micro/releases/tag/v2.0.8 – Rγσ ξηg Lιαη Ημ 雷欧 May 15 '21 at 15:38
  • @RYOENGLianHu it is already packaged for Ubuntu and reports correct version. You install it with `apt install micro`. – anatoly techtonik May 18 '21 at 08:26
19

Vim can be found on virtually any Linux system, including your embedded devices. It's also very powerful (once you've learned how to use it).

Cristiana Nicolae
  • 4,460
  • 9
  • 30
  • 46
19

Simple answer is ...

Nano is a simple text editor.

Emacs is a full fledged text editor with features for programming. This one is usually easier to learn but is still confusing. This is because advanced features are key combinations like crtl + e (goto end of line).

Vim is like Emacs only it uses a much different form of input. Vim is modal meaning that each key means something different in a different mode.

Basically, Nano is for normal users. Emacs and Vim are for programmers. Take your pick (I'm not taking Vim vs Emacs side for this post lol)

wm_eddie
  • 571
  • 4
  • 5
David Stocking
  • 1,022
  • 9
  • 9
  • Well summarized! – andol Aug 04 '10 at 20:15
  • 6
    +1, however, "Emacs and Vim are for programmers" ?? I use emacs all the time for writing LaTeX documents. – steabert Mar 25 '11 at 22:51
  • 1
    @steabert Sure, Emacs & Vim are useful for other cases such as LaTex. But, andol's sentiment is dead on: the power of vim and emacs comes from using them over & over in use cases where "regex search and replace" or personalized functions / macros are helpful. I don't see a book editor, for instance, "search and replacing" all occurrences of "gigantic" with "titanic". – Mike Williamson Feb 10 '15 at 16:48
  • 4
    If you write LaTeX to generate documents you are essentially still a programmer, Just not in the commonly perceived way. – thenaglecode Mar 06 '15 at 03:44
  • @steabert: Scripting is a form of programming, and LaTeX is a form of scripting. Both use a precise syntax and have similar constructs and concepts. I'd say LaTeX users are doing a kind of programming. ^_^ – jvriesem Feb 06 '20 at 15:36
  • @steabert Preparing Latex documents is programming. You're telling the latex software to what to do using all the latex code, like in HTML or CSS – User Apr 28 '21 at 04:27
14

Another good one to use is Geany, found in the Ubuntu package manager or at geany.org . Has really good features and the built-in terminal window is really nice. I use it for most programming projects. I use VIM alot too, mostly when ssh'd into a server. The built-in Gedit is useful for quick edits and config files.

DLH
  • 2,437
  • 4
  • 22
  • 26
pho3nixf1re
  • 101
  • 2
  • 1
    This is definitely my favorite code/text editor. I use it for almost all my programming. – Tommy Brunn Aug 04 '10 at 21:04
  • 1
    +1 For being so right. Geany is the best editor I have found for code when working on a lot of files. I know you can get the same functionality in VIM but it isn't as easy to navigate as Geany. I use VIM for everything else. – Richard Holloway Aug 04 '10 at 22:20
11

I recommend gedit. It's got color coding for programming code which makes everything from HTML/CSS to PHP easier to read and edit. Emacs can do it, but it takes some effort to learn how to set up and use. Gedit is usable on your first attempt with no documentation required.

Greg
  • 31
  • 4
  • 1
    I use Gedit to code quite complex projects right now. It's simple at the beginning, but it has a lot of plugins that let you add functionality. As an example I have a left panel with a project browser, a Find in Files utility and I python syntax analyzer. On the right panel I have a class browser and the documents view. In the text area I have 3 word completion system (including snippets) and a bunch of helpers (like comment/uncomment blocks). Well, you get the idea. It can grow to be a quite complex editor. – Javier Rivera Aug 05 '10 at 11:19
  • 1
    BTW: I noticed that this post is a "comunnity wiki". Should I just edit the original answer instead of commenting it?. – Javier Rivera Aug 05 '10 at 11:20
  • @Javier what do you use for your class browser? I'm yet to find an plugin that is simple to install. – Bala Clark Aug 05 '10 at 13:56
  • @Bala: Class Browser 0.3, you can find it as gedit-class-browser on the repositories. – Javier Rivera Aug 06 '10 at 13:50
8

I know that this is not a "manly" terminal text editor, but gedit is nice. You can make gedit looks and feel a little bit like TextMate. This article is a bit dated, but will still give you the basic idea... http://rubymm.blogspot.com/2007/08/make-gedit-behave-roughly-like-textmate.html

Kevin Kaske
  • 101
  • 3
  • I'm another gedit fan. It is light weight, has a lot of useful extensions and is also cross platform now and available for Mac & Windows. – Bala Clark Aug 05 '10 at 13:55
  • By adding plugins from the repo, and enablung them, gedit really becomes a very powerful editor. – apoorv020 Mar 01 '11 at 09:03
6

Gedit is simple and lightweight, yes, but does it have any actual advantages over Geany? You have to install a bunch of plugins just to catch up with ordinary built-in features of Geany, like code folding etc.

Whereas Geany plugins will give you extras like version control integration, optional and non-intrusive project management, jumping between function definitions and declarations, etc. And the configurable keybindings available in Geany allow you to set it up pretty much exactly how you like - though the defaults are pretty good too. Gedit can bundle a Python interpreter, but Geany bundles an entire virtual terminal.

Geany doesn't come with Ubuntu, but it's available from the repositories, it's tiny (10MB) + fast, and it provides enough features to compete with full-powered IDEs; less bells and whistles, but better support for actual text editing.

Thrawn
  • 1
  • 1
  • 1
5

Vim takes time to learn, but by the time you've got the hang of it (not just which key to hit when, but getting used to looking at the text that way), you stop about how to type and you can really focus on what to type. It becomes so natural that regular text editors will too hard to use.

Use gvim and choose a theme you like a lot before you start learning, it can make it a more pleasant experience. Eventually you'll find yourself composing your emails in vim!

(Ten-finger touch typing makes vim much easier to learn, so you may like to spend an hour or two with gtypist before trying vim, if you aren't already comfortable with touch-typing)

Umang
  • 6,313
  • 4
  • 20
  • 16
  • 2
    If by theme you mean colorscheme, I suggest beginners pick two: one for normal mode and one for insert mode, making it easy to tell which one you're in. This requires adding, e.g., `autocmd InsertEnter * colorscheme ` and `autocomand InsertLeave * colorscheme ` to your .vimrc. – frabjous Sep 12 '10 at 13:15
  • Most programmers use an IDE. vi or emacs or nano would generally be used to open remote files in a terminal window. Saving a file in GEdit - Ctrl + S. Saving a file in vi - Esc, Colon, w, enter. Now which is faster? And I am a touch typist with 60wpm. – RuntimeException Jul 20 '16 at 10:54
4

Emacs is pretty good. It has syntax highlighting and supports extensions

and is extensible through its embedded dialect of Lisp (elisp). It also has modes for many statistical programs, support for tex, a calendar, mail reading utilies, tetris and even a psychiatrist. Emacs (or Vim, but thats less good for stats) are worth learning as they are both cross platform and support almost every programming language in the world.

2

I like vim because it makes coding feel like a video game. It's worth the learning curve. Why don't more applications behave like vim?

Try the vimperator plugin for firefox.

James
  • 1,755
  • 5
  • 22
  • 28
1

I use geddit with a combo of preferences and plugins. On a new machine I check all the boxes on the first two tabs of preferences, set the tabs to use 4 spaces.

I found the snippets plugin to be a rocker. It does not gives you the whole power of vi or emacs but it's almost there, and uses the same keybindings than any other app in gnome, it's more "understandable" :) at least IMO.

tutuca
  • 2,612
  • 5
  • 30
  • 39
1

I use nano with a whole load of customization for the languages I write. I get a simple UI with as many features as I want.

  • 2
    Please consider describing how and where you find these customizations. Include instructions on how to install. Also helpful would be general instructions on how to use nano. Consider the OP is not familiar with this software and that other readers might not be either. – Anthony Nov 01 '12 at 23:32
1

I prefer gedit over all of those.

Admittedly I have spent next to no time trying vim but the other two I would not bother with.

Gedit is light but still has all the handy features you want like syntax highlighting tabbed pages and word/bracket completion.

Here are some screenshots from their site:

geditScreenshot

I find emacs really horrible to use.

Magpie
  • 1,275
  • 2
  • 12
  • 34
1

Note. Geany is an excellent editor if you have to edit XML-(configuration)-files!

Bernard Decock
  • 466
  • 1
  • 6
  • 16
1

My preferred one is gEdit. If you want to beef up to the level of TextMate you can do it this way:

sudo apt-get install gedit gedit-plugins
cd ~/Downloads
git clone http://github.com/gmate/gmate.git
cd gmate
sh ./install.sh

Oh and check the plugins to enable the cool features you need.

AndyB
  • 439
  • 3
  • 7
1

I don't know anything about Nano and Emacs, but you can configure and extend Vim almost endlessly and it is available on most platforms. On the downside I can't imagine a texteditor with a steeper learning curve.

Oh, and don't forget Ubuntu's default text editor, Gedit. It has a lot of features built in and can be extended via plugins (try sudo apt-get install gedit-plugins)

thbusch
  • 219
  • 2
  • 5