Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
using modeline to set procmail filetype
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Troy Piggins  
View profile  
 More options Oct 13, 7:28 pm
Newsgroups: comp.editors
From: Troy Piggins <usenet-0...@piggo.com>
Date: Wed, 14 Oct 2009 09:28:40 +1000
Local: Tues, Oct 13 2009 7:28 pm
Subject: [vim] using modeline to set procmail filetype
When I open most common filetypes in vim, the filetype syntax
colours appear as expected.  But when I try to open
/etc/procmailrc it just appears as all the one colour, as if the
filetype is not recognised.

In an attempt to get vim to automatically set the ft for it, I
added:

#EOF vim: set ft=procmail :

to the end of the file.  But it still will not recognise it.

If I manually type :set ft=procmail in the open file, the syntax
colours do display correctly.

Any ideas?

--
Troy Piggins


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christian Brabandt  
View profile  
 More options Oct 14, 2:08 am
Newsgroups: comp.editors
From: Christian Brabandt <cb-n...@256bit.org>
Date: 14 Oct 2009 06:08:19 GMT
Local: Wed, Oct 14 2009 2:08 am
Subject: Re: [vim] using modeline to set procmail filetype
On 2009-10-13, Troy Piggins <usenet-0...@piggo.com> wrote:

> When I open most common filetypes in vim, the filetype syntax
> colours appear as expected.  But when I try to open
> /etc/procmailrc it just appears as all the one colour, as if the
> filetype is not recognised.

> In an attempt to get vim to automatically set the ft for it, I
> added:

> #EOF vim: set ft=procmail :

Could it be, that modelines are disabled for you? Check your modeline
settings:
:verbose set ml? mls?

Anyway, it seems filetype.vim only detects .procmail and .procmailrc as
filetypes. There a couple of possibilities to have that fixed without
modelines. See help new-filetype.

The easiest solution is to create ~/.vim/ftdetect/procmail.vim and enter
au BufNewFile,BufRead procmailrc     setfiletype procmail
and restart vim

You can also create your own filetype.vim file in your ~/.vim directory
and enter something like

if exists("did_load_filetypes")
  finish
endif
augroup filetypedetect
  au! BufRead,BufNewFile procmailrc         setfiletype procmail
augroup END

See the help, for more possibilites.

regards,
Christian


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Troy Piggins  
View profile  
 More options Oct 14, 2:23 am
Newsgroups: comp.editors
From: Troy Piggins <usenet-0...@piggo.com>
Date: Wed, 14 Oct 2009 16:23:48 +1000
Local: Wed, Oct 14 2009 2:23 am
Subject: Re: [vim] using modeline to set procmail filetype
* Christian Brabandt wrote :

> On 2009-10-13, Troy Piggins <usenet-0...@piggo.com> wrote:
>> When I open most common filetypes in vim, the filetype syntax
>> colours appear as expected.  But when I try to open
>> /etc/procmailrc it just appears as all the one colour, as if the
>> filetype is not recognised.

>> In an attempt to get vim to automatically set the ft for it, I
>> added:

>> #EOF vim: set ft=procmail :

> Could it be, that modelines are disabled for you? Check your modeline
> settings:
>:verbose set ml? mls?

:verbose set ml? mls?
nomodeline
  modelines=5

I guess not.  Checked the help and it seems modeline default is
ON for normal users, OFF for root.  I tried opening
/etc/procmailrc as a normal user and indeed it does syntax colour
correctly, so that must be it.  I guess.

Thanks very much for the options, Christian.  Certainly should be
able to sort it out from here.  Thanks.

--
Troy Piggins


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google