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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityI 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?
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.
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.
~$ micro --version
and shows Version: 0.0.0-unknown
github.com/zyedidia/micro/releases/tag/v2.0.8
May 15, 2021 at 15:38
apt install micro
.
May 18, 2021 at 8:26
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)
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).
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.
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.
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
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.
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)
autocmd InsertEnter * colorscheme <scheme-name>
and autocomand InsertLeave * colorscheme <scheme-name>
to your .vimrc.
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.
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.
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
)
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.
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.
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.
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:
I find emacs really horrible to use.