Skip to content

Instantly share code, notes, and snippets.

@yuitowest
Created May 5, 2015 16:01
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuitowest/086a29bec029b9ed84e4 to your computer and use it in GitHub Desktop.
Save yuitowest/086a29bec029b9ed84e4 to your computer and use it in GitHub Desktop.
Vim で Erlang してみた

入れるもの

最低限の vimrc

if has('vim_starting')
  if &compatible
    set nocompatible
  endif

  " Required:
  set runtimepath+=~/.vim/bundle/neobundle.vim/
endif

call neobundle#begin(expand('~/.vim/bundle/'))

NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/vimproc', {
      \ 'build' : {
      \     'mac' : 'make -f make_mac.mak',
      \    },
      \ }
NeoBundle 'tsukkee/unite-tag'
NeoBundle 'cohama/vim-hier'
NeoBundle 'vim-erlang/vim-erlang-runtime'
NeoBundle 'vim-erlang/vim-erlang-compiler'
NeoBundle 'vim-erlang/vim-erlang-tags'
NeoBundle 'vim-erlang/vim-erlang-omnicomplete'

call neobundle#end()

filetype plugin indent on

" neocomplete
let g:neocomplete#enable_at_startup = 1
autocmd FileType erlang setlocal omnifunc=erlang_complete#Complete
if !exists('g:neocomplete#force_omni_input_patterns')
  let g:neocomplete#force_omni_input_patterns = {}
let g:neocomplete#force_omni_input_patterns.erlang =
      \ '\<[[:digit:][:alnum:]_-]\+:[[:digit:][:alnum:]_-]*'
endif

otp のコードを読む

$ cd /path/to/erlang/lib/erlang/lib
$ ~/.vim/bundle/vim-erlang-tags/bin/vim-erlang-tags.erl
$ ls tags
tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment