Skip to content

Commit 8a78ded

Browse files
committed
def: reuse is a better word
1 parent a605c62 commit 8a78ded

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ IMPROVEMENTS:
4141
* **`:GoTestFunc`** supports now testable examples [gh-794]
4242
* **`:GoDef`** can jump to existing buffers instead of opening a new window
4343
(split, vsplit or tab). By default it's disabled to not break the old
44-
behavior, can be enabled with `let g:go_def_use_buffer = 1`
44+
behavior, can be enabled with `let g:go_def_reuse_buffer = 1`
4545

4646
BUG FIXES:
4747

autoload/go/def.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function! s:jump_to_declaration(out, mode)
6868

6969
" jump to existing buffer if, 1. we have enabled it, 2. the buffer is loaded
7070
" and 3. there is buffer window number we switch to
71-
if get(g:, 'go_def_use_buffer', 0) && bufloaded(filename) != 0 && bufwinnr(filename) != -1
71+
if get(g:, 'go_def_reuse_buffer', 0) && bufloaded(filename) != 0 && bufwinnr(filename) != -1
7272
" jumpt to existing buffer if it exists
7373
execute bufwinnr(filename) . 'wincmd w'
7474
elseif a:mode == "tab"

doc/vim-go.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -745,17 +745,17 @@ Goto declaration/definition. Results are shown in the current buffer.
745745
*(go-def-split)*
746746

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

750750
*(go-def-vertical)*
751751

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

755755
*(go-def-tab)*
756756

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

760760
*(go-def-stack)*
761761

@@ -970,12 +970,12 @@ these keys or mappings. Default is enabled. >
970970
971971
let g:go_def_mapping_enabled = 1
972972
<
973-
*'g:go_def_use_buffer'*
973+
*'g:go_def_reuse_buffer'*
974974

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

981981
*'g:go_dispatch_enabled'*

0 commit comments

Comments
 (0)