0

Much like what was asked in this question:

I want Neovim to show what I type, and keep recognising it as a mapping in progress even if I use Backspace or Delete. This is actually a very useful function that's in vim-latex, a famous plugin for LaTeX in Vim, called by the function call IMAP(). Is this implementable in other filetypes and buffers of Neovim/Vim, and if so, is there an example of this being implemented publically?

EDIT : Giving a clear example would be better for everyone, I was assured, so here goes an example:

Suppose I have an insert mode mapping of the following:

inoremap <buffer> hello helloworld

When I type hello, I want Vim to do the following:

h|
he|
hel|
hell|
hello|
helloworld|

However, Vim does the following:

|h
|e
|l
|l
|o
helloworld|

This is quite annoying since I can't know if I make a typo, and also requires me to type in very quick succession, which I am not really fond of. This, I hear, has something to do with the ttimeout option, which I have next to no knowledge of. Would this be enough of an example to better understand my question? I'm sorry for the inconvenience, but I really don't have a clue of how to phrase this...

  • 2
    As it stands, your question is a bit unclear to me: I suspect it’s missing relevant info from the question you linked. Could you please edit to clarify precisely what the desired functionality is (e.g., what modes you’re referring to, etc.)? Vi and Vim prefers each question to stand on its own—links are acceptable, but only if the relevant info is also sufficiently contained in the post. – D. Ben Knoble Mar 5 at 14:23
  • I've been trying to word this into clear statements for the last few hours to no avail; is it okay if I add a graphic (or textual) examples of what I am trying to achieve? – Paul Kim Mar 6 at 2:09
  • of course! Anything to make it clear what you want to achieve. – D. Ben Knoble Mar 6 at 2:10
  • 1
    This is how mappings work, I don't think there is a way around it. You might try to use abbreviations instead, that work a bit like what you want. – Christian Brabandt Mar 6 at 6:46
  • Wow! I didn't know this feature even existed. Thank you for the info! – Paul Kim Mar 7 at 0:07
0

Note to self: Use abbreviations (like this)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.