ElixirのUnite outline sourceを書いた。
暫く使ってみて、有用ならなんとかする。
"============================================================================= " File : autoload/unite/sources/outline/elixir.vim " Author : ne_Sachirou <utakata.c4se@gmail.com> " Updated : 2013-07-12 " " Licensed under the MIT license: " http://www.opensource.org/licenses/mit-license.php " "============================================================================= " Default outline info for Elixir " Version: 0.1.1 function! unite#sources#outline#elixir#outline_info() return s:outline_info endfunction let s:Util = unite#sources#outline#import('Util') let s:outline_info = { \ 'heading': '^\s*def\%(module\|record\|macro\|protocol\|impl\|delegate\|exception\|overridable\)\?p\?' \ } function! s:outline_info.create_heading(which, heading_line, matched_line, context) let h_lnum = a:context.heading_lnum " Level 1 to 3 are reserved for comment headings. let level = s:Util.get_indent_level(a:context, h_lnum) + 3 let heading = { \ 'word' : a:heading_line, \ 'level': level, \ 'type' : 'generic', \ } return heading endfunction