LeaderF icon indicating copy to clipboard operation
LeaderF copied to clipboard

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

Open zhangk1551 opened this issue 2 years ago • 6 comments

  • vim or neovim?
    • [x] 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:
    • [x] 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 avatar Jun 07 '22 19:06 zhangk1551

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

didn't work as well

zhangk1551 avatar Jun 07 '22 19:06 zhangk1551

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

Yggdroot avatar Jun 08 '22 23:06 Yggdroot

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"?

zhangk1551 avatar Jun 11 '22 19:06 zhangk1551

What do you mean by interactive mode?

Yggdroot avatar Jun 11 '22 23:06 Yggdroot

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.

zhangk1551 avatar Jul 21 '22 19:07 zhangk1551

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

Yggdroot avatar Sep 08 '23 02:09 Yggdroot