Skip to content

Commit 4a0df2f

Browse files
committed
Update README
1 parent 9c6ce62 commit 4a0df2f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

README.mkd

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,21 @@ List your exclusions before the patterns you do want.
114114
```
115115
116116
117+
### Ignored files
118+
119+
By default Rooter does not take into account `.gitignore`.
120+
121+
To make Rooter aware of ignored files:
122+
123+
```viml
124+
let g:rooter_ignore = 1
125+
```
126+
127+
When this is set, and the file in question is ignored by git, Rooter acts as if `.git` is not in `g:rooter_patterns`.
128+
129+
Support for other VCSs' ignores could be added.
130+
131+
117132
### Running automatically or manually
118133

119134
To toggle between automatic and manual behaviour, use `:RooterToggle`.

test/test_rooter.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function SetUp()
3838
let g:rooter_change_directory_for_non_project_files = ''
3939
let g:rooter_silent_chdir = 0
4040
let g:rooter_resolve_links = 0
41+
let g:rooter_ignore = 0
4142

4243
autocmd! User RooterChDir
4344

@@ -221,3 +222,8 @@ function Test_root_contains_wildcards()
221222
execute 'edit' s:wildcard_dir.'/xyz/m.txt'
222223
call assert_equal(s:wildcard_dir, getcwd())
223224
endfunction
225+
226+
function Test_ignore()
227+
let g:rooter_ignore = 1
228+
" TODO
229+
endfunction

0 commit comments

Comments
 (0)