Skip to content

Commit 0736e29

Browse files
committed
godef follow symbolic link and change key
1 parent 86cdc68 commit 0736e29

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Commands/Def.tmCommand

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Go::godef</string>
1313
<string>selection</string>
1414
<key>inputFormat</key>
1515
<string>text</string>
16+
<key>keyEquivalent</key>
17+
<string>^.</string>
1618
<key>name</key>
1719
<string>Go to Definition</string>
1820
<key>outputCaret</key>

Support/gomate.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require ENV['TM_SUPPORT_PATH'] + '/lib/tm/executor'
66
require ENV['TM_SUPPORT_PATH'] + '/lib/tm/process'
77
require ENV['TM_SUPPORT_PATH'] + '/lib/tm/save_current_document'
8+
require 'pathname'
89

910
# TextMate's special GOPATH used in .tm_properties files prepended to the environment's GOPATH
1011
ENV['GOPATH'] = (ENV.has_key?('TM_GOPATH') ? ENV['TM_GOPATH'] : '') +
@@ -119,7 +120,8 @@ def Go::godef
119120

120121
if err.nil? || err == ''
121122
file_details = out.split(':')
122-
TextMate.go_to(:file => file_details[0],
123+
file = Pathname.new(file_details[0]).realpath
124+
TextMate.go_to(:file => file,
123125
:line => file_details[1],
124126
:column => file_details[2].to_i)
125127
else

0 commit comments

Comments
 (0)