sponsor Vim development Vim logo Vim Book Ad

Modeliner : Generates modeline according to the current settings.

 script karma  Rating 17/11, Downloaded by 1328    Comments, bugs, improvements  Vim wiki

created by
Shuhei Kubota
 
script type
utility
 
description
[How to use it?]

execute ':Modeliner'.


[And, what will happen?]

If your current settings are like below:
  - setl fenc=utf-8
  - setl et
  - setl sts=4

then you will get a modeline like:
  - for 'c' filetype:
      /* vim: set fenc=utf-8 et sts=4 : */
  - for 'xml' filetype:
      <!-- vim: set fenc=utf-8 et sts=4 : -->


[How to include my favorite options?]

Modify  g:Modeliner_format.  It is a simple format.

An example:
    let g:Modeliner_format = 'fenc=  tw=  et  ts=  sts=  sw=  backup wrap'
 
install details
Put this plugin in your plugin directory(e.g. $VIMRUNTIME/plugin).
Then restart Vim or :source it.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
modeliner.vim 0.3.0 2008-06-26 7.0 Shuhei Kubota If you use The NERD Commenter, this script uses it to generate a modeline as a comment.
modeliner.vim 0.2.0 2007-10-03 6.0 Shuhei Kubota finds the existing modeline and overwrite it
modeliner.vim 0.1.0 2006-02-22 6.0 Shuhei Kubota Initial upload
ip used for rating: 54.167.11.16

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo