This is got a be one of the most or the most silly question in all stack overflow! But how do you copy/paste a cell in a COLABORATORY notebook? There is a "copy cell" option, but not "paste cell" option. Whenever I try to paste there's this pop message "Use cmd +V to paste", but there is no paste at all!. In Jupyter is just "c" to copy and "v" to paste! This is one of the reasons I do not use COLAB at all. Thanks for your time!
Actually ctrl + V works for pasting on Google Colab in 2021 if you are using Chrome or Edge.
For Copying I use the Edit menu:
Alternatively you can use the context menu for copying:
The workaround is to change your Colab Keyboard shortcuts by
Navigate to Tools > Keyboard shortcuts
Assign:
"Copy cell or selection" to Cmd/Ctrl+M C (press Cmd/Ctrl+M then C)
"Cut cell or selection" to Cmd/Ctrl+M X
"Delete cell/selection" to Cmd/Ctrl+M D
Then you can press Cmd/Ctrl+M then C, X, or D to copy, cut, or delete a cell. This is not as good as the original jupyter notebook method but at least you can do it with just keyboard.
Related
I would like to know how to run all cells (from the beginning of the notebook) and stop at the cell that's selected (do not want to run ALL cells..) on Google-Colab.
Is this possible?
Yes, it is possible.
Just select the cell and click on Runtime > Run before in the toolbar at the top of the notebook. Runtime > Run before runs all the cells from the beginning of the notebook until the selected cell (not included).
Another way is to select all the cells you want to run and click on Runtime > Run selection.
Hope it helps!
To run all cells above you can use this shortcut: Ctrl + F8.
Or manually: Runtime > Run before.
In Eclipse the keyboard shortcut to find next occurrence of a word in a file was Ctrl + k . It finds the occurrence of the selected word in a file one by one in a loop. What is the equivalent keyboard shortcut for IntelliJ IDEA? If not can we configure it some how?
First you'll have to highlight a symbol by pressing Ctrl+Shift+F7.
Then you just press F3 or Shift+F3 no navigate between the highlighted symbols.
When done you press Esc to exit the highlight searching.
It is all described on Highlightning Usages in IntelliJ Web Help.
Add selection for the next occurrence on Linux Alt+J
Finding Word at Caret: Ctrl+F3.
On Mac it's Command + G, but you can check what works for your OS by looking at Edit -> Find -> Find Next....
AFAIK you have to select the word in the search bar first.. So, Command + F and then Command + G to go to the next occurrence.
In Android Studio 1.4, apparently Mac OS default keyboard shortcuts for element next occurrence (vars, methods, etc) are
NEXT/FWD: Command+G
PREVIOUS: Shift+Command+G
I did try all the answers w/out success, and finally I looked it up in Prefs->Key Bindings
There are also hotkeys for navigating next/previous highlighted usages.
Several years ago they were Alt+Wheel down and Alt+Wheel up. Today they are not set by default.
You can find them in Keymap preferences with highlighted element usage search phrase.
Please consider using the Multiple Selections for this:
Select the term you want to lookup;
Use Alt+J / Shift+Alt+J (or Ctrl+G / Shift+Ctrl+G for Mac OS X) to select other occurrences.
It will work the same as Shift+F3, but it will select every next occurrences. I found this way much more conveniant, as you can choose to edit all the matching string or just move the cursor to edit the last selected one (←/→).
The Multiple Selections feature is available since IntelliJ IDEA 13.1 RC, and compete with Atom or Sublime Text similar feature.
I could not get any of IntelliJ's native options for Find Next/Previous to behave like in Eclipse. Find Word at Caret comes close, but it only allows you to slurp and find the next word, not previous.
I wrote an IntelliJ plugin to reproduce the exact behavior as in Eclipse. You can find it here: https://plugins.jetbrains.com/plugin/10635-quick-find-plugin
you can set shortcuts same as in eclipse by setting keymap value as eclipse.
Steps in intellij:
Go to setting in file
search for keymap
In the dropdown section set Eclipse
Now all your shortcuts are same as in eclipse.
For MAC:
First you'll have to highlight a symbol by pressing Command+Shift+F7.
Then for next occurrence Command+G or Command+Shift+G
On my Mac it is:
ctrl-l to find next occurrence
ctrl-shift-l to find previous occurrence
IntelliJ Keyboard Shortcuts
On Ubuntu:
Next occurrence of selected word: F3
To expand the question slightly, the method to display the next occurrence of a search term in the Find In Path pane, is to steer to it using the up/down arrows and then hit Enter.
Start by looking for all occurrence of the key (control + g)
Then use ( shift + command + g ) to find previous occurrence and ( command + g ) to find next occurrence.
For those who use IdeaVim plugin, there is another option.
Add these entries into .ideavimrc:
map <C-j> <Action>(GotoNextElementUnderCaretUsage)
map <C-k> <Action>(GotoPrevElementUnderCaretUsage)
This maps the navigation to the next/previous element under caret using ctrl+j/ctrl+k. Of course you can map it to something else, but this suggestion follows the standard navigation keys in vim.
In IntelliJ 10.5 I have "Highlight usages of element at caret" enabled. When a variable/method/etc is selected, is there a way to move to the next and previous occurrence? I'm looking for the equivalent of Control-K in Eclipse.
Edit: Shortcut to navigate between highlighted usages simply moves to the next text occurrence, which is different than moving to the next occurrence of the variable/method/etc. If I have the variable foo selected, I want to navigate to the next occurrence of foo and not any piece of text called "foo" (including "foo" in comments, method names, etc).
Also, pressing F3 seems to be buggy. When I press F3, it sometimes searches using the previous searched text and not the currently highlighted text.
F3 or shift+F3
ctrl+c, ctrl+f, enter or up and down arrows
ctrl+alt+F7
Added this in case people don't look at your edit.
It's not currently possible, see my question: Shortcut to navigate between highlighted usages.
I even created an issue IDEA-70523 addressing this feature, please vote for it if you can't live without it like me :-).
Install Identifier Highlighter Reloaded and use Alt + Shift + Up/Down (can be redefined in Keymap settings) :)
After you give it a shot and notice the 'hey, the highlight stays there after I move my cursor out of it' annoyance, consider upvoting this issue :)
In the Mac OS, you can navigate to next highlighted usage by press control + option + up/down arrow.
Vote this request up for make them implement the feature.
http://youtrack.jetbrains.com/issue/IDEA-59638
I found something thay may more suite your needs : alt + mouse-wheel up/down.
It goes to previous / next occurrence of identifier under caret.
Shortcut name is "Go to next highlighted element usage".
I usually do the following:
Highlight the word
Cmd + F (it will highlight all the matches in file)
Cmd + G (next match)
Cmd + Shift + G (previous match)
I could not get any of IntelliJ's native options for Find Next/Previous to behave like in Eclipse. Find Word at Caret comes close, but it only allows you to slurp and find the next word, not previous.
Identifier Highlighter Reloaded also does not behave like Eclipse.
I wrote an IntelliJ plugin to reproduce the exact behavior as in Eclipse. You can find it here: https://plugins.jetbrains.com/plugin/10635-quick-find-plugin
Look for next occurrence # Keymap
^G = "select" the variable that you want to search for
[shift]⌘G = [previous]next occurrence of selected variable
All credits to #Igor Wojda for his comment in the accepted answer.
(AFAIK, limiting search scope to only variable/method is not possible)
For text based match and quick jump:
Simply place the cursor over the desired word to be searched
Press Ctrl+F3
For further down/up search, simply use
F3/Shift+F3 respectively
in Intellij shortcut for this action, it's not defined.
but you can define it like this:
Ctrl+ Alt + S
search " highlighted usage"
then you can set a shortcut for that.
Ctrl+Alt+Up and Ctrl+Alt+Down navigates to the next and previous usages of a highlighted variable in IntelliJ.
I use this functionality of navigating to the next usage of a variable in a file by hot in Visual Studio all the time (Ctrl+Shift+Up and Ctrl+Shift+Down) and was looking for the equivalent in IntelliJ
Is there a keyboard shortcut to start a new line on the currently selected line?
I.e. The current line goes down one line and the cursor is on a blank line.
There is Shift + Enter which starts a new line but on the next line. I want the current line.
CTRL+ALT+ENTER was the right shortcut for me (version 12.1.6).
CTRL+SHIFT+ENTER works as of 11.2.
On mac this works for me:
⌘+ ⌥ + ↵
There isn't one, but you can very easily create it using a macro.
In order to create the macro you can follow these steps:
Place the cursor on any line with code.
Click on menu Tools | Start Macro Recording
Press: Home -> Enter -> Up
Click on menu Tools | Stop Macro Recording
Test your macro using Tools | Playback Last Macro
You can remove any action from the macro that doesn't belong there by using Tools | Edit Macros.
When the macro is working fine you can assign a shortcut to it in the Settings window on the Keymap page.
Do not think anything exists in version IntelliJ 8 or 9 for that matter. Prove me wrong.
I create some custom copying functionality for my web application that I want to test. I can't find any Keywords for copying or pasting in the documentation though. Does anything like this exist?
You can use the following code for copy paste in Robot Framework
1.Install clipboard library using command in CMD : pip install clipboard
2.use code:
Copy To Clipboard ${TextToCopy}
Click Element ${TargetLocator}
Press Key ${TargetLocator} \\22
You can use Selenium2Library that has a keyword name Press Key then we could get the values from ascii table such as ASCII Table
We can see that ctrl+A hex value is 01 - we need to hit that to highlight the text.
You could try something like this
Copy Text and Paste Text
[Documentation]
... CTRL-A -> 1
... Copy-> 03
... Paste -> 16
Press Key ${seleniumLocator} \1 #Highlight the text Ctrl+ A
Press Key ${seleniumLocator} \03 #Copy Text Ctrl + c
Press Key ${Some_Other_Locator} \16 # Paste Text Ctrl+ v
For copying and pasting using Selenium + python (using keyboard shortcuts):
Performing-a-copy-and-paste-with-selenium-2
You can also create a method to re-use (e.g. using RobotFramework):
Paste command using Selenium
You will need to first import the selenium2 library for RobotFramework.
I have been using RFW for a while now. I've never heard of copy/paste as you mentioned.
Thus, the only way would be custom your own keywords based on python libraries.
You can use the OS library of Robot Framework
http://robotframework.org/robotframework/latest/libraries/OperatingSystem.html#Copy%20File