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

how to use '--heading' in the interactive mode #901

Open
2 of 6 tasks
zhangk1551 opened this issue Jun 7, 2022 · 6 comments
Open
2 of 6 tasks

how to use '--heading' in the interactive mode #901

zhangk1551 opened this issue Jun 7, 2022 · 6 comments

Comments

@zhangk1551
Copy link

  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version: 8.2
  • 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:
    nnoremap g :Leaderf rg --fullScreen --heading

Describe your question, feature request, or bug.

I can use "--heading" like ":Leaderf rg --fullScreen foo --heading" to search "foo", but I can't use it in the interactive mode.

Steps to reproduce

Actual behaviour

Currently, it will return the heading format search result of "".

Expected behaviour

heading format in the interactive mode

@zhangk1551
Copy link
Author

let g:Lf_RgConfig = [
   \ "--heading"
\]

didn't work as well

@Yggdroot
Copy link
Owner

Yggdroot commented Jun 8, 2022

"--heading" does not support interactive mode, because interactive mode will lose the file name information.

@zhangk1551
Copy link
Author

Thank you for the quick reply.

I don't quite get your point. The information in "no-heading" and "heading" mode are quite alike, the difference is how they are organized, and we can use the "heading" mode to show the search results for the current word. what does it mean by "lose the file name information"?

@Yggdroot
Copy link
Owner

What do you mean by interactive mode?

@zhangk1551
Copy link
Author

image
Sorry for the late reply, for the interactive mode I mean typing interactively and get the instant search results response for the keyword.

image
I can rg the current word in the heading format, but can't use this format when I want to change the keyword.

@Yggdroot
Copy link
Owner

Yggdroot commented Sep 8, 2023

I think now you can use Leaderf rg --live --heading.

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

2 participants