Giter VIP home page Giter VIP logo

Comments (7)

janosimas avatar janosimas commented on July 18, 2024 1

I have never used astyle in windows but i'll try to give some directions

First you should try to put the astyle executable in your project folder, that might solve the problem for one project.

The other option is to put the astyle path in the PATH or the astyle executable somewhere visible in the PATH. I'm not very familiar with Windows best practices so I recommend you avoid this.

from formatter-astyle.

LiZhenhuan1019 avatar LiZhenhuan1019 commented on July 18, 2024 1

There are two ways:

  1. The first way : Copy the executable file to C:\Windows\System32 .
  2. The second way : Generally you should have your own folder to place your executable files so that you can execute them in cmd.
    • So make such a folder and copy your astyle executable into it.
    • Open Control Panel, go to System and Security -> System, select Advanced System Settings on the left, select Advanced tab, click Environment Variables, then a window shown below should appear:
      image
    • Double click on Path variable and add an item for your folder created before.
    • click ok to exit and open cmd, enter astyle and it should work now.

As far as I know it is not convenient to install tools like this on Windows. I tried msys2 to make it more convenient but there seems to be some problems with interaction between msys2 and cmd.

from formatter-astyle.

LiZhenhuan1019 avatar LiZhenhuan1019 commented on July 18, 2024 1

Sorry for lack of clarity in previous reply.

formatter-astyle use astyle.exe to actually format the code, so formatter-astyle (or actually, cmd, which is executed by formatter-astyle) needs to be able to find the executable file astyle.exe to execute it.

In fact you need to download the astyle.exe file and either specify the position of astyle.exe in the setting page of formatter-astyle, so that formatter-astyle can know about astyle.exe or you can place astyle.exe in a position that is included in the Path environment variable, which is specified in previous reply, so that cmd will search the Path variable, find astyle.exe and finally execute it.

After following the instructions , it should work by pressing ctrl + alt + L in Atom.

from formatter-astyle.

ShakilAhmedShaj avatar ShakilAhmedShaj commented on July 18, 2024 1

Thanks a lot guys, Thanks a lot...

both the method copying files in the project folder and setting the path worked <3

from formatter-astyle.

ShakilAhmedShaj avatar ShakilAhmedShaj commented on July 18, 2024

@janosimas Thanks a lot for your responce

but let me clear my problem in brief

@LiZhenhuan1019 thank you also for your reply

so I followed this - https://atom.io/packages/formatter-astyle

image

as instruction i installed thye two package and in atom when i tried to format a code pressing ctrl + alt + L then the error message like below

image

came.

then i downloaded artistic style from - https://sourceforge.net/projects/astyle/

but its just a zip file, i extracted this but In dont know how to use it for atom

i just want to know the next step, that how can i format my code in atom editor pressing shortcut key like atom beautifier( but i dont like beautifier)

I hope I have now cleared my problem and sorry, I am a newbie

please guide me for this :-(

from formatter-astyle.

janosimas avatar janosimas commented on July 18, 2024

The instructions you followed are ok, but the package is not finding the astyle executable.
Try to extract the zip on your project folder e see if it solves the problem.

from formatter-astyle.

janosimas avatar janosimas commented on July 18, 2024

@LiZhenhuan1019 Do you want to make a ppull request with your comments to the instructions?

from formatter-astyle.

Related Issues (11)

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.