ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - mhinz/vim-mix-format: Vim integration for the Elixir formatter.
Vim integration for the Elixir formatter. Contribute to mhinz/vim-mix-format development by creating an account on GitHub.
Visit Site

GitHub - mhinz/vim-mix-format: Vim integration for the Elixir formatter.

GitHub - mhinz/vim-mix-format: Vim integration for the Elixir formatter.

vim-mix-format

Elixir 1.6 introduced the formatter: mix format. This plugin makes it easy to run the formatter asynchronously from within Vim 8 and Neovim.

demo

Installation

Use your favorite plugin manager, e.g. vim-plug:

Plug 'mhinz/vim-mix-format'

Commands

  • To format the current file, use :MixFormat. Use :verb MixFormat to see the exact shell command used.

  • The formatter is not perfect yet, so :MixFormatDiff will open a diff window that can be used for previewing the changes or picking only those that seem reasonable.

    dp pushes changes from the diff window to the source file. q closes the diff window. ]c and [c jump between the changes.

    If you're not used to Vim's diff mode, watch this screencast.

Options

  • Automatically format on saving.

    let g:mix_format_on_save = 1
    
  • Set options for the formatter. See mix help format in the shell.

    let g:mix_format_options = '--check-equivalent'
    
  • By default this plugin opens a window containing the stacktrace on errors. With this option enabled, there will be just a short message in the command-line bar. The stacktrace can still be looked up via :messages.

    let g:mix_format_silent_errors = 1
    
  • If you're not using Elixir 1.6 in your project, but want to use the formatter anyway, you can specify the bin directory of an alternative Elixir installation:

    let g:mix_format_elixir_bin_path = '~/repo/elixir/bin'
    

Customization

When using :MixFormatDiff, a new diff window will be opened and an user event is emitted. It can be used to set different settings or switch back to the source window:

autocmd User MixFormatDiff wincmd p

Feedback

If you like this plugin, star it! It helps me deciding which projects to spend more time on.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory