Drag/Drop text or code within working file #13034

Closed
noahwebdev opened this Issue Jan 11, 2017 · 8 comments

Projects

None yet

2 participants

@noahwebdev

Prerequisites

  • Can you reproduce the problem with Debug -> Reload Without Extensions?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?
  • Did you read the Troubleshooting guide?

For more information on how to write a good bug report read here
For more information on how to contribute read here

Description

[Description of the bug or feature]

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

Please include the OS and what version of the OS you're running.
Please include the version of Brackets. You can find it under Help -> About Brackets (Windows and Linux) or Brackets -> About Brackets (macOS)

@petetnt
Member
petetnt commented Jan 11, 2017

Hi @noahwebdev,

you can drag and drop code in the editor after you set"dragDropText": true, in Debug -> Open Preferences File -> brackets.json

@noahwebdev

Many thanks, I've set it to true but it's having no effect within Brackets, can high-light text in code but the mouse cursor does not change to an arrow-head and doesn't allow you to then move that code, and pressing 'control', 'alt' or 'shift' when code is high-lighted doesn't make any difference to the mouse cursor either. I have tried restarting the app but with no effect, please advise.

@petetnt
Member
petetnt commented Jan 12, 2017

@noahwebdev are you using Windows, Mac or Linux? I noticed that on macOS the cursor doesn't change to a arrowhead, but you can still "grab" the highlighted text and drop it somewhere else. It doesn't update the text position while dragging though, you need to release the text where you want it to drop.

If it's still not working, can you share your brackets.json file?

@noahwebdev

I'm using Windows 10 and am unable to do as you say, as when I've high-lighted the code, if I then click and drag, the cursor just starts selecting surrounding text as though I were trying to high-light a paragraph - I've tried sharing my brackets.json file but github says it does not support .json files as attachments, so I've changed the file extension for the purposes of sharing it to .txt
brackets.txt

and also thought I'd copy & paste its contents here
{
"fonts.fontSize": "13px",
"fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
"debug.showErrorsInStatusBar": true,
"themes.theme": "light-theme",
"styleActiveLine": true
}

@petetnt
Member
petetnt commented Jan 15, 2017 edited

Sorry for the late response @noahwebdev.

You'll need to add dragDropText to that file and set it to true for the feature to work:

{
  "dragDropText": true,
  "fonts.fontSize": "13px",
  "fonts.fontFamily": "'SourceCodePro-Medium', MS ゴシック, 'MS Gothic', monospace",
  "debug.showErrorsInStatusBar": true,
  "themes.theme": "light-theme",
  "styleActiveLine": true
}

Save the file and dragging and dropping should work automatically.

@petetnt
Member
petetnt commented Jan 16, 2017

Removed a spam response from above, disregard that if you received the email.

@noahwebdev
@petetnt
Member
petetnt commented Jan 16, 2017

Great! Closing as answered. 👍

@petetnt petetnt closed this Jan 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment