I'm a linux newbie coming from a Windows background and I am trying to find a simple full-screen console-based plain-text editor. Something that emulates the look and feel of the Windows edit.com would be perfect.
Specifically, I'm looking for;
I'm using small-footprint versions of Ubuntu 904 and Centos 5.5.
edit:
I suppose what I'm looking for is a console editor that conforms to the normal keystrokes used by GUI editors, ie. cursor keys to move up/down/left/right, pg-up / pg-down keys to move up and down a page, home / end keys to move to the start or end of a line etc etc. In other words, the keys we all use without thinking, in any GUI environment, be it Windows or Linux.
If you already started to write in terminal and you want to continue on your favorite editor you can press ctrl + X , ctrl + E and continue working in emacs or your default bash editor. Show activity on this post. From man open : -e Opens with TextEdit.
There are two command-line text editors in Linux®: vim and nano. You can use one of these two available options should you ever need to write a script, edit a configuration file, create a virtual host, or jot down a quick note for yourself.
Here, I’ll compile a list of the best command line text editors for Linux. These are some of the most commonly-used and powerful command-line text editors for Linux. 1. Vim If you’re on Linux for quite some time, you must have heard about Vim.
Not to forget, you can use it for basic text editing or leverage its support for hundreds of programming languages, extensions and file formats. How to install it? You can also find it listed in your software center of the Linux distribution you use.
This editor is a Win32 port of Mark Zbikowski’s port of Z editor to MS-DOS. It has been widely used with Microsoft C as M, MEP and and OS/2 SDK as SDKED. Shockingly looks like Windows NT did actually have a console mode text editor since it’s earliest days or even earlier.
Windows console version uses Curses, but it performs remarkably well. It has a look and feel of a modern programmer’s text editor with syntax highlighting, line numbers, etc. The zip archive comes with over 400 files so it’s rather not portable. Also there seem to be no Windows 64bit build although there is one for Linux.
@mpapis I got mcedit going and learned a lot in the process. For the benefit of other linux newbies I would like to share what I learned.
This is how I installed mcedit on my system which is a Centos 5.5 minimum build running in a VPS.
Starting mcedit
To start mcedit from a console, do;
mcedit
If mcedit is installed it will start and your screen will look like the screenshot above. But if you get an error message like;
No such file or directory
then you need to install mcedit.
Installing mcedit
mcedit is part of a package called mc. To install mcedit you must install mc. To install mc do;
apt-get install mc
If apt-get knows about mc, then you will be asked a question like;
After this operation, 17.4MB of additional disk space will be used.
Do you want to continue [Y/n]?
Go ahead and install it by pressing the 'y' key then then the 'enter' key.
But if you get an error message like;
Package mc has no installation candidate
then apt-get doesn't know about mc, so you have to tell apt-get about mc. mc is stored in the universe repository. To tell apt-get about mc, you need to tell apt-get where the universe repository is. The universe repository is a popular and safe ubuntu repository.
Tell apt-get about the universe repository
The /etc/apt/sources.list file tells apt-get what repositories are where. You can view sources.list by doing;
more /etc/apt/sources.list
For apt-get to know about the universe repository, the sources.list file must contain the line;
deb http://archive.ubuntu.com/ubuntu/ jaunty universe
Add the above line to the sources.list file by doing;
echo deb http://archive.ubuntu.com/ubuntu/ jaunty universe >> /etc/apt/sources.list
The ">>" means append the preceding text to the specified file.
To check whether the above has worked, show sources.list by doing;
more /etc/apt/sources.list
If it worked, the last line of the file will be;
deb http://us.archive.ubuntu.com/ubuntu/ jaunty universe
Now tell apt-get about the change you just made to the sources.list file by doing;
apt-get update
You should see;
Reading package lists... Done
So you can now do;
apt-get install mc
Then run mcedit by doing;
mcedit
And you should see the screenshot above.
pico
or nano
should do fine - joe
is also pretty straight forward. vi/vim
and emacs
have somewhat of a learning curve, but both are worth the invested time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With