Say you are editing code in one IDE and want to open the same file and place the caret at the same place in the other IDE. How would you do that between Pycharm and VSCode?
Is there a pair of extensions for that? Or a standard way of noting said place so that you can copy it from one IDE and paste it into the other?
I've looked around but couldn't find any info (maybe I didn't hit the right keywords).
Okay, so I found an answer for the direction Pycharm -> VSCode:
In Pycharm:
Hit Edit > Copy Path/Reference > Path With Line Number.
You should get a path of the form path/to/file:lineNumber.
In VSCode:
Hit Ctrl + P (command palette) > Ctrl + V (paste) > Enter.
I haven't looked for the other way around (VSCode -> Pycharm), yet.
I'm still new to VS Code and learning the litany of shortcuts and features.
Some shortcuts have multiple steps and it isn't immediately apparently if it's been fired.
For example, remove trailing whitespaces is CTRL + K, CTRL + X.
The only way to tell if it worked is to move my cursor to a line that has whitespace and see if it's gone.
Is there a way to add a small notification that announces when a shortcut is used?
I know I could alternatively use the Command Palette but I'd like to be more efficient as use KB Shortcuts.
Thank you
What is the shortcut to copy current line in VSCode?
I know we can Ctrl+L to select the line then Ctrl+C to copy. But is there any better solution. For example, in Geany, we can Ctrl+Shift+C to copy the line where the cursor is.
To be clear I am not talking about Duplicate line in Visual Studio Code
Here is your solution for your problem
Just press the Ctrl + C without selection it'll copy entire line and you can past it wherever you wanted,
Please read below solution for the query you ask in your question's comment
Stackoverflow don't have the close option but you can delete the question from you profile or you can follow the explaination to mark your question closed from the below link:
https://shodhganga.inflibnet.ac.in/bitstream/10603/32435/11/11_chapter%203.pdf
Another alternative to the accepted answer that I often use is SHIFTALTDOWN which duplicates the current line to the line below (likewise, SHIFTALTUP duplicates to the line above). Once you get the copy of your line you can use ALTUP/ALTDOWN to move it wherever you want. This works well if you are wanting a copy of the line in the near vicinity of the current line.
Go to File ==> Preferences ==> Keyboard Shortcuts, and update the copy line shortcut entry with any combination you like.for example Ctrl + DownArrow is good for me.
I am using VSCode on a Mac.
Does anyone know how to select the entire line that the cursor is on? I know about Command+I, but that only selects what appears to be the whole line, which is not always the whole line if I have word wrap enabled.
I am looking for something like Sublime Text's "Expand Selection to Line" command.
All you need to do is put the cursor anywhere on the line, do not make any selection at all and then do the desired command (Cut, copy, or paste).
When no text selected, VS Code will automatically select the entire line.
just triple click the end of the line it will select the entire line
Triple click at any point on the line
Click once on number of the line
Press Command + L
An alternative to what people have posted is, when your cursor is at the start/end of the line, you can hit shift + end/home respectively.
I find this useful for wrapping a line in curly braces/quotes/etc. whereas the other answers include spaces in the select so whatever you're wrapping it in will be wrapped around that whitespace.
Install the MetaGo extension and use the "metaGo: selectLineDown" command, which will come installed already overriding the "expandLineSelection" command.
This extension has many additional commands that you'll likely find useful as well, including moving up/down over code blocks, centering the active line, and going to any character on the screen.
Now, when I press Command+I, the whole line is selected. I am guessing this was caused by an update to VS Code, but I am not sure.
Ctrl + L on Windows or Command + L on Mac to select the whole line in VS Code.
You can use your mouse to select the whole line by triple-clicking on the line but the better way is to click on the line number to select the whole line or multiple lines.
Tripple click at any point on the line
In case you're wondering why Cmd+L is not working, there might be a chance that there are duplicate shortcuts. You can find out by opening Keyboard Shortcuts in VSC and remove the one that's not needed.
I know its old but for anyone seeking, you can press Alt + arrow up/down to duplicate your cursor to other lines and then without selecting anything copy and paste multiple lines.
I am looking for a quick way to select a line in netBeans.
For example for copy and paste. (in vim editor yy yank current line)
Most GUIs, including Netbeans, allow you to select a word by
double-clicking on it and an entire line by triple-clicking on it.
OR
selection-end-line (Shift+End)
selection-down (SHift+Down) for as many lines as you want.
I've been using Netbeans for a few months.
Ctrl + c will copy the entire line without selecting it.
Ctrl + e will delete the line without selecting it.
Ctrl + Shift + down or up arrows will duplicate the line.
I am late comer to this post, but with a solution. In netbeans 8.x, go to Tools -> Options -> Keymap. In that, search for Select Line. You will get an entry there. Under the field Shortcut, you can give your convenient shortcut. There is no shortcut by default