How to paste into a terminal? - linux

I have copied a URL, such as git://gitorious.org/openhatch/oh-mainline.git. I want to paste this in the terminal using a keyboard shortcut.
Please don't say "right click and paste."

Gnome terminal defaults to ControlShiftv
OSX terminal defaults to Commandv. You can also use CommandControlv to paste the text in escaped form.
Windows 7 terminal defaults to CtrlShiftInsert

Shift + Insert usually works throughout X11.

Mostly likely middle click your mouse.
Or try Shift + Insert.
It all depends on terminal used and X11-config for mouse.

same for Terminator
Ctrl + Shift + V
Look at your terminal key-bindings if any if that doesn't work

In Konsole (KDE terminal) is the same, Ctrl + Shift + V

On windows 7:
Ctrl + Shift + Ins
works for me!

Like this article How to copy paste text and commands in the Linux terminal mentioned.
You can use middle mouse button to implement the functionality of paste. I tested it on terminal successfully.

Related

Edit commenting shortcut in jupyter on mac

I use a Mac with a German keyboard. The shortcut function in jupyter cmd + / does not comment out marked lines, however I would really like this function on a shortcut. The main reason for it not working is mainly because on a German keyboard you access / by pressing shift + 7. When pressing cmd + shift + 7 the help section from the mac top bar drops down. When pressing cmd + 7, nothing happens.
In jupyters help section I tried editing the shortcut, but the commenting shortcut was not listed in the editing section.
Has someone a solution for this?

Ubuntu 16.04 Sublime Text 3 Command Palette and Enter key Completion not working

I already reinstall sublime text 3 many times but it wont fix my command palette. When i press Ctrl + Shift + P it open the Command Palette but if i try to type something the Palette will close. I want it to be the same with my other laptop, that if i Ctrl + Shift + P and type something then some hints will show and if i press enter it will trigger auto complete.
I already solve the problem just turning the numlock off. here's the answer source link

How to select multiple places (sublime) in code in Android Studio?

How to select multiple places in code in Android Studio ?
I want to insert the same text in multiple places in my source code. Like a have more than one mouse cursor. I used to do it in VS2012 so easily though not sure how to do it in Android Studio ?
I found how and lets share this cool feature with you. I found three cool features:
For multiple selection just hold alt + shift then select whenever you want to change by mouse click then type some thing you can write at multiple places at the same time.
Another cool feature is column selection. This lets you to click in a great manner and greatly of help especially when you are refactoring.
In most systems it works with holding middleMouseButton and dragging over your code and in others it works by holding alt and selecting code it acts like below:
the third cool feature is sublime selection it finds the same word in code and let you change that or append that easily. you can do that by pressing alt + j on Windows / Linux and ctrl + g in mac. Look how it works:
Also as #Narayana said in comments, Ctrl + Shift + Alt + j selects all occurrences in one shot, for one-shot refactoring.
You can use Alt + Shift and click multiple locations to for multiple cursor.
To select similar occurrences in files use Alt + j.
For more details : Click Here
Multiline Caret (without mouse)
Windows: CTRL + CTRL(Hold) + ↑ / ↓
Mac: ⌘ + ⌘(Hold) + ↑ / ↓
ESC will end multiline mode.
Change Multi-caret Hotkey
To add a custom Keymap, CTRL+SHIFT+A, type keymap and click on the one with Settings as subtext. Search for Clone Caret Above and Clone Caret Below.
I mapped mine to ALT+SHIFT+↑ / ↓.
Bonus
Try holding combinations of CTRL, SHIFT, and arrows for improved selection power.
For both Mac and Windows, just open the Context Menu and click on the "Column selection mode" to enable or disable the behaviour..
On a MacOS you can use:
Tap: Control + Command + G - Select all the same value
Tap: Control + G - Every tap combination select the new same value
Hold: Option + Mouse Click - Select multiline with a mouse
Hold: Option + Shift and Tap: Mouse Click - duplicate cursor for a each tap place
Press Shift + Alt + Insert combination to edit in Column selection mode.
On a mac I like to do ⌥ (option) + shift + mouse click on multiple lines in Android Studio 3.1.3.
Use the following:
ALT + SHIFT
on Mac , hold OPTION + SHIFT then use the mouse to highlight what you want to select
On Windows, you can try a plugin whose name is ConyEdit. It has a great column mode based on regular expression.
I'm using android studio arctic fox and pressing Alt alone and then selecting code is working properly in windows.

IntelliJ Column Selection using Cursor Keys

Is it possible to some how setup IntelliJ IDEA so that I can column select with the cursor keys similarly to how I might in Notepad++, Visual Studio, or FlashDevelop.
For instance when I'm typing code I almost always do my navigation solely through use of the keyboard. In the IDEs mentioned previously I can quickly select blocks of code by holding Shift + Alt then tapping ↑ to extend my cursor across the lines above. I can then hold Shift + Alt + Ctrl and tap ← or → to quickly jump across words and select the chunk of text I want.
In IntelliJ IDEA I have to constantly enable and disable Column Selection Mode using the Shift + Alt + Insert and even then it doesn't quite function as it does in the other IDEs or Text Editors.
Any ideas?
You can do column editing using the Edit | Column Selection Mode.
The shortcut to turn it on/off is Alt+Shift+Insert. You navigate with arrow keys to select blocks of text.
Multiline Caret (without mouse)
Windows/Linux: CTRL + CTRL(Hold) + ↑ / ↓
Mac: ⌘ + ⌘(Hold) + ↑ / ↓
ESC will end multiline mode.
Change Multi-caret Hotkey
To add a custom Keymap, CTRL+SHIFT+A, type keymap and click on the one with Settings as subtext. Search for Clone Caret Above and Clone Caret Below.
I mapped mine to ALT+SHIFT+↑ / ↓.
Bonus
Try holding combinations of CTRL, SHIFT, and arrows for improved selection power.
It is also possible to select holding middle mouse key.
Go to the Settings | Keymap and set a shortcut for Clone Caret Above and for Clone Caret Below
Most convenient way is to:
MAC: Hold Option+Shift and click with mouse.
Windows: Hold Alt and click with mouse.
On a mac, to toggle block select on/off:
shift command 8
⇧⌘8
For me on Mac:
Press once 'option' key, release it, and press and hold it again.
Now navigate with cursor to select desired code.
Press 'Esc' to exit column mode! :)
I think #Meo's answer is the most correct, but if your hand happens to be on the mouse, you can also accomplish this with Ctrl+Alt+Shift+Left Mouse Button Click. Or look for the Add Rectangular Selection on Mouse Drag in the keymap settings.
In Windows or Linux I press two times Ctrl
For Mac cmd+shift+* didn't work for me. I changed the keymap to something else and now it works seamlessly.

Selecting text in terminal without using the mouse

If I'm working in a terminal window in Linux, is there a keyboard shortcut I can use to select output displayed on previous lines? If I select something with the mouse I can copy using Ctrl + Shift + C, but is there a way to select without using the mouse at all. I'm using either Gnome terminal or KDE konsole in Ubuntu desktop.
For example I often need to copy results from a mysql query and then google them.
You can use the screen application and enter copy mode with Ctrl+a, Esc. Start selecting text with Space and end selecting text with Space. Insert text with Ctrl+a, ]
Daniel Micay's Termite sports a "selection mode". Pressing Ctrl+Shift+Space will activate it. It's got vim-like key bindings. v or V will select à la vim's visual mode, y will yank, Esc will exit selection mode.
Screen and Emacs M-x shell, for example, allow for keyboard access to the scrollback buffer. This was also one of the features of Plan 9 (but I guess it was mouse-oriented, at least primarily); you might want to take a look at 9term and/or Sam, the Plan 9 editor.
You can to it at terminal:
1 - Move the cursor to the beginning of line using ctrl + a
$ touch test.txt
2 - Copy the line to the paste area ctrl + k
3 - Finally, you can past it ctrl + y
$ touch test.txt
4- You can do it in a single word or more just using crtl + ← or crtl + → and use crtl + k at word's beginning.
$ emacs -g '80x24' --eval '(term "/bin/bash")'
C-c C-k char mode
C-c C-j line mode
C-space Selecting text in terminal without using the mouse
M-w copy to X11 clipboard
C - Ctrl
M - Alt

Resources