Jump to content

GNU nano Open-Source Text Editor


Recommended Posts

abarbarian

This thread is dedicated to "GNU nano" so any tips or articles of interest would be most welcome.

 

GNU nano 5.0 Open-Source Text Editor Released, This is What’s New


 

Quote

 

GNU nano 5.0 open-source text editor has been released today and it looks like is a major release that brings many enhancements and other exciting changes for Linux users.

GNU nano is probably one of the most popular text editors for the command line. It’s probably included in almost all GNU/Linux distribution is it usually comes in handy whenever there’s some configuration files you need to edit.

Dubbed “Among the fields of barley,” GNU nano 5.0 introduces a new --indicator parameter that displays some sort of scrollbar to show you where the viewport is located in the buffer and how much it covers, along with the --bookstyle parameter that makes nano consider any line that begins with a whitespace the start of a paragraph.

 

 

This is a earlier post on nano,

 

https://forums.scotsnewsletter.com/index.php?/topic/36677-text-editing-with-nano-made-easy/&tab=comments#comment-300394


 

Quote

 

All regular Linux users and administrators should be well-versed in a command line editor. If something goes wrong with the X Window System, for example, you'll end up at a CLI prompt and your skills will be essential for editing config files


 

 

😎

  • Like 2
  • Agree 1
Link to post
Share on other sites

Sounds good. I remember my months of using vi years ago until the company finally got Toad for the contractors. I got really good at vi though (talk about a largely useless skill).

Link to post
Share on other sites
securitybreach
55 minutes ago, ebrke said:

I got really good at vi though (talk about a largely useless skill).


How so? Vi/Vim comes  preinstalled on most distros. I’ve used vim daily for many years now.

  • +1 1
Link to post
Share on other sites
  • 4 weeks later...

I use nano for any text editing that requires root access. sudo nano something, in my case. For other text editing I like Geany. I've avoided vi for the most part. nano is perfect for the simple stuff I do with it; I haven't bothered to learn all that much about it, but there's always man nano.

 

Still at version 3.2-3 in Debian Stable. Arch now has nano 5.2-1.

Link to post
Share on other sites
Hedon James

I used Geany for the first time when I installed ArchLabs in a VM.  I had always used whatever default text GUI was installed, as it wasn't important enough for me to "upgrade" or replace.  But I really grew to like Geany because of its "numbered lines" functionality.  Sounds like a silly reason, but I REALLY liked that feature.  I was thrilled to find out that LXQt implemented that feature with its Featherpad text editor.

Link to post
Share on other sites
V.T. Eric Layton

Nano Nano!

nanu-nanu.jpg

 

Er... well, I first started out with Vim and have stuck with it all along. Nano may be easier, but Vim is what I learned and I'm used to it. Old people don't like change. ;)

  • Like 1
  • Haha 1
Link to post
Share on other sites

I think I've read that vim has a lot more features than nano has. Is that true? I don't come close to using (or even knowing about) all of nano's features, though!

 

I'm thinking that the only times I've used vim, it was because visudo was set to use vim. I later learned that I could change that to nano, but sometimes I've simply left it set to vim.

Link to post
Share on other sites
raymac46

Nano or one of the GUI editors does what limited text editing I need (visido, .conf files) but I probably should learn more about vim. It seems to have a lot more power and flexibility - even a writer could use it as a word processor.

  • Agree 1
Link to post
Share on other sites
abarbarian

Nano may not be as feature rich as emacs or vim but it still has a few features.

 

How to Use Nano, the Linux Command Line Text Editor

 

A Beginner’s Guide on How to Use Nano Text Editor in Linux

 

for instance,

 

 

Quote

 

Save File with Backup

Sometimes when editing a file, you may want to keep temporary copies of the same file just in case. You can use nano’s -B option, which will create backup of the file you are editing. You can use it in combination with the -C option to tell nano where to save those backups like this:


$ nano -BC ~/backups myfile.txt

The above will make backup copies of the file myfile.txt in the folder “backups” located in the user’s home directory. Note that the backup directory should be existing, otherwise, nano will tell you that the directory is invalid.

 

 

About Nano

 

nano Command Manual

 

nano(1) - Linux man page

 

Three good guides along with the manual and man page.

 

😎

  • Like 1
  • Agree 1
  • Thanks 1
Link to post
Share on other sites
raymac46

Vim doesn't apear to be installed by default in either Linux Mint or MX Linux so I installed it. It isn't as intuitive to me as nano but I can see how you could get to like it. What I find different is that you need to get in and out of command mode to do any editing of the text.

Link to post
Share on other sites
  • 2 weeks later...
On 8/23/2020 at 11:38 AM, ebrke said:

Sounds good. I remember my months of using vi years ago until the company finally got Toad for the contractors. I got really good at vi though (talk about a largely useless skill).

vi still comes in handy, like when editing crontab.

  • Agree 1
Link to post
Share on other sites
On 9/25/2020 at 12:32 PM, securitybreach said:

Agreed!! Vim FTW!!!

i like pico and joe , i use joe when pico just isn't quite enough for what i want to do.

 

Link to post
Share on other sites
  • 3 months later...
abarbarian

Top 6 awesome text editors for Linux and Unix command-line users/developers

Whilst reading the above article I discovered micro which is based on nano.

 

Micro home site with loads of information

Quote

 

micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals. It comes as a single, batteries-included, static binary with no dependencies; you can download and use it right now!

As its name indicates, micro aims to be somewhat of a successor to the nano editor by being easy to install and use. It strives to be enjoyable as a full-time editor for people who prefer to work in a terminal, or those who regularly edit files over SSH.

 

 

The help and information guides can be found here

 

https://github.com/zyedidia/micro/tree/master/runtime/help

 

The commands help file is most informative

 

https://github.com/zyedidia/micro/blob/master/runtime/help/commands.md

 

an the colours help file is well worth a look as it details how you can easily on the fly change the colour scheme of micro to suit you.

 

https://github.com/zyedidia/micro/blob/master/runtime/help/colors.md

 

I tried out a few colour schemes and found this one very easy on the eye

 

09sxskX.png

 

Apart from the neat colour schemes one neat way to use micro would be for viewing differences in files like .pacnew files for instance. You can utilise the vsplit or hsplit function to do this very easily.

 

5dFollW.png

 

😎

Edited by abarbarian
**??**
  • +1 1
Link to post
Share on other sites
abarbarian
1 hour ago, securitybreach said:

 

Lies, all lies. If this were accurate, Vim would be #1 in the list.... B) 

 

I would have thought that NEOVIM should have been top choice as it uses 30% less source-code than vim and has extra features. 🤓

  • Haha 1
Link to post
Share on other sites
wa4chq

I've always used nano.   I just don't do much text editing.  I have tried vi/vim but not enough to remember what does what.  I guess it's time to take another look at it.  I remember seeing vimtutor that SB mentions.  That was helpful. 

  • +1 1
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...