Skip to content

Commit f2b3915

Browse files
author
Herbert Maschke
committed
allow gf (go to file) command also for __() method (which is an alias for trans())
1 parent 299813e commit f2b3915

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

autoload/laravel/goto.vim

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,18 @@ endfunction
9191

9292
""
9393
" @private
94-
" Capture language name at cursor
94+
" Capture language name at cursor using trans() method
9595
function! laravel#goto#language() abort
9696
return s:find_name('\<trans\%(_choice\)\?([''"]\([^''".]\+\)[^''"]*[''"][,)].*$')
9797
endfunction
9898

99+
""
100+
" @private
101+
" Capture language name at cursor using __() method
102+
function! laravel#goto#language() abort
103+
return s:find_name('\<__\%(_choice\)\?([''"]\([^''".]\+\)[^''"]*[''"][,)].*$')
104+
endfunction
105+
99106
""
100107
" @private
101108
" Hack for testing script-local functions.

0 commit comments

Comments
 (0)