Markdown table features.
Title | Command | Default Keybinding | In the Editor Right Click Menu |
---|---|---|---|
Format all tables. | markdowntable.format | Shift + Alt + F | Yes |
Convert TSV to table. | markdowntable.tsvToTable | Shift + Alt + T | Yes (only when selecting range) |
Navigate to next cell. | markdowntable.nextCell | Tab | No |
Navigate to previous cell. | markdowntable.prevCell | Shift + Tab | No |
Navigate to next cell (w/o format). | markdowntable.nextCellWithoutFormat | No | |
Navigate to previous cell (w/o format). | markdowntable.prevCellWithoutFormat | No | |
Insert column in the right. | markdowntable.insertRight | Yes (only when not selecting range) | |
Insert column in the left. | markdowntable.insertLeft | Yes (only when not selecting range) | |
Align to Left. | markdowntable.alignLeft | Yes | |
Align to Center. | markdowntable.alignCenter | Yes | |
Align to Right. | markdowntable.alignRight | Yes |
Key binding to Tab
.
- Auto navigate to next cell when pressing Tab key in table.
- When out of table, vscode's default "tab" behavior is operated.
- Auto insert new row, when the cursor is in last row in table.
- with auto format
- Use markdowntable.nextCellWithoutFormat command
- If you want, you need to assign this command to some key binding by yourself.
Key binding to Shift
+Tab
.
- Auto navigate to prev cell when pressing Shift+Tab key in table.
- When out of table, vscode's default "outdent" behavior is operated.
- with auto format
- Use markdowntable.prevCellWithoutFormat command
- If you want, you need to assign this command to some key binding by yourself.
Key binding to Shift + Alt + T
.
Key binding to Shift + Alt + F
.
- Auto format column width of all tables in current document
- Align data and column header (can be disabled by configuration)
Configuration ID | Description | Type | Default |
---|---|---|---|
markdowntable.alignColumnHeader | Align column header in the table when formatting | boolean | true |
markdowntable.alignData | Align data in the table when formatting | boolean | true |
You can define user snippets.
-
References
-
Steps to add a snippet table to the global scope
-
Open snippet file
- Select User Snippets under File > Preferences (Code > Preferences on macOS)
- Select markdown.json or markdown under New Global Snippets file
-
Add the following, and save file
{ "Insert a simple table": { "prefix": "table", "body": [ "|${0:title} | |", "| - | - |", "| | |" ], "description": "Insert a simple table" } }
-
-
Step to add a snippet table to the project scope
-
Create ".vscode/markdown.code-snippets" in your project directory
-
Add the following, and save file
- Syntax is almost the same as global, scope option is additional
{ "Insert a simple table": { "prefix": "table", "scope": "markdown", "body": [ "|${0:title} | |", "| - | - |", "| | |" ], "description": "Insert a simple table" } }
-
By default, the snippets suggestion is disabled in markdown. You need to enable it to use.
-
References
-
Step to enable snippets suggestion to the global scope
-
Open user settings file
- Windows %APPDATA%\Code\User\settings.json
- macOS $HOME/Library/Application Support/Code/User/settings.json
- Linux $HOME/.config/Code/User/settings.json
-
Add the following, and save file
"[markdown]": { "editor.quickSuggestions": true }
-
-
Step to enable snippets suggestion to the project stope
-
Create (or open if already exist) ".vscode/settings.json" in your project directory
-
Add the following, and save file
"[markdown]": { "editor.quickSuggestions": true }
-
What's focused on.
- As minimal
- Not enhance or change markdown syntax spec.
- Not implement features they can be done by vscode's box selection.
- Support full-width characters
- Because author is Japanese
- See changelog.
- Source Code
- Marketplace
- [VSX]
Apache 2.0, See LICENSE for more information.