Is there any Windows tool (Notepad++ plug-in etc…) or any on-line tool available to format Elixir code, i.e. code beautifier?
Alternatively, is there any Linux command/script that takes a .ex file and pretty formats it?
Thank you very much.
Is there any Windows tool (Notepad++ plug-in etc…) or any on-line tool available to format Elixir code, i.e. code beautifier?
Alternatively, is there any Linux command/script that takes a .ex file and pretty formats it?
Thank you very much.
I am not aware of any automatic code beautifier, but most IDEs or smart-editors that have a proper elixir mode do a good job at indentation while you type your code.
I have found vim-elixir
that pretty formats elixir code perfectly…
I have tested most popular Windows IDE’s, no one actually provides code formatting for Elixir… What I have done eventually was to install vim-for-windows
and vim-elixir
and develop a C++ plugin for Notepad++. The plugin runs vim
in the background to format the code in the editor. The cool thing was that I eventually made it and built something in what I had always avoided, C++.
Is the code available publicly?
I looked for it on my local machine but could not find it. What I have done recently is to switch to VS Code
and create a small script (loaded via vs-script-commands
extension) which:
.ex
cmd
command which runs vim
and beautifies the file.If this can be helpful, I will happily post the source code. Let me know.