On Sep 17, 3:19 pm, thomas <[EMAIL PROTECTED]> wrote:
> > almost no filetype plugin sets 'commentstring' (as they should do!!).
>
> One could also use &comments which is more difficult to parse though
> and there are only a few plugins out there that do that ;-).
>
> > That would be far more complicated then using an "else if" in
> > "autoload/modelines.ada" to add another comment plug in. if you send
> > me the patch then I put it into the main distribution. Since autoload
> > is parsed only once, and only when needed, adding another 2 to 3
> > commenter plugin won't be a problem.
>
> I wouldn't hard code it.
>
> You currently have the line in the source:
>
> > execute l:Line + 2 . " call NERDComment(0, 'norm')"
>
> Instead you could use something like:
>
> in plugin/modelines.vim
> if !exists('g:modelinesCommenter')
> if exists('*NERDComment')
> let g:modelinesCommenter = "call NERDComment(0, 'norm')"
> else
> let g:modelinesCommenter = "call append('.',
> printf(&commentstring, getline('.'))) | norm! dd"
> endif
> endif
But the NERD_Comment is either there - loaded at startup - or not
there. There is no need to check for it everytime I want to add
modelines. While speed might not be an issue here - a more complex
function will need more memory as well.
The way I did it is that ich check once when the first modeline is
added and then define either a function with NERD_Comment or without.
> in autoload/modelines.vim
> execute l:Line + 2 . " ". g:modelinesCommenter
>
> > BTW: I consider it quite wastefulness NERD_Commenter won't use
> > autoload/
>
> I think it's a pity that AFAIK it stores the comment information
> inside
> one function. This way the plugin has to be patched/updated every
> time
> somebody wants it to support a new filetype. The better solution
> would
> be to patch the corresponding ftplugins in the runtime. But this is a
> 90% different story.
Well see my other post. I aggree with you here. Problem here is that
the NERD_Commenter support 3 time more filetype then there are
ftplugins. Not only would you need to to patch ftplugins - you would
need to write them. But the result of the effort would be a lot better
and well worth the effort.
> > Just there is more then one file inside. i.E. the tail bundle - it
> > comes with a helpful Shell script to start gvim and open some files in
> > tail mode right away.
>
> Excellent. But I still don't get why there has to be a name for it.
> But
> as I'm no vim developer I don't have to understand it anyway.
> Temporary
> retreat to silence.
The reason is not at all technical. It's marketing. Or, to be more
precise: http://www.vim.org/search.php.
You can search for "ftplugin", "syntax" and "indent." You can't search
for "omnicompletion" or "compiler" (The Ada bundle also has 2 compiler
plugins). And where would you place a combination of all 5 so that
people find it.
If my idea is accepted the next step would be to ask the webmaster to
update the script search. So it's for you the end-user - no need for
silence speak up.
Martin
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---