Brakets keyboard shortcut to move focus to treeview - treeview

This should have been relatively easy to fine out , turns out its not, so actually all i really want is a shortcut with which i can toggle between the text editor and the treeview on the left.
The brackets documentation really don't mention any such shortcut see here.
In Atom text editor for example there is a shortcut ctrl+0 which shifts focus to the tree view , i can't seem to find such a shortcut in brackets though. I love all the features of brackets, but i just seem to be short of this one last shortcut to make my work flow awesome !!
Thank you.
Alex-z.

Related

How to move a block of code to the left in text editors / ide

I use Sublime Text 3 and Visual Studio 2013, I'd like to know if it's possible and how one would be able to highlight a block of code and move or drag it to the left. This would be the opposite of highlighting a few lines of code and hitting the tab button to shift them to the right. Is it a shortcut, a macro, a simple general thing?
In Sublime Text, you can use the keyboard shortcut Ctrl] to move lines or blocks of text to the right, and Ctrl[ to move to the left.
In windows/linux, the shortcut is Ctrl+[or]
In Mac, the shortcut is Command+[or]

Is there a way to automatically edit wrapped words on find sublime3

Good day,
is there a way to automatically edit the found words using ctrl + f in sublime, without clicking the found word.
its just extra effort if you'll click the word again even though its already high lighted, using a keyboard key would be much easier specially if your always using the search function.
thank you for the tips.
I don't know if this makes things easier for you, but you can simply press Esc when the word is selected, which will bring the focus back to the editor and you can edit the word, and cycle through the next selections using F3 or bring up the find box using Ctrl+F

Xcode Matching Pairs of Braces, Parentheses, and Brackets

If you are a notepad++ user you will understand what I want Xcode to do for me , it's very simple I want when i place the cursor before or after a Braces, Parentheses, and Brackets , it highlight for me its pair to know the matching ones juste try to place the cursor in notepad++ and tell me how to do that in Xcode i know already the trick of the right arrow of the keyboard and the double click but the trick of notepad++ is faster , thanks in advance
The only thing I can add (and I have looked a fair bit) is to train your eyes on the vertical grey bar on the left edge of the editor, called the "code folding ribbon" in preferences. It will visually hint at matching braces (not parenthesis) at all nested levels, and mousing over it hints quite strongly and gives the interface for folding.
See here for a snapshot and brief description from Apple.

Can I add my own code snippets to xcode 4?

It'd be really handy to have collection KVC accessor snippets in xcode, as they're a pain to do by hand. Has anyone who's been using 4 for a while worked out how to add new ones?
(...we're allowed to talk about it now, right?)
Yes, it's quite easy - you just highlight text you want to use as a snippet and drag it into the snippets area (dragging selected text can be difficult, I find it works better if you drag from the left edge of the editor). It brings up a dialog box asking you to name it.
Also, you can have custom parameters in snippets - if you put the text <#paramName#> anywhere in the code you are dragging, when you use the snippet it will come up as a replaceable parameter that you can tab between just like in the official Snippets.
Also make sure to set a completion prefix, which makes it shorter to activate the snippet as you are typing. The nice thing about using Snippets over other solutions like global system text expanders, is that snippets can also be limited to being valid in a certain area of code - so for example a snippet that filled out a string formatting line can be marked as valid only within a block, not outside a method. That way the completion prefix only hits in areas where it's valid to use.
You can edit a snippet by clicking once on it, a box will come up with the snippet text and some other snippet settings you can edit.
A tip to help you drag the code every time, select text then click + hold (do not move mouse) until mouse pointer changes from "I" to pointer. You'll then be able to drag the selected text to the Code Snippet Library.
Drag the highlighted code to the Snippet library. (It can be stubborn and not want to drag. Holding the mouse button down for a moment before dragging seems to help.)
You can use Snippets to manage code snippets in Xcode. Check out this demo http://www.youtube.com/watch?v=il4kE4diy0k
Simply select the code, the press ALT key and drag it into the code snippets library and rename it there, Make sure to press the ALT key, other than this you won'n be able to drag it.

Textmate tab and de-tab selected block

Recently switched to Textmate on Mac for coding. On PC when ever I want to tab in or out a block of code I just highlight and press tab or shift+tab to move it in our out. It's very useful when you are adding an extra loop or conditional statement to a block of code to keep everything tidy and neatly indented.
On Textmate however when I try this it just replaces my selected text with a tab. So is there a way to do tab and de-tab lines of code in textmate?
Indent: Alt+Tab
Un-Indent: Shift+Alt+Tab
the hotkey is command-left bracket to move left and command-right bracket to move right
(the buttons next to 'p')
heres a link to more hotkeys and such
http://projects.serenity.de/textmate/tutorials/basics/
You can use Shift+Tab to decrease indent; You just need to make and assign a macro. You can reuse this technique to accomplish a great many things.
Enter some text, and intend them, this is mostly for feedback.
Click the Record Macro Button
Use ⇧+⌥+⇥ (aka; Shift + Option + Tab) to decrease the indentation.
Click the record button to stop recording the macro.
Use the Edit menu or ⌃+⌘+M to save your macro;
Saving will prompt you to create a new bundle*, or add your macro to an existing bundle.
Add a Key Equivalent by clicking in the field and pressing ⇧+⇥
Your bundle-macro should look like the one below, simply Save and you're done! TextMate will now decrease indent on ⇧+⇥
*: (as noted by u/PatrickT) Sadly the create new bundle functionality has not yet been implemented, and you must choose to add to an existing bundle. You can still create a bundle via Bundles -> Edit Bundles then Command + N.
As an alternative, you can change the keybindings, see Link
Here is what I did:
Install Link
Go to File -> Open -> User Key Bindings, this will create/edit ~/Libary/KeyBindings/DefaultKeyBinding.dict
Add a binding, for the action enter shiftRight: (indent) manually (this is a TextMate specific action and not in the pre-populated actions list)
Choose a shortcut, I used cmd+alt+right
Do the same for the action shiftLeft: (un-indent, I used cmd+alt+left)
Save and then restart TextMate
I used a shortcut with arrow keys as my right hand is already on the arrow keys when I am selecting multiple lines, so this is a good fit.
The reason why I did it was because I have a german keyboard and alt+tab/alt+shift+tab don't work for me since I am using Witch for app-switching using these exact shortcuts.
EDIT: cmd+alt+left/right don't work when you have multiple tabs open, as they are used for navigate to next or previous tab in TextMate... seems this cannot be changed or overridden (I tried Setting Shortcut Keys in Textmate). Looking for an alternative shortcut now.

Resources