I've been using the drupal .vimrc and trying to contribute to it since it was born. Somehow it was the original .vimrc made here that made me use Vim instead of something else. I really liked it.
The last few weeks there was a major change: the .vimrc file ceased to exist and many files and folders took it's place. This is of course for the better, since people who know Vim better than me say so.
BUT: I can't make any of this to work anymore! The old style was easy, I had to copy the file in my ~ folder and ta dah, instant magic.
Now things are different. I have Vim-7.0 in my server (shared host) and I can't make it work.
:help vimfiles gives me this:
E433: No tags file
E149: Sorry, no help for vimfiles:helptags ~/.vim/doc seems to work ok, no errors
:help drupal.txt then replies
E433: No tags file
E149: Sorry, no help for drupal.txt
It is highly probable that I'm doing something wrong, or that my machine doesn't accept the new style of things.
I just need to find out what is wrong... any ideas?
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | install-1326562-11.patch | 4.64 KB | benjifisher |
| #11 | README.txt | 3.77 KB | benjifisher |
| #10 | TROUBLESHOOTING.txt | 2.05 KB | bserem |
Comments
Comment #1
benjifisher@bserem, thanks for your faith. I think we can get things working.
If you do not have any other vimrc file, you need at least a minimal one:
If you do this and copy all the other files to ~/.vim/, then things should work. If you are using git, then after you checkout the latest version, you should be able to move the vimrc/ directory to ~/.vim/ and do your pulls from that directory in the future. (On Windows, use ~/vimfiles/ instead of ~/.vim/ .)
If you are still having trouble, please tell us your OS and what directory structure you are using. Also your version of vim (
:help version).If the above explanation helps, then tell us how to improve the README.txt.
Comment #2
bserem commentedHello benjifisher and thanks for replying!
I don't use git, I'm still at an infant level with all these technologies... I simply got the latest snapshot from the repo and extracted it on my home folder.
I created a .vimrc file, with
set numberinside it in order to make sure that all are ok (so as to see if it loads ok, just in case).:help versiongives me the same error (E433: No tags file, E149: Sorry, no help for version)In fact I can't run any :help command.
I did a vi --version on the command line. Sorry for pasting something that big but it is the only thing I have that might help you. You probably need only the first lines but I'm pasting it all anyways...
I'm on a CentOS server, a simple shared hosting which I use for all of my small sites.
Are Vim plugins available for Vim 7.0? (ok, stupid question, but as I saig I started using Vim because of this project, and not the opposite...)
Thanks for helping ;-)
Comment #3
benjifisher@bserem,
No harm done pasting it all in. I think that d.o can afford the extra bits. ;)
It seems that "vi" is a tiny version of vim 7.0. (Compiled in March 2011 but source code is from May 2006.) I am pretty sure that "tiny" is the problem. The version is recent enough: ftplugins have been around since vim 6.0.
Does
give you the same result? It would be reasonable for CentOS to include an old, stable, minimal version of vim as "vi" and a more recent, feature-rich version as "vim". If so, then stop using vi and start using vim!
Failing that, are you able to install packages on your server? According to Google "vim RPM" there was an RPM of vim-enhanced 7.1 available for Fedora Core 9 back in 2008.
FWIW, the vim help files are available on line: http://vimdoc.sourceforge.net/htmldoc/. These are the files for the latest version, not 7.0, but you can see when features were added using :help version7.
Let's get technical: your vi is compiled with -autocmd, which means autocommands will not work; -syntax, so you will not get any colors; -visual, so you have no Visual mode; -viminfo, so you have no history between sessions; -windows, so you cannot view two buffers at once. I am not sure what features you used to enjoy, but probably several will not work with the tiny version of vim.
You did not say what your directory structure is. Assuming you can get a non-tiny version of vim up and running, you should take the files from this project,
and install them as
I sincerely hope it does not come to this, but if all else fails,
should recover most of what was in the earlier versions of this project.
HTH
Comment #4
bserem commentedI tried to run vim (or vim --version) but vim is not available on my machine. Linux replied "command not found" and sadly there's not much I can do about it. Shared hosts are shared hosts.
After reading all the above, I disconnected from my server and continued locally:
I installed the new "vim plugins" package on my local system, which has Vim7.3 and on which I made the initial tests for persistent undo.
Everything works fine, without any need for a dummy .vimrc file.
It is obvious that there is no problem with the new logic, the one with the ftplugins on Vim7.3 or even on older version of Vim.
There seems to be a problem on some specific "compilations" of Vim, like the one I have on my shared-server.
So I tried your last suggestion
cat plugin/drupal.vim ftplugin/php_drupal.vim >> ~/.vimrcto have at least some functionallity of the old .vimrc file.There is no problem with all of the above, but I think it should be documented that if the vim-plugins package doesn't work on ones server then they should either update their Vi7 to full Vim or fallback to the more simple .vimrc using the above command.
I'm marking this as closed.
Would you like me to create a patch for the fallback-documendation or do you want to it yourself in order to explain it better than I can?
Thank you very much for all your help!
Comment #5
benjifisherI am marking this as "needs work" because we still need to improve the documentation.
I think you are the best judge of what instructions will be clear to a non-expert, and I am the best judge of what is technically correct. If you will suggest a change to the README, then I will review it. Either I will commit it as is or make needed changes and ask you to review it.
Please include a line about using ~/vimfiles on Windows instead of ~/.vim. Please include a link or two to http://vimdoc.sourceforge.net/ for the benefit of those who, like you, cannot use the
:helpcommand in vim. Maybe it should all go in a new "Troubleshooting" section.What features still work in the tiny version of vim?
Comment #6
bserem commentedOk then, I'll prepare a troubleshooting section and post it back here, probably tomorrow noon (noon at Greece).
As for what works on the tiny version of Vim, I don't really think I'm capable of telling.
Is there something specific you would like me to try? I could even give you access to my sandbox with the tiny-vim and see things for yourself if you want.
Comment #7
benjifisherOK, the tiny version of vim only takes advantage of a few of the settings in this project. I think I prefer to advise people to get access to a non-tiny version rather than experiment (on your server or mine) with the tiny version to see what features it supports.
Setting 'nocp' (not vi-compatible) sets the 'esckeys' option, which makes arrow keys work in Insert mode. Also, 'nocp' gives you multiple undo.
Setting 'number' gives you line numbers. Handy when editing PHP code, but distracting when composing e-mail IMHO.
An alternative to copying the two files to ~/.vimrc is to add these two lines:
You decide which instructions are simpler. We could even provide a
vimrc_tiny.vimfile that someone could use as a vimrc file, assuming that .vimrc and vimrc/ are both in the vimfiles directory (~/vimfiles/ on Windows, ~/.vim/ on other systems).Comment #8
benjifisherAs a support request, this is finished, so I am changing the issue settings and changing the title.
Comment #9
bserem commentedI also assigned this to me, for the time being...
Comment #10
bserem commentedI made a first version, any feedback is more than welcomed.
Sadly I can't add it to the project, so Benjifisher you'll have to submit it :)
Comment #11
benjifisher@bserem, thanks!
I added your text to README.txt and did some editing. While I was at it, I broke long lines and replaced hard tabs with spaces. The result is attached, both as a patch and the entire new README.txt. (Note which file is larger!)
I do not think it makes sense to add this to
doc/drupal.txt. If someone can read it there, (s)he probably does not need it!Comment #12
bserem commentedBenjifisher you did a far greater job on the documendation than I did! Thank you!
I'm marking this as fixed, please people with tiny-vims reopen it if necessary.
Comment #13
benjifisherbserem, two heads are better than one! I just committed the patch from #11.
Comment #14
bserem commentedIn other news, my host installed for me Vim 7.023 on my reseller account.
This will help me follow up with most of the new features you add in the drupal-plugin set.
Some of my servers though, particularly vps and dedicated ones, are still with the tiny-vim, so it is a good thing there is some compatibility!