Results 1 to 5 of 5

Thread: Change default command line editor

  1. #1

    Default Change default command line editor

    Hello.

    I want to change the default command line editor from vim to nano, so for example when I type "visudo", I want it to user nano. In Ubuntu this can be easily done by using "update-alternatives --config editor", but openUSE doesn't have an editor-option.

    Any solutions?

  2. #2

    Default Re: Change default command line editor

    Just found out that I can specify the editor in /etc/sudoers.

    I'm just used to Ubuntu. Sorry, delete this thread please

  3. #3
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,996
    Blog Entries
    14

    Default Re: Change default command line editor

    Nope. It contains information that might help others. Welcome to the forums, and thanks for coming back and replying to your own post.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  4. #4

    Default Re: Change default command line editor

    Quote Originally Posted by olejon View Post
    Hello.

    I want to change the default command line editor from vim to nano, so for example when I type "visudo", I want it to user nano.
    Any solutions?

    export EDITOR=nano
    in ~/.profile or ~/.bash_profile.

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Change default command line editor

    Unfortunately if you read man sudo, it won't use $VISUAL or $EDITOR unless overridden, as it considers those variables a security risk.

    But yes, many other programs will honour $VISUAL and $EDITOR.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •