clojure vim shebang

2009-11-11 Thread John Ky
Hi all,

Does anyone know why if the first character in my *.clj file is '#', then
when I open it in VIM, ClojureVIM fails to recognise it as a Clojure file?

Thanks

-John

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure vim shebang

2009-11-11 Thread MarkSwanson
> Does anyone know why if the first character in my *.clj file is '#', then
> when I open it in VIM, ClojureVIM fails to recognise it as a Clojure file?

I don't know why, but I can provide this data point:
It does not do that for me.
Vim 7.2, vimclojure 2.1.2, java 6.0.14

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clojure vim shebang

2009-11-11 Thread John Ky
Mine is almost the same:

Vim 7.2, vimclojure 2.1.2, java 1.6.0_10

On Thu, Nov 12, 2009 at 10:47 AM, MarkSwanson wrote:

> > Does anyone know why if the first character in my *.clj file is '#', then
> > when I open it in VIM, ClojureVIM fails to recognise it as a Clojure
> file?
>
> I don't know why, but I can provide this data point:
> It does not do that for me.
> Vim 7.2, vimclojure 2.1.2, java 6.0.14
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: clojure vim shebang

2009-11-12 Thread David Brown
On Thu, Nov 12, 2009 at 10:21:32AM +1100, John Ky wrote:

>Does anyone know why if the first character in my *.clj file is '#', then
>when I open it in VIM, ClojureVIM fails to recognise it as a Clojure file?

Vim runs the type detectors that examine the file before the ones
based on filename.  The vimclojure name-based autodetector uses
'setfiletype' which only sets the filetype if it hasn't been detected
already.

The simplest fix is to change the 'setfiletype' in the
ftdetect/clojure.vim file to 'filetype'.  This tells it to force the
filetype to clojure when it ends in '.clj' no matter what it was
detected as.

You can also make line 2 of the file be something like:
; vim: set filetype=clojure :

and just override it on an individual basis.

David

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: clojure vim shebang

2009-11-12 Thread Meikel Brandmeyer

Hi,

Am 12.11.2009 um 00:21 schrieb John Ky:

Does anyone know why if the first character in my *.clj file is '#',  
then when I open it in VIM, ClojureVIM fails to recognise it as a  
Clojure file?


What does ":echo &ft" say? I have the general symptom, that Vim  
sometimes does not recognise the filetype correctly for self-defined  
types.


Please consider to ask these questions on the vimclojure group.

Sincerely
Meikel



smime.p7s
Description: S/MIME cryptographic signature


Re: clojure vim shebang

2009-11-12 Thread Meikel Brandmeyer
Hi,

On Nov 12, 12:21 am, John Ky  wrote:

> Does anyone know why if the first character in my *.clj file is '#', then
> when I open it in VIM, ClojureVIM fails to recognise it as a Clojure file?

Ok. I could reproduce the issue and also found the solution. The
culprit is setfiletype in ftdetect/clojure.vim. As a quick fix change
the following line there:

au BufNewFile,BufRead *.clj setfiletype clojure

into

au BufNewFile,BufRead *.clj set filetype=clojure

I will also patch this for the next release. Thanks for the report.

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en