Skip to content

A vim plugin that convert your nested functions into pipe operators

License

Notifications You must be signed in to change notification settings

marocchino/pipe_converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PipeConverter

note: It is early release. It has some bugs and lack of use cases.

Demo

asciicast

Config

Vim

" 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>

Usage in shell

$ cd pipe_converter
$ ./pipe_converter "a(b, c, d)"
b |> a(c, d)
$ ./pipe_converter --revert "b |> a |> c(d)"
c(a(b), d)

Escript Build

$ mix escript.build

Test

$ mix test

About

A vim plugin that convert your nested functions into pipe operators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published