https://github.com/euclio/gitignore.vim
Vim plugin that adds the entries in a .gitignore file to 'wildignore'.
https://github.com/euclio/gitignore.vim
Last synced: 2 months ago
JSON representation
Vim plugin that adds the entries in a .gitignore file to 'wildignore'.
- Host: GitHub
- URL: https://github.com/euclio/gitignore.vim
- Owner: euclio
- License: mit
- Created: 2014-07-26T21:58:31.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-01-13T18:17:39.000Z (over 6 years ago)
- Last Synced: 2025-01-14T06:25:39.934Z (4 months ago)
- Language: VimL
- Homepage:
- Size: 164 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gitignore.vim
=============A Vim plugin that automatically adds the entries in a repo's .gitignore file to
`wildignore`, meaning that those files do not appear in the wild menu. Plugins
(such as [CtrlP]) that depend on `glob()` or `globpath()` will also ignore these
files.Note: This plugin requires vim to be compiled with Python support.
## Fugitive Integration
This plugin uses [fugitive] to detect git repositories. The plugin will then add
that repo's gitignore entries to `wildignore`.If you don't want that to happen automatically, create the file
`.vim/after/plugin/disable-gitignore-fugitive.vim` with the single command:```
autocmd! wildignorefromgitignore_fugitive
```## Manual Triggering
If you need to invoke the functionality manually, put this in your .vimrc:```
map foo WildignoreFromGitignore
```which will look for a .gitignore file in the same directory as the current file.
You can also map against the `:WildignoreFromGitignore` command that accepts
a directory name as in:```
map baz :WildignoreFromGitignore /path/to/some/repo
```## Acknowledgments
This plugin is forked from the [gitignore.vim script][gitignore.vim] maintained
by Adam Bellaire on [vim.org], which is in turn based on [this StackOverflow
post][stackoverflow].[fugitive]: https://github.com/tpope/vim-fugitive
[CtrlP]: https://github.com/kien/ctrlp.vim
[gitignore.vim]: http://www.vim.org/scripts/script.php?script_id=2557
[stackoverflow]: http://stackoverflow.com/a/581860
[vim.org]: http://www.vim.org