i'd like to ask a question about SublimeText configuration. Somehow i managed to disable the dots line matching two brackets or code block.
This is what i mean link
I'd like to know how to enable it again.
Switch the parameter draw_indent_guides to true in the user settings. It should be the default value though, maybe one of your plugins managed to disable it?
Related
How i can quickly make
use \DateTime;
for new \DateTime();
in PhpStorm ? I saw on some videos guys do that with some hotkey or something like that.
You can find the most relevant contextual options with secondary mouse click. The one you want is Show Context Actions (you'll see your current keyboard shortcut beside, mine is Alt+Enter):
Additionally, clicking on the code and waiting for a second will often display a standalone light bulb that points to the same command:
Those are called intentions. There're two that apply here:
Replace with alias (to add use foo as bar;)
Simplify FQN (to just add use foo or remove it altogether if already in root namespace)
Your particular example is a strange use case (you only save one character worth of typing) but the feature rocks when you have nested namespaces.
I have a project where my files are in "lisp-case" (hyphen delimited) and I would like to use the filename as a variable in a live template, but it must be converted to CamelCase first.
I found out that you can set the expression fileNameWithoutExtension() under "Edit Template Variables" and there is also a function called camelCase() which should be able to turn my filenames into CamelCase. But I cannot figure out how to combine those two. I tried doing camelCase(fileNameWithoutExtension()) but that does not work, unfortunately.
Is it possible to achieve this some other way?
camelCase(fileNameWithoutExtension())
It's a correct syntax.
Is it possible to achieve this some other way?
Please ensure that Skip if defined checkbox is checked for this variable.
If I try to wrap fileNameWithoutExtension() inside camelCase() and press enter to save the entry the window is closed but the change is not saved
It's an IDE bug (https://youtrack.jetbrains.com/issue/IDEA-132965 -- supposed to be fixed in current 2017.1.x version).
In any case: either press Enter before leaving the field ... or click on OK button straight away (you may then reopen this window to do further changes).
Also, when editing the field it's rendered like a select box which is kind of weird. Maybe it's a bug in this specific version. I'm on PhpStorm 10.0.4 for Mac.
Not a Mac user here .. but it is an editable drop-down box indeed (it lists all possible functions).
In Sublime I can double click whitespace in-between two characters in order to select just the white space, e.g. in:
$foo = 'bar';
Would result in the selection of:
$foo████████= 'bar';
However in PhpStorm it selects the entire line.
Is there a setting I can toggle so that whitespace can be selected with a double click in the same way I can double click a variable to select it.
This is currently not possible. There is an open issue requesting the functionality you describe on the bug tracker, you could vote for this and leave a comment that you would like to see this functionality added as well.
Apparently, according to the comments triple clicking used to work to get this done. Although that was posted in 2013 and I cannot reproduce this on the latest version anymore, so I figure they removed that somewhere along the way.
In PhpStorm 9.0.2 (I do not know about the newer versions, but I am afraid it will be the same) when you search for something and get the results in the Find tab, you can mark certain results as irrelevat by selecting them and pressing the del key and this will strike them out.
When you search for something very common, which can have 5000+ occurences, even by striking some results out, the Find tab becomes very bloated.
Is there a way to completely remove a result from the Find tab, instead of just striking it out?
When using Find/Replace in Path functionality and you know that you will get a lot of results it's better to limit your search scope by either specific path, specific file extensions or some custom scope (using Scopes functionality).
If such "limiting" cannot not help (e.g. you really need to go trough each occurrence) then use Alt + Delete (the Remove action).
Please note that this action is most likely available since PhpStorm v10 only (it was added only recently).
You can check if you have it and what the shortcut is via content menu:
You can use this keymap shortcut : ALT + SUPPR (this remove the result out of the find tab)
instead of
keymap shortcut : SUPPR (this JUST exclude the result of the find tab with underline this not remove)
EDIT :
This is the exact response for your issue. Look at this screenshoot which say all :)
Is it possible for TextMate to syntax highlight the opening and closing tags of your current caret location? And I am talking about constantly, not by pressing a key combo.
Furthermore, if it possible, how can I do it? There doesn't seem to be any way that I know of except by using selectors in the theme, but I don't know if selectors can be context-sensitive.
currently, the TextMate language grammar has no concept of cursor position. Therefore, this is not achievable right now.
A workaround that I use is to define macros that select a block of text whose boundaries I define with regular expressions. You have to be handy with regular expressions, but you can make it work.
Essentially, record a new macro (option-command-m), use the find dialog to search for the beginning of the tag. Then, use the find dialog and provide a reg-ex that will match the entire contents you want to select. Press option-command-m again to stop the macro, and then save the macro to a bundle.
An example here:
http://github.com/timcharper/vines.tmbundle/blob/master/Macros/Select%20Tag.tmMacro
Tim