Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 6 tasks
MissiontoMars opened this issue Apr 26, 2022 · 9 comments
Open
2 of 6 tasks

Comments

@MissiontoMars
Copy link

MissiontoMars commented Apr 26, 2022

  • vim or neovim?
    • vim
    • 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
    • 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
Copy link
Author

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

@MissiontoMars
Copy link
Author

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

@Yggdroot
Copy link
Owner

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

@MissiontoMars
Copy link
Author

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

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

@Yggdroot
Copy link
Owner

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

@MissiontoMars
Copy link
Author

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

image

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

@Yggdroot
Copy link
Owner

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

@MissiontoMars
Copy link
Author

好的~

@ooing
Copy link

ooing commented Jan 23, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants