Medium doesn’t yet have an alt-text option, so this will make your code completely inaccessible to developers who are visually impaired. Paste a CodePen.io URL into Medium, then hit enter:Įven though it may seem convenient to take screenshots of your code and paste them into Medium, don’t do this. Just in case these don’t render properly in Medium’s mobile apps, I recommend including links below each of the embeds as a fallback. You can also embed GitHub gists by pasting their URL into a blank line, then pressing enter:Īs a bonus, you can embed runnable apps right into Medium. You can also highlight code inline by selecting it, then clicking the backtick key (`). A huge thanks to Luke Esterkyn and the rest of the Medium team for implementing this! If you type ``` on a new line, Medium will now switch to code input mode. Medium also now supports the common convention of starting a code block with triple back-ticks. To accomplish this, select the text, then push: If you need more instructions on how to use VSCode, check out our post on how to enable/disable word wrap in VSCode, How to use LaTeX in VSCode or how to automatically indent your code in Visual Studio Code.If (developer = true) We hope that the information above is useful to you. Basically, the extension provides a way to quickly assign keyboard shortcuts to multiple folding levels in VSCode. There’s another cool extension you should check out if you regularly need to collapse your code blocks : Fold Level by vikyd. The extension allows you to manually control how and where to collapse/expand your code, as well as advanced collapse rules. If you need to further fine-tune the folding feature in VSCode, you can install Explicit Folding by zokugun. "editor.foldingStrategy": "indentation", Code language: JavaScript ( javascript ) You can try specifying the editor.foldingStrategy key in settings.json to overcome this problem. In rare cases, VSCode cannot accurately detect the language you’re editing, so you won’t be able to fold your code. "editor.showFoldingControls": "always", Code language: JavaScript ( javascript )Ĭollapse/expand feature works by detecting the language in the file, then apply appropriate settings created specifically for it, either indentation-based, or defined by contributed folding range providers. Controls when the folding controls on the gutter are shown. Alternatively, open Command Palette and find Open Settings (JSON) to open settings.json. You can do that by accessing File > Preferences or press Ctrl +, key combination. You can change that to always show the icon by editing VSCode settings.json and changed the editor.showFoldingControls setting to always. Advanced Collapse Settingsīy default, the collapse icon in the sidebar are shown only when the mouse is moved over the sidebar gutter. Any regions inside the block of code you’re interacting with will be collapsed if previously expanded and vice versa. Recursive Collapse or Expand in VSCodeĭevelopers usually want to recursively collapse or expand a block of code can do that in VSCode by holding Shift key and Click in the arrow icon in the left sidebar. On macOS, you have to use use ⌘ key instead of Ctrl on each of the shortcut above.
0 Comments
Leave a Reply. |