tabular: add examples
This commit is contained in:
parent
29dc21cb26
commit
da34aa0572
80
tabular.md
80
tabular.md
|
@ -8,43 +8,103 @@ intro: |
|
||||||
[Tabular](https://github.com/godlygeek/tabular) is a Vim script for text alignment.
|
[Tabular](https://github.com/godlygeek/tabular) is a Vim script for text alignment.
|
||||||
---
|
---
|
||||||
|
|
||||||
## Examples
|
## Common usage
|
||||||
|
{: .-three-column}
|
||||||
|
|
||||||
|
### Tables
|
||||||
|
|
||||||
|
```
|
||||||
|
:Tab /|
|
||||||
|
```
|
||||||
|
{: .-setup}
|
||||||
|
|
||||||
|
```
|
||||||
|
| Fruit | Color |
|
||||||
|
| ----- | ----- |
|
||||||
|
| Apple | Red |
|
||||||
|
| Banana | Yellow |
|
||||||
|
| Kiwi | Green |
|
||||||
|
```
|
||||||
|
|
||||||
|
### Variables
|
||||||
|
|
||||||
|
```
|
||||||
|
:Tab /=
|
||||||
|
```
|
||||||
|
{: .-setup}
|
||||||
|
|
||||||
|
```
|
||||||
|
title = "Hello"
|
||||||
|
src = "image.jpg"
|
||||||
|
width = 640
|
||||||
|
```
|
||||||
|
|
||||||
|
### Colons
|
||||||
|
|
||||||
|
```
|
||||||
|
:Tab /:\zs/l0l1
|
||||||
|
```
|
||||||
|
{: .-setup}
|
||||||
|
|
||||||
|
```
|
||||||
|
title: "Hello world"
|
||||||
|
description: "This is a description"
|
||||||
|
src: "image.jpg"
|
||||||
|
height: 320
|
||||||
|
width: 640
|
||||||
|
```
|
||||||
|
|
||||||
|
## Tab command
|
||||||
{: .-three-column}
|
{: .-three-column}
|
||||||
|
|
||||||
### Basic example
|
### Basic example
|
||||||
|
|
||||||
```
|
```
|
||||||
:Tab /,
|
:Tab /:
|
||||||
```
|
```
|
||||||
{: .-setup}
|
{: .-setup}
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
hello , there
|
title : My picture
|
||||||
hi , you
|
src : img.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
### Right align
|
### Right align
|
||||||
|
|
||||||
```
|
```
|
||||||
:Tab /,/r0
|
:Tab /:/r0
|
||||||
```
|
```
|
||||||
{: .-setup}
|
{: .-setup}
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
hello,there
|
title:My picture
|
||||||
hi, you
|
src: img.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### The \zs atom
|
||||||
|
|
||||||
|
```
|
||||||
|
:Tab /:\zs
|
||||||
|
```
|
||||||
|
{: .-setup}
|
||||||
|
|
||||||
|
```
|
||||||
|
title: My picture
|
||||||
|
src: img.jpg
|
||||||
|
```
|
||||||
|
|
||||||
|
The `\zs` atom will exclude the `:` from the search match.
|
||||||
|
|
||||||
### Specifier
|
### Specifier
|
||||||
|
|
||||||
```
|
```
|
||||||
:Tab /,/r1c1l0
|
:Tab /:/r1c1l0
|
||||||
```
|
```
|
||||||
{: .-setup}
|
{: .-setup}
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
hello , etc
|
title : My picture
|
||||||
hi , etc
|
src : img.jpg
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Explanation
|
#### Explanation
|
||||||
|
|
Loading…
Reference in New Issue