VSCode autocomplete/intellisense(?) in Jupyter Notebook when starting string literals keeps making me accidentally insert 'ArithmeticError' every time - visual-studio-code

screenshot of the popup code suggestion box being mentioned
In VSCode Jupyter Notebook code cells, I keep having this annoying popup when I open any single or double quotes. It doesn't appear on markdown cells, nor in regular editor on .py files. It doesn't look like your typical IntelliSense suggestions either (I think), and I've tried to disable as many of such extensions as possible, but I'm not able to get rid of this annoying popup.
Appreciate if someone could point me in the right direction. Or at least what it's actually called, so I can Google the correct term. Thanks.

Figured it out.
In VS Code settings, go to Extensions > Jupyter > Python Completion Trigger Characters
defaults were: .%'"
So I deleted the single and double quotes, restarted, and voila, no more annoying popups.

Related

Highlighting problem in Jupyter Notebook - VSCode

Lately when using Jupyter Notebook in VS Code to write some assignments for my studies I ran into a quite annoying problem - whenever there is a mistake in my code cell that prevents it from running, the "traceback" (or however you call it) to the place where the error persists is colored with a high-contrast marker (the color depends on the theme used) and makes the content pretty much invisible unless you manually "select" it with the mouse coursor. Is there any way I could fix it without going too much in-depth into VSCode/Jupyter Notebook extension settings?
The highlighting looks like shown below.
Yellow syntax marker problem.
And another one here.
I tried all the themes preinstalled with VS Code such as Monokai, Solarized Light etc., and also a custom theme of my choice called Dracula.
Thanks in advance.
This issue has recently reappeared. While the issue is being fixed you can change the highlight colour within the vscode settings.
Open settings and search for "Workbench:ColorCustomizations"
Image of settings page
Create or alter the "terminal.ansiYellow": "#eed202" to a more appropriate value like "terminal.ansiYellow": "#9b4550". See the linked image.
Credit for this fix: https://github.com/microsoft/vscode-jupyter/issues/8717#issuecomment-1241776226
I also have this problem. It looks like they fixed it less than 1 month ago as of writing this, so it may go away if you update to a recent pre-release of Jupyter in VS Code. Personally, I am going to live with it until the next stable release.
My version of Jupyter in VS Code:
Screenshot of Jupyter Versions
Screenshot of vscode-jupyter github: Screenshot of vscode-jupyter github
https://github.com/microsoft/vscode-jupyter/issues/8697

VSCode Comments aren't inline

I use VSCode and I think its a great editor, but when I write a comment in html it drops to a new line under what I'm commenting which is really irritating.
If I comment a closing div I want it next to the closing div not under it.
I have uninstalled prettier but that made no difference.
Is what I want even possible in VSCode?
Any advise would be appreciated because I am so irritated that I am considering using a different editor (I'm on a Mac just in case it matters).
Thanks in advance.
This was a problem for me too, as were other new line / white space related HTML issues.
Assuming you are not using any formatters besides the native VSCode HTML language features (you said you uninstalled prettier, but you didn't mention whether you were using something else),
there is a setting HTML white space which you can set to preserve to leave your comments untouched.
Note that you may need to go into settings and check what is being used as the HTML default formatter

Indentation issue after pushing code from Brackets Editor to Github

For my code I'm using Brackets. In editor, code looks proper but after pushing it to github repository, indentations are messed up.
I'm using tab key to make indentation but in preferences there is set "use 2 spaces" after pressing tab key.
I've find out that Github is using 8 spaces for recognised tab keys. But still, it does not give me anything.
The biggest problem is when I use "one var statement".
I've also used jsbeautifier and it doesn't help me at all.
Here you can find an example: My Github code example
Does anybody had such a problem with brackets and github indentations?
Yes I had such problems.
These problems did not reappear when we moved to eslint inside of our IDE. The setup varies for each IDE. You can refer https://eslint.org/docs/rules/indent
If setting eslint is hard for you. Try bracket extensions like https://github.com/brackets-beautify/brackets-beautify . When used correctly it will beautify on save. Caution: Dont beautify code written by others or a team.

Jupyter Notebook alt+D shortcut collision

I wanted to try out Jupyter notebooks, but quickly ran into problems with it since my keyboard layout uses alt+d and alt+f to insert ( and ) which doesn't work. All my other modifiers are also based on alt+{letter} and they all work, but for some reason alt+d and alt+f are getting swallowed by something. However I can't find any shortcut documented for those two combinations either.
I've added the following to ~/.ipython/profile_default/static/custom/custom.js
$([IPython.events]).on("app_initialized.NotebookApp", function () {
// No idea what these do, but the mess with my keyboard layout
IPython.keyboard_manager.command_shortcuts.remove_shortcut("Alt-d");
IPython.keyboard_manager.command_shortcuts.remove_shortcut("Alt-f");
});
But this doesn't seem to have any effect even after a server restart and browser reload.
Thanks
So after some amount of digging I figured out what causes this. The problem is not in the jupyter notebook, but is caused by a shortcut in the underlying CodeMirror editor. As seen here CodeMirror adds shortcuts for Alt +d and Alt + e. The way to disable these is putting the following in ~/.jupyter/custom/custom.js
delete CodeMirror.keyMap.emacsy["Alt-F"];
delete CodeMirror.keyMap.emacsy["Alt-D"];

How to stop FlashDevelop suggestions in text files

I'm using FlashDevelop 4.6.1.30 in Windows, using it with HaxeFlixel.
The autocomplete suggestions appear when editing code - this is wanted, it is good.
They also appear when editing text files though - this is not wanted, it is not good.
Specifically, if I create a new text file in flash develop (so the file is called "readme.txt" or something), after typing a few words, FD tries to "guess" what I'm typing and pops up the suggestions list. This, of course, makes no sense when trying to type out things that aren't code.
Yes, I've seen this Flashdevelop - Disable autocomplete for txt files and no, it doesn't work - even after a restart.
Here is a screenshot showing it not working...
Can confirm, setting that option doesn't prevent completion in .txt files. Consider opening an issue on the FlashDevelop repository.
Looks like a bug.
For now you can simply disable the BasicCompletion plugin (check Disable and restart FlashDevelop).