How do I get SublimeText to highlight lines that match a certain regex?
if you do a ctrl+f (cmd+f if on mac) you'll see beside the finder text box an icon that has .* click that toggle then place in your regex, you're matches with be outlined.
Related
For comparison:
In Sublime (and also Atom), if I press tab under a line of code that already has 4 tab spaces, Sublime will automatically jump to the same tab spacing of the previous line (4 tab spaces).
In VS Code – when trying to accomplish the same thing – tabs will fail to 'jump' to the previous line's spacing, and force me to manually press tab multiple times, instead of once.
Is there a work-around, or am I missing something?
Sublime, Atom - 1x tab press
VS Code - 4x tab press
If you add this to your settings, you'll be able to just type out the line without watching indentation and whenever you hit enter, vscode will indent that previously written line automatically:
"editor.formatOnType": true
I know this isn't exactly what you're looking for, but I thought I might as well share and hope this is a satisfying answer.
I'm using a Mac, and I want to move the cursor to the last line of file without using Home, End, or Page Down keys.
Any idea?
I've tried "scroll to bottom" keymap but that only moves the scroll, not the caret.
There's a reserved Editor Action for this and it's named Move Caret to Text End. You can find this in the Preferences window (Preferences -> Keymap -> Editor Actions). The counterpart of this action is Move Caret to Text Bottom, in case anyone is interested.
In Mac, native text editors come with shortcuts cmd+up and cmd+down out of the box to easily jump to the top or the bottom of the page (along with the caret). You'd mostly want to adopt the same shortcuts on your PHPStorm IDE to make page navigation more seamless.
Try ⌘A, →.
But it's better to assign shortcut as #LazyOne suggested.
I might have pressed something on my keyboard by accident. The spaces on my code turned into boxes and it's annoying. How do I remove it?
You have opened the Find panel and searched for a space. Press Esc to close the find panel and the boxes will disappear. Alternatively turn off "highlight matches" in the find panel.
Is there there a way to edit files across multiple selections in vintage mode?
I hit cmd + D (this is under a Mac) to select instances of string in the file, but I can't figure out how edit the selections.
This is under Sublime Text 2.
I haven't tested this on a Mac, but on Linux using CTRL-D puts you in visual mode. When you're in visual mode c allows you to change the highlighted text, putting you into insert mode much like vim would.
I struggled to figure this out myself. I came to find that simply selecting a word with Ctrl+D and then pressing c isn't a complete solution. It will only select the first occurrence of a word. In order to select and change them all I have found that I need to execute the following sequence:
Place the cursor at the beginning of the desired word
Ctrl+D to highlight the word
Ctrl+F to open the Find box pre-populated with the desired word
Alt+Enter to select all of the matching words
c to make the changes
Esc to return to COMMAND MODE
There are several posts all over the Internet (including the documentation on the Sublime Text website) which states that pressing Alt+F3 will select all of the matching words. This does not work for me on openSUSE/KDE. Pressing Alt+F3 will instead open the window menu for minimizing, maximizing, etc. In fact, if you hover over the Find All button after opening the Find box it will display Alt-text indicating Alt+Enter.
Usually I just press shift+up/down/right/left, then you will find that you can select whatever you want. It works on Mac sublime 3.
In sublime text with emmet plugin I can write
To get
But if I want to generate some lorem or other tag
after pressing tab I go to the next list item
how can I avoid this?
You can use CTRL+E to expand lorem3, instead of TAB.
When you expand abbreviation (especially like ul>li*3), Emmet generates tabstops (fields in terms of Sublime Text) in some important places assuming that you’re likely want to fill-up data in them (attribute values, tag contents etc.). So after you expand abbreviation you’re actually moving between tabstops with Tab/Shift-Tab. It’s a pity that ST does not displays decorations for tabstops.
You can simply press Esc key to quit tabstops mode and use Tab for expanding abbreviations.