Sublime Text 3: bold text in plain text mode - text

I'm pretty new in Sublime Text 3, and I know it allows for a wide customization.
I would like to know how I could make some part of the text bold, italic or underlined, or even coloured, when I'm writing a plain text. It may sound dumb, but I have no idea how to do it and whether I can do it.
Thank you!

Your best bet is to use the MarkdownPreview plugin combined with the LiveReload plugin to display Markdown text written in Sublime as HTML displayed in your web browser. Unfortunately there isn't anything at this time that can display rendered HTML or Markdown in Sublime itself.
EDIT Apparently there is also MarkdownLivePreview, which I wasn't aware of before. I haven't tested it yet, but it's very popular, so you might want to try it.

Related

How to change hyperlink color in github markdown

I'm creating a webpage using markdown hosted by github.io. I really don't like the blue color of the hyperlink automatically generated by markdown and I'm wondering if it's possible to change it. More specifically, I'd like the text to stay black and the solid underline to become dashed underline. Here is a sample code:
Support static-based commenting via [Staticman](https://staticman.net/) for sites hosted with GitHub Pages. [#424](https://github.com/mmistakes/minimal-mistakes/issues/424)
I heard github markdown is different from traditional markdown, but I've seen people changed the link color and underline type with the same website template so I think it's still possible to change. Any suggestions?
Since GitHub uses its own styling after it processes your markdown file, any custom stylings will be overwritten. However, in a broader case, you can always use HTML elements in your markdown files. Take this example:
[normal link](https://www.google.com/)
custom link
The first one will appear as a normal blue link which will be underlined when you hover your mouse over it. The second one is a link that matches your requirements for black color and dotted underline.
I tested it on my local machine and it renders just fine in VSCode, but all styling is lost when I put it on GitHub.
Though, since you're going for a webpage, I really recommend going for HTML and CSS. They're really easy if you know MD and are much much more customizable.

How exactly does Syntax Highlighting work in IDEs?

I was writing my own text editor in Electron using React and I tried to do some basic syntax highlighting. The user writes their code inside a textarea, but there is no way to insert markup inside a textarea so I can't color text that way.
I found this jquery plugin which adds a backdrop behind the textarea so we can put a background color in certain places however I wanted the text themselves to be colored (which can't be done as the textarea is in front of the backdrop).
Any ideas about how other IDEs like Visual Studio Code (also written in electron) pulled this off?
There are multiple approaches that can work here.
One way could be using a div with a contenteditable="true" attribute instead of a textarea. This way you can both write text inside the element and style its contents. Of course this creates its own issues that would have to be dealt with - when to parse the code, how to reposition the caret and more. Depending on the approach, MutationObserver could come in handy.
Another way would be to not use any built-in writing functionalities at all and implement your own. Listen to keyboard events and programatically insert characters. In that case you would also need to implement your own caret, selection etc., which is not easy.
VS Code is open source, so you can actually take a look under the hood and see how the editor is made. They use a completely bespoke editor called Monaco but its source code is in the VS Code repo. This file is a good start.

color caret in sublime text 3

I would like my caret in sublime text 3 to have a custom hex color attached to it so it is easier to see. Is there a plug in that I can download to achieve this feature or do I haft to edit the theme file? If I need to edit the theme file how should I do that and achieve a successful result.
SublimeText theme files are XML, so you can just find and edit the following chunk
<key>caret</key>
<string>#FFFFFF</string> # change this to the color you want
Otherwise, if you prefer a more GUI approach you can have a look at TMTheme Editor

colored coding typing in text mate

This seems really silly but I somehow hit a key combination by mistake in text mate and now the colored coded typing is disabled. It's all just black text no matter php or html or variables etc... I scoured google and messed with all the preferences and can't get it back on.
any idea?
thanks in advance
You probably change the source associtation to plain text... at the bottom of the editor window there is a dropdwon where you can choose the source syntax, try selecting the appropriate context (ie. HTML, CSS, PHP, etc.)

Can I use multiple font style in UITextView?

I have a requirement to use multiple font style in UITextView. Like Bold, Italic and Underline text in single Textview. Like:
One word is Bold second may be italic third Underline as per user selection.
I don't think this is allowed to do but still if any one have achieved and want to share. I need this all while enter text and same while displaying.
Thanks
You're right that the standard UITextView does not support rich editing. At the moment there are a few solutions to the problem.
The Omni Group has released their iOS and Mac frameworks under an open source license. These include a very powerful rich text editor (see: OUIEditorFrame.m). These are very powerful but also extremely complex. Their sample iPad app includes the rich text editor example. Further discussion can be found here
Secondly, this guy has been working on a custom rich text editing control and is offering it under a negotiable licensing agreement.
Finally, you can do it all yourself and create an editor control that implements the UITextInput protocol. Aside from the Apple documentation, there are some tips on doing this here.
Why don't you use attributed string and use its property to set the string as you like.
Reference link : https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/AttributedStrings/Tasks/CreatingAttributedStrings.html

Resources