Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-16-2012, 02:45 AM   #1
Registered: Aug 2012
Posts: 46

Rep: Reputation: Disabled
append selected text to a txt, in order to gather notes


I would like with one keyboard shortcut or mouse shortcut to append the text I have selected to a txt/doc file, after a newline inserted

is it possible?


Last edited by unixor; 08-16-2012 at 02:53 AM.
Old 08-16-2012, 08:13 AM   #2
LQ Newbie
Registered: Nov 2008
Posts: 24

Rep: Reputation: 0
Well. I am running right now Linux Mint 13 MATE version. So I opened a text file next to the browser. Then I left click at the start of your post, drag the mouse to the end (from "hello! ... to ... thanks!" and then release the mouse leaving the text highlighted. Then I roll the mouse over the highlighted text until the cursor changed, then left click and drag to my text file. The text seems to float accross the screen and when I release the button on my text file, it is pasted in.

It is a detailed description, but it is a two step process I think so it might not be what you need.

1) selected text with mouse
2) drag and drop the selection into the txt file

This is firefox 14.01.

I tried the same between two text files and it works as well.

Next to this computer I have the Fedora 17 KDE. This process works here too if I select from browser, drag to email and drop, then select in email and drag to text file and drop.

I just find that when I select the text, then mouse over the txt file and press the wheel (center mouse button) the text is also pasted right in. So if you have a center wheel on your mouse you can select and then click. It might still be two steps though.

Last edited by dahweeds; 08-16-2012 at 08:16 AM. Reason: Found another tip.
Old 08-16-2012, 08:41 AM   #3
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Install the xsel application (xclip will work too), to allow you scripting access the visual selection. Then just set up a hotkey (using the binding feature your desktop offers, or xbindkeys) to run a simple script like this:


echo >> "$1"
xsel >> "$1"

exit 0

The first and only argument for the script will be the name of the file you want to use, so the command for your hotkey will be:

/path/to/scriptname /path/to/filename

Last edited by David the H.; 08-16-2012 at 08:45 AM. Reason: minor rewording
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extracting second line from multiple txt files and append to a file sal_x_sal Linux - Newbie 11 08-12-2012 04:00 PM
[SOLVED] Pulling text from a text file and append to CSV fishy Linux - Newbie 5 03-02-2012 07:32 AM
copying selected text using vi aceone Red Hat 7 11-20-2010 06:01 AM
Cannot print selected text dwhitney67 Linux - General 0 09-30-2007 12:42 AM
time --output=log.txt --append sadarax Linux - General 1 05-22-2006 08:46 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration