Want more timely Centmin Mod News Updates?
Become a Member

editor choice

Discussion in 'Feature Requests & Suggestions' started by Matt, Jun 1, 2014.

  1. Matt

    Matt Well-Known Member

    926
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    12:22 AM
    1.5.15
    MariaDB 10.2
    Would it be possible to for the shortcuts to include an option to choose the editor being used? I personally never use nano, and always use VIM.

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,530
    12,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,677
    Local Time:
    9:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    right now it's just hard coded into shorts in /usr/bin i.e.

    Code:
    cat /usr/bin/mycnf
    
    nano -w /etc/my.cnf
    so yeah you can change them manually or just set an alias to replace nano with vim command

    Code:
    alias nano='vim'
    should work ???
     
  3. Matt

    Matt Well-Known Member

    926
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    12:22 AM
    1.5.15
    MariaDB 10.2
    Setting the alias didn't work, it's still opening the files in nano.

    I've just taken what was in the shortcuts_install.inc file, and replaced nano -w with vim and ran the commands:

    Code:
    echo "vim /usr/local/lib/php.ini" > /usr/bin/phpedit ; chmod 700 /usr/bin/phpedit
    echo "vim /etc/my.cnf" >/usr/bin/mycnf ; chmod 700 /usr/bin/mycnf
    echo "vim /usr/local/etc/php-fpm.conf" >/usr/bin/fpmconf ; chmod 700 /usr/bin/fpmconf
    echo "vim /usr/local/nginx/conf/nginx.conf" >/usr/bin/nginxconf ; chmod 700 /usr/bin/nginxconf
    echo "vim /usr/local/nginx/conf/conf.d/virtual.conf" >/usr/bin/vhostconf ; chmod 700 /usr/bin/vhostconf
    echo "vim /usr/local/nginx/conf/php.conf" >/usr/bin/phpinc ; chmod 700 /usr/bin/phpinc
    echo "vim /usr/local/nginx/conf/drop.conf" >/usr/bin/dropinc ; chmod 700 /usr/bin/dropinc
    echo "vim /usr/local/nginx/conf/staticfiles.conf" >/usr/bin/statfilesinc ; chmod 700 /usr/bin/statfilesinc
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,530
    12,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,677
    Local Time:
    9:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yup that would be a better approach :)

    maybe can make in a centmin.sh set option and for nano or vim and depending on variable set have alternate set of echo commands :)
     
  5. Matt

    Matt Well-Known Member

    926
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    12:22 AM
    1.5.15
    MariaDB 10.2
    That would be perfect (y)
     
  6. pamamolf

    pamamolf Premium Member Premium Member

    4,069
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    2:22 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    I always use nano and for not experts it is easier :)

    The pro user can change it anyway :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,530
    12,134
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,677
    Local Time:
    9:22 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+