Skip to content

gasparch/vim-elixir-fold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-elixir-fold

This is a part of Vim-Elixir-IDE package.

Provides automatic folding of Elixir source files.

  • function signature is shown if available
  • multiple clause heads folded together

Installation

Drop the file in ~/.vim/plugin or ~/vimfiles/plugin folder, or if you use pathogen into the ~/.vim/bundle/vim-elixir-fold or ~/vimfiles/bundle/vim-elixir-fold.

Style consideration

Some function heads will NOT be folded at all.

Function with arguments is expected to have braces around arguments list. If function does not have arugments, braces can be omitted.

So please rewrite this

def func arg do
  :ok
end

to this form:

def func(arg) do
  :ok
end

This is recognized correctly:

def func do
  true
end

Development

Setup Ruby 2.3.1 environment using rbenv.

To run the tests you can run bundle exec rspec.

To spawn an interactive Vim instance with the configs from this repo use bin/spawn_vim

TODO

  • profiling/speedup

About

Automatic folding for Elixir files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published