From 6235fa6bc8e9857431358b815d6f3dd0a8f5d097 Mon Sep 17 00:00:00 2001 From: "sh.gazgireev" Date: Sun, 10 Nov 2019 15:14:09 +0300 Subject: [PATCH 1/5] site: add instructions on adding file associations for VSCode. --- site/content/blog/2019-04-15-setting-up-your-editor.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/site/content/blog/2019-04-15-setting-up-your-editor.md b/site/content/blog/2019-04-15-setting-up-your-editor.md index 1db85a79741c..394a33d21970 100644 --- a/site/content/blog/2019-04-15-setting-up-your-editor.md +++ b/site/content/blog/2019-04-15-setting-up-your-editor.md @@ -45,3 +45,13 @@ To set the filetype for a single file, use a [modeline](https://vim.fandom.com/w ``` ``` + +## Visual Studio Code + +To treat `*.svelte` files as HTML, add the following lines to your `settings.json` file: + +```cson + "files.associations": { + "*.svelte": "html" + } +``` \ No newline at end of file From 85c8f43fc4eea09540528dbd3ebe66dbc794b586 Mon Sep 17 00:00:00 2001 From: "sh.gazgireev" Date: Sun, 10 Nov 2019 15:20:15 +0300 Subject: [PATCH 2/5] site: add instructions on adding file associations for WebStorm. --- site/content/blog/2019-04-15-setting-up-your-editor.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/site/content/blog/2019-04-15-setting-up-your-editor.md b/site/content/blog/2019-04-15-setting-up-your-editor.md index 394a33d21970..9996889986fe 100644 --- a/site/content/blog/2019-04-15-setting-up-your-editor.md +++ b/site/content/blog/2019-04-15-setting-up-your-editor.md @@ -54,4 +54,11 @@ To treat `*.svelte` files as HTML, add the following lines to your `settings.jso "files.associations": { "*.svelte": "html" } -``` \ No newline at end of file +``` + +## JetBrains WebStorm + +To treat `*.svelte` files as HTML in WebStorm, you need to create a new file type association. +Please refer to the [JetBrains website](https://www.jetbrains.com/help/webstorm/creating-and-registering-file-types.html) to see how. + + From dde60955ffb14ac2c7bc9941212cf1e4ea941b0b Mon Sep 17 00:00:00 2001 From: "sh.gazgireev" Date: Sun, 10 Nov 2019 15:36:43 +0300 Subject: [PATCH 3/5] site: add instructions on adding file associations for Sublime Text 3. --- site/content/blog/2019-04-15-setting-up-your-editor.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/site/content/blog/2019-04-15-setting-up-your-editor.md b/site/content/blog/2019-04-15-setting-up-your-editor.md index 9996889986fe..ff5f3f6a46df 100644 --- a/site/content/blog/2019-04-15-setting-up-your-editor.md +++ b/site/content/blog/2019-04-15-setting-up-your-editor.md @@ -58,7 +58,11 @@ To treat `*.svelte` files as HTML, add the following lines to your `settings.jso ## JetBrains WebStorm -To treat `*.svelte` files as HTML in WebStorm, you need to create a new file type association. -Please refer to the [JetBrains website](https://www.jetbrains.com/help/webstorm/creating-and-registering-file-types.html) to see how. +To treat `*.svelte` files as HTML in WebStorm, you need to create a new file type association. Please refer to the [JetBrains website](https://www.jetbrains.com/help/webstorm/creating-and-registering-file-types.html) to see how. + +## Sublime Text 3 + +Open any `.svelte` file. +Go to *__View → Syntax → Open all with current extension__* and choose `HTML` from an option list. From 22ec0fd5eaaef4bf01518265503dfc779b6026d2 Mon Sep 17 00:00:00 2001 From: "sh.gazgireev" Date: Sun, 10 Nov 2019 15:38:11 +0300 Subject: [PATCH 4/5] site: small tweaks of "setting up your editor". --- site/content/blog/2019-04-15-setting-up-your-editor.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site/content/blog/2019-04-15-setting-up-your-editor.md b/site/content/blog/2019-04-15-setting-up-your-editor.md index ff5f3f6a46df..929353e1b0a2 100644 --- a/site/content/blog/2019-04-15-setting-up-your-editor.md +++ b/site/content/blog/2019-04-15-setting-up-your-editor.md @@ -6,7 +6,8 @@ authorURL: https://twitter.com/Rich_Harris draft: true --- -*Coming soon* This post will walk you through setting up your editor so that recognises Svelte files: +*__Coming soon__* +This post will walk you through setting up your editor so that recognises Svelte files: * eslint-plugin-svelte3 * svelte-vscode @@ -14,7 +15,7 @@ draft: true ## Atom -To treat `*.svelte` files as HTML, open Edit → Config... and add the following lines to your `core` section: +To treat `*.svelte` files as HTML, open *__Edit → Config...__* and add the following lines to your `core` section: ```cson "*": @@ -63,6 +64,6 @@ To treat `*.svelte` files as HTML in WebStorm, you need to create a new file typ ## Sublime Text 3 Open any `.svelte` file. -Go to *__View → Syntax → Open all with current extension__* and choose `HTML` from an option list. +Go to *__View → Syntax → Open all with current extension__* and choose "HTML" from an option list. From 9ab555c69831c3a74998e405d36f657c9a28ea4d Mon Sep 17 00:00:00 2001 From: Conduitry Date: Sun, 10 Nov 2019 08:15:28 -0500 Subject: [PATCH 5/5] adjustments --- site/content/blog/2019-04-15-setting-up-your-editor.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/blog/2019-04-15-setting-up-your-editor.md b/site/content/blog/2019-04-15-setting-up-your-editor.md index 929353e1b0a2..7a107c590b7e 100644 --- a/site/content/blog/2019-04-15-setting-up-your-editor.md +++ b/site/content/blog/2019-04-15-setting-up-your-editor.md @@ -6,7 +6,8 @@ authorURL: https://twitter.com/Rich_Harris draft: true --- -*__Coming soon__* +*__Coming soon__* + This post will walk you through setting up your editor so that recognises Svelte files: * eslint-plugin-svelte3 @@ -63,7 +64,6 @@ To treat `*.svelte` files as HTML in WebStorm, you need to create a new file typ ## Sublime Text 3 -Open any `.svelte` file. -Go to *__View → Syntax → Open all with current extension__* and choose "HTML" from an option list. - +Open any `.svelte` file. +Go to *__View → Syntax → Open all with current extension as... → HTML__*.