Collapse cell via code, or key shortcut in jupyterlab - ipython

Is it possible to collapse the cell itself - and not the output, either via a hotkey combo, or a line of code?
I know that by clicking on the blue line on the side it collapses it, but would want to streamline this.

Related

Keyboard shortcut to move cursor to next cell in VS Code

Is it possible to move the cursor from one script cell to another using a keyboard shortcut using Visual Studio Code i.e. navigating between cells during editing?
I only found the possibility to run single cells but not the possibility of moving only the cursor to the next or to the previous script cell designated by #%%.

How i can change highlighted area in VSCode after Shift+F12

I try to find hotkey which can help me to change selected area after shift+f12.Let's see example:
I selected this function and after it i click shift+f12 and watch this in special window:
And as you can see, the right side of this block is displayed - all the places where this function is found.
I want to know what hotkey I need to press to move to the area with the code and start editing it:
Please say me how i can make it without mouse:)
P.S. i'm using windows

Multiple keystrokes as autohotkey shortcut

I'm new to AutoHotkey.
I have a specfic need to be achieved in Powerpoint using autohotkey.
Let's say in Powerpoint, I want to change font color.
The normal steps are:
Select the text
Click "Home" > Click "Font Color" > The Font palette gets expanded and I select the color.
Now, I want to make this process quicker as below
Select the text
Press FC (as shortcut from keyboard) and autohotkey should press the following keys Alt+H+FC (Very importantly, if I don't press C immediately after F, then it should get typed as replaced text of highlighted text)
So, my code goes as like this
#SingleInstance, Force
#IfWinActive ahk_exe POWERPNT.EXE ; check whether ppt is the active window
f::
#if keypress c
send, !HFC
#if
return
But, this doesn't work.
I don't where am I making mistake. Could someone help, please
I know this is an autohotkey question, but the quick access toolbar (QAT) in PowerPoint may solve your problem out of the box.
The QAT assigns Alt+1 to the first feature, alt+2 to the second, etc. By customizing the order of buttons on the QAT, you can access features you use often with one key combination.
Instructions
First add the font color button to the QAT: right click the 'font color' button, and click 'add to quick access toolbar'
Change the order of features in the QAT: right click on the QAT - customize quick access toolbar). Use the arrow buttons on the right side to change the ordering.
This is the order I use myself:
This allows me to very quickly align objects on a slide, change background color, outline, and text color, all initiated from the keyboard.

How to add a command to Jupyter Notebook toolbar in Visual Studio Code?

My default Jupyter Notebook toolbar in VS Code has a command "Clear Outputs of All Cells". I would like to add a similar but different command Notebook: Clear Cell Outputs, which only clears one cell at a time. I can do that by pressing ALT + DEL, but it would be convenient to have it in toolbar.
I have added this button to the Context Menu Extra extension (v0.4.0) (You need VSC v1.62, because I don't know when some experimental API got public)
If the cell has output you should see the "Clear Cell Output" button in the cell toolbar at first position.
There is no documentation of the allowed groups for this menu. I have used a group the Jupyter extensions also uses. That is the reason it is one of the first buttons.

Line selection not working properly on VSCode

My line selection is acting very weird on VSCode. It goes in this weird multi-line edit mode. I am unable to select multiple lines fully by dragging my mouse down on lines. Even when I use shift and down arrow it does not select the whole line.
Mouse drag selection not working:
Keyboard Shift + Down Arrow not working:
On Mac the solution was simple go to the menu "Selection" and deselect the option "Column Selection Mode".
Now it works as expected.
Two things I use:
I select full lines by clicking and dragging in the 'numbers' columns
For multi-line to work I use the menu option -> Selection -> Column Select Mode
I had the same issue. Resolved it as below.
Go to Selection menu in vs code menu bar.
Untick on Column Selection Mode option.
go to file, preference, settings and search for Editor:Column Selection and desable. this solve my problem
There are two options:
If you wish to perform the desired selection without changing the settings, then hit the ALT key and drag your mouse
Or, just Go to Selection menu in VS code menu and untick the Column Selection Mode option.