Where can I enable or implement full-line and file name completion in VSCode? - visual-studio-code

In Vim, I love using:
Ctrl+X, Ctrl+F to trigger code completion using local file names.
Ctrl+X, Ctrl+L to trigger completion of full lines from open files.
I'd like to have the same features in VSCode. A Google and SO search did not show me any extensions that provide this feature.
Is there an VSCode extension that does this?
What is the best way of adding this feature? Should I write my own extension or is there an existing commonly used "intellisense" extension where I easily contribute these features?

The extension Path Autocomplete does file name completion.
If you search for autocompletion in the marketplace there are other extensions as well which might provide the line completion that you're looking for.

I use vscode.vim extension which is a vim emulator for VSCode. It has most of the features of vim, including the completion of full lines from open files with the same keyboard shortcut: Ctrl+X, Ctrl+L.

Related

How to read vscode keybindings within an extension

I am writing an extension that does things with keyboard shortcuts. I would like to read all current shortcuts and act accordingly. Currently I am reading them from this file:
~/Library/Application Support/Code/storage.json
Is there a way to pull that from vscode module instead?
You need to perform some steps, once you tested the current implementation.
Set a contribution point.
Create a manifest as shown here
Use a command on the VS code API to perform your action
Publish it to the extensions market place. Alternatively package it
into a VSIX. More info.

NerdTREE in VSCODE

In VIM there is a pluggin called NerdTREE that is to move between folders, I am looking for something similar for vscode, where I can move between files but with the keyboard.
As I write this, there is an extension available in VSCode with the same name you mention.
This recently released extension has only basic commands such as creating folders and files, moving between them, copying, pasting, renaming or opening a file.
Well, it also has very few configuration options so maybe that is discouraging, but in short I consider it a good alternative for the moment to have some of that vim pluggin, and maybe over time the developer will add new features.
Here is the repository of this extension so you can take a look at it: https://github.com/61130061/NERDTree

Remove duplicated Intellisense suggestions

I'm writing extension that provides CompletionItems to VSCode CSS Intellisense. The issue is that some completions are already being provided to Intellisense by internal VSCode completion providers resulting in showing same complitions twice.
What I need is to remove those duplications. How can I achieve this without messing with css language-server?
VS Code shows suggestions from all extensions that provide suggestions. It is not possible for your extension to disable the suggestions from another extension: https://github.com/Microsoft/vscode/issues/63004
You could try:
Tell users to disable the built-in css extension.
Have your extension register a new language and a new completion provider for that language.

Fuzzy file opening in vscode

I am exploring vscode after using atom for a long while. One of the things I'm missing is an equivalent of the lovely package advanced-open-file. Is there something similar to this in vscode?
I found the advanced-new-file extension, but it is only helpful when it comes to new files. I would like to be able to quickly open files from all over my local files (not only the workspace).
Edit: I found the option of workbench.action.quickOpen; but it doesn't allow opening files from the whole file system.
Sorry, but currently the answer is no. The problem is that input box doesn't provide a way to listen to key events:
GitHub issue,
so even the extensions can't do that currently. Here's the comment from advanced-new-file extension creator:
Because VSCode extensions don't yet have the ability to do type-ahead autocomplete within the text input box (See https://github.com/Microsoft/vscode/issues/426), we work around this limitation and provide autocomplete using a two-step workflow of selecting existing path, then providing new filename/path relative to the selection.
The good news is that there is a new API addressing this issue, but it's currently in 'proposed' state and can't be used for published extensions.
One workaround could be typing code -r some/path in integrated terminal and using 'tab' for autocomplete.
The Fuzzy search extension seems to work for me.
It adds a new action to the command palette which allows you to search for files in the current project and open them.

There is a plugin or way to jump/go to definition/declaration in Sublime Text 3 like in Eclipse by Command+L-Click?

In Eclipse you can jump to definition/declaration by clicking on hyperlinks with pressing command key (control for Windows). I would like to use the same functionality for Sublime Text 3. Mostly I work with Robot Framework with a lot of files and would like to jump to the source of Keyword through whole project.
In sublime this kind of feature is provided by plugins.
Look at https://sublime.wbond.net/packages/Robot%20Framework%20Assistant or https://sublime.wbond.net/packages/Robot%20Framework, but be aware you can't use both, they conflict.
This plugin allows you to jump from .txt (.robot) files to the keyword's definition in .py and in .txt (.robot) in case they are resource files. Please read more here: https://github.com/andriyko/sublime-robot-framework-assistant
You can add below two plugins in pycharm, it will then allow you to navigate.