3

I'm trying to manipulate the editor of crontab but it's really really confusing. So I launch the creation of a new crontab with crontab -e Then the default editor opens.

Now from there, it's seems to be LAGGING !!??

How do I move around in the editor ?

How do I get "--INSERT--" to show and then write my "scritp" and then type :wq to write and save exit ?

How can I go back to writing mode after pushing once esc or : ?

12

You can pick any editor you like by setting the $EDITOR variable before calling crontab -e

e.g.

$ EDITOR=emacs crontab -e

will run emacs as your editor. If you have a favourite editor then you can select that.

Many programs that call an external editor may also use this $EDITOR variable so you may find it useful to set it permanently in your .profile with

export EDITOR=emacs

Now crontab -e and others will automatically select this editor.

5

That looks like vi or one of its many clones, probably vim.

You can use i to insert, x to delete the current character, dd to delete a line (and copy it to clipboard), p to paste below the current line, and u to undo the last change.

Hopefully that will be enough to let you do your change. For more details, search for a vi manual, handbook, or tutorial.

4

crontab -e enters into default editor (vi editor). The simple shortcuts in vi editor are

  • i - Insert mode (allows you to write data)

: mode

  • :w -> we can save data
  • :q -> quit from editor
  • :q! -> force quit
  • :wq -> save and quit

any time we can reset the mode of editor by using Esc key. You can use EDITOR=nano crontab -e to edit crontab file by using the nano editor.

0

The editor is vi, its very simple to play around, if you need to type anything press escape button and then i (i means insert) if you need to save it then again press escape button and then :wq

If you don not want to save and close press escape and then :q!

  • 1
    Did you just create an account so you could state that it’s very simple to play around in vi? That’s some quality trolling, I salute you. – Olivier 'Ölbaum' Scherler Jul 12 '16 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.