We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [user-input]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
24 views

how to implement basic ctrlp like UI interface

How to implement basic ctrlp like UI interface. In case never used ctrlp, let's be specific, how to achieve below functionality? type <F2> open a tmp window with 5 lines, wating for user input ...
3
votes
2answers
266 views

What is the proper way to allow the user of a plugin to modify settings?

So I have a plugin that I am writing which should allow the user to set whether they want to enable a feature. I want the feature to be disabled by default, and allow the user to change it by adding ...
1
vote
1answer
19 views

How to get a function to print something to colon command and let user edit it?

I need to write a function that when executed it opens colon command and paste some stuff on to it and let user edit it before executing the command. for example function! EditRelativePath() :e ...
1
vote
1answer
38 views

How to cut off user input and continue with script after a certain number of characters are entered?

I'm struggling to write a function that asks the user to input a string, but cuts it off after they've inputted a specific amount of characters (three, for example) and moves on with the rest of the ...
1
vote
1answer
45 views

Vim bell limited to once per half a second

Since Vim 8, I've noticed that the bell can sound at most once per half a second. This annoys me. I have this solved by recompiling, but am still looking for a way to do it without. I've searched the ...
0
votes
1answer
48 views

Capture the next keypress under 200ms

1) I need to capture the next key press from the keyboard, if there are any in 200 millisecond. Which function should I use to achieve this? 2) Basically I need to re-send the captured key, with some ...
2
votes
1answer
107 views

User Input in a Recording

So I am pretty new to vim, but I have started using it as my Latex editor to help get more efficient. Anyways I have a recording that I would like to prompt a user for input on that will change how ...
0
votes
2answers
45 views

Extract JavaScript variable (feature example): how to improve it?

I am a Vim newbie with one week experience and I'm already enjoying it. I've successfully written an (ugly) command+function+mapping with which I can extract some code to a new variable in JavaScript....
5
votes
1answer
331 views

How to measure words per minute?

Been looking for a method to measure words per minute, with no luck. Is there any way to do this?
9
votes
2answers
1k views

How does vimgolf record all keystrokes?

From time to time I like to engage in a round of vimgolf. It can be enlightening. How are they able to record all the keystrokes? That must be a vim feature. Anybody any idea how to do that. It could ...
1
vote
2answers
944 views

How do you pass user input to a system command?

I'm trying to write an autocmd to make a commit to a git repository. Here is some non-functional code that should illustrate what I'm trying to do: let g: CommMsg = '' augroup misc autocmd! ...
0
votes
1answer
298 views

confirm(msg, choices) without newline on msg?

Is there any way to have the confirm function place the choices on the same line as the msg prompt? confirm("Yes no question", "&Yes\n&No", 2) Instead of Yes no question (Y)es, [N]o: it ...
3
votes
1answer
369 views

How do I get the next n characters input by the user?

I answered a question that needed a user input using the built-in input() function, which works great. I was wondering if it was possible to ask vim for (let say) the next 3 characters input, without ...