A vim plugin that convert your nested functions into pipe operators
MIT License
note: It is early release. It has some bugs and lack of use cases.
" Add this line to your .vimrc file
" Vundle
Plugin 'marocchino/pipe_converter'
" Plug
Plug 'marocchino/pipe_converter', { 'do': 'mix escript.build' }
let g:pipe_converter_command = "~/.vim/plugged/pipe_converter/pipe_converter"
" minpac
call minpac#add('marocchino/pipe_converter', { 'do': '!mix escript.build' })
let g:pipe_converter_command = "~/.vim/pack/minpac/start/pipe_converter/pipe_converter"
" Change it your own keymap.
nnoremap ec :call PipeConvert()<CR>
nnoremap er :call PipeRevert()<CR>
$ cd pipe_converter
$ ./pipe_converter "a(b, c, d)"
b |> a(c, d)
$ ./pipe_converter --revert "b |> a |> c(d)"
c(a(b), d)
$ mix escript.build
$ mix test