Skip to main content
15 events
when toggle format what by license comment
Mar 29, 2023 at 14:16 comment added Mega Bang Please do as your time permits.
Mar 29, 2023 at 13:36 comment added D. Ben Knoble @MegaBang sorry, I gave a command to edit the code to fix the out-of-range. It should change the indexing [a:result] to [a:result-1]. I would have to think more about how to cope with nohidden, but maybe adding :hide to :next/:argdo/etc. would help?
Mar 29, 2023 at 9:03 comment added Mega Bang No, I don't have hidden set in my config. And where should I add the code for index out of range?
Mar 28, 2023 at 21:28 comment added D. Ben Knoble @MegaBang I'm not sure about the E163 or E37; do you have hidden set? I'm also not sure why the autocommand would show up when running :edit; it should only run once on startup.
Mar 28, 2023 at 21:27 comment added D. Ben Knoble I think for the index out of range, try :%s/\Va:result]/a:result-1]
Mar 28, 2023 at 9:46 comment added Mega Bang in terminal, these error shows up Error detected while processing function SelectedOneTemplate: line 4: and E37: No write since last change (add ! to overwrite). Though pressing enter, the template goes to current file but doesn't apply to all.
Mar 28, 2023 at 9:35 comment added Mega Bang When creating a file :e hello.cpp, these shows up Error detected while processing VimEnter Autocommands for "*"..function TryTemplate: line 5 and E163: There is only one file to edit then Error detected while processing VimEnter Autocommands for "*"..function TryTemplate[5]..SelectedTemplate: line 4 also E684: List index out of range: 1
Mar 27, 2023 at 15:11 comment added D. Ben Knoble @MegaBang what does "not working as expected" mean? Details would be the most helpful.
Mar 25, 2023 at 8:09 comment added Mega Bang it's not working as expected.
Mar 24, 2023 at 13:31 comment added D. Ben Knoble @MegaBang unless you can answer my earlier questions or explain what you mean by "foolproof," I can't do much. But perhaps you can take a crack at it yourself and learn by doing?
Mar 23, 2023 at 7:19 comment added Mega Bang Are you there @d-ben-knoble
Jan 3, 2023 at 14:45 comment added Mega Bang I'm still a noob at this. sorry
Jan 3, 2023 at 14:07 comment added D. Ben Knoble @MegaBang could you please specify what is wrong and what needs improved? It was intended as a sketch for you to adapt to your needs.
Jan 2, 2023 at 14:00 comment added Mega Bang Could you please make the script foolproof?
Sep 22, 2021 at 20:33 history answered D. Ben Knoble CC BY-SA 4.0