Fl4m3Ph03n1x

Fl4m3Ph03n1x

VIM Elixir folding

Background

So recently I moved in to Vim 8.1, trying to have an IDE I can simply take to any UNIX machine.
As part of this process, I am now picking which plugins to use for Elixir.

Objective

I miss a lot the ability to fold code. Thus naturally I am looking for an Elixir folding plugin for Vim, but I only found 1:

That’s it. It has no documentation on the Readme nor any additional install install information for PlugInstall which I use.

I also found a blog:

http://blog.nathansplace.co.uk/2018/vim_folding_swagger_elixir

But it is for swagger comments which I don’t really care about nor use.

If this sounds like a silly post, please notice I have just recently moved to Vim and I am still learning.

Question

  • Which code folders to you use for Elixir in your Vim setup?

Marked As Solved

hauleth

hauleth

So you need to manually create folds. If you want more automatic solution then add:

set foldmethod=syntax

in your $MYVIMRC and it will work.

Also Liked

hauleth

hauleth

What does :echo &foldmethod return? I am using syntax with just vim-elixir and everything works as expected without any problems.

Vim supports few different folding methods and you need to be sure that you use the one you want.

tomkonidas

tomkonidas

I wouldn’t look at a specific Elixir folding plugin, look more general Vim. Maybe this will help? http://vimcasts.org/episodes/how-to-fold/

Where Next?

Popular in Questions Top

New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement