Make tags private in pairs with WebStorm

I use the live template in real time, a single-tag auto-auto tag, for example <View/>, but it usually uses <View></View>.

Can I install WebStorm in this style?

+12
source share
2 answers

Decision

One solution to this problem is to create snippetwith WebStorm.

What is snippetWebStorm?

snippets- These are parts of the code that we usually use in our work on code; that is, the part of the code that contains the pattern that should be repeated at any time .

For example, the following code snippet:

<!doctype html>
<html>
<head lang="es">
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
</head>
<body>

</body>
</html>

How to implement this?

  • IDE WebStorm

    ! [A1124] (A112_images / A1124.png)

  • File> Settings CTRL+ ALT + S .

  • Editor (1) & rarr; Live Templates (2). seeker (3)

  • (4), , .

    • ( ).
  • , (5) (Webstorm ).

  • (6) add (+), delete (-), duplicate restore.

    . . , .

( EDgrid), Live, + ( ).

, , Template Group, React, React:

! [A112] (A112_images / A112.png)

Ok.

Live Template:

! [A1121] (A112_images / A1121.png)

  • Abbreviation , , :

  • Description .

  • Template Text

    <View>$END$</View>
    

Define:

! [A1123] (A112_images / A1123.png)

Javascript.

, .

! [A1122] (A112_images / A1122.png)


! [GIF] (A112_images / gif.gif)

+5

IntelliJ.

(2018) .

0

Source: https://habr.com/ru/post/1674486/


All Articles