Text Editors

jed isn't bad for people familair with windows notepad. There was a copy of it called tilde.

vi may be a pain to learn, but once you learn it, it's fast and powerful.

Then there is also emacs.
 


I use the text writer that comes installed as default which usually is FeatherPad.
 
Like browsers, I use different text editors for different purposes.
 
Interesting fact. I've been using Linux and Unix professionally since 1999 and personally a bit longer than that. I've always used Vim. I've edited thousands of configurations, written hundreds of Python scripts and even written full blown daemons in Python using Vim. In all that experiencing using Vim and that huge amount of commands and features it offers. I still know only a few of Vim's commands. Mostly just enough to get what I need done.

Proceed all commands below with hitting the ESC key.
  1. i ~ Insert
  2. x ~ Delete charcter
  3. dd ~ Delete line
  4. #yy -> p ~ Copy and paste # number of lines
  5. :/<search term> ~ Search
  6. :s/<find pattern>/<replace pattern>/[mode] ~ Find and replace (using sed command structure)
  7. :# ~ Goto line number specified by #
  8. shift+g (or just 'G') ~ Move to the end of the file
  9. "gg' ~ Move to the beginning of the file
  10. :w ~ Save
  11. Shift+zz (or 'ZZ') ~ Save and quit (also :wq, but I mainly use shift+zz)
Given how many commands and things you can do in Vim. It's amazing that I pretty much have only used these commands for the most part. There are times when I had to search down a command for a specific use, but for the most part. This is it.

Oh I also use this command, but it's specific to starting vim:
vim <filename> +# ~ Opens the file and goes to the specified line number.

This command is great when writing Python and you get a stack trace with a line number and you want to jump directly to it.

One last thing I will say is, while there are many different command line editors out there. If you want to become a Linux / Unix admin. Learning the basics of Vi is very important. There are many Linux and Unit systems out there. They can have very basic installs with no extra software. The one editor they always have is Vi. (sometimes not even Vim, just Vi) For that reason alone. Learning Vi is VERY important. Otherwise, you may be unable to edit something on a system you must work on!

Viva la Vi!
 
the only one i remember is :wq

i thought there were certain things you could only do with Vi/Vim then found this:

Code:
sudo  EDITOR=nano visudo

So far nano does everything i want ; if i have to i can use vim


For python geany suffices
 
Last edited:
I use nano. One of these days I will get around to learning vi/vim. Until then nano suffices.
VIM-Cheat-Sheet-02.jpg
 
luckily with Arch we have this line :

# pacstrap /mnt base base-devel linux linux-firmware nano mc grub efibootmgr networkmanager



i just didn't know Robin Williams was a fan of it :
 
Edit files on a Unix / Linux system with only a base install? :p

nano is included in a ton of base installs, depending on what you're calling 'base'. It's included by default quite often these days.

That said, I can open, edit, and save a file in vim. I can't do much more than that. I refresh my limited skills periodically, as I don't use vim often enough to lock it into muscle memory.
 

Staff online

Members online


Top