Learn about Centmin Mod LEMP Stack today
Become a Member

Sysadmin Which Linux Text Editor do you prefer nano or vim ?

Discussion in 'System Administration' started by eva2000, Oct 21, 2016.

  1. nano

    10 vote(s)
    76.9%
  2. vim

    3 vote(s)
    23.1%
  1. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    If you use Centmin Mod, then you'll spend time logged into ssh via your ssh client like putty, securecrt etc. You'll need to use a linux text editor so you can edit config files, nginx vhosts, and other files in ssh. There's 2 main linux text editors folks use, nano or vim.

    Which is your preferred ? I started out with pico text editor in Pine so I prefer using it's successor, nano which you can read up more about nano here and here. For vim text editor read here and here.

    For folks new to nano or vim, there's numerous online how to use guides for nano and vim you can search for via google :)

     
  2. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    6:02 PM
    Nano all the way.
     
  3. deltahf

    deltahf Premium Member Premium Member

    587
    265
    63
    Jun 8, 2014
    Ratings:
    +489
    Local Time:
    6:02 PM
    I started out with nano, but I switched over to vim a few years ago.

    I'm not particularly crazy about it, and I don't really use it enough to fully memorize all of the keyboard shortcuts, but I do like its syntax highlighting. Maybe nano has gotten better in this respect?
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    4,100
    428
    83
    May 31, 2014
    Ratings:
    +836
    Local Time:
    1:02 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    I am using also nano :)

    It will be good if other users agree to have it installed by Centminmod and set it as default :)

    So i will avoid the crontab -e open in vim and remind me to install nano and set it as default :)
     
  5. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    11:02 PM
    1.25.3
    10.6.x
    Nano
     
  6. dorobo

    dorobo Active Member

    420
    104
    43
    Jun 6, 2014
    Ratings:
    +162
    Local Time:
    6:02 AM
    latest
    latest
    Nano but it pays to know even a little of vim
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    centmin mod sets default linux editor as nano out of box since beginning, so that is what it should be doing

    it's not doing that for you ?

    unfortunately not yet

    indeed
     
  8. pamamolf

    pamamolf Premium Member Premium Member

    4,100
    428
    83
    May 31, 2014
    Ratings:
    +836
    Local Time:
    1:02 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    On some servers no. I am noticing that when i run crontab -e that is not the default editor and then i edit this:

    Code:
    /etc/bashrc
    and i add at the bottom this:

    Code:
    export EDITOR="nano"
    Then i logout from ssh and login again and crontab -e is using nano :)

    But i didn't know that Centminmod set nano as default so i didn't check on which cases or OS version or if it was a dedicated or vps server that i had this issue :(
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  10. pamamolf

    pamamolf Premium Member Premium Member

    4,100
    428
    83
    May 31, 2014
    Ratings:
    +836
    Local Time:
    1:02 AM
    Nginx-1.26.x
    MariaDB 10.6.x
    Ok if i got that again i will post here :)
     
  11. Matt

    Matt Well-Known Member

    932
    415
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +671
    Local Time:
    11:02 PM
    1.5.15
    MariaDB 10.2
    100% vim for me.
     
  12. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    6:02 AM
    1.15.x
    MariaDB 10.3.x
    I use nano for quick edits on a server.

    If I need a full editor, I use notepad++ and check the stuff into a git repo since versioning is really really useful.
     
  13. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    just added a poll to this thread - forgot about polls LOL
     
  14. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah actually nano does do syntax highlighting, might be worth enabling on centmin mod installs !

    upload_2016-10-22_22-28-11.png

    centos 7 supported syntax highlighing in nano
    Code (Text):
    grep '^# include' /etc/nanorc
    # include "/usr/share/nano/nanorc.nanorc"
    # include "/usr/share/nano/c.nanorc"
    # include "/usr/share/nano/makefile.nanorc"
    # include "/usr/share/nano/css.nanorc"
    # include "/usr/share/nano/debian.nanorc"
    # include "/usr/share/nano/gentoo.nanorc"
    # include "/usr/share/nano/html.nanorc"
    # include "/usr/share/nano/php.nanorc"
    # include "/usr/share/nano/tcl.nanorc"
    # include "/usr/share/nano/tex.nanorc"
    # include "/usr/share/nano/mutt.nanorc"
    # include "/usr/share/nano/patch.nanorc"
    # include "/usr/share/nano/man.nanorc"
    # include "/usr/share/nano/groff.nanorc"
    # include "/usr/share/nano/perl.nanorc"
    # include "/usr/share/nano/python.nanorc"
    # include "/usr/share/nano/ruby.nanorc"
    # include "/usr/share/nano/java.nanorc"
    # include "/usr/share/nano/fortran.nanorc"
    # include "/usr/share/nano/objc.nanorc"
    # include "/usr/share/nano/ocaml.nanorc"
    # include "/usr/share/nano/awk.nanorc"
    # include "/usr/share/nano/asm.nanorc"
    # include "/usr/share/nano/sh.nanorc"
    # include "/usr/share/nano/pov.nanorc"
    # include "/usr/share/nano/xml.nanorc"


    update: enabled nano syntax highlighting in 123.09beta01 Beta Branch - enable nano editor syntax highlighting in 123.09beta01 | Centmin Mod Community
     
    Last edited: Oct 22, 2016
  15. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  16. SeaTea

    SeaTea Member

    49
    13
    8
    Feb 20, 2015
    the Netherlands
    Ratings:
    +28
    Local Time:
    12:02 AM
    Nginx:1.11
    MariaDB-10
    nano or the build-in editor of Midnight Commander.

    (I use MC a lot for simple file manipulation - grew-up with norton-commander on DOS ;) )
     
  17. dooma

    dooma Active Member

    326
    34
    28
    Oct 15, 2016
    Cairo
    Ratings:
    +49
    Local Time:
    12:02 AM
    Nano is more better.
     
  18. eva2000

    eva2000 Administrator Staff Member

    55,155
    12,249
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,825
    Local Time:
    8:02 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    lots of nano fans !

    been playing with adding additional nano syntax highlighting formats support including nginx config file !

    upload_2016-10-24_0-45-53.png

    yum .repo files syntax

    upload_2016-10-24_0-54-0.png

    markdown syntax

    upload_2016-10-24_0-55-30.png

    sql syntax

    upload_2016-10-24_0-56-40.png
     
    Last edited: Oct 24, 2016
  19. Sunka

    Sunka Well-Known Member

    1,150
    325
    83
    Oct 31, 2015
    Pula, Croatia
    Ratings:
    +525
    Local Time:
    12:02 AM
    Nginx 1.17.9
    MariaDB 10.3.22
    Allways Nano.
    I never tried Vim, but read about it on web, seems to me that it is very complicated on the beggining.
    So I just use Nano for small changes, and notepad+ for detailed changes and readings
     
  20. Tracy Perry

    Tracy Perry Active Member

    280
    118
    43
    Aug 24, 2014
    Texas
    Ratings:
    +210
    Local Time:
    5:02 PM
    1.21.6
    MariaDB 10.3.36
    joe (Joe's Own Editor) works fine for me - I've used it for ages and is one of the first things I install on any flavor I set up - along with midnight commander.
    joe uses Wordstar command syntax - which I'm familiar with from my baddie old DOS days.