Code Notes 2023.1.2 Help

Demo

TL;DR

Use the <tldr> tag to introduce important facts or prerequisites about the feature you describe. Place it as the first element of a topic and wrap each fact with the <p> tag.

There can be only one <tldr> element per page.

Use <tldr> only for introducing small amounts of information. We don' recommend using more than three elements inside of it.

Glossary

A definition list or a glossary:

Notes

limited support limited support

via a plugin depends on JavaScript plugin in IDEA Ultimate / WebStorm / GoLand / PhpStorm / Pycharm / RubyMine / AppCode / Clion / Rider etc

limited support limited support

available available

Expanded by default

This is the definition of the first term.

Collapsed by default

This is the definition of the second term.

缩进块代码

前面加上缩进后(选中后按下Tab键),纯文本内容会自动放进一个无边框区域内,相当于代码块。

Use the <code>&lt;tldr&gt;</code> tag to introduce important facts or prerequisites about the feature you describe. Place it as the first element of a topic and wrap each fact with the <code>&lt;p&gt;</code> tag. <p>There can be only one <code>&lt;tldr&gt;</code> element per page.</p> Use <code>&lt;tldr&gt;</code> only for introducing small amounts of information. We don' recommend using more than three elements inside of it.

段落折叠

The content.

Nested chapter's title

The content.

代码折叠

class Main { public static void main(String[] args) { System.out.println("Enter two numbers"); int first = 10; int second = 20; System.out.println(first + " " + second); // add two numbers int sum = first + second; System.out.println("The sum is: " + sum); } }
class Main { }
sudo tar -xzf the-package-*.tar.gz -C /opt

Include a block from another folder

To include the code example from another file in the repository:

Specify the name of the directory where you will place the code files in the snippets attribute of the project.ihp file.

<snippets src="directoryName"/>

To include content from other files, use src attribute and specify the filename.

To specify a specific line range or comma-separated list to include, use include-lines attribute.

To specify a specific code construct, like, method or class, use include-symbol attribute.

Markup

Result

&#96;&#96;&#96;kotlin &#96;&#96;&#96; {src="newTest.kt" include-lines="2-4"}
fun testSum() { val expected = 42 assertEquals(expected, testSample.sum(40, 2))
&#96;&#96;&#96;kotlin &#96;&#96;&#96; {src="newTest.kt" include-symbol="hello"}
fun hello() { }

control

Use the control tag to refer to UI elements such as buttons, dialogs, checkboxes, and so on.

Check out from Version Control

ui-path

Use the ui-path tag to specify a path to a menu option.

In the Settings/Preferences dialog Ctrl+Alt+S

path

Use the path tag for paths to directories and files on your computer or file extensions.

The TOC is stored in the product's .tree file.

样式和小段落

Hello, world!

Default value

true

Example

小段落

提示信息

<tooltip> 标记需要在 cfg/glossary.xml 中添加解释. RN Console

步骤

步骤

  • Call the following command in the terminal:

    run this --that

图片

Getting Service
Screenshot

左右表格

Markup

Result

![](sample-image-white.png) alt="Sample image" {width="250px"}
Sample image

标签页 + Markdown

plugins { id("org.jetbrains.intellij") version "..." }
plugins { id "org.jetbrains.intellij" version "..." }

标签页联动

This is Kotlin.

This is Java.

This is Kotlin theory.

This is Java theory.

Video

Use <video> tag to add local videos or links to videos from YouTube, or Vimeo.

Last modified: 24 April 2024