Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

Description

907th/vim-auto-save pre-save git hook - only save files under git (or any other scm you can think of) Inspired by vim-rooter

Installation

Use your favorite package manger

Usage

Just install this package and 907th/vim-auto-save and all your git files will be automatically saved. All other files will have to be saved manually.

Options

A lot of the options are taken from vim rooter. for a more detailed explanation view vim-rooter's README file

To specify how to identify a project's root directory:

" .vimrcletg:git_patterns= ['.git', '.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']" default values

By default all files and directories trigger git-auto-save. Configure a comma separated list of file patterns to specify which files trigger git-auto-save. Include / to trigger git-auto-save on directories.

" directories and all files (default)letg:git_targets='/,*'" ignore directories; all filesletg:git_targets='*'" ignore directories; yaml filesletg:git_targets='*.yml,*.yaml'" directories and yaml filesletg:git_targets='/,*.yml,*.yaml'

By default git-auto-save doesn't resolve symbolic links. To resolve links:

letg:git_resolve_links=1

Configuration

My preferred settings:

" .vimrcletg:auto_save=1letg:auto_save_silent=1letg:auto_save_events= ["CursorHold"]
letupdatetime=4000

License

None

About

auto save only git files

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages