Auto suggestions for Python snippets trigger only on Ctrl+Space - visual-studio-code

Previously I had another autosuggestion behaviour for snippets:
I type in a Python snippet alias and in a few milliseconds I see a list of suggestions, including code snippets on top. Now, I see the following:
Screenshot w/o snippets in suggestion
After pressing Ctrl+Space:
Screenshot after pressing Ctrl+Space
After this autosuggestion on-the-fly starts working for this snippet - "inp". For each snippet that hasn't been used with Ctrl+Space, I will need to press the shortcut.
The issue holds for both Jupyter notebooks and Python scripts.
I want to restore suggestions of code snippets on-the-fly, without pressing the Ctrl+Space combination.
Some suggestion-related settings
I tried to modify some settings with no success.
Reading https://code.visualstudio.com/docs/editor/userdefinedsnippets also didn't provide much insight into the issue.

The problem is due to the 1.75.0 version of VScode. Running
sudo apt -y update
and installing 1.75.1 is enough to resolve the issue.

Related

vscode showing "completion" for previous commands in integrated terminal

I am using vscode v1.74.2.
When I updated vscode about one month ago, this "completion" of commands which i have previous run. I have searched though the settings, however I can't find the name of the feature. What is this featured named or how do I get rid of it?
I tried using pwsh in an external terminal and the "completion" appeared here too. This has nothing to do with vscode 😅. Thanks #perplexyves for noting.
Edit: use right arrow for auto completion.

Resize the terminal in vscode is trigger the ctrl+c to terminate the running command

I'm running the vscode 1.64.2 on Windows 10. Currently i met a strange problem, When i resize the terminal in the vscode and the cursor is focus on the terminal, Then it will trigger ctrl+c . At this time any running command would be terminated immediately .
To avoid this i have to un-focus for the terminal first and then resize it. Any suggestion here?
I was searching about this with no luck. Today I realized about one installed software on my machine that has a global hook on mouse selection. In my case was the QTranslate software. When I exit the application the problem was solved.
Check if you have this or another software that has a global hook on mouse selection.
In VS Code this problem (control C) was happening for any command line inside the terminal. Apart from that, opening Git bash (standalone) I was having the same issue, but not for cmd or another command line.
Hope this helps you because this was driving me crazy.
Absolutely working solution!
I experienced the same problem with mouse strange behavior for a long time, but finally I found out it was the QTranslate's guilt! After I stopped it, the problem has gone. (can't vote up because of my virgin profile here).
PS: I found the solution how to push work both QTranslate and terminal window - just set QTranslate setting "Advanced->Copy action" to "Ctrl+Insert" instead of Ctrl+C.

I am trying to use :g in Vim doesn't work "Command :g[lobal] is not yet implemented" i get in the status line

I wanted to try vim for a bit, and get used to it... i got stuck with trying to replicate Ctrl+D functionality of VScode... so I've tried couple Google solutions.
This is What I've tried when I got that error:
:g/oldword/norm newword
I see lots of people do search patterns like this, but it's annoying I get this message, without being able to find solution on google :D
I know I can solve this issue with /word then cgn newword and then just repeat with . operator, BUT, I want to be able to use the global command for searching patterns and stuff, for other purposes too, and it stresses me out that I can't make it work!
Here is the error I am getting.
Any help is extremely appreciated / welcome! Thanks.
Edit: Forgot to mention: We are talking about Vim for VScode, not the gvim installation stuff. Will try to install that too, and update the question.
Edit2: Okay so apparently, after instalilng gvim (from official site) and ran it through vim command in cmd prompt, the official vim can run the :g commands.
Like (for example) if you want to search for <a> and replace it with <router-link> you can do so by: :g/<a>/norm ciw<router-link>
Which means:
:g/<a>/norm run a global (file) search for pattern <a>
ciw - change in word
<router-link> the replacement pattern for <a>
Note: The same should be done for </a> after that :D
The problem still exists tho.
While the native vim exe (outside of vscode) works and can run these stuffs, I still need to fix the vscode one (the extension that is). It is defo nice to have syntax highlighting and correction.
What you are using is not Vim. It is a Vim emulator which, like all Vim emulators, can't be expected to be either complete or accurate. Its only relationship with Vim is that it tries and fails to imitate it.
Some of the Vim stuff you will find on the internet will work in that VSCode extension exactly as it does in Vim, some of it will work but partially or differently, and most of it, like :g, will simply not work.
There is nothing you can do about that except, maybe, contributing to the project.
If you want support for the global command in VSCode, install Neovim and the VSCode extension for it:
for those who expected this to work but it doesn't, it's possibly because you need to have installed neovim (firstly) and then vscode-neovim extension (secondly) https://marketplace.visualstudio.com/items?itemName=asvetliakov.vscode-neovim
Source: https://github.com/VSCodeVim/Vim/issues/2346
The easiest way to get this working is to enable neovim in the VS Code Vim extension you're using.
Once you have installed Neovim on your operating system, you can enable it within VSCode inside the Preferences: User Settings window:
Enable the Vim: Enable Neovim option (vim.enableNeovim)
Set the path to Neovim inside the Vim: Neovim Path setting (vim.neovimPath)
Restart VSCode
Source: https://www.barbarianmeetscoding.com/boost-your-coding-fu-with-vscode-and-vim/integrating-vscode-with-neovim/#enabling-neovim-inside-vscode

zsh autocompletion appears to only work with built in commands

I'm new to zsh, just switched over from fish. I'm trying to get autocomplete working so it displays argument/flag options for commands upon pressing tab.
Currently this works, but it only appears to work for built in commands. For example, it works for ls, grep, git, etc. but does not work for programs I have added myself. For example, fd-find, exa, and nvm all do not work.
For nvm, I have enabled the nvm plugin using Oh My Zsh. I know the plugin is working in general, because nvm itself is working (and it wasn't before enabling the plugin).
For fd-find, I see the auto-completion file in /usr/share/zsh/vendor-completions/_fd
For exa, I manually downloaded and placed the autocompletion file in /usr/local/share/zsh/site-functions/_exa as instructed by the site.
All 3 of these programs do not show me the typical arguments/flags autocomplete menu the way built in commands do. I'm not sure what is wrong.
I echoed the fpath environment variable to make sure /usr/local/share/zsh/site-functions was in there. It is, along with /usr/local/share/zsh/site-functions/
When I run which nvm, I get:
_nvm () {
# undefined
builtin autoload -XUz
}
Which is actually what I get for all of _nvm, _exa, _fd.
Not sure what else to try.
Any suggestions for how to get autocomplete working properly?
Other info: I'm on a System76 Darter Pro laptop running Pop!_OS.
I found a fix that worked for me. After searching through zsh issues related to autocomplete on github, this solution worked for me. Credit was given to the original source of the solution on stackexchange.
The solution was simply to remove all zcompdump files:
rm ~/.zcompdump*
After running the above command, autocomplete works and expands out the possible flags/arguments for non-builtin programs!

VSCode latex-workshop command not found

I just cannot find any actions to work of the latex-workshop extension in VS Code, though it worked well yesterday.
When I tried to find the actions (using Ctrl+Shift+P), it shows a choice of LaTex Workshop: All Actions. However, after click on it, an error occurs as command 'latex-workshop.actions' not found, and nothing happens. And I can't use any command by shortcut keys.
I tried to reload and reinstall the extension, but they don't help.
Does anyone know what's happening here?
I had the same problem, and followed some suggestion in this GitHub issue.
Simply reinstalling the plugin won't work, but I fixed like this:
Uninstall extension
Close VS Code (Make sure all processes are shut down, maybe restart your machine)
Open Code and reinstall the extension
For me, what solved the problem (August 2021) was to revert to an earlier version - the problem was in 8.20.2, I reverted to 8.19.2. Just click on the extension to show its menu screen and hit the drop-down arrow of the "Uninstall" button.
I solved the issue by uninstalling the extension and deleting the folder
/.vscode-oss/extensions/james-yu.latex-workshop-8.14.0/
The name may vary across distributions