Skip to content

Commit 5f02fbc

Browse files
committed
Include modules when on gf on constant
1 parent 9cfa605 commit 5f02fbc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ftplugin/ruby.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,13 @@ function! RubyCursorIdentifier() abort
351351
endfunction
352352

353353
function! RubyCursorFile() abort
354-
let cfile = expand('<cfile>')
354+
let isfname = &isfname
355+
try
356+
set isfname+=:
357+
let cfile = expand('<cfile>')
358+
finally
359+
let isfname = &isfname
360+
endtry
355361
let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!')
356362
let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*')
357363
let ext = getline('.') =~# '^\s*\%(require\|autoload\)\>' ? '.rb' : ''

0 commit comments

Comments
 (0)