question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature request] Find file based on the current buffer

See original GitHub issue

The nixprime/cpsm CtrlP matcher has tihs awesome feature:

cpsm will still attempt to perform matching on an empty query based on the open file in the current buffer.

When the query is empty the match is done based on the current buffer name.

I like this feature a lot because it allows me to quickly switch between the implementation file and his test file. eg: Having the file foo.go open, press <C-p>, select the foo_test.go file…

The current buffer have to be ignore from the search result… (another feature by itself??)

I know such feature can be found in vim-projectionist, but I tend to prefer selecting file though the fuzzyfinder for other reason.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Yggdrootcommented, Oct 11, 2019

Also, Could it be possible to have another VIM option to always ignore the current buffer name from the search result?

Since we have the feature “Find file based on the current buffer”, I don’t think it is necessary to support it. Because if the file name you intend to find is much similar with current buffer name, it will be placed at the top when no input, meanwhile the current buffer name is at the bottom(we can think it is ignored). If not similar, the current buffer name won’t bother you at the top.

1reaction
Yggdrootcommented, Sep 17, 2019

Maybe I will add this feature in the future, currently, you can achieve similar effect through this: If you opened foo.go using LeaderF by typing foo, then launch LeaderF, press <up>, you will see the last search result.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feature Requst: File picker based on current buffer's directory ...
Being able to open a picker based on the current buffer's file location, and having a way to "go up a level" in...
Read more >
How to find which file provide(d) the feature in emacs elisp
I execute the following code in scratch buffer which prints filename and the symbols in separate lines consecutively. (dolist (var load-history) (princ (format ......
Read more >
Visiting (GNU Emacs Manual)
To visit a file, type C-x C-f ( find-file ) and use the minibuffer to enter the name of the desired file. While...
Read more >
Feature Request Form - Buffer
Thank you for using Buffer. We would love to hear your ideas on how we can make our products even better for you!...
Read more >
What's New in Emacs 28.1?
New minor mode 'lock-file-mode'. This command, called interactively, toggles the local value of 'create-lockfiles' in the current buffer. Emacs Server. New ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found