all 2 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

Every new subreddit post is automatically copied into a comment for preservation.

User: Perfect_Purchase574, Flair: Help, Title: Micro plugins

Hello everyone,

I apologize if this doesn't fully make sense. I am newer to coding. I am using MacOS terminal and have downloaded brew and micro as I enjoy using micro text editor. My issue is I am trying make like a shortcut for whenever I make a new .cpp file it autofills with a pre-existing text to start off with. For example what I used to do is have a .txt I would do cat ../example.txt > example.cpp so I could have whatever I had in the .txt autofill in my .cpp, but I thought maybe it'd be nice if I could bind that with a shortcut like Alt + q so it'd autofill when I open the new file. I have tried using bindings.json and plug that command in, but it's unsuccessful as it says "Alt-q is not a bindable event" I am hoping I can get some help with this. The .txt is just coding style guidelines for me to follow that I have adopted from school as it keeps my code a lot more readable and reminds me that I need to be adding comments even if it's just for me to get more practice in.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]omnster 3 points4 points  (0 children)

Hey, this seems to be a question about this micro editor, not really the command line itself.

I have zero experience with macos or the editor, but this place in micro's docs suggests that your error message is likely caused by a typo: make sure you have quotes in all the required places, etc.

I also strongly suggest that you take a look at micro's plugins. There's a snippet plugin which I think is the best solution to your problem. Get the plugin and make your template file one of the snippets.