Skip to content

Draft of #54: Configurable extensions#55

Merged
bhurlow merged 3 commits intobhurlow:masterfrom
RhysU:master
Aug 28, 2018
Merged

Draft of #54: Configurable extensions#55
bhurlow merged 3 commits intobhurlow:masterfrom
RhysU:master

Conversation

@RhysU
Copy link
Contributor

@RhysU RhysU commented Aug 27, 2018

Please review/test carefully-- I'm new to parinfer, lisp-like languages, and VimScript.

if !exists('g:vim_parinfer_' . s:key)
let g:vim_parinfer_{s:key} = copy(g:_VIM_PARINFER_DEFAULTS[s:key])
endif
endfor
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pattern lifted from syntastic.

execute "autocmd FileType " . join(g:vim_parinfer_filetypes, ",") . " nnoremap <buffer> <Tab> :call parinfer#do_indent()<cr>"
execute "autocmd FileType " . join(g:vim_parinfer_filetypes, ",") . " nnoremap <buffer> <S-Tab> :call parinfer#do_undent()<cr>"
execute "autocmd FileType " . join(g:vim_parinfer_filetypes, ",") . " vnoremap <buffer> <Tab> :call parinfer#do_indent()<cr>"
execute "autocmd FileType " . join(g:vim_parinfer_filetypes, ",") . " vnoremap <buffer> <S-Tab> :call parinfer#do_undent()<cr>"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may well be better/cleaner ways to avoid the repeated joins.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out there is a good pattern, just a let s:foo = expr statement. Still, leaving as-is for now.

@bhurlow
Copy link
Owner

bhurlow commented Aug 27, 2018

@RhysU yea this looks 💯, I'm fine with some repetitions in the joins there since it's very concrete. LMK if this is ready to merge and I will do so

@RhysU
Copy link
Contributor Author

RhysU commented Aug 28, 2018

@bhurlow, I fixed a couple of typos in the documentation-- please merge away whenever you're hapy.

@bhurlow bhurlow merged commit fbafb9b into bhurlow:master Aug 28, 2018
@RhysU RhysU mentioned this pull request Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments