New in Datalore: Intentions, magics, command mode, and more
In the last update, Datalore gained some code editing features from PyCharm: inspections and quick-fixes. Today we are coming back to you with more updates in code insight and some other new useful features.
Intention is a special action that can be executed on code. The concept is similar to quick-fix, with the difference that while quick-fix is applied to erroneous code, intention is a way to modify valid code to make it express what you mean even better.
The Datalore kernel is now fully compatible with the IPython kernel, which means that all the features of the IPython kernel work the same way when you use the incremental Datalore kernel. This includes IPython magic commands.
Some of you are probably familiar with the concept of Command Mode from editors like Vim and Jupyter Notebook. We find this feature very helpful since it allows users to quickly navigate between cells, and select multiple cells to cut/delete/paste.
Now we have implemented Command Mode in Datalore, so why not give it a try?
The basic keystrokes are:
- Esc – enable Command Mode (editor loses focus and caret disappears)
- Enter – disable Command Mode and return to Edit Mode (brings the caret back to the editor)
- Up / k – select previous block
- Down / j – select next block
- Shift + j / Shift + Down – extend selected blocks downwards
- Shift + k / Shift + up – extend selected blocks upwards
- copy/cut/paste selected blocks (hotkeys:
- Delete or Backspace – delete block
If you did something wrong – don’t forget that Undo (Ctrl + z) works from Command Mode as well.
If you forget the shortcuts – you can always find them in the Help -> Shortcuts menu.
The Datalore kernel preserves the consistency of workbook cells by incremental updates – after you’ve made an edit, only the code cells that depend on this edit will be recalculated. However, in some cases you may want to tell the Datalore kernel that the variables in a particular cell shouldn’t be changed during execution – in other words, they are read-only variables. To do this you can use the readonly annotation to signify that these variables are not to be changed during cell execution. Subsequent cells that use these variables will not be recalculated, and so computation time is reduced and your experiments iterate more quickly:
By using readonly you can skip unnecessary recalculations.
Please note that readonly won’t “freeze” the value of the variable – it should be used only when you’re sure that the variable will remain unchanged during the cell execution.
Distraction free mode
Distraction free mode (View -> Distraction free mode) hides the menu, status bar, and the editor tabs allowing you to focus on the editor content.
In distraction free mode you can still access the menu and editor tabs by hovering over where they would normally be.
Table of contents
Enable the option Tools -> Table of Contents to display a table of contents that will help you to navigate through your notebook with ease.
That’s all for today! We look forward to hearing your feedback! Especially about the incremental Datalore kernel as we’ve made some improvements already and are going to implement some more changes. What do you think about the incrementality? Do you like it? How can it be improved? You can give us your feedback in the comments under this post or in the Datalore forum.
Subscribe to Blog updates
New in Datalore: Chart Cells, Spelling and Grammar Checking, Initialization Scripts, and More
Greetings from the Datalore team! Does the #Tesla stock price depend on Elon Musk’s mood? In this newsletter, we’ll share a new tutorial for sentiment analysis and talk about the new features that can improve your daily workflow in Datalore. Chart cells Could you imagine that working with v…
Revamped Reactive Mode and How It Makes Your Notebooks Reproducible
Greetings from the Datalore team! Jupyter notebooks can get messy. Perhaps you have tried different things in one notebook, or maybe you have chunks of outdated code and variable declarations all over the place. This isn’t necessarily a sign that something is wrong. Rather, the tool was designed …
New in Datalore: Cell Redesign, PDF and Python File Export, Embedly Support, Twitter Challenge, and More
For the last month, we’ve been working on implementing a frequent user request to export notebooks into different types of files and to share code on other platforms. You might have also already noticed that the look of the editor has changed a bit. Read on to learn more about the recent updates in Datalore 👇🏻
New in Datalore: Publishing Update, Documentation, Pandas Tutorial and More
In January and February we introduced a lot of updates to Datalore: we integrated the UI for publishing notebooks, released the first version of Datalore’s documentation, updated the landing page, and introduced improvements for working with files from Python code.