Monday, March 24, 2025

inoremap and typing pace?

hello,

On Mon, Mar 24, 2025 at 09:39:54AM -0000, Steven H. wrote:
> set listchars=eol:⏎,tab:>·,trail:▪,space:␣,extends:>,precedes:<,nbsp:+
> set ai ci noet
> command -nargs=0 ArgIndent {
> y y | put y
> var s = @/
> s!\v^\s*\zs(\S+\s+).*!\=repeat(' ', 1 + len(submatch(1)))!
> @/ = s
> }
> inoremap \<cr> \<c-o>:ArgIndent<cr>
>
>
> and typing your example gives me:
>
> this␣--example␣\\⏎
> --works␣\⏎
> ␣␣␣␣␣␣␣␣--fine▪⏎
>
> However, if I type the '\\<cr>' fast, I get this:
>
>
> this␣--example␣\\⏎
> ␣␣␣␣␣--works␣\▪⏎
> ␣␣␣␣␣␣␣␣␣␣␣␣␣--fine▪⏎
>
> I wonder why it works for you and not for me.

well … I remember something about a mapping timout but I have to admit
I just don't know anymore.

regards

--
Marc Chantreux

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/Z-Eranw0GHR65W7n%40prometheus.

No comments: