8000 Go to file directly with fzf instead of directory · Issue #876 · jarun/nnn · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Go to file directly with fzf instead of directory #876

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

Closed
medwatt opened this issue Mar 14, 2021 · 5 comments
Closed

Go to file directly with fzf instead of directory #876

medwatt opened this issue Mar 14, 2021 · 5 comments

Comments

@medwatt
Copy link
medwatt commented Mar 14, 2021

I have been using this file manager for a few days now and I like it so much that I have been using it exclusively over my GUI file manager and also in vim. But there is one behaviour that doesn't seem right.

I have tried the fzcd plugin, but that takes you to the directory where the file is located, and if there are a lot of files, it would require a second search to get to the file. This seems like unnecessary double work. Is there a way to search for a file using fzf or something similar and jump straight to the file instead of the directory where the file is located ?

I have also tried fzopen but this opens the file directly. I don't always want to open the file. So, this is also not a solution.

@jarun
Copy link
Owner
jarun commented Mar 14, 2021

It's a very good improvement without losing any functionality.
Please confirm the modified fzcd plugin works.

@jarun jarun mentioned this issue Mar 14, 2021
21 tasks
@medwatt
Copy link
Author
medwatt commented Mar 14, 2021

@jarun, thanks for this. It works! Just one last question, if you don't mind: is it possible to disable the page that pops up with the message "Choose context 1-4 (blank for current):" and just go straight to the file in the same context?

@jarun
Copy link
Owner
jarun commented Mar 14, 2021

You can override CUR_CTX in the plugins. So add the following in fzcd in the next line after .nnn-plugin-helper is sourced.

CUR_CTX=1                                                                                              

@jarun
Copy link
Owner
jarun commented Mar 14, 2021

All of this is documented: https://github.com/jarun/nnn/tree/master/plugins#send-data-to-nnn

Please read the documentation to save our time.

@medwatt
Copy link
Author
medwatt commented Mar 14, 2021

Thanks once more. I have actually gone through the documentation, but because of the wealth of information, you don't get to remember every little detail. But given that this has become my goto file manager, I will take the time to peruse the documentation more closely.

KenJean pushed a commit to KenJean/nnn that referenced this issue Mar 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants
0