I can use VIM to input these color control chars by "Ctrl-V, Esc" then it will show me ^[ as a special leading char for color control chars sequence.
How could I do this in Textmate?
Thanks
You can select those from the character viewer (Menu Edit -> Special Characters, then search for 'escape'), but I think you'd be better off using an escaped form of that character, e.g. \033 in Bash or \x1b in PHP. That, of course, would depend on what kind of document you're editing.
Related
How do you escape the Unicode control commands in a text line? I have a string "%%P123" I want my text line to show but it keeps coming out as "±123" because %%P is treated as the plus/minus symbol
Use %%%%P123, but you'll have to edit the Contents property through the Properties Palette, as the standard TEXT command will automatically evaluate a double %%.
For my documentation, I want escape special characters.
Example :
.. code-block:: terminal
$ php bin/console test:user
Press <return> for continue
For Sphinx, it's an external URL <return> and I want escape that.
Screenshot :
See Escaping Mechanism:
A backslash followed by any character (except whitespace characters in non-URI contexts) escapes that character. The escaped character represents the character itself, and is prevented from playing a role in any markup interpretation. The backslash is removed from the output.
To answer your question, you can use various markup techniques.
Escape the opening and closing brackets.
Press \<return\> for continue
Use inline literal markup.
Press ``<return>`` for continue
Use semantic markup with the kbd role:
Press :kbd:`<return>` for continue
IMO, the last option is the most appropriate for this situation. The first option is the least appropriate.
I want to have Diacritical r in my wygwam editor's special character list. I have some special characters at the moment but not Řř. Can anyone tell me how to enable/add this please?
Current special character list
Thanks.
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)
I am using both Notepad2 and Sublime Text 3 and I prefer ST3 over Notepad2 as it has a lot of great features. One thing I miss very much though is the possibility to view special characters in a logfile.
If I have a logfile with this one line in it (<null> is the HEX char 0x00):
ERROR: Received invalid data string [<null><null>e<null><null>test</null>]
If I open it in Notepad2 I get this view:
If I open it in ST3 I get this HEX view:
Is it possible to get the same view in ST3 as in Notepad2, so I can see the special characters?
I just found this option which can be set in the User Settings:
// Files containing null bytes are opened as hexadecimal by default
"enable_hexadecimal_encoding": false
This gives exactly what I wanted:
I've been using this:
https://sublime.wbond.net/packages/HexViewer
But that does not map \0 to NUL, this may cause alignment issue (unless you have a fixed-width NUL glyph in your font).