Skip to content

Commit

Permalink
update docs for release windows version
Browse files Browse the repository at this point in the history
  • Loading branch information
buaazp committed Oct 2, 2015
1 parent 1ecfaa2 commit 33869a3
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 15 deletions.
4 changes: 3 additions & 1 deletion Godef.sublime-settings
Expand Up @@ -2,5 +2,7 @@
// Copy this file to Settings - User
// Set your real GOPATH in user's Godef.sublime-settings
// For example:
//"gopath": "/Users/zippo/develop/GO"
// "gopath": "/Users/zippo/gopath"
// or if you use windows
// "gopath": "C:\\gopath"
}
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,4 +1,4 @@
Copyright (c) 2014, 招牌疯子
Copyright (c) 2014-2015, 招牌疯子
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
75 changes: 74 additions & 1 deletion Main.sublime-menu
Expand Up @@ -54,12 +54,85 @@
},
"caption": "Key Bindings – Default"
},
{
"command": "open_file",
"platform": "OSX",
"args": {
"file": "${packages}/User/Default (OSX).sublime-keymap"
},
"caption": "Key Bindings – User"
},
{
"command": "open_file",
"platform": "Linux",
"args": {
"file": "${packages}/User/Default (Linux).sublime-keymap"
},
"caption": "Key Bindings – User"
},
{
"command": "open_file",
"platform": "Windows",
"args": {
"file": "${packages}/User/Default (Windows).sublime-keymap"
},
"caption": "Key Bindings – User"
},
{ "caption": "-" },
{
"command": "open_file",
"platform": "OSX",
"args": {
"file": "${packages}/Godef/Default (OSX).sublime-mousemap"
},
"caption": "Mouse Bindings – Default"
},
{
"command": "open_file",
"platform": "Linux",
"args": {
"file": "${packages}/Godef/Default (Linux).sublime-mousemap"
},
"caption": "Mouse Bindings – Default"
},
{
"command": "open_file",
"platform": "Windows",
"args": {
"file": "${packages}/Godef/Default (Windows).sublime-mousemap"
},
"caption": "Mouse Bindings – Default"
},
{
"command": "open_file",
"platform": "OSX",
"args": {
"file": "${packages}/User/Default (OSX).sublime-mousemap"
},
"caption": "Mouse Bindings – User"
},
{
"command": "open_file",
"platform": "Linux",
"args": {
"file": "${packages}/User/Default (Linux).sublime-mousemap"
},
"caption": "Mouse Bindings – User"
},
{
"command": "open_file",
"platform": "Windows",
"args": {
"file": "${packages}/User/Default (Windows).sublime-mousemap"
},
"caption": "Mouse Bindings – User"
},
{ "caption": "-" },
{
"caption": "Read Me",
"command": "open_file",
"args": {
"file": "${packages}/Godef/README.md"
"file": "${packages}/Godef/messages/install.txt"
}
}
]
Expand Down
22 changes: 13 additions & 9 deletions README.md
@@ -1,8 +1,6 @@
# Godef

This Sublime Text 2/3 [golang](http://golang.org/) plugin adds a `godef` command which
uses [godef](http://godoc.org/code.google.com/p/rog-go/exp/cmd/godef) to find
the definition under the cursor.
This Sublime Text 2/3 [golang](http://golang.org/) plugin adds a `godef` command which uses [godef](http://godoc.org/github.com/rogpeppe/godef) to find the definition under the cursor.

#### Compatible with GoSublime

Expand All @@ -19,9 +17,8 @@ go get -v github.com/rogpeppe/godef
NOTE: If you upgrade you go runtime version, for example from 1.4.1 to 1.4.2, you need to rebuild the `godef` to find the correct postion of runtime src:

```
cd $GOPATH/src/code.google.com/p/rog-go/exp/cmd/godef
cd $GOPATH/src/github.com/rogpeppe/godef
go clean -r -i
go build -v
go install -v
```

Expand Down Expand Up @@ -49,7 +46,7 @@ git clone git@github.com:buaazp/Godef.git ~/.config/sublime-text-3/Packages/Gode

Windows:

Now windows is been supported. Thanks for [@decker502](https://github.com/decker502)'s work. Please use the Sublime Package Control to install this plugin.
Now windows is been supported. Thanks for [@decker502](https://github.com/decker502) and [@mattn](https://github.com/mattn)'s work. Please use the Sublime Package Control to install this plugin.

## Settings

Expand All @@ -59,11 +56,16 @@ You need to add gopath to the setting file before using this plugin. Here's an e

```
{
"gopath": "/Users/zippo/develop/GO"
"gopath": "/Users/zippo/gopath"
}
// or if you use windows
{
"gopath": "C:\\gopath"
}
```

NOTE: The value of `gopath` should be a absolute path. Multiple path like env `GOPATH` are supported but relative path are not:
NOTE: The value of `gopath` should be absolute path. Multiple path like env `GOPATH` are supported but relative path are not:

```
GOOD:
Expand All @@ -82,7 +84,9 @@ BAD:

### Key Bindings

The default key of Godef is `gd`. Don't be afraid. This key binding will NOT modify your codes. Just press it. Or you can goto the definition by clicking mouse left button while pressing `super/ctrl+alt`. You CAN of course change it by yourself. Here's an example key binding:
The default key of Godef is `gd`, which is also the default key of godef plugin for vim. Don't be afraid. This key binding will NOT modify your codes. Just press it.

Or you can click left button while pressing `super/ctrl+alt`. You CAN of course change it by yourself. Here's an example key binding:

```
{ "keys": ["super+h"], "command": "godef" }
Expand Down
13 changes: 10 additions & 3 deletions messages/install.txt
Expand Up @@ -22,7 +22,12 @@ And then add gopath to the setting file before using this plugin.
Here's an example Godef.sublime-settings:

{
"gopath": "/Users/zippo/develop/go"
"gopath": "/Users/zippo/gopath"
}

// or if you use windows
{
"gopath": "C:\\gopath"
}

NOTE: The value of gopath should be a absolute path. Multiple path like env
Expand All @@ -39,8 +44,10 @@ BAD:

********************************************************************************

The default key of Godef is gd. You CAN of course change it by yourself.
Here's an example key binding:
The default key of Godef is gd, which is also the default key of godef plugin
for vim.
Or you can click left button while pressing super/ctrl+alt.
You CAN of course change it by yourself. Here's an example key binding:

{
{ "keys": ["super+h"], "command": "godef" }
Expand Down

0 comments on commit 33869a3

Please sign in to comment.