mirror of
https://github.com/amix/vimrc
synced 2024-12-20 17:03:09 +00:00
85 lines
1.7 KiB
Text
85 lines
1.7 KiB
Text
Before:
|
|
let &gdefault = 1
|
|
|
|
After:
|
|
let &gdefault = 0
|
|
|
|
Given markdown;
|
|
| normal |no space| 2 spaces ||
|
|
| - |-| --- ||
|
|
| normal |no space| 2 spaces ||
|
|
|
|
Execute (format unformatted table):
|
|
TableFormat
|
|
|
|
Expect (table is formatted):
|
|
| normal | no space | 2 spaces | |
|
|
|--------|----------|----------|--|
|
|
| normal | no space | 2 spaces | |
|
|
|
|
Given markdown;
|
|
| a | b |
|
|
|---|---|
|
|
| c | d |
|
|
|
|
Execute (format well formatted table):
|
|
TableFormat
|
|
|
|
Expect (table is not modified):
|
|
| a | b |
|
|
|---|---|
|
|
| c | d |
|
|
|
|
Given markdown (indented table);
|
|
| a | b |
|
|
|---|---|
|
|
| c | d |
|
|
|
|
Execute (format well formatted, indented table):
|
|
TableFormat
|
|
|
|
Expect (table is not modified):
|
|
| a | b |
|
|
|---|---|
|
|
| c | d |
|
|
|
|
Given markdown;
|
|
| left |right| center ||
|
|
| :- | --: |:---:|:|
|
|
| left |right| center ||
|
|
|
|
Execute (format table with colons):
|
|
TableFormat
|
|
|
|
Expect (preserve colons to align text):
|
|
| left | right | center | |
|
|
|:-----|------:|:------:|:--|
|
|
| left | right | center | |
|
|
|
|
Given markdown (indented table with colons);
|
|
| left |right| center ||
|
|
| :- | --: |:---:|:|
|
|
| left |right| center ||
|
|
|
|
Execute (format indented table with colons):
|
|
TableFormat
|
|
|
|
Expect (preserve colons to align text):
|
|
| left | right | center | |
|
|
|:-----|------:|:------:|:--|
|
|
| left | right | center | |
|
|
|
|
Given markdown (borderless table);
|
|
left |right| center
|
|
:- | --: |:---:
|
|
left |right| center
|
|
|
|
Execute (format borderless table):
|
|
let g:vim_markdown_borderless_table = 1
|
|
TableFormat
|
|
unlet g:vim_markdown_borderless_table
|
|
|
|
Expect (table with borders):
|
|
| left | right | center |
|
|
|:-----|------:|:------:|
|
|
| left | right | center |
|