N
N
Nikolai Gromov2014-07-10 03:07:32
Notepad++
Nikolai Gromov, 2014-07-10 03:07:32

Notepad++ and Emmet auto-indent stops working when changing tab to double space. How to fix?

While the indentations are tabulated, "!" expands to:

<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  
</body>
</html>

but as soon as you check the box "replace tabs with spaces" in the settings, the same abbreviation unfolds already in:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>

</body>
</html>

that is, without indentation.
Question: can this be fixed so that the indentation is and is double spaces?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Gromov, 2014-07-10
@nicothin

I found the solution myself:
in Notepad++\plugins\EmmetNPP\editor.js I
replaced

editorProxy._syntax = syntax;
  var indentation = '\t'; 
   if (!e.getUseTabs()) {
    indentation = r('utils').repeatString(' ', +e.getIndent());
  }
on the
editorProxy._syntax = syntax;
  var indentation = '  '; // \t
/*   if (!e.getUseTabs()) {
    indentation = r('utils').repeatString(' ', +e.getIndent());
  } */
that is, replaced "\t" with a double space and commented out the condition.
(I did not find where to influence this condition)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question