Results 1 to 3 of 3

Thread: Crontab edit with VIM not working as sudo

  1. #1
    Join Date
    Mar 2009
    Beans
    127

    Crontab edit with VIM not working as sudo

    I'm having troubles with editing my crontab. This is what happens: when I edit crontab as my own user 'crontab -e', everything works fine. The environment var "EDITOR" is read and /usr/bin/vim is started as the editor for the crontab. However, when I try to edit the crontab for root (by typing 'sudo crontab -e'), I receive the following errors:

    Code:
    Error detected while processing /home/rogier/.vimrc:
    line    1: E319: Sorry, the command is not available in this version: syntax enableError detected while processing /home/rogier/.vim/colors/solarized.vim:
    line  141: E319: Sorry, the command is not available in this version: let s:terms_italic=["rxvt","gnome-terminal"]
    line  147: E319: Sorry, the command is not available in this version: let s:terms_noitalic=["iTerm.app","Apple_Terminal"]
    For some reason, the .vimrc file is interpreted wrong and I don't know how to solve this.
    Last edited by lisati; September 12th, 2014 at 09:15 AM. Reason: Replaced "Font" tags with "Code" tags

  2. #2
    Join Date
    Aug 2009
    Location
    Makati City, Philippines
    Beans
    2,269
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Crontab edit with VIM not working as sudo

    This server has no GUI right? What what happens if you use the default .vimrc file? I mean, from your error I think you copied the .vimrc from a desktop and used it on the server?

  3. #3
    Join Date
    Mar 2009
    Beans
    127

    Re: Crontab edit with VIM not working as sudo

    Hi, indeed, the server is not running a GUI. The .vimrc is as follows. As you can see, it's not very complex.

    syntax enable
    set background=dark
    colorscheme solarized

Bookmarks

Posting Permissions

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