Skip to content

Pick bufnr function, to allow selecting which split to open a selected file in #1036

@Leandros

Description

@Leandros
  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version:
NVIM v0.9.2
Build type: Release
LuaJIT 2.1.1692716794

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/share/nvim"

Run :checkhealth for more info
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :py print(sys.version):
3.7.16 (default, Aug 30 2023, 20:37:53)
[GCC 7.3.1 20180712 (Red Hat 7.3.1-15)]
  • Output of :py3 print(sys.version):
3.7.16 (default, Aug 30 2023, 20:37:53)
[GCC 7.3.1 20180712 (Red Hat 7.3.1-15)]
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:

Describe your question, feature request, or bug.

LeaderF will always open the specified file in the least recently focused buffer (the buffer that you previously edited before triggering leaderf).

I would like to be able to select which buffer the file is opened in, similar to what I can achieve with nvim-tree and window-picker:
Screenshot 2023-09-15 at 11 58 33

The green bars below each split is telling me which key to press to open the file in this split.

As far as I understand, LeaderF would need to provide a "callback" that's called before opening the file. The pick() function from window-picker will return a bufnr in which the new file is opened.

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