1. Pete: Edita
- Posted by Al Getz <Xaxo at aol.com> Jul 29, 2006
- 483 views
Hi Pete, I had a good use for Edita when i ended up with some data that was arranged in one column that needed to be in two columns. Here's an example with some language data: Some data is arranged like this: i have you have we have they have tenho tem temos tem And needs to be like this: i have tenho you have tem we have temos they have tem what i wanted to do was paste the 'i have' column into Edita, then come back and copy the 'tenho' lines and then simply paste that to a new column. Unfortunately, either Edita wont allow that (paste to new column) or i dont know how to do it. Any ideas? Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."
2. Re: Pete: Edita
- Posted by don cole <doncole at pacbell.net> Jul 30, 2006
- 458 views
Al Getz wrote: > > Hi Pete, > > I had a good use for Edita when i ended up with some data > that was arranged in one column that needed to be in two > columns. > > Here's an example with some language data: > > > Some data is arranged like this: > > i have > you have > we have > they have > > tenho > tem > temos > tem > > And needs to be like this: > > i have tenho > you have tem > we have temos > they have tem > > what i wanted to do was paste the 'i have' column into Edita, > then come back and copy the 'tenho' lines and then simply paste > that to a new column. Unfortunately, either Edita wont allow > that (paste to new column) or i dont know how to do it. > > Any ideas? > > > Al > > E boa sorte com sua programacao Euphoria! > > > My bumper sticker: "I brake for LED's" > Hello Al, Why not just do all that in Microsoift Word and paste it in Edita? Don Cole
3. Re: Pete: Edita
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jul 30, 2006
- 466 views
On Sat, 29 Jul 2006 04:11:10 -0700, Al Getz <guest at RapidEuphoria.com> wrote: >Hi Pete, > >I had a good use for Edita when i ended up with some data >that was arranged in one column that needed to be in two >columns. > >Here's an example with some language data: > > >Some data is arranged like this: > >i have >you have >we have >they have > >tenho >tem >temos >tem > >And needs to be like this: > >i have tenho >you have tem >we have temos >they have tem > >what i wanted to do was paste the 'i have' column into Edita, >then come back and copy the 'tenho' lines and then simply paste >that to a new column. Unfortunately, either Edita wont allow >that (paste to new column) or i dont know how to do it. > >Any ideas? > Yes, this should be possible with column selection. I stumbled into a few bugs, so first here is a replacement Paste (edita.exw ~line 2450)
global procedure Paste() object clipText, padding integer cX, cY, sX, absY if currfile then if and_bits(isClearOverStrike,cOVRpaste) then insertMode=1 end if clipText=getTextFromClipboard() if isEu then if isReplaceTabs or Xtrans then -- This also performs translation: for i=1 to length(clipText) do clipText[i]=PackTabs(clipText[i],0) end for end if end if if length(clipText) then if selON=2 then -- column mode absY = Abs(CursorY-selY)+1 if equal(clipText,repeat(clipText[1],length(clipText))) then clipText = repeat(clipText[1],absY) else if length(clipText)!=absY then if length(clipText)=absY+1 and equal(clipText[length(clipText)],{}) then clipText=clipText[1..absY] -- drop trailing {} else void=messageBox(xl("Error"), xl("incorrect length for non-uniform column paste"), 0) return end if end if end if cY=Min(selY,CursorY) cX=Min(selX,CursorX) sX=Max(selX,CursorX) for i=1 to length(clipText) do CursorY=cY CursorX=ExpLength(filetext[currfile][CursorY+1]) if CursorX<cX then -- line too short - pad if length(clipText[i]) then padding = {repeat(' ',cX-CursorX)} selON=0 addAction(INSERTBLOCK,padding) InsertBlock(padding) end if elsif CursorX>cX and sX>cX then if CursorX>sX then CursorX=sX end if selX=CursorX CursorX=cX selY=cY -- one line at a time selON=1 if not deleteSelection() then ?1 end if end if if length(clipText[i]) then CursorX=cX selON=0 addAction(INSERTBLOCK,{clipText[i]}) InsertBlock({clipText[i]}) end if cY+=1 end for else if deleteSelection() then end if addAction(INSERTBLOCK,clipText) InsertBlock(clipText) end if forceCursorOnscreen() end if end if end procedure
With the above routine in place, you should be able to block select tenho..tem and cut to the clipboard, move to the end of "they have", insert a few tabs/spaces (make sure it is now the longest line of the set), Alt-Up to block-column-select the four lines, and paste. In this particular case the column select is zero chars wide so you don't get much/any visual feedback but it should now work. You could of course start on "I have" and use Alt-Down. Note that when you perform a column selection (using Alt cursors) and attempt a paste of several different lines into that selection, it will check that the lengths match. I added a line above to ignore a lone trailing {}. While doing this, I nailed another of those pesky undo/redo WHOOPS, so many thanks for the feedback. Regards, Pete
4. Re: Pete: Edita
- Posted by Al Getz <Xaxo at aol.com> Jul 30, 2006
- 451 views
Pete Lomax wrote: snip(long eu code) > > With the above routine in place, you should be able to block select > tenho..tem and cut to the clipboard, move to the end of "they have", > insert a few tabs/spaces (make sure it is now the longest line of the > set), Alt-Up to block-column-select the four lines, and paste. > > In this particular case the column select is zero chars wide so you > don't get much/any visual feedback but it should now work. You could > of course start on "I have" and use Alt-Down. > > Note that when you perform a column selection (using Alt cursors) and > attempt a paste of several different lines into that selection, it > will check that the lengths match. I added a line above to ignore a > lone trailing {}. > > While doing this, I nailed another of those pesky undo/redo WHOOPS, so > many thanks for the feedback. > > Regards, > Pete > > Hi again Pete, Hey that's nice, thanks for the fix. I also didnt know that you had to select the 'block' first before you could paste. I thought you could press ALT and right click and just paste and that would paste a column starting at the current cursor position. Maybe a little more in the doc's about this? BTW, what is the most recent version now? There was a discrepancy in the line number you quoted so i think maybe i've got a slightly outdated version. The fix still worked however :) I think this is the only app that pastes (and i assume cuts) working with columns, right? I havent seen another editor that does columns have you? Thanks again. Take care, Al E boa sorte com sua programacao Euphoria! My bumper sticker: "I brake for LED's" From "Black Knight": "I can live with losing the good fight, but i can not live without fighting it". "Well on second thought, maybe not."