VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


HTML 내에서 매칭되는 닫는 태그나 여는 태그를 강조해 주는 확장입니다.


링크 : https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag




ㅇㅇㅇㅇ



VariableDefaultDescription
highlight-matching-tag.enabledtrueEnables/disables the highlighting and status bar
highlight-matching-tag.showPathtrueEnables/disables showing path to tag in status bar (e.g. div > p > a)
highlight-matching-tag.showRulertrueEnables/disables showing highlighted tag pair in ruler section
highlight-matching-tag.highlightSelfClosingfalseShould self-closing tags be highlighted too (can be useful for multiline self-closing tags)
highlight-matching-tag.highlightFromContentfalseWhether to highlight from the tag content the closest matching tag pair
highlight-matching-tag.styles{ opening: { name: { underline: 'yellow' } } }Custom styling configuration, see Styling Options


VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


VSCode 에서 코드를 이쁘게 변경해 주는 확장입니다.


링크 : https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify




Visual Studio Code 에서 javascript, JSON, CSS, Sass 와 HTML 의 코드를 이쁘게 변경해 줍니다.


CSS 변경전


CSS 변경후


.jsbeautifyrc settingVS Code setting
eolfiles.eol
tab_sizeeditor.tabSize
indent_with_tabs (inverted)editor.insertSpaces
wrap_line_lengthhtml.format.wrapLineLength
wrap_attributeshtml.format.wrapAttributes
unformattedhtml.format.unformatted
indent_inner_htmlhtml.format.indentInnerHtml
preserve_newlineshtml.format.preserveNewLines
max_preserve_newlineshtml.format.maxPreserveNewLines
indent_handlebarshtml.format.indentHandlebars
end_with_newlinehtml.format.endWithNewline (html)
end_with_newlinefile.insertFinalNewLine (css, js)
extra_linershtml.format.extraLiners
space_after_anon_functionjavascript.format
.insertSpaceAfterFunctionKeywordForAnonymousFunctions
space_in_parenjavascript.format
.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis

Note that the html.format settings will ONLY be used when the document is html. javascript.format settings are included always.

Also runs html and css beautify from the same package, as determined by the file extension. The schema indicates which beautifier each of the settings pertains to.

The .jsbeautifyrc config parser accepts sub elements of htmljs and css so that different settings can be used for each of the beautifiers (like sublime allows). Note that this will cause the config file to be incorrectly structured for running js-beautify from the command line.

Settings are inherited from the base of the file. Thus:

{
  "indent_size": 4,
  "indent_char": " ",
  "css": {
    "indent_size": 2
  }
}

Will result in the indent_size being set to 4 for JavaScript and HTML, but set to 2 for CSS. All will get the same indent_char setting.

If the file is unsaved, or the type is undetermined, you'll be prompted for which beautifier to use.

You can control which file types, extensions, or specific file names should be beautified with the beautify.languagesetting.

{
  "beautify.language": {
    "js": {
      "type": ["javascript", "json"],
      "filename": [".jshintrc", ".jsbeautifyrc"]
      // "ext": ["js", "json"]
      // ^^ to set extensions to be beautified using the javascript beautifier
    },
    "css": ["css", "scss"],
    "html": ["htm", "html"]
    // ^^ providing just an array sets the VS Code file type
  }
}

Beautify on save will be enabled when "editor.formatOnSave" is true.

Beautification on particular files using the built in Format Document (which includes formatting on save) can be skipped with the beautify.ignore option. Using the Beautify file and Beautify selection will still work. For files opened from within the workspace directory, the glob patterns will match from the workspace root. For files opened from elsewhere, or when no workspace is open, the patterns will match from the system root.

Examples:

/* ignore all files named 'test.js' not in the root folder,
   all files directly in any 'spec' directory, and
   all files in any 'test' directory at any depth
*/
"beautify.ignore": ["*/test.js", "**/spec/*", "**/test/**/*"]

/* ignore all files ending in '_test.js' anywhere */
"beautify.ignore": "**/*_test.js"

Note that the glob patterns are not used to test against the containing folder. You must match the filename as well.

Embedded version of js-beautify is v1.8.4

Use the following to embed a beautify shortcut in keybindings.json. Replace with your preferred key bindings.

{
  "key": "cmd+b",
  "command": "HookyQR.beautify",
  "when": "editorFocus"
}


VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


중첩된 주석을 토글링 하기 위한 확장입니다.


링크 : https://marketplace.visualstudio.com/items?itemName=philsinatra.nested-comments




원래 주석을 유지하고 코드 섹션에서 주석을 신속하게 토글 할 수 있게 해줍니다.



<main>
  <div class="container">
    <h2>Hello World</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
    <!-- <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.</p> -->
  </div>
</main>

Becomes:

<!-- <main>
  <div class="container">
    <h2>Hello World</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
    <!~~ <p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.</p> ~~>
  </div>
</main> -->



example {
  /* display: flex; */
  transition: all 0.5s;
  /* user-select: none; */
  background: linear-gradient(to bottom, white, black);
}

Becomes:

/*.example {
  /~ display: flex; ~/
  transition: all 0.5s;
  /~ user-select: none; ~/
  background: linear-gradient(to bottom, white, black);
}*/


확장 프로그램을 실행하려면 주석 처리 / 주석 해제할 텍스트를 강조 표시해야 합니다.

  • Mac: cmd + alt + /
  • Windows: ctrl + alt + /

다음 언어가 지원됩니다.

  • asp
  • cfm
  • css
  • htm
  • html
  • jsx
  • md
  • njk
  • php
  • svg
  • tsx
  • twig
  • vue
  • xml
  • xsl


* 버젼 2.2.6 으로 PHP 에서 사용시 주석처리에 문제가 발생 할수도 있습니다.

VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


JS, CSS, HTML 파일 또는 디렉토리 내의 파일에 대해서 코드를 축소해 주는 확장입니다.


링크 : https://marketplace.visualstudio.com/items?itemName=HookyQR.minify




파일을 선택 후 Minify 시 {파일명|디렉토리명}.min.[js|css|html] 형식으로 파일을 생성해 줍니다.


원본 : index.html


축소 : index.min.html

VSCode = Visual Studio Code 에서 사용할 수 있는 확장(Extension) 입니다.


작업 공간에 있는 정의를 기반으로 HTML Class 속성에 대한 CSS Class 이름을 자동 완성해 줍니다.


링크 : https://marketplace.visualstudio.com/items?itemName=Zignd.html-css-class-completion





지원 언어 모드

  • HTML
  • Razor
  • PHP
  • Laravel (Blade)
  • JavaScript
  • JavaScript React (.jsx)
  • TypeScript React (.tsx)
  • Vue (.vue) [requires octref.vetur]
  • Twig
  • Markdown (.md)
  • Embedded Ruby (.html.erb) [requires rebornix.Ruby]
  • Handlebars
  • EJS (.ejs)


+ Recent posts