How can I enable the ability to drag-and-drop text in Adobe Brackets?
For example, when I select text and drag it in Sublime Text, it moves. How can I do the same in Bracket?
You're looking for the dragDropText setting.
To enable it, insert this line into your preferences file:
"dragDropText": true
(Note: You may need to reload Brackets for the changes to take effect)
VoilĂ ! Drag-and-drop that text! :)
Happy coding!
1- go to menu-->Debug
2- go to "open Preferences File"
3- go to the file : "brackets.json"
4- copy and pase these codes on last line and dont forget separate last code with this by ",":
"dragDropText": true
*HOPE TO HELP :))
Related
For markdown there is a shortcut like typing a number(1,2,3,4..) in command mode (Esc) and then giving an Enter
The thing is that your cursor gets before the "###" (if you used 3) where you also need to click the End key to be able to write.
Is there a way to overcome the last action as it is very annoying.
What you already have is a one click solution, which is going to be hard to beat. The only improvement I can think of is to override the functionality that's inserting the markdown headings for you. You could extend it to also place the cell in edit mode and move the cursor to the end. This would be placed in your custom.js file, which you place here: ~/.jupyter/custom/custom.js.
See below for a screenshot of my brackets editor in a css file.
I see the colored highlighting for all file types. I am not sure what to call it.
I have been downloading extensions lately so it could be one of them but not sure what its called and thus can't search online for how to disable it.
Those colored marks are the "gutter marks" from the Brackets Git extension. They indicate added (green), modified (yellow/orange), or deleted (red) lines in the current file.
Personally, I find them very helpful. In case you still want to turn them off, go to the Git Settings and check the box for "Use Git gutter marks".
I find it tedious to manage very large style sheets in Sublime Text 3.
Some of my stylesheets are about 2000 lines of code. I am trying to figure out how to navigate more easily within the stylesheet. I already know about bookmarks and the brilliant search function, but another way would be to hide/fold all code and show comments only. Tis way it would be easier to find the correct place you want to go to.
So is there a way to hide all code below a comment? This would be something as the opposite of Fold Comments
I know Hugo proposed the classic "fold all" solution here. But I would like to hide absolutely all code and display comments only.
For example:
/*******************************************************************
Description 1
*******************************************************************/
Hide/fold all code between here...
...
...
..
.
.
/*******************************************************************
Description 2
*******************************************************************/
You can fold everything, which is not a comment by opening the console ctrl+` and write view.fold(view.find_by_selector("-comment")).
This searches all regions with the selector - comment, which means everything except comments. Afterwards these regions are folded.
If you want to create a keybinding for it, just create a plugin. Open Tools >>> Developer >>> New Plugin and paste:
import sublime_plugin
class FoldEverythingExceptCommentsCommand(sublime_plugin.TextCommand):
def run(self, edit):
regions = self.view.find_by_selector("-comment")
self.view.fold(regions)
Afterwards add this to your Key Bindings - User to add a keybinding for the command:
{
"keys": ["ctrl+alt+shift+f"],
"command": "fold_everything_except_comments"
},
You can use the arrows in the far left of the text editor. Sublime has the line number listed down the left and beside those numbers are tiny arrows.
I'm trying to paste text into heroku vi editor, like the code snippet from facebook tutorial, but I cant seem to figure it out.
I have tried
:"*P
:"*p
:p
etc, i'm using windows 7 for all it matters? any ideas
open the vi editor, you want to start with an empty, unnamed document
type ':set noai nosm' (without the single-quotes) (you need the ':' char)
press the enter key
press the letter i (for insert)
now use the appropriate mouse click to paste your text
type ':wq myFileName.php' (no single-quotes)
# this 'w'rites the filename and 'q'uits the editor
Now you should have a file with the code you wanted.
Incidentally, this doesn't really qualify as a programming question, in the future, use the related site, superuser.com to post this sort of question.
I hope this helps.
at first You have to copy the text to the buffer pressing yy on the line you want to copy, after that You will be able to paste it anywhere with p .
Hope it helps :)
Just select and copy normally from the webpage ..And right click at the cursor position you want to paste at in your Unix terminal..(i.e vi editor) .
It'll get pasted.
I couldn't find a way to put a bookmark inside the code in XCode 4. I know about the #pragma mark thing but it's not what I'm looking for. What I need is something that I can put and remove with a mouse click and navigate amongst with next and previous, like in VS.
Is there anything that I'm missing?
Bookmarks seem to have gone the way of the dinosaur in Xcode 4. This wouldn't have been so bad had the jump-to-bookmark popup above the editor in previous versions not also disappeared. The best replacement currently seems to be to use breakpoints (disabled individually, of course) and navigate with the Breakpoint Navigator.
Shortcut to breakpoints is Cmd + 8. Once there use arrow keys
File a bug report at http://bugreporter.apple.com if you feel something like this should be brought back.
Write below comment in your source file that you want bookmarked.
//<##>
And you can navigate to next / previous with: '^/' or '^?'
<##> means "placeholder of code snippet"
^/ means "jump to next placeholder"
^? means "jump to previous placeholder"
thanks
Another option, if anyone is still interested. The following directives will both produce a compiler warning that you can use as a bookmark:
#pragma message "<# message #>"
or
#warning <# message #>
If you want to place bookmarks using your mouse: create a code snippet with one of the 2 directives above. Drag & drop it to the line in your source file that you want bookmarked.
Navigate to next/previous with: Cmd-' and Cmd-Shift-'
In Xcode 4.4, if you leave a comment with this format:
// TODO: Your text here
it will be added as a listing in the jump bar alongside the list of methods in your current file, and then you can jump straight to that comment from that menu.
The simplest technique is to use a comment prepended by // TODO and then search, which allows you to jump through the issues from the navigator. Pretty hard to beat that technique.
I personally don't like using break points for bookmarks because it is not easy to enter notes. I use breakpoints as breakpoints, and prefer not to mix them up with bookmarks.
Anyhow, if you want to get a bit fancier you could get xcode to generate warnings // TODO: some message or // FIXME: some message that can be navigated in the issue navigator. I took the instructions below from this site:
Instructions
Head over to your project's item in the Project Navigator (usually at the very top)
Find your target in the list of targets on the left, select it
Head over to the "Build Phases" tab.
Click the "Add Build Phase" in the bottom right of this screen.
In the editor that appears insert the bash script shown below.
Now just build and you'll see all your //TODO: and //FIXME: comments have become warnings. I love this technique, it might not be right for everyone, but hope it helps someone.
Bash Script For "Run Script" Build Phase
KEYWORDS="TODO:|FIXME:|\?\?\?:|!!!:"
find "${SRCROOT}" ( -name ".h" -or -name ".m" ) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
You'll also be able to click on each of the warnings in the issue navigator to go right to the file and point in your code where you left the original //TODO: or //FIXME:
Extra pro tip: Make sure you're using phrases to describe your //TODO: comments like //TODO: Handle this error gracefully, and things like that. The phrases will show up in the issues list beside each warning.
Credit for the little tidbit should go to "Tim" on the Cocos2D forums, (found after Googling for a bit), I believe his solution originally was intended for Xcode 3 and didn't work if you had spaces in your path name, my script here doesn't have those restrictions, still he should get full credit here's his original post.
Like npellow's answer to this question of mine, appCode by JetBrains has also made this possible. So, this may be another reason to use appCode instead of Xcode4, except that it won't be free later in time.
My method:
type in grammar error code in the previous line.....
After changing something in other place, I can go back to the previous place because the grammer error line will show a red line in the right side scroll bar. It indicate the place.
It is not elegant but unless there is a bookmark feature, this is the way i am using at the moment
You can install an Xcode plugin called "XBookmark".
This plugin provide features below :
Toggle Bookmark
Show Bookmarks
Next Bookmark
Previous Bookmark
How to install XBookmark:
Install Alcatraz.
Search XBookmark from Window->Package Manager and click Install.
Restart Xcode.
Now, you can see menus about bookmarks in the Edit Menu.
PS : This plugin is open source.