Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename a file or directory shortcut in jupyter lab?

I'm using jupyter lab.but everytime when i touch a new file or directory it default names Untitle.I have to click it and select "rename".

Is there a shortcut to rename a file or a directory? i have search this question in google but i didn't find what i want. Thanks!

like image 383
Hsgao Avatar asked Nov 07 '18 02:11

Hsgao


People also ask

How do I change directory in Jupyter lab?

How to change the working directory of Jupyter and Jupyter Lab on Windows environment. Open cmd (or Anaconda Prompt) and run jupyter notebook --generate-config . This writes a file to C:\Users\username\. jupyter\jupyter_notebook_config.py .

What does Ctrl d do in Jupyter Notebook?

A to insert a new cell above the current cell, B to insert a new cell below. M to change the current cell to Markdown, Y to change it back to code. D + D (press the key twice) to delete the current cell.

How do I create a shortcut to a folder in Jupyter Notebook?

Creating Your Own Jupyter Notebook Shortcut. To begin, we must have already installed Jupyter Notebook or Jupyter Lab. Next, navigate to the folder we want to create your shortcut. Right-click, select 'New', then create a shortcut.


2 Answers

You don't need to select the file and rename it.

You can give desired name just after a notebook it created or while it's open.Right Click on the tab where Untitled(in my case it is Untitled1) is written, in top left corner and select Rename Notebook.

enter image description here

It will open a popup text box.

enter image description here

change the name and click on RENAME.

like image 62
Krishna Avatar answered Sep 28 '22 02:09

Krishna


I managed to enable the shortcut by going Settings > Keyboard Shortcuts and add descriptions as below (and hit the save button at the upper right).

"command": "docmanager:rename",
"keys": [
    "Ctrl R"
],
"selector": "body"

Image

like image 40
Yusuke196 Avatar answered Sep 28 '22 01:09

Yusuke196