rb_nav 0.0.1 → 0.0.3
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 +8 -8
- data/Rakefile +1 -1
- data/lib/rb_nav/version.rb +1 -1
- data/lib/rb_nav.vim +4 -8
- metadata +2 -2
data/README.markdown
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# RbNav
|
2
2
|
|
3
|
-
RbNav is a lightweight Vim
|
3
|
+
RbNav is a lightweight Vim plugin that helps you navigate the classes,
|
4
4
|
modules, and methods in your Ruby project
|
5
5
|
|
6
6
|
[screenshots]
|
@@ -41,8 +41,8 @@ For the all the commands below, the mapleader is assumed to be `,`. If it is
|
|
41
41
|
* `,N` navigate the classes and modules in your project
|
42
42
|
* `,n` navigating the methods in the current file
|
43
43
|
|
44
|
-
|
45
|
-
|
44
|
+
To change these keymappings, edit the two `nnoremap` lines at the end of
|
45
|
+
`~/.vim/plugin/rb_nav.vim`.
|
46
46
|
|
47
47
|
Use the standard Vim autocompletion commands to move up and down the match
|
48
48
|
list.
|
@@ -59,13 +59,13 @@ one.
|
|
59
59
|
|
60
60
|
### The search path
|
61
61
|
|
62
|
-
By default RbNav looks
|
63
|
-
|
62
|
+
By default RbNav looks through all '.rb' files in your working directory and
|
63
|
+
its subdirectories.
|
64
64
|
|
65
|
-
You can
|
66
|
-
files
|
65
|
+
You can restrict the search path by putting something like this in a `.vimrc`
|
66
|
+
files in your project's root directory.
|
67
67
|
|
68
|
-
let g:RbNavPaths = "
|
68
|
+
let g:RbNavPaths = "app lib spec"
|
69
69
|
|
70
70
|
The directories should be separated by spaces.
|
71
71
|
|
data/Rakefile
CHANGED
@@ -40,7 +40,7 @@ task :build_webpage do
|
|
40
40
|
`cp README.markdown ../project-webpages/src/rb_nav.README.markdown`
|
41
41
|
`cp coverage.markdown ../project-webpages/src/rb_nav.coverage.markdown`
|
42
42
|
Dir.chdir "../project-webpages" do
|
43
|
-
puts `ruby gen.rb rb_nav #{
|
43
|
+
puts `ruby gen.rb rb_nav #{RbNav::VERSION}`
|
44
44
|
`open out/rb_nav.html`
|
45
45
|
end
|
46
46
|
end
|
data/lib/rb_nav/version.rb
CHANGED
data/lib/rb_nav.vim
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
" This can be set in .vimrc
|
6
6
|
if !exists("g:RbNavPaths")
|
7
7
|
let g:RbNavPaths = ""
|
8
|
-
for x in ['
|
8
|
+
for x in ['.']
|
9
9
|
if isdirectory(x)
|
10
10
|
let g:RbNavPaths .= x.' '
|
11
11
|
endif
|
@@ -68,7 +68,7 @@ function! AutocompleteRbNavClasses(findstart, base)
|
|
68
68
|
endfun
|
69
69
|
|
70
70
|
func! RbNavClasses()
|
71
|
-
let command = "grep -rn ".g:RbNavPaths." --include='*.rb' -e '^\\s*\\(class\\|module\\) \\+[A-Z]' | rb_nav_classes | sort"
|
71
|
+
let command = "grep -rn ".g:RbNavPaths." --exclude-dir=.git --include='*.rb' -e '^\\s*\\(class\\|module\\) \\+[A-Z]' | rb_nav_classes | sort"
|
72
72
|
let res = system(command)
|
73
73
|
return split(res, "\n")
|
74
74
|
endfunc
|
@@ -142,9 +142,5 @@ func! s:jump_to_method()
|
|
142
142
|
call feedkeys("z\<cr>", "t")
|
143
143
|
endfunc
|
144
144
|
|
145
|
-
|
146
|
-
|
147
|
-
au BufRead,BufNewFile *.rb nnoremap <Leader>n :call <SID>autocomplete_methods()<cr>
|
148
|
-
|
149
|
-
|
150
|
-
|
145
|
+
nnoremap <Leader>N :call <SID>autocomplete_classes()<cr>
|
146
|
+
nnoremap <Leader>n :call <SID>autocomplete_methods()<cr>
|
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.
|
5
|
+
version: 0.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Daniel Choi
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-09 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|