I cannot select multiple (adjacent) cells (in order to e.g. delete them)
I have tried
Shift +up/down arrows
Shift + J/K
Both of the above in both Edit mode and Command mode
Running a javascript keyboard tester to make sure shift J/K not being intercepted
Windows on-screen keyboard for shift +up/down/J/K
Online searching for same symptoms
Question: any ideas why this is happening and how to resolve it or how to perform a more detailed investigation/diagnosis?
Environment: Windows-10 Home 64-bit 20H2; Jupyterlab 3.0.5; Python 3.8.6 | packaged by conda-forge | (default, Dec 26 2020, 04:30:06) [MSC v.1916 64 bit (AMD64)]; IPython 7.18.1
Browsers tested Chrome, Opera, Edge (Chrome has security extensions, all disabled/allowing localhost, but Edge is vanilla and behaved exactly the same)
Starting jupyterlab from Anaconda Navigator launcher
The problem is not with selection per se, as all selection actions failed (e.g. select all cells from menu), but rather with the display
The CSS value for var(--jp-notebook-multiselected-color) was #e3f2fd - invisibly faint on my monitor; it was declared in the index.css file as "md-blue-50" (Google's Material Design blue) but the colour displayed did not match an online sample of md-blue-50 (so I guess the value for md-blue-50 declared elsewhere was not found).
The issue was identified by switching to to dark mode, where selection highlighting was clearly present.
Solution (because I can't find the source of the md-blue-50 value) was simply to use Stylebot to override the background color - in fact, using Stylebot scoped to localhost is better for me because I don't have to fix the css in every installation of jupyterlab in every Python environment.
try to open the jupyter-lab from the cmd, type this command :
jupyter notebook
it will open the same lab you can open via anaconda. then all of shortcuts will work as usual
Related
Similar to Rstudio, Atom allowed you to run code segments on interactively rather than the entire script all at once. Is there a suitable Julia language IDE that is comparable to rstudio or Atom (juno) and allows for on-the-fly execution of code blocks because Atom is being phased out?
note: Thanks for answers in vs code to obtain interactive feature hold ctrl + return will run code.
Did you try the Microsoft Visual Studio Code ? You can check how to download and setup for Julia notebook in link below.
https://github.com/julia-vscode/julia-vscode#installing-juliavs-codevs-code-julia-extension
The Best, Wr
In Microsoft VS Code you can define code cells using magic comments (## or # %% or #- can play this role - the choice is yours):
##
(your code goes here)
##
A code cell is executed by pressing Alt + Enter while the cursor is inside the cell.
At the code below I pressed Alt + Enter while being in line 10.
The keyboard shortcut can be configured by selecting in the main menu View->Command Palette or pressing Ctrl + Shift + P:
VSCode. The Julia team was working on a Julia IDE called Juno but the website now says "Juno will receive no more feature updates. Development focus has shifted to the Julia extension for VSCode", and VSCode seems to be the recommended way to develop in julia.
The Julia extension for VSCode let's you run code block by just pressing shift+enter and it uses Revise.jl to make interactive sessions better. You can see plots and other outputs right in the editor, and recenty they have even added performance monitoring/benchmarking tools.
However, if you prefer notebook-style workflows, you can use Jupyter with Julia (and the IJulia kernel) but even better imo is Pluto, which is specifically made for Julia and has some nice features such as no hidden state.
Is there a widget or keyboard shortcut to apply code formatting a jupyter notebook?
If I have a function like:
def f(x):
y = x*2
z = y*2
return z
I'd like to be able to autotab this function over to:
def f(x):
y = x*2
z = y *2
return z
automatically.
There's jupyter-black - a simple extension for Jupyter Notebook and Jupyter Lab to beautify Python code automatically using Black
For JupyterLab, there's also JupyterLab_Black.
For JupyterLab, there's jupyterlab_code_formatter - a JupyterLab plugin to facilitate invocation of code formatters. You can configure the keyboard shortcut for that.
Keep in mind that soon (present is Fall 2022) the document-centric notebook experience, most people now associate with the classic notebook interface, will be based on what is underlying JupyterLab, see here. And thus investing great time working out things in the old classic notebook may result in you needing to change approaches soon as a lot of the stuff that works only with the classic Jupyter notebook interface will need updating to use while things already working in current JupyterLab will either work or have a lot less friction getting updated.
There is Jupyter Nbextensions Configurator which contains several extensions for your Jupiter Notebook needs:
autopep8;
Code prettify.
You'll find instructions on how to set them up in links.
Both of extensions have their settable toolbar buttons and are applicable to a whole document.
I'm a Python beginner and recently came across the Atom editor and the package Hydrogen, that implements the Jupyter notebook. I did so after realizing that running the notebook in Chrome consumed way too many resources and also seemed to be a bit slower.
However, the Atom editor and Hydrogen always output prints within a little frame in the code (see image). Unfortunately, it doesn't use the full window width. I also don't see any console/terminal for installing pip libraries.
Is there a way to have the output in a console below the code, just as in Jupyter, and to have a terminal?
this comes most certainly too late, but in case someone else searches for this:
hit control+shift+P / cmd+shift+P and type "toggle output area".
This is my first foray into Jupyter Notebooks. My background is in Java and Scala development in classical IDEs (e.g. IntelliJ, Eclipse).
I have Jupyter Notebook 5.0.0 installed with only two nbextensions: jupyter-js-widgets and beakerx.
My Python 3 notebooks allow me to use the tooltip feature (i.e. if I were to hit the combination shift+tab inside a method's parenthesis, I get expected arguments). However my Scala and Groovy notebooks do not (but I can run the cells just fine).
Is this expected or am I missing something? If this is expected, how do folks author in the notebooks without the ability to discover method arguments like you can in a standard IDE?
First, you have to run your statements (import module and declarations) by SHIFT + ENTER. Then it will show you tooltip after Shift + Tab was pressed.
See here: https://github.com/twosigma/beakerx/issues/6598
Tl;dr - BeakerX doesn't support this yet. Version 0.10.0 brings us one step closer.
Whenever i evaluate a cell (Shift+Enter) jupyter moves the screen down so that the output is shown, assuming the cell is to big to fit on the screen entirely.
I find this feature rather annoying as it jumps so fast that i sometimes lose track where i just was when debugging.
Is there a way to modify this behavior or to disable automated screen adjustments entirely?
I use a standard jupyter installation without any modifications.
The version of the notebook server is: 5.2.0
The server is running on this version of Python:
Python 3.5.4rc1 (default, Jul 25 2017, 08:53:34)
[GCC 6.4.0 20170704]
Current Kernel Information:
Python 3.5.4rc1 (default, Jul 25 2017, 08:53:34)
The Shift+Enter command is run cell, select cell below, so if you are debugging a cell this is probably not what you want. If you use Ctrl + Enter, that is just run cell and should not move your cell cursor.
This may be what is causing your issue, as jumping to the next cell would also show you your output, misleading you on the cause of your issue. Using Ctrl + Enter in my 5.2 notebook does not move my screen position at all.