Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rpeshkov/vscode-text-tables

VSCode extension that brings the power of Emacs table editing
https://github.com/rpeshkov/vscode-text-tables

markdown org-mode tables vscode-extension

Last synced: 5 days ago
JSON representation

VSCode extension that brings the power of Emacs table editing

Awesome Lists containing this project

README

        

# Text Tables

[![version][version-badge]][CHANGELOG]
[![license][license-badge]][LICENSE]
[![Build Status](https://travis-ci.org/rpeshkov/vscode-text-tables.svg?branch=master)](https://travis-ci.org/rpeshkov/vscode-text-tables)

![Text tables](icons/icon.png)

VSCode extension that brings the power of Emacs table editing.

![Sample](doc/sample.gif)

## Features

- Tables reformat
- Easy table cells navigation
- Support for [org](https://orgmode.org/manual/Built_002din-table-editor.html#Built_002din-table-editor) and [markdown](https://help.github.com/articles/organizing-information-with-tables/) tables

## Activation

Extension is automatically activated when you open markdown or org file. If you want to use this extension in any other file, just trigger `Text Tables: Enable` command in command pallete.

## Commands

Extension provides several commands that are available in the Command Palette:

- `Text Tables: Enable` - enable extension.
- `Text Tables: Create table` - create new table in cursor position.
- `Text Tables: Format under cursor` - reformat the table under cursor.
- `Text Tables: Enter table mode` - enter [table mode](#table-mode).
- `Text Tables: Exit table mode` - exit [table mode](#table-mode).
- `Text Tables: Go to next cell` - switch to next cell in current table.
- `Text Tables: Go to previous cell` - switch to previous cell in current table.
- `Text Tables: Clear cell` - clear cell under cursor.

You can access all of the above commands from the command pallete (Ctrl+Shift+p or Cmd+Shift+p)

## Table mode

Table mode is the mode where some of the default keybindings have another action assigned.

To enter table mode you may execute command `Text Tables: Enter table mode` from command palette or press Ctrl+q Ctrl+q shortcut to toggle mode. To control whether you're in table mode or not, see the icon in the status bar of Visual Studio Code:

![Table mode status](doc/table-mode-status.png)

When in table mode, Tab and Shift+Tab keybindings will navigate next/previous cell accordingly.

![Navigation](doc/navigation.gif)

## Keybindings

- Ctrl+q f - format table under cursor.
- Ctrl+q space - clear cell under cursor.
- Ctrl+q Ctrl+q - toggle table mode.

### In table mode

- Tab - navigate to the next cell in table.
- Shift+Tab - navigate to the previous cell in table.

### Custom keybindings

Extension introduces additional `tableMode` when-clause that you may use to define your own keybindings when in table mode.

Sample keybinding:

```json
{
"key": "tab",
"command": "text-tables.gotoNextCell",
"when": "tableMode"
}
```

## Settings

This extension introduces some settings that you may setup in your user settings or workspace settings.

Available settings:

- `text-tables.mode` - sets the type of tables. Valid values are: `org` and `markdown`.
- `text-tables.showStatus` - controls whether to show or not status item for table mode.

## Contribution

All contributions are welcome.

If you found a bug or want to propose new feature for the extension, feel free to create an issue.

[CHANGELOG]: ./CHANGELOG.md
[LICENSE]: ./LICENSE
[version-badge]: https://img.shields.io/badge/version-0.1.5-blue.svg
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg