Open core-ai-bot opened 3 years ago
Comment by dangoor Wednesday Oct 01, 2014 at 18:27 GMT
Nice suggestion. Marking move to backlog to remember the feature.
Comment by infin80 Tuesday Mar 17, 2015 at 21:03 GMT
I added this GIF on the movable text page...hopefully it is still on your radar for Brackets??
Comment by prksingh Thursday Mar 19, 2015 at 04:46 GMT
Movable text was shipped brackets 1.2 but is disabled by default due to issues:
The issues were fixed in PR: https://github.com/adobe/brackets/pull/10708 If you have taken the latest code for brackets from source, there should be no issues with text drag and drop
You can enable the feature, by setting the preference "dragDropText": true.
Comment by MarcelGerber Friday Mar 20, 2015 at 16:35 GMT
@
prksingh Just for the sake of completeness, issue #10590 hasn't yet been fixed as CodeMirror wasn't merged yet.
Comment by prksingh Saturday Mar 21, 2015 at 06:45 GMT
Oh. You're right. Added issue to milestone for 1.3 release so we don't miss it.
Comment by infin80 Monday Mar 23, 2015 at 16:26 GMT
I still can not 'option' drag to make a copy on Mac. I apologize if that's what you're working on!
Comment by nethip Wednesday Mar 25, 2015 at 05:08 GMT
@
infin80 Copy drag is not yet implemented in Code Mirror.
Comment by MarcelGerber Wednesday Mar 25, 2015 at 17:56 GMT
@
nethip Actually, copy drag is implemented in CodeMirror (see https://github.com/codemirror/CodeMirror/blob/8b5e6594f7a4156248945d64bdf4e40d49d63702/lib/codemirror.js#L3771-L3775), and it definitely works on Windows.
Comment by nethip Wednesday Mar 25, 2015 at 18:06 GMT
@
MarcelGerber Is the code mirror online demo updated with this commit? I did try this demo and I don't recall if I tried this on Windows / Mac, and I was not able to do a copy drag. We have a scheduled code mirror integration this week or the next and if this is already implemented then we would get this commit too. But I am wondering why is this enabled only on win. And also this requires through testing.
Comment by MarcelGerber Wednesday Mar 25, 2015 at 18:24 GMT
@
nethip It is already part of our local CM copy, so apparently, it doesn't work on Mac right now (that's also what@
infin80 found in https://github.com/adobe/brackets/issues/3125#issuecomment-83274492). Accordingly, it's also already online in the CM demo, yeah.
Also, could you just quickly test if copy drag works for you on https://marcelgerber.github.io/github/demo/codemirror/drag-drop-mac.html using any modifier (I really don't know what e.altKey
refers to on Mac)?
If it works, I could quickly put up a PR to CM so we get this feature working for Mac too in our next release.
Comment by nethip Wednesday Mar 25, 2015 at 19:32 GMT
@
MarcelGerber OK I must have checked this on MAC as I still can't do a copy drag on any of the code mirror demos(https://codemirror.net/demo/). But I loaded the URL(https://marcelgerber.github.io/github/demo/codemirror/drag-drop-mac.html ) in chrome and I am able to do a copy drag on MAC by holding the alt key. I guess the e.altKey
refers to the alt/Option key on MAC.
One observation was that once I hold the alt/option key on MAC, the cursor turns to cross hair cursor. But when I start to drag the cursor changes to default drag cursor. Apart from that it seems to work fine. Please go ahead and raise PR in CM.
Comment by MarcelGerber Wednesday Mar 25, 2015 at 19:54 GMT
PR is up. I'm not sure if Marijn takes my contribution as the crosshairs cusor turning up is a solid UI/UX issue in my opinion, but let's see.
Issue by PhiLhoSoft Friday Sep 19, 2014 at 13:16 GMT Originally opened as https://github.com/adobe/brackets/issues/9172
Follow up of my remarks in #3125.
In editors like SciTE (or Notepad++) or Eclipse, when I do a rectangular selection and copy or cut its content, I can then paste the selection as rectangular, ie. each line below the caret will receive the corresponding line fragment from the selection.
Visual explanation:
Select and cut the a's:
Put caret just before the first y and paste:
As said in the other issue, SciTE (Scintilla) does that by setting flags (clipboard formats) in the Windows clipboard (
MSDEVColumnSelect
andBorland IDE Block Type
), and has probably a similar trick in other platforms (GTK+ / MacOS).Eclipse also uses a flag, a different one (incompatible):
Preferred DropEffect
If Brackets can have fine control over the clipboard data, I suggest to do the same (perhaps with the three flags!).
Otherwise, it might copy such rectangular selection both in the standard clipboard and in a private one. So, when pasting in Brackets itself (still the most common scenario), it can detect it has a rectangular copy and paste it smartly.
Of course, a regular copy would empty the special clipboard.