Skip to content

Commit

Permalink
def: reuse is a better word
Browse files Browse the repository at this point in the history
  • Loading branch information
fatih committed Apr 25, 2016
1 parent a605c62 commit 8a78ded
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ IMPROVEMENTS:
* **`:GoTestFunc`** supports now testable examples [gh-794]
* **`:GoDef`** can jump to existing buffers instead of opening a new window
(split, vsplit or tab). By default it's disabled to not break the old
behavior, can be enabled with `let g:go_def_use_buffer = 1`
behavior, can be enabled with `let g:go_def_reuse_buffer = 1`

BUG FIXES:

Expand Down
2 changes: 1 addition & 1 deletion autoload/go/def.vim
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function! s:jump_to_declaration(out, mode)

" jump to existing buffer if, 1. we have enabled it, 2. the buffer is loaded
" and 3. there is buffer window number we switch to
if get(g:, 'go_def_use_buffer', 0) && bufloaded(filename) != 0 && bufwinnr(filename) != -1
if get(g:, 'go_def_reuse_buffer', 0) && bufloaded(filename) != 0 && bufwinnr(filename) != -1
" jumpt to existing buffer if it exists
execute bufwinnr(filename) . 'wincmd w'
elseif a:mode == "tab"
Expand Down
10 changes: 5 additions & 5 deletions doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -745,17 +745,17 @@ Goto declaration/definition. Results are shown in the current buffer.
*(go-def-split)*

Goto declaration/definition. Results are shown in a split window.
Jumps to an existing buffer if |g:go_def_use_buffer| is enabled.
Jumps to an existing buffer if |g:go_def_reuse_buffer| is enabled.

*(go-def-vertical)*

Goto declaration/definition. Results are shown in a vertical split window.
Jumps to an existing buffer if |g:go_def_use_buffer| is enabled.
Jumps to an existing buffer if |g:go_def_reuse_buffer| is enabled.

*(go-def-tab)*

Goto declaration/definition. Results are shown in a tab window.
Jumps to an existing buffer if |g:go_def_use_buffer| is enabled.
Jumps to an existing buffer if |g:go_def_reuse_buffer| is enabled.

*(go-def-stack)*

Expand Down Expand Up @@ -970,12 +970,12 @@ these keys or mappings. Default is enabled. >
let g:go_def_mapping_enabled = 1
<
*'g:go_def_use_buffer'*
*'g:go_def_reuse_buffer'*

Use this option to jump to an existing buffer for the split, vsplit and tab
mappings of |:GoDef|. By default it's disabled. >
let g:go_def_use_buffer = 0
let g:go_def_reuse_buffer = 0
<

*'g:go_dispatch_enabled'*
Expand Down

0 comments on commit 8a78ded

Please sign in to comment.