Skip to main content
9 events
when toggle format what by license comment
Jun 14, 2023 at 17:44 comment added HRC @ChristianBrabandt Thanks! I will try this way.
Jun 14, 2023 at 12:52 comment added Christian Brabandt you can map ab and in your function call getchar() to get the next character and act upon this
Jun 14, 2023 at 12:04 comment added HRC Yes! In the same vim.keymap.set() setting, I would like that the function take, e.g., (if we type abc) c in abc to do some process in the function, and (if we type abd) d to do the other process in the same function. Wait. So I have to set for abc and abd separately?
Jun 14, 2023 at 11:59 comment added Vivian De Smedt Thanks it is clear. Is your goal is to use the same function for multiple mappings and to access the keybuffer to decide what to do in the function?
Jun 14, 2023 at 11:56 comment added HRC Hi. Pardon me for the unclear description. In this question, I mean: in normal mode, neovim must "memorize/store" ab we just typed to be ready for triggering the map when we type c. I guess that there may be somewhere neovim "memorizes/stores" ab. Maybe ab is "memorized/stored" in some kind of "register" like mark register (e.g., ma marked in register a), yank register (e.g., "ay yanked in register a), or recording register (e.g., qa recorded in register a)? My goal is to access that "register", and I hope it can be used in the function part of vim.keymap.set().
Jun 14, 2023 at 11:11 comment added Vivian De Smedt Could you tell us more about your goal? I suppose it will help us to help you? By definition of the mapping it is triggered when abc is typed.
Jun 14, 2023 at 11:08 history edited Vivian De Smedt CC BY-SA 4.0
deleted 11 characters in body
S Jun 14, 2023 at 10:21 review First questions
Jun 14, 2023 at 11:08
S Jun 14, 2023 at 10:21 history asked HRC CC BY-SA 4.0