rb_nav 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.markdown CHANGED
@@ -59,11 +59,12 @@ one.
59
59
 
60
60
  ### The search path
61
61
 
62
- By default RbNav looks through all '.rb' files in your working directory and
63
- its subdirectories.
62
+ By default RbNav searches files using these `grep` command flags:
64
63
 
65
- You can restrict the search path by putting something like this in a `.vimrc`
66
- files in your project's root directory.
64
+ let g:RbNavPaths = " . --exclude-dir='\.git' --exclude-dir='vendor' --exclude-dir='db' --include='*.rb' "
65
+
66
+ You can override these flags by reassigning `g:RbNavPaths` to something else in
67
+ a `.vimrc` files in your project's root directory.
67
68
 
68
69
  let g:RbNavPaths = "app lib spec"
69
70
 
@@ -1,4 +1,4 @@
1
1
  module RbNav
2
2
 
3
- VERSION = '0.0.6'
3
+ VERSION = '0.0.7'
4
4
  end
data/lib/rb_nav.vim CHANGED
@@ -2,15 +2,9 @@
2
2
  " Maintainer: Daniel Choi <dhchoi@gmail.com>
3
3
  " License: MIT License (c) 2011 Daniel Choi
4
4
 
5
- " This can be set in .vimrc
6
- if !exists("g:RbNavPaths")
7
- let g:RbNavPaths = ""
8
- for x in ['.']
9
- if isdirectory(x)
10
- let g:RbNavPaths .= x.' '
11
- endif
12
- endfor
13
- endif
5
+ " This can be overridden in .vimrc
6
+
7
+ let g:RbNavPaths = " . --exclude-dir='\.git' --exclude-dir='vendor' --exclude-dir='db' --include='*.rb' "
14
8
 
15
9
  let s:last_class_search = ""
16
10
 
@@ -68,7 +62,7 @@ function! AutocompleteRbNavClasses(findstart, base)
68
62
  endfun
69
63
 
70
64
  func! RbNavClasses()
71
- let command = "grep -rn ".g:RbNavPaths." --exclude='.git/*' --include='*.rb' -e '^\\s*\\(class\\|module\\) \\+[A-Z]' | rb_nav_classes | sort"
65
+ let command = "grep -rn ".g:RbNavPaths." -e '^\\s*\\(class\\|module\\) \\+[A-Z]' | rb_nav_classes | sort"
72
66
  let res = system(command)
73
67
  return split(res, "\n")
74
68
  endfunc
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rb_nav
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi