[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using the clipboard



On Thu, Nov 27, 2008 at 2:41 PM, Rick Pasotto <rick@niof.net> wrote:
> I have a text file of about 100 lines (more than will display on one
> screen of less or vi). How can I get the entire file into the clipboard
> so I can then do a single paste to get it into a web text box? I know I
> can do it in sections but pasting uses the scroll wheel and the scroll
> wheel wants to scroll so the text frequently ends up getting inserted in
> the wrong place.
>
> Things work fine in the other direction since a browser window will
> scroll automatically when the mouse pointer reaches the bottom or top of
> the window.

You can use the tool xclip to read the contents of a file to the clipboard.

Many x-terminal scrolls and have configurable scrollback size so if
you're using one of those then you can most likely adjust the settings
so that the whole file fits.

You can also open the file in vim (or gvim) and copy to the clipboard.
 If you want the whole file then jump to the top (gg) then copy
everything to the '+' register ("+yG).  I'm sure you can use emacs in
some way to do the same, but you'll have to ask someone else about
that :)

I hope that helps.

/M

-- 
Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe

Reply to: