Announcement

Collapse
No announcement yet.

Fedora Developers Restart Talk Over Using Nano As The Default Text Editor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Originally posted by programmerjake View Post

    Write a shell script that does that and Fedora might include it by default.
    In fact, I was working on a proof-of-concept after having that idea:

    Code:
    #!/bin/sh
    
    editors=(nano vim)
    selection=1
    
    echo "Please select your default text editor:"
    echo "(1) Simple (nano)"
    echo "(2) Programmer/Advanced (vim)"
    
    while true; do
      echo -n "Input number (default 1)? "
      read -n 1 selection
      echo
      if [ $selection ]; then
        if ! [ "$selection" -eq "$selection" ] 2>/dev/null; then
          selection=0
          echo "Please input a number (1 or 2)."
        else
          if [ $selection -gt 2 ] || [ $selection -lt 1 ]; then
            selection=0
            echo "Please input a number (1 or 2)."
          else
            selection=$((selection-1))
            break
          fi
        fi
      else
        selection=0
        break
      fi
    done
    
    echo >> $HOME/.profile
    echo "# editor-selector" >> $HOME/.profile
    echo "EDITOR=${editors[selection]}" >> $HOME/.profile
    
    export EDITOR=${editors[selection]}
    echo "Default text editor set to ${editors[selection]}."
    echo "You may need to relog for the change to take effect."
    sleep 3
    
    exec ${editors[selection]} $@
    (note that this is just a proof of concept and not meant to be actually used)
    Last edited by tildearrow; 25 June 2020, 04:59 PM. Reason: oops vBulletin breaking indentation

    Comment


    • #22
      Originally posted by Neraxa View Post
      Debating over the default text editor does little to inspire confidence in the project. It is a user settable, and people who use command line should be expert users so know how to set their own default.
      expert users don't just appear out of thin air. Expert users were newcomers that started exploring and found it interesting.

      If you put pointless complexity their way you end up with the VIM situation where a complete trash application becomes "what pros must use" because that's what they learned to use when they were younger.

      Comment


      • #23
        Originally posted by lucrus View Post
        Time waste around useless dilemma: average Joe coming from Windows/macOS does not even open the terminal.
        Average Joe does not come on Linux to begin with.

        It's safe to assume people on Linux are more techie than average and will appreciate a better terminal experience by default as they learn their ropes and eventually become experts.

        Comment


        • #24
          I wonder if it would make a good research project trying to quantify just how much developer time has been wasted on this bike-shed.

          Comment


          • #25
            Originally posted by bachchain View Post
            I wonder if it would make a good research project trying to quantify just how much developer time has been wasted on this bike-shed.
            which reminds me of "... the amount of noise generated by a change is inversely proportional to the complexity of the change."
            (Source: https://workbench.cadenhead.org/news...ormat-bikeshed)

            Comment


            • #26
              While nano is not my current editor of choice for day by day work, it is small and easy enough to use and to explain to those that do not want to choose a religion (their own editor of choice) at this time, or are running inside a minimal install. Off the top of my head jed might be the only equivalent (small, easy to use/explain) for a simple terminal editor.

              Comment


              • #27
                Isn't vi part of the POSIX standard? The Vim "lite mode" satisfies that requirement.

                I am assuming that they are keeping both binaries, this is purely so when tools like Git require input it can shock you with the opposite editor to the one you are comfortable with?

                Comment


                • #28
                  what an important news and discussion ;-) Hope they plumb it soon, …

                  Comment


                  • #29
                    I'd love if a minimal nano-like editor gets added to busybox. Editing some startup scripts in an emergency/rescue shell is a pain with vi(m). And I sometimes manage to get it totally stuck over a serial terminal.

                    Comment


                    • #30
                      @tildearrow: Ubuntu has this menu already.

                      I think that most people should be able to work with mcedit very well. And mc as file manager (hint: alt-enter, ctr+o, , Ctrl+s)

                      Comment

                      Working...
                      X