Re: added completion to the :setfiletype command.

2010-07-29 Fir de Conversatie François Ingelrest
Hi, 2010/7/28 Dominique Pellé: I'm sorry, I messed up again and forgot one file in the patch :-( Here it is again. This new feature is great! It's easier and a bit faster to have completion at hand when setting the file type. One (maybe silly) question though: Isn't it possible to use

Re: added completion to the :setfiletype command.

2010-07-29 Fir de Conversatie Jürgen Krämer
Hi, François Ingelrest wrote: One (maybe silly) question though: Isn't it possible to use completion also with :set ft= ? It's not that I can't use :setf, just that I'm used to the former and thought that the patch wasn't working at first. that would make :set ft= behave differently from

Re: added completion to the :setfiletype command.

2010-07-29 Fir de Conversatie Benjamin R. Haskell
On Thu, 29 Jul 2010, Jürgen Krämer wrote: Hi, François Ingelrest wrote: One (maybe silly) question though: Isn't it possible to use completion also with :set ft= ? It's not that I can't use :setf, just that I'm used to the former and thought that the patch wasn't working at

Re: added completion to the :setfiletype command.

2010-07-29 Fir de Conversatie Bram Moolenaar
Dominique Pellé wrote: Here is the updated patch taking into account Nazri's comments. Using fnamecmp() is fine indeed after rethinking about it. I'm sorry, I messed up again and forgot one file in the patch :-( Here it is again. Thanks, I'll include it now. Please make any further

Re: added completion to the :setfiletype command.

2010-07-28 Fir de Conversatie Bram Moolenaar
Dominique Pellé wrote: Please try and review the attached patch. It think it does what's needed and it's rather simple: :setfiletype completes using things that match $VIMRUNTIME/{syntax,ftplugin,indent}/*.vim and ~/.vim/{syntax,ftplugin,indent}/*.vim :ownsyntax behaves as

Re: added completion to the :setfiletype command.

2010-07-28 Fir de Conversatie Ingo Karkat
On 28-Jul-2010 00:03, Dominique Pellé wrote: Dominique Pellé wrote: Please try and review the attached patch. It think it does what's needed and it's rather simple: :setfiletype completes using things that match $VIMRUNTIME/{syntax,ftplugin,indent}/*.vim and

Re: added completion to the :setfiletype command.

2010-07-28 Fir de Conversatie Matt Wozniski
On Wed, Jul 28, 2010 at 9:20 AM, Ingo Karkat sw...@ingo-karkat.de wrote: Sorry, I haven't tried your patch yet, only reviewed it. I'd like to point out the naming peculiarities for ftplugins (:help ftplugin-name), which I think require additional filtering of the retrieved *.vim names: | The

Re: added completion to the :setfiletype command.

2010-07-28 Fir de Conversatie Dominique Pellé
2010/7/28 Bram Moolenaar b...@moolenaar.net: Dominique Pellé wrote: Please try and review the attached patch. It think it does what's needed and it's rather simple: :setfiletype completes using things that match $VIMRUNTIME/{syntax,ftplugin,indent}/*.vim and

Re: added completion to the :setfiletype command.

2010-07-28 Fir de Conversatie Dominique Pellé
Dominique Pellé wrote: Here is the updated patch taking into account Nazri's comments. Using fnamecmp() is fine indeed after rethinking about it. I'm sorry, I messed up again and forgot one file in the patch :-( Here it is again. -- Dominique -- You received this message from the vim_dev

Re: added completion to the :setfiletype command.

2010-07-28 Fir de Conversatie Bram Moolenaar
2010/7/28 Bram Moolenaar b...@moolenaar.net: Dominique Pellé wrote: Please try and review the attached patch. It think it does what's needed and it's rather simple: :setfiletype completes using things that match $VIMRUNTIME/{syntax,ftplugin,indent}/*.vim and

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Ingo Karkat
On 26-Jul-2010 23:29, Dominique Pellé wrote: The completion EXPAND_FILETYPE expands things from files located in $VIMRUNTIME/syntax/. Granted, most filetypes do define custom highlighting via a $VIMRUNTIME/syntax/filetype.vim script. But shouldn't the filetype completion also take into account

Re: [patch] added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Bram Moolenaar
Dominique Pelle wrote: Bram Moolenaar b...@moolenaar.net wrote: Christian Brabandt wrote: Hi Dominique! On Sa, 24 Jul 2010, Dominique Pellé wrote: Hi Attached patch adds completion to the :setfiletype command. Example: :setf javaCTRL-D javajavacc

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Peter Odding
Ingo Karkat wrote: Granted, most filetypes do define custom highlighting via a $VIMRUNTIME/syntax/filetype.vim script. But shouldn't the filetype completion also take into account files from the ftplugin and syntax directories, too? If I for example have a custom filetype bullettext that defines

Re: [patch] added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Tony Mechelynck
On 27/07/10 09:44, Bram Moolenaar wrote: [...] Aha, so the filetypes are found by looking in the syntax directory. Well, the result is still a list of filetypes, although there can be a few syntax files that are not a filetype (e.g. 2html.vim). So do we let the implementation details prevail?

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Dominique Pellé
Peter Odding wrote: Ingo Karkat wrote: Granted, most filetypes do define custom highlighting via a $VIMRUNTIME/syntax/filetype.vim script. But shouldn't the filetype completion also take into account files from the ftplugin and syntax directories, too? If I for example have a custom

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Peter Odding
Dominique Pellé wrote: I can try to change the behavior. But just to make sure I understand the problems: :setfiletype and :ownsyntax commands currently both perform completion by looking at syntax/*.vim from both $VIMRUNTIME and ~/.vim/. That's almost fine, but it not ideal for 2 reasons:

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Bram Moolenaar
Dominique Pelle wrote: Peter Odding wrote: Ingo Karkat wrote: Granted, most filetypes do define custom highlighting via a $VIMRUNTIME/syntax/filetype.vim script. But shouldn't the filetype completion also take into account files from the ftplugin and syntax directories, too?

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Dominique Pellé
Bram Moolenaar wrote: Dominique Pelle wrote: Peter Odding wrote: Ingo Karkat wrote: Granted, most filetypes do define custom highlighting via a $VIMRUNTIME/syntax/filetype.vim script. But shouldn't the filetype completion also take into account files from the ftplugin and syntax

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Dominique Pellé
Dominique Pellé wrote: Please try and review the attached patch. It think it does what's needed and it's rather simple: :setfiletype completes using things that match $VIMRUNTIME/{syntax,ftplugin,indent}/*.vim and ~/.vim/{syntax,ftplugin,indent}/*.vim :ownsyntax behaves as before, i.e. it

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Nazri Ramliy
2010/7/28 Dominique Pellé dominique.pe...@gmail.com: I send this patch again with slightly more elegant way of doing it saving 3 lines of code. Sorry for the noise. From your patch: +/* Used in qsort */ +static int cmp_str(s1, s2) +const void *s1; +const void *s2; +{ +return

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Dominique Pellé
Nazri Ramliy wrote: 2010/7/28 Dominique Pellé dominique.pe...@gmail.com: I send this patch again with slightly more elegant way of doing it saving 3 lines of code. Sorry for the noise. From your patch: +/* Used in qsort */ +static int cmp_str(s1, s2) +    const void *s1; +    const void

Re: added completion to the :setfiletype command.

2010-07-27 Fir de Conversatie Nazri Ramliy
2010/7/28 Dominique Pellé dominique.pe...@gmail.com: * I could also reuse remove_duplicates() but it has a slightly  different behavior since it calls fnamecmp() instead of  STRCMP() to check for dupes. I wonder whether that's  desirable here.  I think it's better to use STRCMP() in my case.

Re: [patch] added completion to the :setfiletype command.

2010-07-26 Fir de Conversatie Christian Brabandt
Hi Dominique! On Sa, 24 Jul 2010, Dominique Pellé wrote: Hi Attached patch adds completion to the :setfiletype command. Example: :setf javaCTRL-D javajavacc javascript -- Dominique diff -r 0c8219a26bc9 src/ex_docmd.c --- a/src/ex_docmd.c Sat Jul 24 20:57:44 2010

Re: [patch] added completion to the :setfiletype command.

2010-07-26 Fir de Conversatie Bram Moolenaar
Christian Brabandt wrote: Hi Dominique! On Sa, 24 Jul 2010, Dominique Pellé wrote: Hi Attached patch adds completion to the :setfiletype command. Example: :setf javaCTRL-D javajavacc javascript -- Dominique diff -r 0c8219a26bc9 src/ex_docmd.c ---

Re: [patch] added completion to the :setfiletype command.

2010-07-25 Fir de Conversatie Bram Moolenaar
Dominique wrote: Attached patch adds completion to the :setfiletype command. Example: :setf javaCTRL-D javajavacc javascript Thanks. -- Beer pretzels can't be served at the same time in any bar or restaurant. [real standing law in North Dakota, United

[patch] added completion to the :setfiletype command.

2010-07-24 Fir de Conversatie Dominique Pellé
Hi Attached patch adds completion to the :setfiletype command. Example: :setf javaCTRL-D javajavacc javascript -- Dominique -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit