GNU Moe Tutorial/Review
Yesterday I was looking at a listing of updates for free software projects. I commented that the package moe could be used as a replacement for
zile, that is, when you need to quickly edit files from the command-line.
So today I’m giving it a go. I downloaded moe via the GNU project’s FTP server and installed it. The compilation was insanely fast, I think it took less than 10 seconds to get it all built and installed.
This blog post is a small tutorial (and a bit of a review) for using
moe and is actually being written in it. I’m learning as I’m doing and this is usually the best way to learn anything. The manual for
moe is, well it doesn’t exist. When you first enter
moe you are confronted with a blank screen and a title bar at the top of it.
The title bar lists:
- the command key being used (if any)
- the current mode of the text editor, either “I” for “Insert” or “O” for “Overwrite”
- the name of the file being edited
- whether it has been modified and needs to be save
- which line you are on
- which column you are at
- the time (in 12-hour clock with no AM/PM indicator)
- a helpful reminder telling you to press “F1 for help”
nano only tells you the version of GNU
nano that you are using and the name of the file. Nano also helpfully lists some commands at the bottom of its screen.
The first command key I used was of course
"F1", the help key. Moe uses the function keys for saving files, loading files, undo and redo, the options menu, the buffers menu and some other things which I will get into as I come across them.
The second command key that I used was
Ctrl+C. If the current file being edited is Modified, it will ask if you want to “lose your changes”. If you press “n” meaning “No I don’t want to lose my changes”, it will save the file. I think this is better than asking if you want to save your changes. The way the question is posed is different and highlights the fact that you will lose whatever you were working on.
In terms of typing,
moe hasn’t gotten in the way at all. In fact, it has provided two useful command keys;
Ctrl+Y which kills/deletes a whole line of text, and
Ctrl+B which re-formats a paragraph by wrapping it at a certain column (I think column 72). The re-formatting is very useful when you’re on a regular terminal. Right now I’m in the shell that you get before running any desktop system. The screen can only handle 80-character columns right now. You can set the column to whatever you like in the Options menu (accessed by pressing
Okay, I just pressed
F2 to save the file. It asked me for a new name or location for the file, but luckily it already provides the same name as before. So saving the changes is a matter of pressing
F2 and then the Enter key. You can also save and exit
moe by pressing
Ctrl+X. After I’m done typing here, I’ll definitely be using that, heh.
To load a file, you press
F3. As soon as you open more than one file, they are loaded into separate buffers and then
moe gives you access to the buffer menu. You can access it by pressing
F11 and it lets you switch between the different buffers by choosing from the menu or pressing a number key. To get rid of the buffer, you press
moe is very easy to deal with, it all seems self-explanatory.
One thing to watch out for is the behaviour of whatever terminal you’re using. The GNOME Terminal wouldn’t let me use the function keys properly and the same was true of xterm. Another thing is the key bindings. They’re kinda like Emacs’s key chords, though not all of them are like that. There are four different prefixes for the key chords: “
S“. The first prefix is the most commonly used one, while the other three are used for special commands.