Plain text editor (or plugin) with ability to copy line into clipboard in just one mouse click - text-editor

I'm looking for plain text editor (or plugin) with ability to stay on top and copy entire single line into clipboard by just clicking somewhere within this line. Without need to make a selection or press any key(s) first, just click and get line copied into clipboard. Next click inside editor's window gets another line from opened file copied into clipboard, and so on. Thanks.

I don't think such app exists. Coz single click always changes caret position only.
In SynWrite editor u can click line, AND press Ctrl+C. (First set option "Copy current line if no selection made" on).

Related

How do I copy/cut text which I selected using shift+Arrow keys in Nano?

When I am trying to copy/cut in Nano command while using Shift and Arrow key to select the lines, its not working. But if I am selecting the lines with my mouse to copy/cut, its working.
Is it normal or I have to change any setting.
Thanks in advance.
Alt-A starts marking. Move the cursor to mark the text.
Alt-6 is copy
Move to the target location.
Ctrl-U is paste
The shortcuts are displayed at the bottom of the screen. :)

copy to clipboard with vim running in windows 10 cmd line window

I have a windows 10 PC.
The VIM session is run from a command prompt window.
Normally when I copy and paste, I do the following steps:
1. go into edit mode by typing ":"
2. select the text with mouse drag
3. right click on mouse button
4. move cursor to a text editor, which is a different window than the VIM terminal.
5. right click and select Paste.
How do I do that the same with yank?
I know there's a trick about using clipboard "*y, but I tried it, it didn't work.
Use the yank command. Select the text you want to copy and type "*y

How to get a widget from another app when clicking on it and paste to the clipboard?

I am working on a program but as I'm still new to Python I don't know how to paste the content of the clipboard, which I already figured out, so I can enter some text in my GtkTextView and when clicking a button that text goes in the system clipboard, but what I'm trying to do is that when I click the button in my program to then automatically paste the clipboard to ANY other application when I click on them, like for example to Chrome or to gedit or any other 3rd party application.
I don't know how to get the text entry of say for example Chrome when clicking on it.
How do I get a widget from another app when clicking on it and paste it to the clipboard there automatically?

StringReplace unable to identify and replace string copied into clipboard from web pages?

What I am trying to do is very simple: copying selected text into clipboard and replacing every occurrence of some words with others.
StringReplace replaces the specified substring with a new string, so it would be what I am actually looking for.
This small script should copy the text highlighted by user into clipboard, look for every occurrence of the strings <name>, <class> and <race> and replace them with strings Aerien, Paladin and Human:
^q::
{
Send, ^c
ClipWait
StringReplace, clipboard, clipboard, <name>, Aerien, All
StringReplace, clipboard, clipboard, <class>, Paladin, All
StringReplace, clipboard, clipboard, <race>, human, All
Sleep, 250
Send, ^v
}
Return
At the end, it pastes the new content.
Well, said that... try to use it on the contents of this web page as instance, especially where it's written:
I hope you strapped your belt on tight, young <class>, because
there is work to do here in Northshire.
Aforementioned script returns me always <class> instead of replacing that string with Paladin. Using the same script within Notepad instead of within that web page sometimes work but more often not.
I am guessing some issues with < and > symbols.
Always use AutoHotkey from http://ahkscript.org/ (current version, new official website)! AutoHotkey from autohotkey.com is outdated and you may have some problems running scripts with it!
Your script works as intended. When you press CTRL+q script copies to clipboard selected text (so you have to select text before pressing CTRL+q), then in a text that is in clipboard it searches for <name>, <class>, <race> and replaces them respectively to Aerien, Paladin, Human. After it pastes the content of clipboard to the current active window.
1. If you need to paste the content of clipboard in specific input field of current active window, then in my opinion the best way to do that is to use ImageSearch command to get coordinates of that input field, after make click in theses coordinates and after paste the content of clipboard. But also keep in mind that there can be other solutions to do the some.
2. If you need to paste content of clipboard in some other window, activate that window with WinActivate command and then paste the content of clipboard.

Why can't I copy paste this text in Vim?

When even i try to copy paste this text in vim it put half of it in the command line and half in text editor main window
This is the text
sub(/;;/," ",$0)
How can i copy paste that
When you paste in console Vim (not GVIM), Vim cannot detect whether what you've pasted is typed by you or an actual paste. Therefore, any (insert mode) mappings will apply. You probably have a mapping (maybe ;;?) that leaves insert mode, and that is triggered during the paste, wreaking havoc.
There are two ways to prevent that:
Either paste in normal mode via "*p (active selection) or "+p (system clipboard), provided that Vim is able to interact with them.
Or, set the 'pastetoggle' option, e.g.
:set pastetoggle=<F2>
and then press F2 (in insert mode) before pasting (note how the mode changes to -- INSERT (paste) --, and again after it. This way, you explicitly tell Vim "the next characters aren't typed by me, treat them literally".
If this manual management is too much of a hassle for you, you can alternatively use graphical GVIM.
I'm not sure which way you're copying and pasting (i.e. from an Xorg window (like gnome-terminal) to vim or vice-versa). Let's assume you want to copy and paste from an Xorg window into your vim window. There are a few ways to do it:
Select the text to copy using the mouse, put vim into insert mode, then press the middle mouse button.
If you are using vim with X support in a console (often started by typeing vimx) then you can select the text to copy using the mouse, then in the vimx window press "*p. The text selected by the mouse is placed in the * register.
If you are using vim with X support in a console (started by typing vimx) then you can select the text to copy using the mouse, right click the mouse, choose menu item Copy and then in the vimx window hit "+p to paste. In this case, because you used the right click menu item to copy, the text was placed in the in the + register.
Items 2 and 3 above also work when using gvim.
What you can do is make sure you're in insert mode and copy the code snippet with ctrl+v on the keyboard and then left click to the vim window to put it back in focus, then tap right click once and your text should paste in. I just tested this to make sure and it worked on CentOS 6.3 at least.
In vim you have modes, to enter text you have to be in insert mode. Press i (before current char) or a (after current char) before pasting your text.
If you don't go into insert mode, the first char s will erase the current char and enter insert mode putting ub(/;;/," ",$0) on your file.
Press ESC to leave the insert mode.
Also if you happen to have a shared clipboard with your GUI pressing p will paste.
To have a shared clipboard on OSX insert set clipboard=unnamed in your ~/.vimrc file.

Resources