Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
I don't use gvim, but I use vim extensively. My .vimrc works in all shells that I have tried bash, ksh, tcsh, zsh, etc. I'm guessing that you are copying or creating the .vimrc lines with shell commands. Here is my .vimrc:
In the vim context, double quotes at the beginning of a line marks a comment.
We would need to know more about how you are creating and using .vimrc to help. I think the "set" error is because somehow tcsh is seeing the command, not vim, and set is how tcsh places values in variables.
Best wishes ... cheers, drl
Edit 1: In other words, exactly as neutronscott described.
sea,
" can be used to comment in .gvimrc file. I have used the above posted code as such in ksh, as I've said earlier and it worked fine. And there are pages online which explains the same too. I didn't understand when you asked "Have you installed it?". If you are talking about gvim, it is already installed in the (company) server and I just needed to set path to point to the installation area, which I've done in .cshrc file.
neutronscott,
It is indeed an intialization file and is sourced from .cshrc or .profile file generally. I was running it from command line for debug purposes because I was getting syntax errors from the file. Otherwise it is automatically sourced. Thanks for the response though.
No, it's generally loaded from within vim since the shell doesn't understand that language. Do you also run perl code from the command-line without invoking perl?
See how perl code works in perl, but not in bash?
Same thing with your gvimrc initialization file. I promise.
This User Gave Thanks to neutronscott For This Post:
I had committed the blunder of trying to source .gvimrc from .cshrc. Actually I had copied it from one of my colleagues and somehow the code was there like that. Though I remember that gvimrc was never sourced from my previous kshrc, it somehow didn't dawn to me until I read your comments (even after neutronscott's first comment).
So bottom line "Never source rc files from another file. They are executed automatically". This applies to .kshrc/.cshrc etc too, I suppose.
Thanks sea, neutronscott, drl for the epiphany!! You guys are awesome.
Hi,
I am getting an wired error.... the script is running fine when i run it manually... but the same when i try to run in nohup mode, i am getting error
if
Error:
syntax error at line 24: `(' unexpected
The above if is the 24th line!!! I dont understand the error... (4 Replies)
Hi All
I am quite new to Unix. Following is a shell script that i have written and getting the subject mentioned error.
#!/bin/ksh
#-------------------------------------------------------------------------
# File: ang_stdnld.ksh
#
# Desc: UNIX shell script to extract Store information.... (3 Replies)
how to check which line of the script is showing the error...
like -x will print each output in stdout...
but want to know exact error line trowing error.. (2 Replies)
Help please! :confused:
I have the following error with the following file and the emails are not arriving to the email, any idea please?
ERROR: ./launch_full_backup.sh: Syntax error at line 28 : `else' is not expected.
FECHA=`date +%d%m%y%H%M`... (2 Replies)
hi ,
while running this script i am getting below error:
Syntax error at line 11 : `for' is not matched.
here is program:
#! /bin/ksh
sqlplus -s << !+!
user/password
update GR_SUB_SCRIPT_PC set act_del_ind='0';
commit;
exit;
!+!
cd /home/salunke/pvcsfiles/source_files
for i in... (5 Replies)
Hi
I am having a shell script load_data.sh which calls /home/users/project/.profile. When am executing the script, am getting below error:
$sh -x bin/load_data.sh null
+ . /home/users/project/.profile
bin/load_data.sh: syntax error at line 8: `(' unexpected
The line which is throwing... (1 Reply)
hi can anyone pls look into this....shell script...
Pls find the error below:
> sh -n tmp
tmp: syntax error at line 28: `(' unexpected
isql -Usa -S$1 -P`grep $1 dbpassword|cut -d ":" -f3` -w2000 -b<<!
set nocount on
declare @i int
declare @dbname char(6)
declare @tmp int
if... (10 Replies)
Hi all,
I've a problem with oracle10.1.0.2 installation on Solaris 10 (I already know this is possible) but when I run "./runInstaller" command from CD I read "syntax error at line 2" followed by several lines (ex. \200\201\203\206...ect).
Can you help me please? It is very urgent! (19 Replies)
I compiled C program under SUN OS sparcv9 ...I had a problem related to SIGBUS which has been resolved by adding an option to the CC compiler which is memory alignement option ..-memalign=1i as I remmber ...after running the program I got the below error please let me KNow more details what should... (2 Replies)
Hi There,
I have a cron script that returns the error:
syntax error on line 1, teletype
Has any one seen this, know what it is, or know's how to get rid of it?
Thanks,
Jeremy. (1 Reply)