When your documentation covers the same concepts across multiple languages or platforms you can use to make the entire page switchable Unlike regular which require wrapping each difference in a tabs fence lets you sprinkle tab specific content throughout the page Shared content stays as regular markdown This page itself uses notice the tabs at the top Switch between them to see how content changes across sections while shared text remains Below is a demo except the final Definition section tab content tabs tab content tab content
Every project needs an editor configuration Create a workspace settings file in your project root Create in your project root Note VS Code will automatically detect these settings when you open the folder vscode settings json Create in your project root Note Emacs will automatically load these settings when visiting any file in the directory dir locals el nil indent tabs mode nil tab width 4 fill column 100
Set up the build tool for your project All editors use the same underlying build system but the integration differs Create to integrate the build Java C Use to run the build task vscode tasks json Ctrl Shift B Configure in Java nil compile command mvn compile C nil compile command cmake build build Use to run the build compile command dir locals el M x compile
All projects benefit from proper debug configuration Breakpoints watch expressions and stepping through code work the same conceptually but the configuration differs per editor Create Java C Press to start debugging vscode launch json F5 Java Use with the Java debug adapter dap mode require dap java dap register debug template Debug Main list type java request launch mainClass com example Main C Use with dap mode gdb require dap gdb lldb dap register debug template Debug Main list type cppdbg request launch program $ workspaceFolder build main Use to start a debug session M x dap debug
Use fence blocks with a tab id to mark sections of content that are specific to a tab Content outside of blocks is always visible regardless of which tab is selected When a page contains blocks tabs automatically appear at the top of the page Regular fence blocks can be used inside for additional sub grouping The global page tabs and regular tabs operate independently Shared content here is always visible Java hello VS Code Java C hello Vs Code C Java hello Emacs Java C hello Emacs C More shared content here tab content tab content Shared content here is always visible ```tab content VS Code Press `F5` to start debugging ``` ```tab content Emacs Use `M x dap debug` to start a debug session ``` More shared content here tab content tabs tab content Shared content here is always visible `````tab content VS Code ```tabs Java hello VS Code Java C hello Vs Code C ``` ````` `````tab content Emacs ```tabs Java hello Emacs Java C hello Emacs C ``` ````` More shared content here