Skip to content

vim-scripts/vim-gitmodeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

This is a mirror of http://www.vim.org/scripts/script.php?script_id=4538

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/

About

Store modelines in git config

Resources

Stars

Watchers

Forks

Packages

No packages published