Sublime text 3 automatically highlights the texts when typing on mac - macos

when i type something in sublime 3 it has a white box appear around the text, when i out focus the sublime and get focus back, the text which is highlighted disappear.
So i have to press escape or space to turn it off before saving which is super annoying. Tried to turn off some highlight functions in sublime setting but doesn't work.
please see the example image below, thanks
p/s i dont install any plugin except package control, and it happens to every language (php, js, html, text, xml ...)

i used a vietnamese keyboard, so turn it off when the problem sold.
i think it may happen to another keyboard. thanks

Related

Sublime Text 3: selects all typed text as you go along

I'm using sublime text 3 and I've suddenly started seeing this annoying bug where it selects all the text that was typed in it as you go along typing. I'm not sure if something I did had caused this.
The only package I have installed is 'Anaconda' for python.
All I changed was increase the font size. How do I fix this?
PS: I'm a new user so can't add images unless I have enough points.

How to enable OS X cmd+ctrl+space character menu in Sublime Text 2?

In most OS X apps, even the Terminal which otherwise seems to lack features, cmd+ctrl+space brings up a character menu, where you can type in the name and look for special characters (e.g. greek alphabet). In Sublime Text 2 this does not come up; I just get the bell sound. I tried the trick described Unmap ctrl+space in Sublime Text 3 of mapping the key to the empty command, but that did nothing. Anyone have an idea of how to enable the menu?
The default shortcut for this in ST2, of course, is alt+super+t, but I assume you are wanting to remap this, right?
If so, I looked pretty hard on this one, unfortunately, I couldn't find much to help. It is not a default command, and even if you look inside Packages/Default/Main.sublime-menu, right where the "Special Characters..." line should appear, it is conspicuously absent. Logging all commands in the console using sublime.log_commands(True) shows nothing when I open the special characters window this way.

Sublime Text 3 unable to find text that is plainly there

Hitting cmd+f to find text in SublimeText, I frequently see something like:
Clearly 'someText' exists on the page. Why can't Sublime find it?
Note this sometimes seems to work, and sometimes fails. I can't work out the difference though.
How can I reliably find text with Sublime Text?
I've tried to reproduce this problem with Sublime Text 2 and this is what I found:
If you place caret before the text and the hit find, the text will be found
If you place the caret after the text and then hit find, the text will not be found
It seems that Sublime Text doesn't wrap search by default. You can enable it by toggling the button with the arrow icon (second one from the left of Find what, its tooltip should say Wrap). Then the search works regardless of the caret position.
Look at the buttons right before search box. Sometimes they are just get disabled accidentally, mis-click, or the short-cut get trigged, then the search doesn't behave as expected.
From left to right, RegExp, case sensitive, whole word, wrap(search whole doc, not just below current line), you can see them with mouse pointer hover.
I strongly suggest you to disable those shortcuts to prevent unexpected toggle of these :)
Also, turning off the regex may help you in searching for symbols which have special meaning in regex. For instance, someText(foo) will not be searchable in regex mode without escaping the brackets or putting the search string in quotes.

Cursor lost in highlighted text - Vim

When text is highlighted in vim, for example using the 'em' tag when writing a HTML document, I find that in some color schemes the cursor becomes invisible, making it difficult to correctly place the closing tag. Is there a way to have the cursor change color over highlighted text?
Change color of cursor in gvim
Look at both answers sir, I think you'll have your answer in there....
You'd have to hook into the CursorMoved,CursorMovedI events and then determine the highlight group under the cursor with synIDattr(synIDtrans(synID(line("."), col("."), 1)), "name"). If it's one of those diffcult-to-see groups, you can issue a :highlight Cursor ... command to change it (or else change it back).
But this is rather complicated. Why don't you simply modify the colorscheme and choose a color that is easily recognized under all circumstances?! (The :hi command lists all colors and helps you choose one.)
This problem led me down quite a rabbit hole and caused me to learn a lot more about how syntax highlighting works than intended.
I learned that the reason my, supposedly italic, text was highlighted in the first place, is because the Mac terminal doesn't support italics ("Enabling italics in vim syntax highlighting for mac terminal")
I realised, thanks to "Colour colour everywhere! 256 colour-mode for Linux consoles", that due to the color profile I had chosen in Terminal's preferences, my "bright" and "normal" colors showed no difference, and for that reason my color profiles never looked like the screenshots.
And, finally, I solved my cursor getting lost problem by changing the cursor color in the Terminal preferences.

Sublime Text 2—Quickly find something on a page

I've been trying out Sublime for the past few days. Long-time TextMate user.
The one thing I struggle with most is finding stuff in a document. I can use CMD+r to find a selector, but what if I'm looking for something else, a comment maybe, or something else?
If I use CMD+f, Sublime will put a box around all of the instances of my search term, which isn't what I want either. Worst, it keeps a box around all of the instances:
http://cl.ly/1T3x0i2L0j2u1a0E0M12.jpg
I need to "disengage" the find before I can move on.
Is there a TextMate "QuickFind" (Ctrl+s) equivalent in Sublime Text?
I find searching/navigating through a document in Sublime to be really, really frustrating.
After looking for a very long time, I've found it. The Sublime equivalent to Textmate's quick search/find is Find > Incremental Find, or cmd+i.
Now, I'm officially a Sublime convert.
Worst, it keeps a box around all of the instances (see screenshot: http://cl.ly/1T3x0i2L0j2u1a0E0M12). I need to "disengage" the find before I can move on.
To disengage find in sublime text 2 just press Esc key.
On top of using Find as per usual, if a find is for a small amount of characters that would appear 50 times on a page, use the EasyMotion plugin which does that old Vim deal:
You hit the EasyMotion key, hit the character you want to match, then Sublime replaces all visible instances of that character with a letter, number, etc - you then hit that replacement character on your keyboard and the cursor moves to that particular instance of the character you wanted. It's a bit confusing to explain but basically, it lets you teleport to absolutely arbitrary points on any page in 3 key presses.

Resources