jEdit Community - Resources for users of the jEdit Text Editor
Block copy/paste request
Submitted by Hans_Bauer on Saturday, 16 October, 2004 - 17:41
Dear JEdit team,

working a lot with JEdit using block copy and paste i miss a very useful feature, some other editors offer. So at the moment it's hard for me to change to JEdit completely even though i wish to do this.

With JEdit we need to select a block using the ctrl-key, count the number of the selected lines in the block, select the same number of lines in the target area and insert the block (ctrl-v). This is very hard for large blocks with many lines, expecially because the statusline does not show the number of the selected lines.

It would be very useful to be able to paste the selected block into the target area only by setting the cursor to the upper left corner of the target and pressing ctrl-v.

An example to show my problem:
Assume the block of 'X' should be copied between 'c' and 'd' (should be read with fixed font)

aaaaa bbbbbbbbb
aXXXa cccdddeee
aXXXa f
aXXXa ggghhhiii
aaaaa jjjjjjjjj

The intuitive way is to select the block of 'X', press ctrl-c, move the cursor between 'c' and 'd' and press crtl-v to get

aaaaa bbbbbbbbb
aXXXa cccXXXdddeee
aXXXa f XXX
aXXXa gggXXXhhhiii
aXXXa jjjjjjjjj

At the moment the above procedure leads to

aaaaa bbbbbbbbb
axxxa cccXXX
XXX
XXXdddeee
axxxa f
axxxa ggghhhiii
aaaaa jjjjjjjjj

I hope you agree with my request. Is there a possibility to implement this?

I appreciate your great work coding one of the best editors found in the net.
Thanks you all.

Yours
Hans Bauer
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Vertical Paste
by fixedsys on Mon, 18/10/2004 - 06:44
Hi Hans,

jEdit has the feature "Vertical Paste". You'll find it in "Edit" -> "More Clipboard" -> "Vertical Paste". Of course you can bind an own key to it in the Global Options. Result of your case with Vertical Paste:

aaaaa bbbbbbbbb
aa cccXXXdddeee
aa f XXX
aa gggXXXhhhiii
aaaaa jjjjjjjjj

Between "f" and "X" there are white spaces now to keep the columns.

Sorry for my english.

Lars
 
Great!
by Hans_Bauer on Mon, 18/10/2004 - 19:47
Hello Lars,

thank you a lot. I'm very ashamed not to find this option by myself before, although using JEdit a long time. Would'nt it be nice to usual have this this feature activated when having a block in the clipboard?

You helped me a lot.
Thanks again.
 
Re: Great!
by fixedsys on Wed, 20/10/2004 - 09:03
Hi Hans,

hmm, I prefer the way it works now because I have to copy a block and paste in in "normal" way quite often. So I have the free choice to do exactly what I want.

But I think I could be possible to create a "automatic paste" which pastes normal until there is a block in the clipboard. Then you can bind this to your preferred key. So everybody's happy. Smiling

Lars
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300