-
Notifications
You must be signed in to change notification settings - Fork 46
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
breaks undo #2
Comments
Thanks for information. |
undo is fixed by that but it is no longer dot-repeatable because of existence of |
Regarding the issue in delimitMate: @justinmk The idea would be to use @tpope's vim-repeat, but I have not figured out how it should be used in the context of delimitMate (Raimondi/delimitMate#138 (comment)). |
tpope's vim-repeat cannot be used for this sort of plugins. |
Hi, I'm not familiar with this issue, but is this related? |
@dai-shi no |
Note: Starting from version 7.4.849 you can use |
Thanks. You mean |
Any updates on this? Is there perhaps a workaround I could use? |
Checkout Raimondi/delimitMate#227 |
It's been nearly four years since the issue created. It was a promising plugin among other ones, so bad I can't use it because of this problem. Friendly ping @cohama. |
A cause of breaking undo is calling |
I'm sure that. In historically reason, lexima uses Sorry for slow response and I will try re-implementation for this issue on this week. |
No, sorry. This problem is very difficult for now. |
@cohama Thanks for the update! And no worries, your plugin is very much appreciated! If it helps anyone, I have switched to a simple solution that is not quite as good as this plugin but works okayish: " Complete braces on <CR> in a sensible way
function! s:complete_braces()
let line = getline('.')
let col = col('.')
if col < 1000 && col == len(line) + 1 && matchstr(line, '\%' . (col-1) . 'c.') == '{'
return "}\<C-o>k\<C-o>A\<CR>"
endif
return ""
endfunction
inoremap <buffer><expr><CR> "\<CR>" . <SID>complete_braces() It shouldn't be too hard to extend this manually for slightly more complicated cases... |
Hi everyone. I have updated lexima.vim and partially fix this problem. lexima.vim does not break undo until
However, in multiline input like bellow
undo is still broken ( |
This is a great fix 🎉 |
This looks like a promising plugin. I would like to make you aware of Raimondi/delimitMate#138 which has discussion about fixing undo/redo with these types of plugins. I just tried lexima.vim, and although dot-repeat seems to work, it still breaks undo.
The key to solving undo/redo is in this comment: Raimondi/delimitMate#138 (comment)
There is an edge case with visual-block mode: Raimondi/delimitMate#138 (comment)
But fixing undo is vastly more important in my opinion. No one has taken the time to implement the solution yet, though.
The text was updated successfully, but these errors were encountered: