Giter Club home page Giter Club logo

Comments (8)

Glavin001 avatar Glavin001 commented on July 3, 2024 1

For example.jsbeautifyrc:

{
  "html": {
    "indent_char": "    ", // Tab character here
    "indent_size": 1,
    "indent_with_tabs": true
  }
}

from atom-beautify.

Glavin001 avatar Glavin001 commented on July 3, 2024

This is a problem with Atom Settings View. Using the Settings View there would be nothing I could with Atom Beautify to fix that. However...

Easy Solution

You could put a tab character in your .jsbeautify configuration file.
See https://github.com/Glavin001/atom-beautify#configuration for details.
Store the .jsbeautify config file in your User home directory (~/.jsbeautify) if you want it to be effectively global. Or better yet, put it in your project's directory.

Let me know if you have any further questions.

from atom-beautify.

RangerMauve avatar RangerMauve commented on July 3, 2024

Since there's no sane reason for using something other than tabs or spaces for indenting, would it be possible to have a boolean flag in the future? There seems to be one for the JavaScript settings already.

Also, what would my home directory be on Windows?

from atom-beautify.

Glavin001 avatar Glavin001 commented on July 3, 2024

Since there's no sane reason for using something other than tabs or spaces for indenting, would it be possible to have a boolean flag in the future? There seems to be one for the JavaScript settings already.

The options are defined by the underlying package, js-beautify. See the complete list of options here: https://github.com/beautify-web/js-beautify#options

  -t, --indent-with-tabs        Indent with tabs, overrides -s and -c

It appears that using indent-with-tabs will override your indentation size and indentation character, so effectively giving you what you want.


Also, what would my home directory be on Windows?

A quick Google search shows that the Home Directory for Windows is C://Users/YOURUSERNAME/. Give that a try.

from atom-beautify.

tomByrer avatar tomByrer commented on July 3, 2024

You could put a tab character in your .jsbeautify configuration file

Can't without opening it in a plain-text editor (eg Notepad), since Atom translates [tab] to indenting.

from atom-beautify.

julkue avatar julkue commented on July 3, 2024

@Glavin001 Can you please elaborate why using "indent_with_tabs": true does not work?

from atom-beautify.

Glavin001 avatar Glavin001 commented on July 3, 2024

Can you please elaborate why using "indent_with_tabs": true does not work?

@julmot : indent_with_tabs should work, and it overrides indentation size and indentation character when used with JS-Beautify.
If you are having issues, please create a new Issue following the template found at https://github.com/Glavin001/atom-beautify/blob/master/ISSUE_TEMPLATE.md and be sure to include the debugging information in a Gist.

from atom-beautify.

regedit15 avatar regedit15 commented on July 3, 2024

I had the same problem, i solved it by deleting the file ".editorconfig" of the project folder where I was working

from atom-beautify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.