Skip to content

<Plug>(ref-open) doesn't respect g:ref_open #28

@tyru

Description

@tyru

issuesが英語ばっかりだったので途中まで空気読んで英語で書いてしまったので無駄に日本語/英語両方で登録するテスト(なんて無駄な)。

The spoken language on this issues seems English.
So I started writing this issue in English...
but you(@thinca) are an Japanese!
I should have written this issue in only Japanese...

日本語(Japanese)

:help <Plug>(ref-open)にはこう書いてあります。

ソースが見つからなかった場合は |K| を押したのと同じになります。

この挙動の問題点

  1. ref.vimはfiletypeがvimな全てのバッファに対して:normal! Kと同じように振る舞う
  2. しかし:normal! Kg:ref_openを考慮しない
  3. したがってK(実際は<Plug>(ref-open))はfiletypeがvimな全てのバッファに対してこのように振る舞う

途中間違ってたらすみません。

期待する動作

K(<Plug>(ref-open))がg:ref_openも考慮してくれるとうれしいです。
ただg:ref_open:verticalとか:belowrightみたいな:splitに対するサブコマンドではなく、開くコマンドそのものなので難しいかもしれませんが...

英語(English)

From :help <Plug>(ref-open)

When the source that should be used is not
found, the same behavior as |K|.

Problem

  1. ref.vim behaves like normal! K on any buffer whose filetype is vim.
  2. However, :normal! K doesn't respect g:ref_open.
  3. So, K(this is actually <Plug>(ref-open)) on any buffer whose filetype is vim does not respect g:ref_open.

Sorry if my deduction was wrong.

Expected Behavior

It would be great if K(<Plug>(ref-open)) respects g:ref_open.
I know/guess it is difficult to implement this behavior,
because g:ref_open is a command to open a buffer,
not subcommand for a command like :vertical, :belowright.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions