Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default double quote marks to single quote mark in Intellij(IDEA) once you press tab when you are writing HTML and CSS

This is the default :

<div class="container"></div>

Is there any setting to let it become

<div class='container'></div> 

when you press tab?

like image 733
ItsJack Avatar asked Sep 22 '14 03:09

ItsJack


People also ask

How do you change double quotes into single quotes?

Use the String. replace() method to replace double with single quotes, e.g. const replaced = str. replace(/"/g, "'"); . The replace method will return a new string where all occurrences of double quotes are replaced with single quotes.

How do I add single quotes in IntelliJ?

If you have Settings > Editor > Smart Keys > Insert Pair Quote checked, typing single or double quote inserts a pair of them.

Can we do HTML in IntelliJ idea?

HTML IntelliJ IDEA brings powerful support for HTML that includes syntax and error highlighting, formatting according to the code style, structure validation, code completion, on-the-fly preview during a debugging session (Live Edit) or in the dedicated preview tab in the code editor, and much more.

Can you use CSS in IntelliJ?

With IntelliJ IDEA, you can write style definitions in CSS as well as in various languages that compile into it, such as Sass, Less, SCSS, or Stylus. You can also look up documentation for Style Sheets, create and move rulesets, introduce variables, and more.


1 Answers

Editor > Code Style > HTML

I think you might be looking for Code Style Settings.

There is a drop down under "Generated Code" for String literal type: Single Quotes.

Change that.

You may also want to change it for JavaScript as well as Zhe points out, that is in the Punctuation tab.

like image 145
nycynik Avatar answered Oct 12 '22 02:10

nycynik