writemonkey / wm3

165 stars 5 forks source link

Unable to use spaces instead of tabs #352

Closed pdxkcm closed 4 years ago

pdxkcm commented 4 years ago

There appears to be no setting to use spaces instead of TAB characters, or else I missed it.

A quick perusal of writemonkey.js yielded this:

function setCM() {
  // Codemirror default options
  var opt = {
    //...
    indentUnit: _settings.tabs_number_of_spaces,
    tabSize: _settings.tabs_number_of_spaces,
    indentWithTabs: true,
    //...

So it looks like I can adjust the number of spaces per TAB, but I can't just insert spaces instead, since indentWithTabs is hard-coded to true.

It would be highly preferable to be able to be able to control whether WM inserts spaces or TAB characters.

writemonkey commented 4 years ago

Hi, version 3.2 has:

"indent_with_tabs": true, 
"tabs_number_of_spaces": 4,

in settings and indentWithTabs is not hardcoded. i.

pdxkcm commented 4 years ago

Verified, thank you!