Can TextMate show tab vs space characters? - textmate

Using TextMate on Mac, the "invisibles" can be displayed by using
View -> Show Invisibles
But the space vs tab characters are not shown, and Preferences doesn't seem to have any entry to change that either. Is there a way to show them? It is because some older coder may have tab or space mixed together so what looks good in the editor may actually be misaligned. (editor shows tab as 2 spaces)

Tab characters are shown, but spaces are not. What's probably happening is that you have Soft tabs turned on, in which case the tabs are converted into spaces automatically.
alt text http://grab.by/grabs/fabaea391dc8bc764636f0ca19a8c38d.png
In this picture there is a tab character, new line, tab character, new line, soft tab, new line
See this thread for an explanation as to why spaces are not shown.
Here is where you can change soft/real tabs.
alt text http://grab.by/grabs/783db3a88609a01c7702cbd250f495c6.png

If "Show invisibles" is activated, you will see a little triangle for each tab, which points to the right. Spaces are not shown at all, you can only see them indirectly, i.e. via the symbol which represents the line break. If the line break isn't the first character after your code of that line, there are spaces in between.
So to make a long answer short: You should already see tabs, however the symbols representing the invisibles are sometimes hard to see.

Related

RStudio tab functionality working differently

On my desktop computer, tab quickly moves a comment or command across over 4 spaces in rapid succession. On my laptop, tab brings up a message that says "(No matches)", then when I hit tab again, it moves 4 spaces, then another message, then another 4 spaces. I cannot quickly move text to the right. I imagine this is a setting I can turn on and off but I cannot figure it out.
I am using 0.99.903
Odds are you need to tweak two settings:
Insert spaces for tab
Use tab for multiline autocompletions
You can find each in the Global Options pane:

soft tabs showing up as hard tabs, spaces converted to hard tabs

I have soft tabs enabled, but not only is the editor putting actual tabs in instead of spaces, if I type [space][space], it converts it to a tab. I've read that the editor tries to read existing files to guess your settings (I have Autodetect turned off if that matters), so I tried with a new file. Here is the relevant section of my settings file (which I edited through the GUI):
"ace": {
"#guessTabSize": false,
"#newLineMode": "unix",
"#tabSize": 2,
"#useSoftTabs": true
},
When I turn off soft tabs, it stops converting spaces into tabs, but either way, when I hit enter at the end of a line, autoindent uses a tab instead of spaces.
Cloud9 doesn't have any code that can convert two spaces into a tab.
When soft tabs is enabled it moves cursor as if two spaces is a tab, but that doesn't change characters in the file.
Enter at the end of line copies indentation from that line, and doesn't depend on tab settings.

Notepad++ convert leading spaces to tabs upon entry

Very close to reverse of this question. I prefer coding with 2-whitespace indentation, but need to have files indented with tabs to align with project convention. What I would like to do is preferably automatically convert 2 spaces upon entry to tab symbol in Notepad++ and have the editor configured to tab length of 2.
A possible manual way for doing this could be Edit->Blank Operations->Space to TAB but this converts all of my spaces to tabs, even those of length 1 - which are, for example, spaces between function arguments, not just leading spaces.
In a perfect case scenario I'm trying to achieve formatting style as described in this question, but with typing just spaces and the editor taking care of the rest.
I'm on Notepad++ 6.0, but willing to upgrade if this helps
Let me complete the answer of Ari Okkonen to add a workaround to the problem commented by Sergii Zaskaleta of mixed tabs and spaces at the beginning of the line.
Settings->Preferences->Tab Settings->Tab size: 2 (if not already)
Edit->Blank Operations->Space to TAB (Leading)
Select a block of lines of text with the problem of mixed spaces and tabs. Press [Tab] and [Shift]+[Tab] to add and remove a tab from each line. In the process, the leading spaces had been converted to tabs.
A manual way that seems to work: After having edited the file before saving you may try (Works in Notepad++ v6.8.3):
Settings->Preferences->Tab Settings->Tab size: 2 (if not already)
Edit->Blank Operations->Space to TAB (Leading)

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.

What are these yellow spacers in Xcode?

Just came back to my desk and Xcode keeps highlighting/underlining white space in files. If I type something it goes away, but if I switch tabs and come back, they reappear.
UPDATE: this isn't caused by the "show invisibles" option. That looks different (try it).
You seem to have a search active. Look in your search bar at the top and you should find a " " character. Xcode is highlighting all instances of the matching space character.
Go to Editor > Hide Invisibles in the toolbar. It's showing all the invisible characters in the document, including spaces.

Resources