edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

"filetype unknown" error while trying to launch MacVim from command line #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- What steps will reproduce the problem?
1. Setup following alias in .cshrc:
alias gvim '/Applications/MacVim/Contents/MacOS/Vim -g'
2. From Terminal, type:
gvim .cshrc (or any other files)

- What is the expected output? What do you see instead?
Result:
1. Terminal shows twice "filetype unknown" error message
2. MacVim is launched and open .cshrc file correctly

Expectation:
There should be no error message

- MacVim/OS version
Version 7.2 stable 1.2 (33.3)
10.5.6

Original issue reported on code.google.com by louis.s...@gmail.com on 4 May 2009 at 4:34

GoogleCodeExporter commented 9 years ago
This is because your alias command is wrong ('.app' missing after 'MacVim'). 
Please do some minimal testing 
before you report things as bugs. If you had pasted 
'/Applications/MacVim/Contents/MacOS/Vim -g' into csh, 
you would've seen that the line is wrong.

Original comment by nicotha...@gmail.com on 5 May 2009 at 3:27

GoogleCodeExporter commented 9 years ago
Sorry I didn't copy the path I set in .cshrc correctly. The path I setup is:
alias gvim '/Applications/Third\ Party\
Apps/Documenting/MacVim/MacVim.app/Contents/MacOS/Vim -g'
And the error message "filetype unknown" is shown twice

Original comment by louis.s...@gmail.com on 5 May 2009 at 4:03

GoogleCodeExporter commented 9 years ago
Check if this also happens if you do `gvim --noplugins .cshrc` or `gvim -u NONE 
.cshrc` or move your ~/.vim 
directory and your ~/.vimrc, ~/.gvimrc temporary to another place. Does the 
problem still happen? If so, does it 
also happen with the latest snapshot (  
http://code.google.com/p/macvim/wiki/Snapshot )?

Original comment by nicotha...@gmail.com on 6 May 2009 at 3:01

GoogleCodeExporter commented 9 years ago
It seems following command in .vimrc causes error message pops up:
set ic
The feature of "set ic" works though.

Original comment by louis.s...@gmail.com on 6 May 2009 at 4:36

GoogleCodeExporter commented 9 years ago
I still could not reproduce this:

cp ~/_vimrc ~/backup_vimrc
echo 'set ic' > ~/_vimrc
csh
/Applications/MacVim.app/Contents/MacOS/Vim -g -U NONE ~/some_file.txt

No error message is printed for me (`-U NONE` tells vim to ignore my gvimrc). 
This is with the latest 
snapshot. Do you see an error with these commands? Did you try the latest 
snapshot?

Original comment by nicotha...@gmail.com on 7 May 2009 at 4:53

GoogleCodeExporter commented 9 years ago
Test several scenarios:
A: echo 'set ic' > ~/.vimrc
1. Run latest snapshot 45
/Applications/MacVim.app/Contents/MacOS/Vim -g -U NONE .cshrc
No error message occurs
2. Run stable version 1.2 (33.3)
/Applications/MacVim.app/Contents/MacOS/Vim -g -U NONE .cshrc
No error message occurs
3. Run latest snapshot 45
/Applications/MacVim.app/Contents/MacOS/Vim -g .cshrc
Error message shows as
[localhost]% filetype unknown
4. Run stable version 1.2 (33.3)
/Applications/MacVim.app/Contents/MacOS/Vim -g .cshrc
Error messages show as
filetype unknown
[localhost]% filetype unknown

B: echo '' > ~/.vimrc
No error message at all in either snapshot or stable version.

Original comment by louis.s...@gmail.com on 7 May 2009 at 1:10

GoogleCodeExporter commented 9 years ago
Is there anything in your ~/.gvimrc (or ~/_gvimrc) that triggers this? If you 
move your .gvimrc out of the way, it 
works, right? Can you find out which line in your .gvimrc causes this?

Original comment by nicotha...@gmail.com on 7 May 2009 at 2:20

GoogleCodeExporter commented 9 years ago
It seems the combination of "set ic" and "set syntax=on" in .gvimrc/.vimrc 
causes the
error:
1. printf "set ic\nset syntax=on" > .vimrc
echo '' > .gvimrc
No error message

2. printf "set ic\nset syntax=on" > .vimrc
echo 'set syntax=on' > .gvimrc
Error messages occurs

3. echo 'set syntax=on' > .vimrc
echo 'set syntax=on' > .gvimrc
No error message

Original comment by louis.s...@gmail.com on 7 May 2009 at 3:19

GoogleCodeExporter commented 9 years ago
"set syntax=on" is not correct -- it should be "syntax on".  I am guessing that 
is why you get the error message.

Original comment by bjorn.winckler@gmail.com on 11 May 2009 at 4:44

GoogleCodeExporter commented 9 years ago
I change to "syntax on" in both vimrc and gvimrc, it works without error 
message. I 
check Vim doc, however, it seems "set syntax=on" should be workable as well:
http://vimdoc.sourceforge.net/htmldoc/options.html#'syntax'

Original comment by louis.s...@gmail.com on 12 May 2009 at 1:36

GoogleCodeExporter commented 9 years ago

Original comment by bjorn.winckler@gmail.com on 5 Jun 2009 at 7:11