6

Exporting and importing Live Templates in JetBrains Rider

 1 year ago
source link: https://alexanderzeitler.com/articles/exporting-and-importing-jetbrains-rider-livetemplates/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Exporting and importing Live Templates in JetBrains Rider

Published on Sunday, April 2, 2023

I love JetBrains Rider and I'm using it on every Platform: Xubuntu, macOS and Windows. That's great a great experience but sharing Live Templates between the platforms is a bit tricky.

Things might be easier if you're using JetBrains sync but I'm using the repository sync for ages now....

The obvious option might be to use the "Save" button in the "Live Template" settings. However, if this would work, I wouldn't write this post.

The aforementioned option only export none .NET live templates.

So how do we do it for C# (and F# I guess)?

Exporting

First, open the "Manage Layers" dialog - I'm doing this via the Actions Panel (double shift keyboard shortcut). Then right click "This computer" (or where ever you want to export the live templates from) and select "Export to File...":

Manage Layers dialog

Then tick the checkbox "Live Templates":

Exporting the Live Templates

Next, assign a file name and you're done with exporting.

Importing

Bring up the "Manage Layers" dialog again and select "Import from" ➡️ "Import from File..."

Select import from File

Select a file containing exported Live Templates:

Select file to import

Tick the "LiveTemplates" checkbox

Tick the Live Templates checkbox

And we're done 💥️

Just double check the templates have been imported:

double check the templates have been imported

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK