GoSublime - errs

295 views
Skip to first unread message

Andrew Z

unread,
Jul 26, 2012, 4:50:46 PM7/26/12
to golang-nuts
DisposaBoy,

 If you don't mind a few simple questions re your GoSublime:
 a. is there a way to get the documentation without highliting the whole function name? - ideally it would be very convenient to get the doc by just having the cursor position in the identifier
b. how do i get back on the screen the window with compilation errors?
c. is there a way to show all parameters for the function ? when i type "package." - i get the list of all exported elements, but when i type "func( " there is no drop down for parameters.

Thank you
AZ

Maurice Nicholson

unread,
Jul 27, 2012, 1:21:07 AM7/27/12
to golan...@googlegroups.com
GoSublime was just updated so first make sure you have the latest (restart Sublime Text or find "Package Control: Upgrade Package" from the Goto -> Goto Anything menu.

Now you can use the "Goto Anything" menu again and narrow down the options by typing "GoSublime", or use GS's own "Goto Anything" style menu (cmd-., cmd. on Mac, maybe ctrl-. ctrl. on PC?)

In there you find Show Errors (cmd-., cmd-e). Also you can place your cursor on the line with an error (marked by dot in gutter) and look at the status bar - it shows the error.

Show documentation hint (cmd-., cmd-h) is supposed give the godoc in a panel below the editor but doesn't seem to work reliably for me (it has in the past). Also there is Goto Definition (cmd., cmd-g) which opens the file and jumps to the definition of the item under cursor.

Show Call tip (cmd-., cmd-space) shows the function-under-cursor's parameters in a panel below the editor. You can dismiss these panels with ESC.

Personally I also use Add/Remove package (cmd-., cmd-p) all the time.

Andrew

unread,
Jul 27, 2012, 11:51:06 AM7/27/12
to golan...@googlegroups.com
Maurice,
 thank you for response.

errors - try this scenario - make some errors and try to build the file.
It should show you a window with errors smth like this:
# queen
./queen.go:41: invalid argument parent1 (type *[][]int) for len
./queen.go:42: use of builtin copy not in function call

now ESC from it. and try CMD+.,CMD+e - in my case it opens the window in the middle of the screen and reports "no errors to report"

call tips - it works as expected for function calls. But i can't get it to work for, for example, "make" or "new" and "copy"

Another question - is there a way to go back to the line i was @ after ,say, i jumped to the package declaration?

Thank you
AZ

DisposaBoy

unread,
Jul 27, 2012, 1:24:30 PM7/27/12
to golan...@googlegroups.com
file a bug report and I'll answer there.
Reply all
Reply to author
Forward
0 new messages