Pages: [1] 2 3 4   Go Down
Author Topic: X11 paste in IDE  (Read 5140 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 179
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

one very useful feature on X11 based systems is PRIMARY buffer. As soon as any text is selected it is copied to the buffer, then clicking mouse button 3 (often scroll wheel click) then pastes the buffer.

This is about an order of magnitude faster the all the right-click context menu cut and paste method.

Unfortunately neither the copy not the paste works with arduino IDE

This makes even minor editing of the code in the IDE window is much more labourious than it needs to be.

This feature is inherent to all X11 windows, so what is preventing this from working in the IDE?

Can it be fixed?
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't realise that. I usually use the keyboard for copy/paste (I find it faster than having to move a hand to the mouse). As the IDE is written in Java, I suspect it relates to that. A quick google suggests that, at least, some other Java based applications suffer the same problem (including some versions of Eclipse). jEdit on the Sun box I have here doesn't support middle-click paste. Even though it is standardised, I presume it still has to be implemented as a mouse click event.
« Last Edit: August 06, 2012, 02:16:44 am by dxw00d » Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 534
Posts: 26969
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I just use CTRL-C to copy and CTRL-V to paste. Seems quick enough.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Or Ctrl-Insert/Shift-Insert. Keyboard controls are usually quicker.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6746
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On Mac, I use x-style select for copy, and cmd-V for paste into arduino.  There may be an additional cmd-C needed as well, connecting X paste buffers with Mac paste buffers presents interesting challenges.  Probably true of windows as well.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 179
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just use CTRL-C to copy and CTRL-V to paste. Seems quick enough.

Well it's better than going through the menus but  if I'm selecting text it's almost sure that I'm doing it with the mouse, editing and shifting code around, or copying code from browser or other files. This is where X11 pasting is a huge time saver.

So rather than needing to pick up the mouse to do the paste it's a case of dropping the mouse to do
CTRL-V

I was forgetting the "IDE" was written in java. I'll have to dig a bit to see if it's a universal problem with java or a common java programming defect.

Thanks for the replies.

BTW the mouse copy-on-select does not work either.
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
f I'm selecting text it's almost sure that I'm doing it with the mouse

That's the difference. Almost all my editing is pretty much keyboard based.
Logged

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
f I'm selecting text it's almost sure that I'm doing it with the mouse

That's the difference. Almost all my editing is pretty much keyboard based.

Trying to copy text from one window to another is hardly "editing." The sequence of buttons could either be
windows:
Code:
1.Select text on one window
2.Press "ctrl-c"
3.Click on other window
4.Press "ctrl-v"
X11:
Code:
1.Select text on one window
2.Middle click on other window
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 534
Posts: 26969
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ctrl-C, Ctrl-V easy enough to remember for me. And more likely to work in more places.
I don't see how just highlighting the text copies it into a paste buffer.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Trying to copy text from one window to another is hardly "editing."

Indeed, but as a generic term, 'editing' will do.
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I don't see how just highlighting the text copies it into a paste buffer.
That's the way X11 has worked for, I dunno, 25 years or more?

I'm a keyboard kind of guy, but if you are already moving between windows to copy and paste, that implies a mouse (to select the "copy" text even if you use the keyboard to switch windows), which means you've got your finger on the trigger to paste, X11 style.  Depending on your settings, you can select the target window and paste with a single click.

-j
Logged

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This thread seems to have devolved into people who have used X11 saying how nice the middle click paste is and the people who haven't saying it seems useless/impossible.

I'm pretty sure there's nothing the IDE developers can do about this and that it should be reported upstream.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 179
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which "upstream" would that be?

Here's a new twist. The error window of the IDE does support X11 c&p but does not respond to a right click to do it windows style off context menus.

This can not be laid at the door of java or anyone else it has to be arduino IDE.

(both windows work with control key sequences, apparently the only copy/paste method that was tested)

Since the official team have not fixed the disastrous heap allocation bugs in the two years since a fix was provided , I don't see much hope of this getting any attention.

I could be wrong, but it does not inspire hope.
Logged

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 69
Posts: 2166
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Gotta remember, the Due will most probably need a new IDE, hopefully the standard arduinos go with it, hopefully they have considered a lot of what has been reported in its design. But yes its not java's fault.

This may be one form of getting things "upstream"
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 179
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Wizened wrote:
Quote
I'm pretty sure there's nothing the IDE developers can do about this and that it should be reported upstream.

That's why I was asking what "upstream" he was referring to.

Thanks for the link to google code arduino but until there is some evidence that someone up there has a will to fix major defects like heap allocation problems and the numerous memory leaks in the official included libs, I will not be wasting time filing bugs.

I'm becoming rather disappointed with the quality of std libraries. It seems that in order to produce a reliable Arduino project it is necessary to vet every line of included code for this sort of careless mistake and/or trawl these forums for bugs and fixes.

All of which rather defeats the point of importing libraries of code.

Logged

Pages: [1] 2 3 4   Go Up
Jump to: