All Projects → lambdatoast → Elm.vim

lambdatoast / Elm.vim

Licence: mit
Vim plugin for the Elm programming language

Labels

Projects that are alternatives of or similar to Elm.vim

Vim Online Thesaurus
A Vim plugin for looking up words in an online thesaurus
Stars: ✭ 242 (-15.38%)
Mutual labels:  viml
Vim Smooth Scroll
Make scrolling in Vim more pleasant
Stars: ✭ 262 (-8.39%)
Mutual labels:  viml
Dotfiles
twerth
Stars: ✭ 274 (-4.2%)
Mutual labels:  viml
Fuzzyfinder
buffer/file/command/tag/etc explorer with fuzzy matching
Stars: ✭ 252 (-11.89%)
Mutual labels:  viml
File Line
Plugin for vim to enabling opening a file in a given line
Stars: ✭ 260 (-9.09%)
Mutual labels:  viml
Jshint2.vim
Lightweight, customizable and functional Vim plugin for JSHint integration.
Stars: ✭ 265 (-7.34%)
Mutual labels:  viml
Conque Shell
Run interactive commands inside a Vim buffer
Stars: ✭ 241 (-15.73%)
Mutual labels:  viml
Vim Stylus
Syntax Highlighting for Stylus
Stars: ✭ 277 (-3.15%)
Mutual labels:  viml
Vim Rubocop
The Vim RuboCop plugin runs RuboCop and displays the results in Vim
Stars: ✭ 262 (-8.39%)
Mutual labels:  viml
A.vim
Alternate Files quickly (.c --> .h etc)
Stars: ✭ 272 (-4.9%)
Mutual labels:  viml
Spf13 Vim
The ultimate vim distribution
Stars: ✭ 15,235 (+5226.92%)
Mutual labels:  viml
Vim Railscasts Theme
A vim color scheme based on the Railscasts Textmate theme.
Stars: ✭ 257 (-10.14%)
Mutual labels:  viml
Vim Tomorrow Theme
Tomorrow Theme for Vim
Stars: ✭ 269 (-5.94%)
Mutual labels:  viml
Color Schemes
Color schemes I've used for an extended period of time and like
Stars: ✭ 244 (-14.69%)
Mutual labels:  viml
Dotfiles
My config files
Stars: ✭ 276 (-3.5%)
Mutual labels:  viml
Drawit
Ascii drawing plugin: lines, ellipses, arrows, fills, and more!
Stars: ✭ 243 (-15.03%)
Mutual labels:  viml
Vim Language Server
VImScript language server, LSP for vim script
Stars: ✭ 264 (-7.69%)
Mutual labels:  viml
Investigate.vim
A Vim plugin for looking up documentation
Stars: ✭ 282 (-1.4%)
Mutual labels:  viml
Vim Powerline
Moved to powerline/powerline.
Stars: ✭ 2,880 (+906.99%)
Mutual labels:  viml
Vim Hemisu
A Vim color scheme with dark and light variants
Stars: ✭ 271 (-5.24%)
Mutual labels:  viml

elm.vim

Vim plugin for the Elm programming language.

Installation

Just like any other plugin, clone this repository into the ~/.vim/bundle directory

cd ~/.vim/bundle && \
git clone https://github.com/lambdatoast/elm.vim.git

If you are unfamiliar with this process, please refer to the Pathogen project.

System Requirements

Nothing other than vim is needed for the syntax highlighting.

For the special commands and aliases (for compilation, etc), the plugin expects the following programs to be available:

  • elm-make: The Elm build tool.
  • elm-repl: The Elm REPL. The plugin sends it bits of code for evaluation.

Usage

These are the available commands. To get the most out of them, you should create mappings according to your needs.

Compilation

  • :ElmMakeCurrentFile compiles the current file.
  • :ElmMakeMain compiles an assumed Main.elm file.
  • :ElmMakeFile <filename> compiles filename.

Evaluation

  • :ElmEvalLine evaluates the current line and puts the result as a comment in a new line below it.
  • :ElmEvalSelection evaluates a visual mode selection.

REPL

  • :ElmRepl switches to elm-repl, when closing the REPL you'll get back to vim.

Example mappings

I use the following mappings in my .vimrc at the moment:

nnoremap <leader>el :ElmEvalLine<CR>
vnoremap <leader>es :<C-u>ElmEvalSelection<CR>
nnoremap <leader>em :ElmMakeCurrentFile<CR>

Example autocommands

Vim autocommands can make your life a lot easier. These are just some examples of what I use sometimes:

  • Compiling the current file on write:
    • :au BufWritePost *.elm ElmMakeCurrentFile
  • Usually more useful: Compiling a specific file, e.g. "Main.elm", on file write to any file in the project:
    • :au BufWritePost *.elm ElmMakeFile("Main.elm")

Remember you can clear all these afterwards, with e.g. :au! BufWritePost *.elm

TODO

  • Integration with Elm docs.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].