Introduction to the

Recently, small make up recommend you a markdown IDE editor: Typora, specific tweets is as follows: R communication | markdown editor – Typora and R | how to communicate in Typora figure bed set free.

Today for the text color change to do a demonstration, the main reference to Yanqi’s answer.

This is really useful in the actual needs (xiaobian is also just learned a small skill, to share with you)!

1. Conventional text color changing method

The dumbest way to do this is to use one of the following Settings. The second kind of internal can set a lot of parameters, you can explore.

  1. The font tags
<font color='red'>Copy the code
  1. Span tags
<span style='color: RGB (0, 0, 0); Background: background color; Font-size: 16px; The font-family: font; Text '> < / span >Copy the code

2. Alfred Block Variation (Mac OS)

How to change font color quickly in Typora? .

The installation

First, download and install Alfred 4. Try it out for yourself and put it in the background of our official account.

After clicking on the corresponding DMG file, the following screen appears, then drag Alfred 4 from the left to the application avatar on the right, and the installation is complete.

Introductory tutorial

Then open the software and go to Preferences Features -> Snippets. (In fact, the small editor has been set up, you should be the bottom right interface has nothing).

Notice that I’ve set the Snippet Keyword to SP. The default might be called Snippet, but I thought it was too long, so I made it shorter, and I’ll use that later. You don’t need to set the shortcut keys. You don’t need to change other positions. The default Settings are fine.

Then click the plus sign in the lower right corner to add a record as follows:

You can set the Keyword by yourself. Here I set span, and the rest are default

The Snippets text looks like this:

<span style='color:red; Background: background color; Font-size: 16px; '>{cursor}</span>Copy the code

For convenience, you can just copy and paste.

Note the details in the code: after inserting the code, {cursor} jumps to the location where the text was added (see the GIF below for a demonstration). No need to move the cursor repeatedly;

Xiaobian set this record, the default is to use red, you can change according to their own needs, or do not add, use time to add is also possible. Other colors such as red, green, yellow, etc.

Using the process

After setting up the above, you only need to do a few steps to complete the font color change:

  1. Use shortcut keys to open Alfred (found in General, shown below)

I’m going to say option+Space

  1. Type keyword to find the corresponding record (sp span)

Where SP is the keyword for the Snippets and SPAN is the keyword for setting the record

The specific demonstration process (GIF) is as follows:

! [show] (/ Users/liangliangzhuang/Documents/wechat/sparkling zhuang original niche software/typora / 2021.04.30 change font color/demonstration. GIF)

3. AutoHotKey(.ahk) shortcut key change (Windows)

This article gives a tutorial on setting font colors for Windows Stypora shortcuts.

The specific process

  1. Download software: AutoHotKey
  2. Create a script
    • Create a TXT file for desktop
    • Change the suffix to.ahk
    • renameMyTyporaHotkeyScript.ahk
  1. Edit the script
; Typora ; Add font color quickly; #IfWinActive ahk_exe typora.exe {; Ctrl + Alt + o ^ orange! o::addFontColor("orange") ; Ctrl + Alt + r red ^! r::addFontColor("red") ; Ctrl+Alt+ B Light blue ^! b::addFontColor("cornflowerblue") } ; AddFontColor (color){clipboard := ""; Clear clipboard Send {CTRL Down}c{CTRL Up}; SendInput {TEXT}<font color='%color%'> SendInput {CTRL down}v{CTRL up}; Paste If(clipboard = ""){SendInput {TEXT}</font>; Typora does not automatically add}else{SendInput {TEXT}</; Autocomplete labels in Typora}}Copy the code
  1. Run the script
    • Double-click the AHK script to run it
    • Typora detection
      • Ctrl + Alt + O – Orange Orange
      • Ctrl + Alt + R – Red Red
      • Ctrl + Alt + B – Blue Blue
  1. Customize shortcut keys

Crystal: Windows Automation Productivity Tool: AutoHotkey Tutorials and script recommendations

The recommended setting is Alt+1234567= Red orange Yellow green blue indigo purple, which is also very convenient.

  1. red; 2. orangle; 3. yellow; 4. green; 5. blue; 6. cyan; 7. purple; 8….

Matters needing attention

  • ;After the semicolon is the comment (not the script!!)
  • Hot key tag
    • !The exclamation mark stands forAltkey
    • #Well, on behalf ofWindows
    • ^The upper Triangle representsCtrl
    • +A plus sign on behalf ofShift
  • perform
    • : :Indicates that subsequent commands are executed after you press previous shortcut keys.

You can just copy off the shelf.

; Alt + 0 red! 0::addFontColor("black") ; Alt + 1 red! 1::addFontColor("red") ; Alt + 1 orange! 2::addFontColor("orange") ; Alt + 3 yellow! 3::addFontColor("yellow") ; Alt + 4 green! 4::addFontColor("green") ; Alt +5 light blue! 5::addFontColor("cornflowerblue") ; Alt + 6 blue! 6::addFontColor("cyan") ; Alt + 7 purple! 7::addFontColor("purple")Copy the code
  1. Box for shortcut keys

If you feel the mouse frame text trouble, you can use the system’s own shortcut keys:

  • The cursor
    • Tab — Quickly indent
    • Home/End – Switches to the beginning or End of the current line
    • Ctrl+Home/End — Toggles to the beginning or End of the current document
  • The cursor box to choose
    • Shift+ up, down, left, right arrow keys – You can customize text like a mouse to copy and paste.
    • Shift+Home (when the cursor is at the end of the line) – Select this line, similar to some Ctrl+L.
    • Shift+End (when the cursor is at the beginning of the line) – Select this line as above.
  • Content of the operation
    • Ctrl + Insert – copy
    • Shift + Insert – paste