Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Using both <expr> mappings on <cr> and endwise #91
I'm trying to use vim-endwise and keep the ability to undo single lines. I have this in my vimrc:
When I press enter, it inserts:
I tried my own mappings with:
But as you might expect, I get an infinite loop and
I guess this is similar to #10 but I don't have any conflicting plugins.
Any idea how to get out of this conundrum?
just realize I made a mistake, after read the vim documentation about mapping http://vim.wikia.com/wiki/Mapping_keys_in_Vim_-_Tutorial_(Part_1).
For the life of me I can't make it work :)
Your last example does not call vim-endwise, and the one before either (see my my test below).
Here's a few things I have tried (I would REALLY love to undo individual lines and use vim-endwise)
If I remove the
I also have tried:
which does the same, and using
It seems like
I'm sure there is a simple way out that allows both undoing individual lines AND enabling vim-endwise. Yesterday I have lost a bunch of lines by working on the plane on my tiny tablet, but I can't accept that Vim cannot do this. That would be a first :)
@tpope what would you think of a PR that would allow executing
Note that I tried adding a
But this works fine for me as-is; it allows me to undo every line break as expected... I could also use