在 Webstorm 中调试 Vue 项目

目录

  • Markdown For Typora

    • Overview
    • Block Elements
      • Paragraph and line breaks
      • Headers
      • Blockquotes
      • Lists
      • Task List
      • (Fenced) Code Blocks
      • Math Blocks
      • Tables
      • Footnotes
      • Horizontal Rules
      • YAML Front Matter
      • Table of Contents (TOC)
    • Span Elements
      • Links
      • URLs
      • Images
      • Emphasis
      • Strong
      • Code
      • Strikethrough
      • Underlines
      • Emoji ??
      • Inline Math
      • Subscript
      • Superscript
      • Highlight
    • HTML
      • Embed Contents
      • Video
      • Other HTML Support

Markdown For Typora

Overview

Markdown is created by Daring Fireball; the original guideline is here. Its syntax, however, varies between different parsers or editors. Typora is using GitHub Flavored Markdown.

Block Elements

Paragraph and line breaks

A paragraph is simply one or more consecutive lines of text. In markdown source code, paragraphs are separated by two or more blank lines. In Typora, you only need one blank line (press Return once) to create a new paragraph.

Press Shift + Return to create a single line break. Most other markdown parsers will ignore single line breaks, so in order to make other markdown parsers recognize your line break, you can leave two spaces at the end of the line, or insert <br/>.

Headers

Headers use 1-6 hash (#) characters at the start of the line, corresponding to header levels 1-6. For example:

# This is an H1

## This is an H2

###### This is an H6

In Typora, input ‘#’s followed by title content, and press Return key will create a header.

Blockquotes

Markdown uses email-style > characters for block quoting. They are presented as:

> This is a blockquote with two paragraphs. This is first paragraph.
>
> This is second pragraph. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

> This is another blockquote with one paragraph. There is three empty line to seperate two blockquote.

In Typora, inputting ‘>’ followed by your quote contents will generate a quote block. Typora will insert a proper ‘>’ or line break for you. Nested block quotes (a block quote inside another block quote) by adding additional levels of ‘>’.

Lists

Input * list item 1 will create an unordered list - the * symbol can be replace with + or -.

Input 1. list item 1 will create an ordered list - their markdown source code is as follows:

## un-ordered list
*   Red
*   Green
*   Blue

## ordered list
1.  Red
2.  Green
3.  Blue

Task List

Task lists are lists with items marked as either [ ] or [x] (incomplete or complete). For example:

- [ ] a task list item
- [ ] list syntax required
- [ ] normal **formatting**, @mentions, #1234 refs
- [ ] incomplete
- [x] completed

You can change the complete/incomplete state by clicking on the checkbox before the item.

(Fenced) Code Blocks

Typora only supports fences in GitHub Flavored Markdown. Original code blocks in markdown are not supported.

Using fences is easy: Input ``` and press return. Add an optional language identifier after ``` and we‘ll run it through syntax highlighting:

Here's an example:

?```
function test() {
  console.log("notice the blank line before this function?");
}
?```

syntax highlighting:
?```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
?```

Math Blocks

You can render LaTeX mathematical expressions using MathJax.

To add a mathematical expression, input $$ and press the ‘Return‘ key. This will trigger an input field which accepts Tex/LaTex source. For example:

$$
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \
\end{vmatrix}
$$

In the markdown source file, the math block is a LaTeX expression wrapped by a pair of ‘$$’ marks:

$$
\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0 \\end{vmatrix}
$$

You can find more details here.

Tables

Input | First Header | Second Header | and press the return key. This will create a table with two columns.

After a table is created, putting focus on that table will open up a toolbar for the table where you can resize, align, or delete the table. You can also use the context menu to copy and add/delete individual columns/rows.

The full syntax for tables is described below, but it is not necessary to know the full syntax in detail as the markdown source code for tables is generated automatically by Typora.

In markdown source code, they look like:

| First Header  | Second Header |
| ------------- | ------------- |
| Content Cell  | Content Cell  |
| Content Cell  | Content Cell  |

You can also include inline Markdown such as links, bold, italics, or strikethrough in the table.

Finally, by including colons (:) within the header row, you can define text in that column to be left-aligned, right-aligned, or center-aligned:

| Left-Aligned  | Center Aligned  | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is      | some wordy text | $1600 |
| col 2 is      | centered        |   $12 |
| zebra stripes | are neat        |    $1 |

A colon on the left-most side indicates a left-aligned column; a colon on the right-most side indicates a right-aligned column; a colon on both sides indicates a center-aligned column.

Footnotes

You can create footnotes like this[^footnote].

[^footnote]: Here is the *text* of the **footnote**.

will produce:

You can create footnotes like this1.

Hover over the ‘footnote’ superscript to see content of the footnote.

Horizontal Rules

Inputting *** or --- on a blank line and pressing return will draw a horizontal line.


YAML Front Matter

Typora now supports YAML Front Matter. Input --- at the top of the article and then press Return to introduce a metadata block. Alternatively, you can insert a metadata block from the top menu of Typora.

Table of Contents (TOC)

Input [toc] and press the Return key. This will create a “Table of Contents” section. The TOC extracts all headers from the document, and its contents are updated automatically as you add to the document.

Span Elements

Span elements will be parsed and rendered right after typing. Moving the cursor in middle of those span elements will expand those elements into markdown source. Below is an explanation of the syntax for each span element.

Links

Markdown supports two styles of links: inline and reference.

In both styles, the link text is delimited by [square brackets].

To create an inline link, use a set of regular parentheses immediately after the link text’s closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:

This is [an example](http://example.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.

will produce:

This is an example inline link. (<p>This is <a href="http://example.com/" title="Title">)

This link has no title attribute. (<p><a href="http://example.net/">This link</a> has no)

Internal Links

You can set the href to headers, which will create a bookmark that allow you to jump to that section after clicking. For example:

Command(on Windows: Ctrl) + Click This link will jump to header Block Elements. To see how to write that, please move cursor or click that link with ? key pressed to expand the element into markdown source.

Reference Links

Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:

This is [an example][id] reference-style link.

Then, anywhere in the document, you define your link label on a line by itself like this:

[id]: http://example.com/  "Optional Title Here"

In Typora, they will be rendered like so:

This is an example reference-style link.

The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets — for example, to link the word “Google” to the google.com web site, you could simply write:

[Google][]
And then define the link:

[Google]: http://google.com/

In Typora, clicking the link will expand it for editing, and command+click will open the hyperlink in your web browser.

URLs

Typora allows you to insert URLs as links, wrapped by <brackets>.

<[email protected]> becomes [email protected].

Typora will also automatically link standard URLs. e.g: www.google.com.

Images

Images have similar syntax as links, but they require an additional ! char before the start of the link. The syntax for inserting an image looks like this:

![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg "Optional title")

You are able to use drag & drop to insert an image from an image file or your web browser. You can modify the markdown source code by clicking on the image. A relative path will be used if the image that is added using drag & drop is in same directory or sub-directory as the document you‘re currently editing.

If you’re using markdown for building websites, you may specify a URL prefix for the image preview on your local computer with property typora-root-url in YAML Front Matters. For example, input typora-root-url:/User/Abner/Website/typora.io/ in YAML Front Matters, and then ![alt](/blog/img/test.png) will be treated as ![alt](file:///User/Abner/Website/typora.io/blog/img/test.png) in Typora.

You can find more details here.

Emphasis

Markdown treats asterisks (*) and underscores (_) as indicators of emphasis. Text wrapped with one * or _ will be wrapped with an HTML <em> tag. E.g:

*single asterisks*

_single underscores_

output:

single asterisks

single underscores

GFM will ignore underscores in words, which is commonly used in code and names, like this:

wow_great_stuff

do_this_and_do_that_and_another_thing.

To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:

\*this text is surrounded by literal asterisks\*

Typora recommends using the * symbol.

Strong

A double * or _ will cause its enclosed contents to be wrapped with an HTML <strong> tag, e.g:

**double asterisks**

__double underscores__

output:

double asterisks

double underscores

Typora recommends using the ** symbol.

Code

To indicate an inline span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:

Use the `printf()` function.

will produce:

Use the printf() function.

Strikethrough

GFM adds syntax to create strikethrough text, which is missing from standard Markdown.

~~Mistaken text.~~ becomes Mistaken text.

Underlines

Underline is powered by raw HTML.

<u>Underline</u> becomes Underline.

Emoji ??

Input emoji with syntax :smile:.

User can trigger auto-complete suggestions for emoji by pressing ESC key, or trigger it automatically after enabling it on preference panel. Also, inputting UTF-8 emoji characters directly is also supported by going to Edit -> Emoji & Symbols in the menu bar (macOS).

Inline Math

To use this feature, please enable it first in the Preference Panel -> Markdown Tab. Then, use $ to wrap a TeX command. For example: $\lim_{x \to \infty} \exp(-x) = 0$ will be rendered as LaTeX command.

To trigger inline preview for inline math: input “$”, then press the ESC key, then input a TeX command.

You can find more details here.

Subscript

To use this feature, please enable it first in the Preference Panel -> Markdown Tab. Then, use ~ to wrap subscript content. For example: H~2~O, X~long\ text~/

Superscript

To use this feature, please enable it first in the Preference Panel -> Markdown Tab. Then, use ^ to wrap superscript content. For example: X^2^.

Highlight

To use this feature, please enable it first in the Preference Panel -> Markdown Tab. Then, use == to wrap highlight content. For example: ==highlight==.

HTML

You can use HTML to style content what pure Markdown does not support. For example, use <span style="color:red">this text is red</span> to add text with red color.

Embed Contents

Some websites provide iframe-based embed code which you can also paste into Typora. For example:

<iframe height='265' scrolling='no' title='Fancy Animated SVG Menu' src='http://codepen.io/jeangontijo/embed/OxVywj/?height=265&theme-id=0&default-tab=css,result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'></iframe>

Video

You can use the <video> HTML tag to embed videos. For example:

<video src="xxx.mp4" />

Other HTML Support

You can find more details here.


  1. Here is the text of the footnote.?

原文地址:https://www.cnblogs.com/cnbzys/p/11984087.html

时间: 2024-11-09 06:11:36

在 Webstorm 中调试 Vue 项目的相关文章

WebStorm+Chrome调试Vue步骤

在调试时请 注意 : 在WebStorm中启动调试时,WebStorm会根据你设置的url,自动打开新的Chrome浏览器进程访问这个设置的url,而且这个浏览器页面和你平常看到的浏览器差异会比较大,看不到书签栏,也看不到你先前所装的所有插件.这是因为平常我们打开Chrome浏览器进程时,并不会添加–remote-debugging-port选项,而WebStorm无法让已经打开的Chrome实例支持调试,所以必须重新打开一个新的Chrome浏览器进程,而且不能和原来的Chrome浏览器进程使用

webstorm如何调试vue项目的js

webstorm如何调试vue项目的js webstormvuewebstorm调试jsjs 1.编辑调试配置,新建JavaScript调试配置,并设置要访问的url地址,如下图所示: 在URL处填写示例: http://localhost:8080 保存好调试配置 2.先用dev正常启动项目,然后切换到刚才设置的js调试名称,点击debug按钮,这时候会打开chrome,如下图所示 : 4.当我们在chrome中运行页面,WebStorm就会响应断点状态,如下图所示: 原文地址:https:/

在eclipse中调试web项目的时候如何把web项目分配给配置好的服务器

举个例子,我今天在做spring和struts2整合的例子 新建项目blk 1.配置好web.xml,struts.xml,applicationContext.xml,写好jsp页面 2.把struts2.spring整合需要的jar包(struts核心jar包,spring核心jar包以及struts-spring-plugin.jar.commons-logging.jar)放到你项目的WEB-INF/lib目录下 3.写好java代码,并把java代码编译后的class文件拷贝到WEB-

解决webstorm拉取Vue项目时卡顿,及内存爆满问题

最近在拉取Vue项目时总是会出现webstorm内存瞬间爆满,导致webstorm卡死,而且,有时在下载完node_modues后webstorm一直处于updating中,为此在网上找了很多方法结果效果不怎么理想,然后自己就接着捣鼓,终于捣鼓出来了.下面就是方法: 1.打开webstorm,然后依照此路径(files->settings->editor->File Types->ignore files and folders)打开在其输入框中添加"node_modul

webstorm+chrome 调试vue

chrome搜索插件,并添加 然后新建javascript调试: 这边设置成跟你项目启动一样的ip及端口.src目录的remote URL改成webpack:///src. 然后先 npm run dev,启动项目.(就是你平常项目启动的命令) 然后点调试的小乌龟开始调试. 这时候会打开一个新的浏览器,然后再webstorm中打断点,会自动定位到: 原文地址:https://www.cnblogs.com/chenmz1995/p/12404133.html

WebStorm中Node.js项目配置教程——项目设置

上一章讲解了Node.js项目在WebStorm中的两种创建方式,当完成Node.js项目创建以后,剩下的就是涉及配置设置工作. 为了确保Node.js全局和Node.js核心模块的代码完成功能,打开Settings|Languages & Frameworks | JavaScript|Libraries进行设置: 值得注意的是:WebStorm将建议创建一个Node.js依赖的JavaScript库,并添加到列表用于代码完成.语法突出显示.导航和文档查找等. 对于Express框架,可以直接

VSCode调试vue项目

先决条件 你必须安装好 Chrome 和 VS Code.同时请确保自己在 VS Code 中安装了 Debugger for Chrome 扩展的最新版本. 在可以从 VS Code 调试你的 Vue 组件之前,你需要更新 webpack 配置以构建 source map.做了这件事之后,我们的调试器就有机会将一个被压缩的文件中的代码对应回其源文件相应的位置.这会确保你可以在一个应用中调试,即便你的资源已经被 webpack 优化过了也没关系. 打开 config/index.js 并找到 d

在Azure DevOps Server (TFS)中实现VUE项目的自动打包

概述 Vue.js(读音 /vju?/, 类似于 view)是一个构建数据驱动的 web 界面的渐进式框架.由于它在数据绑定.页面展示和使用简单方面有很大的优势,逐渐被越来越多的前端开发团队使用.本文介绍基于Azure DevOps Server,如何实现Vue框架前端代码的编译和打包. 代理服务器配置 Azure DevOps Server的自动化流水线,都基于代理服务器Agent Server,需要在你的代理服务器上安装部署好VUE自动打包所需要的环境,这里主要说明如何安装VUE需要Node

解决webstorm中测试dva项目run start命令需要不断重启问题

用dva-cli构建了项目之后在webstorm开发,用npm start跑本地服务,经常修改之后在浏览器刷新没反应,偶尔才会有刷新,需要重新跑一遍npm start才会更新,这是怎么回事呢? webstorm保存的时候会先保存到临时文件中,其实并没有真正保存,要在setting->stystem settings下的"use save write"去掉,这样webstorm就可以保存编译,并且直接在浏览器更新..