pubs icon indicating copy to clipboard operation
pubs copied to clipboard

Templates for `pubs note` if it is the first time to edit

Open m15a opened this issue 2 years ago • 4 comments

When creating a new note by pubs note, its content is blank. It would be helpful for note taking if some templates are available.

m15a avatar Dec 21 '21 08:12 m15a

You can emulate this by setting the application that you wish to note take with as a script that emulates this behaviour. Instead of setting the editor to vim, I had a wrapper script that would check to see if the file existed first and if it did, open it in vim. else it would copy a template file to the location, and then open it in vim.

On Tue, Dec 21, 2021 at 12:05 AM Mitsuhiro Nakamura < @.***> wrote:

When creating a new note by pubs note, its content is blank. It would be helpful for note taking if some templates are available.

— Reply to this email directly, view it on GitHub https://github.com/pubs/pubs/issues/274, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSAQS67ADR4LSEO5THVH43USAYNHANCNFSM5KPQ336Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

zamlz avatar Dec 22 '21 03:12 zamlz

Instead of setting the editor to vim, I had a wrapper script that would check to see if the file existed first and if it did, open it in vim. else it would copy a template file to the location, and then open it in vim.

That's a nice trick, thanks! Is it possible to create a plugin that provides this functionality?

m15a avatar Dec 22 '21 04:12 m15a

Yeah that's possible. I don't know if I have time to work on it at the moment, but I know it shouldn't be too complicated.

On Tue, Dec 21, 2021 at 8:13 PM Mitsuhiro Nakamura @.***> wrote:

Instead of setting the editor to vim, I had a wrapper script that would check to see if the file existed first and if it did, open it in vim. else it would copy a template file to the location, and then open it in vim.

That's a nice trick, thanks! Is it possible to create a plugin that provides this functionality?

— Reply to this email directly, view it on GitHub https://github.com/pubs/pubs/issues/274#issuecomment-999272207, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSAQS2NBKZOMMO642PUUHDUSFF7TANCNFSM5KPQ336Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

zamlz avatar Dec 24 '21 00:12 zamlz

Here's a similar workaround for VIM. https://tinyurl.com/y8x84m4o

sevehub avatar Jan 26 '22 08:01 sevehub