LeaderF icon indicating copy to clipboard operation
LeaderF copied to clipboard

[Feature]prompt中打开文件可以选择在哪个split中打开

Open MissiontoMars opened this issue 3 years ago • 9 comments

  • vim or neovim?
    • [ ] vim
    • [x] neovim
  • Output of vim --version or nvim --version:
  • Output of :echo has("python"):
  • Output of :echo has("python3"):
  • Output of :echo &pythondll(only vim, not neovim):
  • Output of :echo &pythonthreedll(only vim, not neovim):
  • Output of :py print(sys.version):
  • Output of :py3 print(sys.version):
  • Output of :echo g:Lf_Debug_Cmd:
  • Output of :echo g:Lf_FilesFromCache:
  • Operating system:
    • [ ] Linux
    • [x] Mac OS X
    • [ ] Windows
    • [ ] Etc.
  • Configurations related to LeaderF in vimrc:

Describe your question, feature request, or bug.

比如当前split显示了两个buffer,leaderf打开文件的时候,能增加一个选项,可以选择在左右哪一个split中显示。 就像nvim-tree那样,打开文件的时候,左边split标为A,右边标为B,同A/B来选择。

Steps to reproduce

Actual behaviour

Expected behaviour

MissiontoMars avatar Apr 26 '22 09:04 MissiontoMars

@Yggdroot Can you consider this requirement? thank you!!

MissiontoMars avatar Apr 29 '22 15:04 MissiontoMars

@Yggdroot 请问考虑实现这个功能吗?

MissiontoMars avatar May 10 '22 15:05 MissiontoMars

一般是当前光标在哪个窗口,就在哪个窗口打开。

Yggdroot avatar May 11 '22 02:05 Yggdroot

一般是当前光标在哪个窗口,就在哪个窗口打开。

是的。比如当前光标在左边,说明在看左边的代码,通过Leaderf的prompt打开其他文件的时候,多数时候是希望不要覆盖掉左边正在查看的代码,希望它在右侧打开。就是这个feature

MissiontoMars avatar May 11 '22 02:05 MissiontoMars

但是如果有多个split,怎么指定是在哪个打开呢?

Yggdroot avatar May 11 '22 02:05 Yggdroot

但是如果有多个split,怎么指定是在哪个打开呢?

image

参考nvim-tree的实现,如果当前窗口是split的,在选择文件打开的时候,会用ABCD....标识窗口,然后pick window这里输入选择就可以了。我觉得是不是也可以用类似的方式呢?

MissiontoMars avatar May 11 '22 02:05 MissiontoMars

这个实现工作量有点大,先挂在这里吧,等以后有时间我看看。

Yggdroot avatar May 11 '22 02:05 Yggdroot

好的~

MissiontoMars avatar May 11 '22 02:05 MissiontoMars

@Yggdroot 可否选择面积最大的split

ooing avatar Jan 23 '23 02:01 ooing