sponsor Vim development Vim logo Vim Book Ad

vim-gitmodeline : Store modelines in git config

 script karma  Rating 0/0, Downloaded by 96    Comments, bugs, improvements  Vim wiki

created by
Andreas Schneider
 
script type
ftplugin
 
description
This is a vim plugin which reads modelines from the git config and sets it to the current buffer.
To set a modeline in the git config you can do it with the following command:

  git config --add vim.modeline "tabstop=8 shiftwidth=8 noexpandtab cindent"

The allowed modelines are defined in a variable and can be overwritten and
extended by setting the following in your .vimrc:

  let g:git_modeline_allowed_items = [
              \ "textwidth",   "tw",
              \ "softtabstop", "sts",
              \ "tabstop",     "ts",
              \ "shiftwidth",  "sw",
              \ "expandtab",   "et",   "noexpandtab", "noet",
              \ "filetype",    "ft",
              \ "foldmethod",  "fdm",
              \ "readonly",    "ro",   "noreadonly", "noro",
              \ "rightleft",   "rl",   "norightleft", "norl",
              \ "cindent",     "cin",  "nocindent", "nocin",
              \ "smartindent", "si",   "nosmartindent", "nosi",
              \ "autoindent",  "ai",   "noautoindent", "noai",
              \ "spell",
              \ "spelllang"
              \ ]

The git repository can be found here: http://git.cryptomilk.org/projects/vim-gitmodeline.git/
 
install details
Copy it to the plugin dir.
 

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
git_modeline.vim 0.1 2013-04-22 7.3 Andreas Schneider Initial upload
ip used for rating: 54.227.11.2

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