vim-asciidoc icon indicating copy to clipboard operation
vim-asciidoc copied to clipboard

Can we reduce the effects of vimple?

Open Mange opened this issue 8 years ago • 6 comments

Adding support for ASCIIdoc requires the vimple plugin according to the README. vimple, in turn, adds several mappings to all filetypes that I don't want. Perhaps the library parts of vimple could be extracted to its own plugin and then this plugin is used instead?

Mange avatar Nov 21 '17 19:11 Mange

Ok. I'll have a look at it.

dahu avatar Nov 22 '17 23:11 dahu

713a2bbf1aded4a32ef123a5067c447ce100fb2b

Disable vimple's maps and commands with: let g:init_vimple_maps_and_commands = 0

There might be a few lingering maps buried in the autoload (library) files, so this may not be completely over yet. Those remaining maps (and commands?) would be better shielded with per-instance guards rather than the all-or-none guard I just put on the main plugin/vimple.vim maps and commands. Of course, I could add per-instance guards around the plugin/vimple.vim maps and commands in the future too.

dahu avatar Nov 23 '17 00:11 dahu

Thank you! I will try this soon.

On Thu, Nov 23, 2017, 01:59 Barry Arthur [email protected] wrote:

713a2bbf1aded4a32ef123a5067c447ce100fb2b

Disable vimple's maps and commands with: let g:init_vimple_maps_and_commands = 0

There might be a few lingering maps buried in the autoload (library) files, so this may not be completely over yet. Those remaining maps (and commands?) would be better shielded with per-instance guards rather than the all-or-none guard I just put on the main plugin/vimple.vim maps and commands. Of course, I could add per-instance guards around the plugin/vimple.vim maps and commands in the future too.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dahu/vim-asciidoc/issues/15#issuecomment-346511518, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAGPy95w9EA_UUtwQr-OyEz0B4oTF8gks5s5MNygaJpZM4QmZ8l .

Mange avatar Nov 24 '17 15:11 Mange

This did not work fully for me. (Sorry for not getting back to you in such a long time)

I still cannot type "jj" in my documents, even after adding the new variable before loading vim-asciidoc (and vimple).

Should I move this issue over to the vimple repo?

Mange avatar Mar 21 '18 07:03 Mange

I managed to fix it locally by adding an after file that removes the bindings I could find using Github search for inoremap and imap:

" Disable some unwanted Vimple keybindings (Vimple is loaded by vim-asciidoc)
iunmap jj
iunmap <c-x><c-z>
iunmap <c-x><c-a>

Mange avatar Mar 21 '18 07:03 Mange

I have just updated vimple (dahu/vimple@ce4535facb987ab4f5ff80c3a7151d454f6fd8fb) to provide maps for the abbrev and datetime completers. The jj completer was already a map. You can disable these completers from your vimrc like this:

imap <unique> <nop-1> <plug>vimple_completers_trigger
imap <unique> <nop-2> <plug>vimple_completers_abbrev_trigger
imap <unique> <nop-3> <plug>vimple_completers_datetime_trigger

dahu avatar Mar 21 '18 23:03 dahu