rb_nav 0.1.5 → 0.1.6

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.
Files changed (3) hide show
  1. data/lib/rb_nav/version.rb +1 -1
  2. data/lib/rb_nav.vim +6 -6
  3. metadata +1 -1
@@ -1,4 +1,4 @@
1
1
  module RbNav
2
2
 
3
- VERSION = '0.1.5'
3
+ VERSION = '0.1.6'
4
4
  end
data/lib/rb_nav.vim CHANGED
@@ -30,7 +30,6 @@ func! s:prepare_autocomplete()
30
30
  setlocal noswapfile
31
31
  setlocal modifiable
32
32
  setlocal nowrap
33
- resize 2
34
33
  noremap <buffer> <Esc> :close<cr>
35
34
  inoremap <buffer> <Tab> <C-x><C-u>
36
35
  endfunc
@@ -39,13 +38,13 @@ endfunc
39
38
 
40
39
  function! s:autocomplete_classes()
41
40
  call s:prepare_autocomplete()
41
+ call feedkeys("\<c-w>K:resize 2\<cr>", 't')
42
42
  inoremap <buffer> <cr> <Esc>:call <SID>open_class_file()<cr>
43
43
  noremap <buffer> <cr> <Esc>:call <SID>open_class_file()<cr>
44
44
  setlocal completefunc=AutocompleteRbNavClasses
45
+ gg
45
46
  call setline(1, "Select a class or module: ")
46
- call setline(2, "") " s:last_class_search)
47
- normal G$
48
- call feedkeys("a\<c-x>\<c-u>\<c-p>", 't')
47
+ call feedkeys("o\<c-x>\<c-u>\<c-p>", 't')
49
48
  endfunction
50
49
 
51
50
  function! AutocompleteRbNavClasses(findstart, base)
@@ -57,7 +56,7 @@ function! AutocompleteRbNavClasses(findstart, base)
57
56
  let s:selection_list = RbNavClasses()
58
57
  for m in s:selection_list
59
58
  " why doesn't case insensitive flag work?
60
- if m =~ substitute(a:base, '\*', '\\*', '')
59
+ if m =~ '\c'.substitute(a:base, '\*', '\\*', '')
61
60
  call add(res, m)
62
61
  endif
63
62
  endfor
@@ -75,6 +74,7 @@ endfunc
75
74
 
76
75
  function! s:autocomplete_methods()
77
76
  call s:prepare_autocomplete()
77
+ resize 2
78
78
  inoremap <buffer> <cr> <Esc>:call <SID>jump_to_method()<cr>
79
79
  noremap <buffer> <cr> <Esc>:call <SID>jump_to_method()<cr>
80
80
  setlocal completefunc=AutocompleteRbNavMethods
@@ -117,7 +117,7 @@ func! s:open_class_file()
117
117
  if len(split(selection, '\s\+')) == 1
118
118
  " user pressed return without autocompleting, so find the first match
119
119
  for x in s:selection_list
120
- if get(split(x, '\s\+'), 0) == selection
120
+ if tolower(get(split(x, '\s\+'), 0)) == tolower(selection)
121
121
  let selection = x
122
122
  endif
123
123
  endfor
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rb_nav
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.5
5
+ version: 0.1.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Choi