You are not logged in.

#1 2012-06-10 19:33:28

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

[Solved][VIM] E484: Can't open file syntax.vim

Hi all,

I've installed Archlinux few days ago on my netbook and yesterday i decided to configure Vim using plugins.
During plugins configuration, i messed up and i decided to revome all Vim files in my ~ folder in order to restart configuration.

However, since I've executed the `rm -R .vim .vimrc .viminfo` command, I can't re-activate Vim's syntax coloration using `syntax on` into my .vimrc file nor into Vim directly.
Here is the error message when I start Vim :

Error detected while processing /home/romain/.vimrc:
line    1:
E484: Can't open file /home/romain/.vim/syntax/syntax.vim
Press ENTER or type command to continue

I've found this topic on BBS which seems to be the same problem as me but reinstalling vim or vi doesn't solve this problem.
I've tried to copy this syntax.vim file from /usr/share/vim/vim73/syntax/syntax.vim but it doesn't solve the problem and I want a clean solution without hacking my ~ folder ; moreover, this bug also appears being root while I haven't configured vim with the root account so it may be a problem into Vim's installation folders or something.

Thanks for your help and sorry I my english contains mistakes,
MicroJoe.

Last edited by MicroJoe (2012-06-14 16:16:45)

Offline

#2 2012-06-10 19:43:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

That's odd - you shouldn't need anything in your home directory for syntax highlighting to work.  I have an empty directory tree and it works fine.

Can you post (or pastebin) your ~/.vimrc


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2012-06-10 19:45:01

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

Here it is :

syntax on

Offline

#4 2012-06-10 20:33:08

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [Solved][VIM] E484: Can't open file syntax.vim

To turn syntax on, I believe nocompatible has to be set.  It wouldn't hurt to explicitly set a runtimepath, too.  Try this as your .vimrc –

set nocompatible
set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME

syntax on

Offline

#5 2012-06-10 20:42:18

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

Thanks for your awnser, but it doesn't seem to be the good solution :
Here is my current .vimrc file :

set nocompatible
set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME

syntax on

And I've got the same error message except the line which is now line 4, where 'syntax on' is set.

Offline

#6 2012-06-10 20:53:27

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

I don't know if this will be a very efficient method - but if nothing else comes up you can try it.  If I were in your place I'd start putting "debugging" lines into /usr/share/vim/vim73/syntax/{syntax.vim,synload.vim}

Perhaps through in a line that will echo some output.  This will first tell you if those files are even being read as they should, then it can help narrow down how far vim gets into those files before the error.

This is certainly not an elegant way to figure out the problem, but in the absence of anything else it should provide some more information.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2012-06-10 21:01:18

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

I've added this into each file you mentionned before any other instructions :

" Debug
echom "Loaded <filename>"

But when lauching Vim none of these debbuging messages appears.
It may confirm the fact that Vim doesn't look into his "system" directory but into my own ~/.vim directory only.

Last edited by MicroJoe (2012-06-10 21:01:30)

Offline

#8 2012-06-10 21:17:21

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

This may sound stupid ... but in the end many errors turn out to be from oversights ... do you have any aliases or bash functions for vim anywhere?  I can imagine that an alias of vim to 'vim <parameter to read user sytnax files>' would cause just such a problem.

edit:
And/or you could try running vim as root to see if the problem persists there.

Last edited by Trilby (2012-06-10 21:17:55)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#9 2012-06-10 21:19:17

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

Here is my .bashrc file :

#
# ~/.bashrc
#

export LANG=fr_FR.UTF-8
export TERM=rxvt-unicode

PATH=$PATH:~/bin

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='\[\033[32m\]\u\[\033[33m\]@\[\033[34m\]\h \[\033[36m\]\W \[\033[34m\]\$\[\033[00m\]> '

I can't see any Vim-related things here. hmm

EDIT : I've found another interesting thing !
If I try do launch `vimtutor`, here is what I've got :

Error detected while processing command line:
E484: Can't open file vim/tutor/tutor.vim

Last edited by MicroJoe (2012-06-11 15:20:20)

Offline

#10 2012-06-12 21:10:40

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

Up, maybe my last edit about vimtutor can help you ?

Offline

#11 2012-06-12 21:22:07

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

Please paste the output of vim --version


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#12 2012-06-12 21:53:24

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

This is the output :

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun  7 2012 00:41:40)
Rustines incluses : 1-547
Compilé par ArchLinux
Grosse version sans interface graphique.
  Fonctionnalités incluses (+) ou non (-) :
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent 
-clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con +diff +digraphs 
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path 
+find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv 
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent 
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape 
+mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm -mouse_sysmouse 
+mouse_xterm +mouse_urxvt +multi_byte +multi_lang -mzscheme -netbeans_intg 
+path_extra +perl +persistent_undo +postscript +printer -profile -python 
-python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent 
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo 
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
 -xterm_clipboard -xterm_save 
         fichier vimrc système : "/etc/vimrc"
     fichier vimrc utilisateur : "$HOME/.vimrc"
      fichier exrc utilisateur : "$HOME/.exrc"
               $VIM par défaut : "/usr/share/vim"
Compilation : gcc -c -I. -Iproto -DHAVE_CONFIG_H   -I/usr/local/include  -march=i686 -mtune=generic -pipe -fstack-protector --param=ssp-buffer-size=4  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Édition de liens : gcc   -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -L/usr/local/lib -Wl,--as-needed -o vim       -lm -lncurses  -lacl -lattr -lgpm -ldl    -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro,--hash-style=gnu -fstack-protector -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc

(I've noticed that some part were in French but I hope that it'll not be a problem).

Offline

#13 2012-06-12 21:59:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

That looks OK. Remove the term export from your .bashrc - even if it is not related to your problem, it will cause you other unintended consequences...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#14 2012-06-13 12:49:36

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

I've removed it. smile

So, no ideas ?
I think it looks like Vim has totally forgotten where were his system files. yikes

Offline

#15 2012-06-14 11:53:30

MicroJoe
Member
From: France
Registered: 2012-06-10
Posts: 21
Website

Re: [Solved][VIM] E484: Can't open file syntax.vim

Well, I think I've found a solution using $VIMRUNTIME, here is my new .bashrc file :

#
# ~/.bashrc
#

export LANG=fr_FR.UTF-8
export VIMRUNTIME=/usr/share/vim/vim73

PATH=$PATH:~/bin

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias ocaml='rlwrap ocaml'
PS1='\[\033[32m\]\u\[\033[33m\]@\[\033[34m\]\h \[\033[36m\]\W \[\033[34m\]\$\[\033[00m\]> '

And well, it works well with the .vimrc given by thisoldman (especially with the `set runtimepath [...]` thing I think)
Thank for your help, I hope that this thread will help. smile

EDIT : Well, each time I start VIM, it displays this :

Loaded syntax.vim
Loaded synload.vim

And then ask me to press ENTER in order to really start VIM ; any idea about hiding these messages in order to start VIM directly ?

EDIT 2 : This solution suck because if I install snipMate into ~/.vim/ VIM doesn't care about that and I can't use snipMate, any solution ?
I do miss when VIM was freshly installed and I hadn't all that ugly things.

EDIT 3 : I'm stupid, these debug message were mine, fix'd ; EDIT 2 problem to solve.

EDIT 4 : Well, removing `set runtimepath` into my .vimrc file seems to have solved the problem ; kinda voodoo magic. Solved !

Last edited by MicroJoe (2012-06-14 16:16:29)

Offline

Board footer

Powered by FluxBB