LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-16-2012, 03:45 AM   #1
unixor
Member
 
Registered: Aug 2012
Posts: 46

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


hello!

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?

thanks!

Last edited by unixor; 08-16-2012 at 03:53 AM.
 
Old 08-16-2012, 09:13 AM   #2
dahweeds
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.

EDIT:
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 09:16 AM. Reason: Found another tip.
 
Old 08-16-2012, 09:41 AM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,837

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
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:

Code:
#!/bin/bash

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:

Code:
/path/to/scriptname /path/to/filename

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


Reply


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 05:00 PM
[SOLVED] Pulling text from a text file and append to CSV fishy Linux - Newbie 5 03-02-2012 08:32 AM
copying selected text using vi aceone Red Hat 7 11-20-2010 07:01 AM
Cannot print selected text dwhitney67 Linux - General 0 09-30-2007 01:42 AM
time --output=log.txt --append sadarax Linux - General 1 05-22-2006 09:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:06 PM.

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