sponsor Vim development Vim logo Vim Book Ad

RootIgnore : Set 'wildignore' from git repo root

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

created by
Pine Wu
 
script type
utility
 
description
Set 'wildignore' from git repo root.

See github https://github.com/octref/rootignore.

Adapted from gitignore <http://www.vim.org/scripts/script.php?script_id=2557>; by Adam Bellaire.

This plugin is designed to complement CtrlP.
There is no easy way to:
1. Restrict search results to files under current directory
2. Honor .gitignore in repo root
at the same time.

Adam Bellaire's script honors .gitignore when Vim is opened at repo root, but not when Vim is opened in subfolders under repo root.

If this plugin is present, when you cd foo/bar/ and open Vim, and suppose foo/.gitingore ignores _*, CtrlP ignores foo/bar/_build and all results are under foo/bar/.
 
install details
Vundle installation is recommended.

Add this to your .vimrc:
plugin 'octref/RootIgnore'
 

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
RootIgnore.tar.gz 0.3 2015-08-07 7.0 Pine Wu Able to use .gitignore even in non-git folder.
Can use a global ~/.gitignore.
RootIgnore.tar.gz 0.2.1 2015-03-01 7.0 Pine Wu Add g:RootIgnoreUseHome which allows ignoring ~/.gitignore.
RootIgnore.tar.gz 0.2 2015-02-06 7.0 Pine Wu Resolve folder path in gitignore to path relative to current working dir.
RootIgnore.tar.gz 0.1 2014-11-03 7.0 Pine Wu Initial upload
ip used for rating: 18.117.184.62

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.
   
Vim at Github