> 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
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.
> 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.
Regards,
Thomas.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---