How is your Vim set up?

In the last couple of months I only played a little bit with elixir, haven’t had much time to actually build something with it. But now that I am starting to actually use it for a project, I am curious what vim plugins everybody is using to make writing elixir as pleasant as possible inside of vim.

I shared my config in my blog and am very curious on what other vim users here use in their day to day elixir lives. Please share your config :slight_smile: .

14 Likes

Thanks for sharing this!!

I installed neomake. Got it to highlight errors, but the :lnext and :lprev commands do not work. (they do with ruby…) Any idea what could be going on??

1 Like

Sadly I have no idea what is going wrong there.

I did a little more research - testing both Syntastic and Neomake. Here’s what I found:

  • both Syntastic and Neomake only detect max of one error per run
  • since there is only one error, :lnext and :lprev will never work
  • but :ll works !!

So both Syntastic and Neomake are broken for Elixir…

There is a further issue with Neomake. When Neomake performs syntax check, it does not resolve references to Structs. It tags a valid reference to %MyStruct{} with an undefined object error. Syntastic does not have this problem.

For the time being, I’m using Syntastic. BTW there is a maintainer for Syntastic/Elixir - Richard Ramsden. Perhaps it will be possible to work with Richard to fix the multi-error detection problem.

1 Like

Nice thread @bitboxer, I was about to post the same :003: very interested in hearing how others have theirs set up too.

Is anyone using Janus? It’s probably most common amongst Ruby folk and what I’ve used to date. Wondering whether to ditch it tho…

1 Like

I started out with Janus, too. Its a nice distribution to start exploring vim (for me there are 2 approaches to learning vim, pointed out here). But after a while I wanted to configure vim more to my needs. I wanted to remove functionality that I didn’t need and add others. Basically I started again from scratch and rebuild my vim config based on my needs. This is what lots of people I know did. With this I don’t want to say that Janus is bad or just a beginners tool. Everyone uses Vim in a very unique own way. And for some Janus fits, and for others it doesn’t.

2 Likes

I am beginning to feel the same way - I want more control over my config. Partly because I want to know what’s standard Vim and what I’ve added, as a few times I have gone to do something on the server and it’s not worked (obviously because the config on the server is non-janus).

Thanks for your feedback! I might just strip out Janus and go solo :003:

2 Likes

I went solo, but am back to Janus :lol:

I see Janus a bit like SpaceMacs - it adds pretty much all the nice things I would want to add anyway, but without the hassle of configuring it all myself.

1 Like

I’ve just started learning Vim (ST and Atom user).
Thanks a lot for your config and especially for tons of comments in it :slight_smile:
Very useful!

Thanks for pointing me to Janus, I’ll definitely give it a try… probably after I get used to Vim.

3 Likes

I use neovim and a pretty big list of plugins

set termguicolors " use true colors in the terminal

" Make sure you use single quotes
call plug#begin('~/.vim/plugged')
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " Group dependencies, vim-snippets depends on ultisnips, snippets
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' } " On-demand loading , File browser
Plug 'tomasr/molokai' " colorscheme
Plug 'tpope/vim-sensible' " sensible defaults
" Plug 'shougo/deoplete.nvim' " autocomplete
Plug 'Valloric/YouCompleteMe', { 'do': './install.py --clang-completer --gocode-completer --tern-completer --racer-completer' }
Plug 'tpope/vim-fugitive' " git
Plug 'tpope/vim-surround' " surround
Plug 'tpope/vim-rails' " rails stuff
Plug 'tpope/vim-repeat'
"Plug 'actionshrimp/vim-xpath'
Plug 'tpope/vim-endwise'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-projectionist'
Plug 'scrooloose/nerdcommenter'
Plug 'minhajuddin/zainu-vim'
Plug 'jiangmiao/auto-pairs'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'JazzCore/ctrlp-cmatcher'
Plug 'bling/vim-bufferline'
Plug 'yggdroot/indentline'
Plug 'mileszs/ack.vim'
Plug 'itchyny/lightline.vim'
Plug 'vim-airline/vim-airline'
Plug 'mattn/emmet-vim'
Plug 'fatih/vim-go'
Plug 'maksimr/vim-jsbeautify', {'do' : 'git submodule update --init --recursive'}
Plug 'godlygeek/tabular'
Plug 'scrooloose/syntastic'
Plug 'tpope/vim-abolish'
Plug 'minhajuddin/vim-quickrun'
Plug 'bronson/vim-trailing-whitespace'
Plug 'kana/vim-textobj-user'
Plug 'nelstrom/vim-textobj-rubyblock'
Plug 'marijnh/tern_for_vim', { 'do': 'npm install' }
Plug 'tacahiroy/ctrlp-funky'
Plug 'ConradIrwin/vim-bracketed-paste'
Plug 'DrawIt'
" elixir
Plug 'elixir-lang/vim-elixir'
Plug 'slashmili/alchemist.vim'
"Plug 'awetzel/elixir.nvim', { 'do': 'yes \| ./install.sh' }
Plug 'powerman/vim-plugin-AnsiEsc'
Plug 'thinca/vim-ref'
Plug 'neomake/neomake'
Plug 'diepm/vim-rest-console'
Plug 'ivalkeen/vim-ctrlp-tjump'
Plug 'editorconfig/editorconfig-vim'
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'rust-lang/rust.vim'
Plug 'racer-rust/vim-racer'
"Plug 'majutsushi/tagbar'
Plug 'vim-airline/vim-airline-themes'
Plug 'junegunn/gv.vim'
Plug 'vimwiki/vimwiki'
Plug 'vim-erlang/vim-erlang-runtime'
" languages
Plug 'leafgarland/typescript-vim'
Plug 'lifepillar/pgsql.vim'
Plug 'vim-scripts/dbext.vim'

" trial
Plug 'airblade/vim-gitgutter'
Plug 'elmcast/elm-vim'
Plug 'tudorprodan/html_annoyance.vim'
Plug 'terryma/vim-multiple-cursors'
Plug 'ten0s/syntaxerl'
Plug 'kshenoy/vim-signature'
Plug 'janko-m/vim-test'
Plug 'benmills/vimux'
Plug 'tpope/vim-fireplace'
Plug 'sheerun/vim-polyglot'
Plug 'ludovicchabant/vim-gutentags'

runtime macros/matchit.vim
call plug#end()

source ~/r/dotfiles/vim.settings.vim
4 Likes

bitboxer, are you using vim or neovim ? I’m really envious of the autocompleteion, but did not manage to get the Alchemist plugin to work.

but did not manage to get the Alchemist plugin to work.

Do you use YouComplete with Alchemist?

1 Like

I am using neovim together with deoplete. Deoplete needs neovim. But you can get the same results with other completion plugins in vim. I think YouComplete me works, not 100% sure though.

1 Like

I did not manage to get NeoVim to work properly on my Windows box. I’ll try the other autocomplete tools and gvim. Thanks for your reply !

6 posts were split to a new topic: SpaceVim - like SpaceMacs but for Vim!

This way: https://github.com/kelvinst/dotfiles/blob/master/.vimrc-new :slight_smile:

1 Like

I also want to improve the lang#elixir layer in SpaceVim.

REPL for elixir

3 Likes

Thanks for posting. Nice to see what other ppl are using.

1 Like