Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Mode line in template not run, but is run when reloading file.
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
  2 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
 
hardkrash  
View profile  
 More options Jun 21 2012, 6:43 pm
From: hardkrash <smichal...@gmail.com>
Date: Thu, 21 Jun 2012 15:43:35 -0700 (PDT)
Local: Thurs, Jun 21 2012 6:43 pm
Subject: Mode line in template not run, but is run when reloading file.

When using qtmplsel.vim the mode lines in my templates are not processed.

So when I have expand tabs set and other options in model lines they are not being followed.

How can I programmatically evaluate the text to yes the freshly inserted modeline.

Currently I need to write the file and reread the file to process the modeline.

Steve


 
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.
Tony Mechelynck  
View profile  
 More options Jun 21 2012, 7:22 pm
From: Tony Mechelynck <antoine.mechely...@gmail.com>
Date: Fri, 22 Jun 2012 01:22:29 +0200
Local: Thurs, Jun 21 2012 7:22 pm
Subject: Re: Mode line in template not run, but is run when reloading file.
On 22/06/12 00:43, hardkrash wrote:

> When using qtmplsel.vim the mode lines in my templates are not processed.

> So when I have expand tabs set and other options in model lines they are not being followed.

> How can I programmatically evaluate the text to yes the freshly inserted modeline.

> Currently I need to write the file and reread the file to process the modeline.

> Steve

Yes, I think that's the way to go: From the help:

> 3. If you start editing a new file, and the 'modeline' option is on, a
>    number of lines at the beginning and end of the file are checked for
>    modelines.  This is explained here.

>                                    *modeline* *vim:* *vi:* *ex:* *E520*

IOW, if you modify a file to add a modeline, the modeline won't take
effect until you reread the file to "start editing" it.

If 'autowriteall' is set, just :e will do the trick; otherwise you need
to precede it with :w or :up

However, if the modeline is written by an autocommand, there might be
tricks about it: a command issued by an autocommand will sometimes
trigger further autocommands, and sometimes it won't. The process is
deterministic but I don't understand it fully.

Best regards,
Tony.
--
... And then there's the guy who bought 20,000 bras, cut them in half,
and sold 40,000 yamalchas with chin straps ...


 
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 »