Looking or an autocomplete filename vscode plugin - visual-studio-code

Is there any VSC plugin that allow to autocomplete file path within a project folder? I am used to RStudio, where I could simply start typing the name of a file, hit tab, and then rapidly find the corresponding file (see below).
I have tried Path Autocomplete and Path Intelisense, but could not get them working like this.
Thank you,
Phil

I've been using the RelativePath extention by jakob101 for the past couple of years.
It searches for files within the workspace and pastes a relative path at the cursor.
Super simple and easy to use.

Related

Is it possible to paste files copied to the clipboard from other applications in VS Code?

Within the explorer panel of VS Code itself, if I want to copy a file to another directory in the workspace, I can use ctrl+c and ctrl+v, but if I find a file from another application on my computer such as the native File Explorer application, first pressing the shortcut key ctrl+c and then going to the VS Code window and pressing the shortcut key ctrl+v in the Explorer panel, there is no effect.
Note that I'm not talking about copying the contents of the file and pasting into VS Code. I'm talking about copying "the file" as in the notion of the file to the desktop environment.
The workaround is the use the native file explorer, copy the file first, then open the folder opened in VS Code, and finally paste it within the native file explorer. But I find this so troublesome.
Is there an easier way to do this? Does VS Code support such functionality to paste files copied to the clipboard from a different application (not VS Code) and paste into VS Code? Is that functionality hidden behind a setting that I need to change? Or is this possible via an extension?
Vscode does dragging the filename from a native file explorer (at least on Windows) and dropping in vscode's Explorer where you want it.
You can also use your OS's Open With... functionality and then drag the tab of that editor into whichever directory you want.
You can choose Add File from File to add a file to your workspace. Or you can use New File from File to create a new file in your workspace and copy the content of the file outside to it.
At the time of this writing, this is not supported... yet!
Work to implement this is tracked under this GitHub issue: Explorer: allow to paste files from the clipboard into target folder #130036, which is a subtask of a larger issue tracking a larger effort for Better drag and drop / clipboard integration of files across applications #164.
You can give a thumbs up reaction on those issue pages to increase their prioritization (but please don't leave "me too" comments there, as such comments are considered annoying noise).
pingren (a contributor to the VS Code repository) tried to implement this and found it to be more complicated than it looks. You can read their explanation of why in their comment there. One of the difficulties stems from itegration with system keybindings and VS Code's affordance for remapping keys:
the onPaste event could only be triggered by system paste (cmd+V on macOS). Users could change filesExplorer.paste command to any keybindings. So we need to consider how to merge native paste from clipboard and VSCode explorer paste.
There's another feature-request issue (Copy paste files from native explorer to vscode #89862, created before #130036) where isidorn (another VS Code contributor) commented:
This is a fair feature request however I believe there is a Chrome limtation which is preventing us from achieving this. [...]
As for extensions that might do this, I don't know of any (but haven't tried searching intently).
Other possible workarounds:
Try dragging the file from your native file explorer application to the VS Code file explorer panel. This is confirmed to work at least on Windows and Ubuntu.
From Mark's answer (copied under CC-BY-SA):
You can also use your OS's Open With... functionality and then drag the tab of that editor into whichever directory you want.
From user103's answer (copied under CC-BY-SA), and partially mentioned in the question post already:
You can choose Add File from File to add a file to your workspace. Or you can use New File from File to create a new file in your workspace and copy the content of the file outside to it.

Can you create a file or folder by path in VS Code?

In Atom, hitting Cmd+N brings up a window where you can type in basically any path to create any file or folder anywhere in the project. In VSCode, hitting Cmd+N brings up a dialog where you can create a file in the currently focused folder, and I believe you can type a path to create a file in a subfolder (whether it exists or not), but not as flexibly as in Atom.
Is there way to do it Atom-style in VSCode?
I don't know for sure whether this is what you're looking for, but still there exists this plugin which can emulate the file/directory creation feature of Atom.
Since i use vscode-vim it's fairly easy to create new folders and files using command mode. If you're familiar with using terminal, then you can use shell commands to create file/dir.
I have no idea whether one could do what you had mentioned the proper way with vanilla vscode.
Hope this helps you somehow.

How to search for all files in the currently open folder / workspace?

I'm searching for a particular piece of text and using the Search functionality within VS Code (Ctrl+Shift+F). I type some text in the search box and it shows the results only from files that are open already. How do I search for all the files within that workspace / open folder?
(I'm quite new to VS Code so this might be something simple)
Maybe you have the 'Use Exclude Settings And Ingore Files' toggled?

Go To File with directory in NetBeans

The "Go to File" dialog is handy (Alt-Shift-o), but my project has a hundred files called index.phtml. Is there any way to include the directory? Say, search for docs/index.phtml?
Or do I just have to fix/wait for https://netbeans.org/bugzilla/show_bug.cgi?id=222697?
I'm using NetBeans PHP 7.3.
No, only file names can be searched for.
When looking at the code of the Jump To module, you can notice that a org.netbeans.modules.parsing.spi.indexing.CustomIndexerFactory gets registered which only keeps record of file names including their extension. So currently there is no way to to search for files with a path specified.
However, I think it shouldn't be too difficult to change the indexer of the Jump To module to not omit the path, I'd worry about the performance though.

sublime text - eclipse App Explorer equivalent

Hi I wondering if there is the equivalent to an App Explorer in Sublime Text 2.
When using eclipse, I use the App Explorer panel to search by file name.
I have a file naming convention that helps me find files by there functionality within the system.
So say I want to list all files relating to the registration process. I search for "regis" via the App Explorer and get a nice list of the relevant files. This filtered list is available all the time until I search again.
I can use Sublime Text's cmd+p but prefer the above as I can see the folder hierarchy etc.
In essence it is merely a file name filter on the folder list.
Are there any plugins that may give me something similar.
Any help much appreciated.
No, as far as I can tell nothing like this has been implemented in Sublime Text 2. I would suggest opening an issue at Sublime's UserEcho forum.
In the meantime:
Typing "regis" into Sublime's 'GoTo Anything' panel will bring up the files you're looking for, and show you their paths (I realize this doesn't help you with visualizing the hierarchy, but that's as close as it gets).
I use a package called SyncedSideBar - this will at least show you a visual representation of the folder hierarchy in the sidebar, for the open file, if it's added to the project.
The GoTo Folder package by freewizard may do something similar to what you're looking for, but I had trouble getting it to work. Maybe you'll have more success.
Good luck!