Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable the <CR> mapping ? #29

Closed
frazrepo opened this issue Jun 3, 2019 · 2 comments
Closed

How to disable the <CR> mapping ? #29

frazrepo opened this issue Jun 3, 2019 · 2 comments

Comments

@frazrepo
Copy link

frazrepo commented Jun 3, 2019

Hi there,

Is there a way to disable the mapping which remove the closing character and restore it automatically when quitting insert mode.

I use jk as and it doesn't work.

with <CR> and <ESC>

func main() {
    //Do something

}

with <CR> and jk

fun main() {
    // quitting insert mode with jk doesnt' fill automatically the closing character
@tmsvg
Copy link
Owner

tmsvg commented Jun 3, 2019

Hello! You can make jk reinsert the closing character by replacing inoremap jk <Esc> with imap jk <Plug>(PearTreeFinishExpansion) in your vimrc.

If you still want disable the <CR> mapping, let g:pear_tree_map_special_keys = 0 prevents Pear Tree from mapping <CR>, <BS>, and <Esc> so you can manually map only the ones you want.

See :h pear-tree-mappings and :h g:pear_tree_map_special_keys

@tmsvg tmsvg closed this as completed Jun 3, 2019
@frazrepo
Copy link
Author

frazrepo commented Jun 8, 2019

Great ! Thank you, It works flawlessly

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

No branches or pull requests

2 participants