Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple linux console text editor wanted [closed]

Tags:

linux

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.

windows edit.com

Specifically, I'm looking for;

  • A plain text editor.
  • Console-based not GUI-based.
  • Full-screen not command line.
  • Menus to tell me what my options are. I don't want to have to find out and remember a complex set of keystrokes specific to that one application.
  • An application that is in the default apt-get / yum repositories, or failing that is easy for a newbie to install.

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.

like image 647
Nigel Alderton Avatar asked Apr 09 '11 19:04

Nigel Alderton


People also ask

How do I open a text editor in Linux terminal?

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.

What is the basic text editor for Linux?

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.

What are the best command line text editors for Linux?

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.

What can you do with a Linux editor?

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.

Is there a console mode text editor for Windows NT?

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.

Is there a 64-bit version of Windows console editor?

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.


Video Answer


2 Answers

mcedit

@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.

mcedit screenshot

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.

like image 81
Nigel Alderton Avatar answered Sep 28 '22 10:09

Nigel Alderton


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.

like image 31
Erik Avatar answered Sep 28 '22 11:09

Erik