Closed (fixed)
Project:
Vim Plugin For Drupal
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2012 at 06:44 UTC
Updated:
29 Aug 2012 at 21:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
benjifisherInstead of giving a link to your vimrc file, please say which settings you do not like.
Comment #2
benjifisherI forgot to change the status.
Adding the project as a submodule should work fine.
It is easy enough to move settings from
plugin/drupal.vimtoftplugin/drupal.vimso that they only affect Drupal files. As I said in #1, I need to know which settings are bothering you.Comment #3
ozon commentedI am a little confused... ;)
What is the goal of this project? A plugin for Vim or a Vim-Distribution for Drupal Developer? The Project name taught that there is a plugin.
I think if there is a plugin, the plugin should not overwrite user settings of the vimrc.
http://drupalcode.org/project/vimrc.git/blame/27343ed439167b508d79052c2f... at the moment.
Sample
fileformats=unix- sure thats the best option for Windows Users?Sample
linebreak- dont like linebreaks ;)Sample
pastetoggle=<F2>- mh... want use F2 for other actions ;)But it is not the individual settings. It generally goes with the question whether it makes sense to define user settings / override.
And if there is a distribution, then please shipped with .vimrc ;)
What have I done for me? I merged your codebase and settings to my vim dotfiles. Clone it and say what you do not like:).
Anyway. I think a focus on the vim distribution is better.
I like and respect your work.
Comment #4
benjifisherI agree with most or all of what you say. I opened the issue #1305998: Setting 'fileformats' to "unix" breaks some files. in the hopes of getting a discussion started, but if it happens here, that is fine with me.
Sorry, I do not have time to look through your dotfiles, or anyone else's. If you want to improve this project for the benefit of the Vim/Drupal community, please make specific suggestions. Patches are welcome.
The goal of the project should be pretty clear. We changed the name once, and we may change it again. Again, specific suggestions are more helpful. Do you think "Vim distribution for Drupal" would be better?
My personal branch of this project contains new features that have not yet been committed, but it also makes changes along the lines you suggest, moving several questionable or personal settings into sample vimrc files. This afternoon, if I have time, I will post a patch as a basis for further discussion.
Comment #5
benjifisherI have attached a patch file that removes most option settings from
plugin/drupal.vim. Maybe I have removed too much, but probably I removed everything that bothered you. Perhaps some of these options should be added toftplugin/drupal.vim.I also attached three sample vimrc files: minimal, standard, and one with most of the options I removed from
plugin/drupal.vim. It might be a good idea to add (not to the minimal one)call pathogen#infect()since we are recommending that people install our project with pathogen.
I would have made these changes months ago, but I want some consensus before removing a big part of what was in this project before I joined it.
I have marked #1305998: Setting 'fileformats' to "unix" breaks some files. as a duplicate.
Comment #6
benjifisherI marked #1435142: Move all non-drupal specific settings to an optional settings file. as a duplicate of this issue.
Comment #7
naught101 commentedPatch is a nice start. That would fix all my problems, I think. But why do you put
set nocompatiblein the minimal.vim? That's basically an options nuke (see #1435142: Move all non-drupal specific settings to an optional settings file.), which is potentially ok, if you tell users to put it at the top of their .vimrc. But why do you need it anyway?Comment #8
benjifisherThe
vimrc_*.vimfiles are there for the sake of users who are new to vim or have never bothered to configure it before. The intention is that such a user could copy one of these to~/.vimrc(or$HOME\_vimrcon Windows). In that context,:set nocompatibleis a good thing.This project started out as one file, to be used as a vimrc file by such users. Most of what the project contained before it was reorganized is in
vimrc_timplunkett.vim. We should come up with a more descriptive name for that file. Maybe put all of them in anexamples/folder.Of course,
'nocompatible'is set as soon as vim finds a vimrc file. (:help startup) We do not really need to:setit if people follow our advice and create a vimrc file (whether using one of the examples or some other way), but since when can you count on people to follow advice? ;)I should probably add a line to these files to invoke pathogen.
We should definitely say something in the docs about creating a vimrc file.
Comment #9
grota commentedas far as it's worth, +1 on removing those lines from the code.
Comment #10
alanmackenzie commentedThe correct thing to do is to put your own configuration in: ~/.vim/after/plugin/*.vim
example:
I prefer relative line numbers so in ~/.vim/after/plugin/after-plugins.vim
We should probably add a notice to this effect in the documentation, if the maintainers are happy with this then I'll create a patch.
Comment #11
benjifisher@grota: Are you inclined to mark the patch in #5 as RTBC? That would be clearer than a +1 in a comment.
@alanmackenzie: First, we should make sure that our "defaults are carefully chosen". (
:help design-flexible) After that, if there are still tweaks that individual users want to make, they should use theafter/directory. If you would like to create a documentation patch with a pointer to:help ftplugin-overrulethen I will include it.Comment #12
alanmackenzie commentedPatch in #5 works as expected.
On the subject of example .vimrc files I would add both
call pathogen#infect()andcall pathogen#helptags()to the standard one.Perhaps it's better to discuss that in a separate issue given the age of this one.
Comment #13
benjifisherI committed the patch and the sample vimrc files from #5. I also edited
doc/drupal.txt. (I do not think that documentation patches need to be reviewed as carefully as code patches.) Here is the commit record: c9d9e0e. For the record, I am attaching the final patch.Let's discuss pathogen in another issue: perhaps #1145580: Add installer? or perhaps a new one. I do not really like the idea of running
pathogen#helptags()every time I start up vim.