Error when using vim to open files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Error when using vim to open files
# 1  
Old 09-04-2014
Error when using vim to open files

Hi all, 1st post here. I'm on Solaris and currently, I get the following error if I try to use vim to edit anything:
Code:
Error detected while processing function <SNR>6_initialize:
line    2:
E697: Missing end of List ']':
E116: Invalid arguments for function <SNR>6_defineOption
line    3:
E10: \ should be followed by /, ? or &
line    4:
E10: \ should be followed by /, ? or &
line    5:
E10: \ should be followed by /, ? or &
line    6:
E10: \ should be followed by /, ? or &
line    7:
E10: \ should be followed by /, ? or &
line    8:
E10: \ should be followed by /, ? or &
line   86:
E121: Undefined variable: g:fuf_modes
E116: Invalid arguments for function filter
line   87:
E121: Undefined variable: g:fuf_modes
E15: Invalid expression: g:fuf_modes
line   95:
E121: Undefined variable: g:fuf_modes
E15: Invalid expression: g:fuf_modes
Press ENTER or type command to continue

This only happens after I "source" (what's this mean?) with the following:
Code:
. shrc

After I source, my home directory becomes a different user's ... Where should I start looking to fix this error? The errors don't seem to correspond to my .bashrc or, .vimrc, or the shrc file.

Thanks.
# 2  
Old 09-04-2014
Hi Fred,

Firstly "sourcing" is generally when you load an environmental configuration file into your environment.

Are you definitely using
Code:
/bin/sh

Secondly I would suggest thet you logout and log back in - then just run the vim command to edit the file.

Regards

Dave
# 3  
Old 09-04-2014
Quote:
Originally Posted by gull04
Hi Fred,

Firstly "sourcing" is generally when you load an environmental configuration file into your environment.

Are you definitely using
Code:
/bin/sh

Secondly I would suggest thet you logout and log back in - then just run the vim command to edit the file.

Regards

Dave
Thanks Dave. If I relogin then some of the variables are reset, so I can't really do that.

The 1st line of the shrc file is
Code:
#!/bin/sh

# 4  
Old 09-04-2014
When you relogin, all your envirnment is reset to YOUR values... Not just some

and executing a file like the one you are trying is not the thing to do unless you know what is inside for it will if same variable exists as in your environment replace them with the latter... Explaining the mess you get in...
You should read carefully its content and try to understand what you want you dont already have and which ones affect your env and if you can comment them out...
# 5  
Old 09-04-2014
Hi,

That wasn't really the question that I asked, what shell are you using? was meant to be what the question was.

Easy way to get that is;

Code:
echo ${SHELL}

The errors seem to be from the source action not vim.

Regards

Dave
# 6  
Old 09-04-2014
Quote:
Originally Posted by gull04
Hi,

That wasn't really the question that I asked, what shell are you using? was meant to be what the question was.

Easy way to get that is;

Code:
echo ${SHELL}

The errors seem to be from the source action not vim.

Regards

Dave
Hi,

I'm using bash, the command returns /usr/bin/bash
# 7  
Old 09-04-2014
Hi,

Then you'll need to use a properly configured bashrc file to suit the bourne shell.

Regards

Dave
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Vim help.txt automatically open every time I open vi

Hi Friends, Every I try to open a vi window, vim help.txt automatically opens evertime. After doing ZZ or :q! also the same page opens automatically. How to stop this? Is it machine specific ? Other users who are opening the same servers and files are not facing this issue. Thanks... (3 Replies)
Discussion started by: sudiptabhaskar
3 Replies

2. UNIX for Beginners Questions & Answers

Vim help.txt automatically open every time I open vi

Hi Friends, Every I try to open a vi window vim help.txt automatically opens evertime. After doing ZZ or :q! also the same page opens automatically. How to stop this? Is it machine specific ? Other users who are opening the same servers and files are not facing this issue. Thanks... (1 Reply)
Discussion started by: sudiptabhaskar
1 Replies

3. UNIX for Dummies Questions & Answers

Comparing Two Files, Possibly with VIM

Hello, I have a problem comparing two files, both .csv. One file, let's call it files.csv, contains a list of thousands of file names for models of molecules that have made it through an optimization process. The other file, formulas.csv, contains file names for the same kind of models, and has... (2 Replies)
Discussion started by: Stuart Ness
2 Replies

4. OS X (Apple)

how to open ~/.vim/ in 10.6

I have MacOSX 10.6, I cannot open this more than 24hours, Google is also not helpful. pubxx-xxx:~ xxx$ cd ~/.vim -bash: cd: /Users/xxx/.vim: No such file or directory pubxx-xxx:~ xxx$ PLEASE HELP!!! Thanks (1 Reply)
Discussion started by: c_lady
1 Replies

5. UNIX for Dummies Questions & Answers

VI/VIM ERROR ^Z

Dear Unix user, I'm using putty 0.60 (on Windows Vista) to connect by ssh protocol to other Linux computer. I have a problem with VI/VIM. When I key button "n" or "b", it returns me n^Z or b^Z. What could the problem be?! Thanx a lot, Maria Elena (7 Replies)
Discussion started by: mesana
7 Replies

6. Linux

VI/VIM ERROR ^Z

Dear Unix user, I'm using putty 0.60 (on Windows Vista) to connect by ssh protocol to other Linux computer. I have a problem with VI/VIM. When I key button "n" or "b", it returns me n^Z or b^Z. What could the problem be?! Thanx a lot, Maria Elena (0 Replies)
Discussion started by: mesana
0 Replies

7. Shell Programming and Scripting

VI/VIM ERROR ^Z

Dear Unix user, I'm using putty 0.60 (on Windows Vista) to connect by ssh protocol to other Linux computer. I have a problem with VI/VIM. When I key button "n" or "b", it returns me n^Z or b^Z. What could the problem be?! Thanx a lot, Maria Elena (0 Replies)
Discussion started by: mesana
0 Replies

8. UNIX for Dummies Questions & Answers

Using Vim or Ex to rename all files in a folder

Is there a way to use Vim or Ex to rename all files in a folder? For example if i have a folder with Apples1.txt, Apples2.txt, Apples3.txt, could I rename all files so they are Oranges1.txt, Oranges2.txt, Oranges3.txt ? I know with :bufdo %s/apples/oranges/g|update you can do this for inside... (5 Replies)
Discussion started by: VimNewUser
5 Replies

9. 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

10. Shell Programming and Scripting

Assistance pls - pipe error: Too many open files in system

When I run a bash script in the customer system, it throws the warning and script exits Exec '/root/sample.sh' @ hostname-- OK (warn) /root/sample.sh: pipe error: Too many open files in system /root/sample.sh: n + : syntax error: operand expected (error token is " ") Exec... (5 Replies)
Discussion started by: vidhyamirra
5 Replies
Login or Register to Ask a Question