editing crontab with vim and using .vimrc


 
Thread Tools Search this Thread
Operating Systems Solaris editing crontab with vim and using .vimrc
# 1  
Old 12-17-2009
editing crontab with vim and using .vimrc

Hi

since we migrated from Solaris 8 to Solaris 10 I do miss a nice feature when editing crontab with vim editor: no more color highlighting after starting to edit. Well there is a hack, see below.

I did define:
export EDITOR='vim -c ":source /export/home/duc904/.vimrc"'

Under Sol8 when starting to edit crontab I did get automatically the entries highlighted with colors I did define in .vimrc .

Under Sol10 this direct way is no longer possible(?)

I have to start editing crontab:
$ crontab -e

and then in CLI mode I enter:
:source /export/home/duc904/.vimrc
and the highlighting is available.

any ideas what I have to change additionally so I do not have to source .vimrc separately?

Thanks and regards,
duc904
# 2  
Old 12-17-2009
Why are you doing that? :/
export EDITOR=vi

will do
# 3  
Old 12-21-2009
Hi incredible

sure I can be using vi or vim:

export EDITOR=vi
or
export EDITOR=vim

depending on personal flavours. This works so far fine.

I more wondering why the hell I cannot more source the .vimrc file directly.

any ideas?

bye
duc904
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Crontab editing issue

Hi, OS - SunOS I gave crontab -e then it returns zero. $ crontab -e 0 ? ? Crontab status - $ ps -ef | grep cron root 2481 1 0 May 12 ? 0:18 /usr/sbin/cron Please help (9 Replies)
Discussion started by: nag_sathi
9 Replies

2. Shell Programming and Scripting

Difference between .vimrc and .exrc?

What is the difference between .vimrc and .exrc? I google it but didn't find the brief explanation? Regards ADI (2 Replies)
Discussion started by: adisky123
2 Replies

3. Shell Programming and Scripting

Editing crontab via ksh

Hi all, I am trying the following I am hoping that the crontab would be changed. but it prints the previous crontab and says Can anyone tell me the correct ksh command that should be used here? I don't want to edit the crontab with crontab -e, I need to edit it via ksh. Thank... (2 Replies)
Discussion started by: ajaba
2 Replies

4. UNIX for Dummies Questions & Answers

Editing crontab of non-root user from file

Hi All, Ref: "build crontab from a text file" in same forum. (I am not allowed to post URL's in the first post) We are reorganizing our UNIX Crontab file by first making changes in a word pad text file. The intent is to then copy it back to Crontab. Will this work? Copy and Paste does not... (6 Replies)
Discussion started by: nivedhitha
6 Replies

5. UNIX for Advanced & Expert Users

vimrc help with line endings

I was reading this and thought I could put this in my vimrc and it would convert the line endings to unix. Am I doing something wrong or am I missing something? set ff=unixManaging/Munging Line-Endings with Vi/Vim | Jeet Sukumaran I used this command and it confirms that my global option is... (2 Replies)
Discussion started by: cokedude
2 Replies

6. Fedora

editing crontab help

I'm using fedora 5 and sql 5.0. I'm trying to edit the crontab to perform automatic backups of my database. For some reason it isn't working. Here is what I have so far. 15 2 * * * /usr/bin/mysqldump -opt -all-databases u root -ppassword -h localhost... (10 Replies)
Discussion started by: randerson21
10 Replies

7. Solaris

Very Importan - Vim Settings - Error while opening a File using vim

I downloaded vim.7.2 and compiled the vim source . Added the vim binary path to PATH (Because iam not the root of the box) when i load the file using vim it throws me an error Error detected while processing /home2/e3003091/.vimrc: line 2: E185: Cannot find color scheme darkblue line... (0 Replies)
Discussion started by: girija
0 Replies

8. UNIX for Dummies Questions & Answers

Editing a cron file with crontab

I want to set up a file with crontab to run the cron deamon so I can use at to schedule jobs. I think the crontab file (or whatever you call it) has to be set up. Currently, I don't have a crontab file (I checked by typing sudo crontab -u myusername -l), and I don't know the syntax for creating... (6 Replies)
Discussion started by: Ultrix
6 Replies

9. Shell Programming and Scripting

VIMRC question ????

Hi There, :) I Need to put the following command in the vimrc for the execution of ECLIPSE so I have written smthing like as follows, export PATH=$PATH:/JVM location after this i go to my eclipse folder and when I execute STILL it is not getting opened..... Any Help that makes my... (6 Replies)
Discussion started by: gk_linux
6 Replies

10. Shell Programming and Scripting

Editing Crontab

Hi I am not able to edit crontab. Following is the comand that is being issued $crontab -e 2764 ............ This is what I am able to see But when I do $crontab -l List of all the crontab entry is displayed. Also I am seeing one entry in my /etc/cron.d prw------- 1 root ... (6 Replies)
Discussion started by: pankajkrmishra
6 Replies
Login or Register to Ask a Question