Giter Club home page Giter Club logo

vscode-fzf-quick-open's Issues

Searching with rg finds multiple duplicate results

I have this weird behaviour that when I search for a term with rg with this extension I get multiple results that are basically the same, but somehow are separated by different column number of the cursor. See the screenshot provided.

In StudentController.java there is only one result for List<Student> at line 37, but it finds it multiple times - what's wrong? I do not pass any options to rg.

I identified the culprit:
The way I like to search is not through the input box that opens up, rather, I press enter without entering any terms, and then search in the interactive panel that opens up in the terminal inside vscode. If I search with the input box, this problem is not occurring. I also found out that that the default command of rg has --vimgrep which actually might cause this behaviour as described in the man rg docs. Is there something I can do to search the way I want and not through the input box?
Screen Shot 2021-07-31 at 14 08 28

custom shortcuts

Hello, I would like to replace the original "Cmd+P" shortcut like this in keybindings.json:

{
    "key": "cmd+p",
    "command": "fzf-quick-open.runFzfSearch"
  }

However, when I do this, it prompts me to enter a starting pattern or it copies the pattern in from under my cursor:
image

It would be cool to be able to go straight to fzf with no pre-entered text. Any idea?

xargs: illegal option -- r

Open file using fzf

fzf --print0 | xargs -0 -r code
xargs: illegal option -- r
                          usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
                                [-L number] [-n number [-x]] [-P maxprocs] [-s size]
              [utility [argument ...]]
ProductName:	Mac OS X
ProductVersion:	10.15.3
BuildVersion:	19D76

Is it possible to automatically close the terminal panel that runs fzf after completing or canceling a search session?

Hi,

Thanks for making such a useful extension!

I want to ask how I can make it automatically close the terminal panel that runs fzf after completing or canceling a search session?

Currently, when I cancel a search (by Esc) or visit a searched pattern (by Enter), the terminal panel that runs fzf still open.

FYI, I notice that in another extension https://github.com/tomrijndorp/vscode-finditfaster, it can automatically close the terminal when I press Esc or Enter.

Thank you!

Windows Cmd Escape Path issues with new terminal profiles

Same error as in issue #23, now caused by using terminal profiles instead of the deprecated terminal.integrated.shell config.
The fix is straightforward, if the old term shell value is not set just query for the new default profile and check for cmd.exe there.

I will add a pull request.

Finding the extension on vscode

Thanks for the extension. Have couple of suggestions to make it easier to find the extension on vscode:

  1. Add fuzzy in title/tags/description.
  2. Highlight search more. This extension stands out for fuzzy keyword search. Native support for fuzzy file search is quite OK on vscode.

Implement "open folder" command

Hi @rlivings39!
Very nice extension!

Could it be possible to implement the command "File: open folder..."?
I know that the extension already support "fzf: Add workspace folder using fzf...", but this is slightly different from simply opening the folder.
I'm no expert in TS and VSCode extension, but if you don't have time for that I will try to create a PR for this.

Thanks in advance!
Luca

`cut` on MacOS is not gnu coreutils

cut on MacOS X is rather more limited than gnu cut, and so cut -z is invalid, producing cut: illegal option -- z

If gcut is installed through brew install coreutils then that works as expected, and either OS detection in the extension or a configuration option for the name of the cut binary could be used. Inserting | tr '\n' '\0' to nul-terminate the string instead also works.

I'm happy to put a PR in, once I've heard if there's a strong preference one way or the other.

Accepting PR?

Hello, thanks for the extension.
We have some ideas to improve the workflow using the extension, just like the CTRL+P works.
I want to know if you are accepting PR or should we fork it and work in another rep?

Thanks!

About the ideas:

  • Add && exit at the end of the command, so you dont have to close de terminal manually after opening a file.
  • Add filtering to the command, like search only git files.

I'm thinking in a lot of features xD

runFzfFile and runFzfAddWorkspaceFolder inherit previous working directory

If I run one of the commands that uses the current working directory, then the terminal used for fzf is changed to that directory, but runFzfFile and runFzfAddWorkspaceFolder run in the same terminal and don't reset the directory to the current workspace, meaning that runFzfFilePwd causes runFzfFile to have the same behaviour if it's run afterwards.

Wrapping the command in a subshell, such as (cd whatever/cwd/is; cmd) will ensure that the cwd is reset after each command, which is probably cleanest.

does nearly work on windows

Hi

On windows, everything is looking fine: I have fzf and fd; they are working fine together. Until I actually select a file/dir. Then, all the backslashes seem to be quotation characters, thus leaving just one long string. The file/dir, of course, cannot be found by vscode.

Regards
Adam

Add workspace folder fails on Mac

$ find -type d
find: illegal option -- t
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]

Using fd works fine on Mac

Add folder doesn't work in remote ssh

The code command put on the path doesn't support -a.

$ fd --type d -I | fzf | xargs -r code -a                                                                                                               
Ignoring option a: not supported for code.
At least one file or folder must be provided.

Search in project root

I know that there is an option to search in the project root when using with vim, where "project root" being found by the folder that has .git folder (basically the repo home upper most directory). Is there a possibility to add this here as well?

Currently if I search in a subfolder, then the search is only within that subfolder, not taking into account files in the project that are found in upper directories.

Maybe there is no need to "escapeWinPath"

I'm working on Windows. I found that using fzf: Open file using fzf the fzf runs well but when I selected the file, vscode dosen't open the file. Also, I got a error message said "The specified path is invalid." on cmd.

After reading the code, I tried the following operations on cmd:

C:\Users\my_username>echo open $$ F:\Path\To\Workspace $$ server\bin\start.bat > "\\?\pipe\fzf-pipe-21160"

C:\Users\my_username>echo open $$ F:\\Path\\To\\Workspace $$ server\bin\start.bat > "\\?\pipe\fzf-pipe-21160"

C:\Users\my_username>echo open $$ F:\\Path\\To\\Workspace $$ server\bin\start.bat > "\\\\?\\pipe\\fzf-pipe-21160"
The specified path is invalid.

C:\Users\my_username>

It shows that, the first 2 command did work and my vscode opened that start.bat, however, the 3rd one echos an error. But now
what the extension produces is like the 3rd one.

I tried modifying function escapeWinPath to make it just return origPath;, and it seems everything works well.

Is it truly necessary to use escapeWinPath on the named pipe and the path to scripts\topipe.bat ?


PS: I think this extension will really save my time! ๐Ÿ˜† vscode's Ctrl+P can be very slow when I'm working on a large project.

Remove need for codeCmd setting

dd90b93 added a setting fzf-quick-open.codeCmd to handle using code-insiders for the command rather than code. We should be able to programmatically determine this.

For example someone saw that the path ~/.vscode-server-insiders/bin/1c36d747fbf113144d3bf82b0aa3cbd290714e38/bin/code-insiders gets set up with remote ssh. Can we find that and use it?

Add RipGrep options

Hi, just started using and it's a great extension.

I miss being able to set ripgrep options. I have some generated files that are ignored by the default config and it would be nice to be able to set ripgrep flags to not ignore them.

No `fzf-quick-open` commands can be found.

I'm using latest VSCode on latest Windows 10.

Whenever I try to run a fzf-quick-open command, I get the following error:
image

I have all three of fd, rg, and fzf in my path, and I'm not sure what else I might have done wrong. Weirdly, the "feature contributions" tab of this extension on VSCode seems to indicate that several commands are added by this plugin, but I can't use any of them.

Weird default initial working directory

The initialWorkingDirectory gave me some weird results.
Looks like it sets to the folder where the last open file but I'm not sure.

For me, this setting worked best

"fzf-quick-open.initialWorkingDirectory": "${workspaceFolder}"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.