mirror of
https://github.com/dhruvasagar/vim-table-mode.git
synced 2025-11-12 04:53:46 -05:00
Updated README.md
This commit is contained in:
32
README.md
32
README.md
@@ -47,6 +47,7 @@ sure Tabular is installed and loaded into your runtime to ensure this works.
|
|||||||
disable the table mode. This is on a per buffer basis and so it does not
|
disable the table mode. This is on a per buffer basis and so it does not
|
||||||
cause any unusual behavior unless enabled explicitly. Please read `:h
|
cause any unusual behavior unless enabled explicitly. Please read `:h
|
||||||
table-mode` for further information.
|
table-mode` for further information.
|
||||||
|
|
||||||
- Format existing content into a table :
|
- Format existing content into a table :
|
||||||
|
|
||||||
Table Mode wouldn't justify it's name if it didn't allow formatting
|
Table Mode wouldn't justify it's name if it didn't allow formatting
|
||||||
@@ -58,11 +59,42 @@ sure Tabular is installed and loaded into your runtime to ensure this works.
|
|||||||
`:line1,line2Tableize`, but this is not that intuitive. You can also use
|
`:line1,line2Tableize`, but this is not that intuitive. You can also use
|
||||||
the mapping `<Leader>T` with a `[count]` to apply it to the next `[count]`
|
the mapping `<Leader>T` with a `[count]` to apply it to the next `[count]`
|
||||||
lines in usual vim style.
|
lines in usual vim style.
|
||||||
|
|
||||||
- Move between cells :
|
- Move between cells :
|
||||||
|
|
||||||
Now you can move between cells using table mode motions. Check `:h
|
Now you can move between cells using table mode motions. Check `:h
|
||||||
table-mode-motion-prefix` for more details.
|
table-mode-motion-prefix` for more details.
|
||||||
|
|
||||||
|
- Manipulating Table :
|
||||||
|
|
||||||
|
- Cell Text Object :
|
||||||
|
|
||||||
|
Tableize provides a text object for manipulating table cells. By default
|
||||||
|
it's `tc`, but that can be changed if you wish to by setting the
|
||||||
|
`g:table_mode_cell_text_object` option.
|
||||||
|
|
||||||
|
This is intelligent in the sense that if you use it to delete the
|
||||||
|
contents it will delete everything till the `g:table_mode_separator` so
|
||||||
|
that the cell is removed and you can enter new stuff if you wish to (had
|
||||||
|
you used 'c' operator), having to input the `g:table_mode_separator`
|
||||||
|
again to form the cell & realign it (since it can't be done from the
|
||||||
|
text object itself). However if you were to 'y' or yank the text, it
|
||||||
|
would copy the right text, i.e. the contents of the cell and nothing
|
||||||
|
else.
|
||||||
|
- Delete Row :
|
||||||
|
|
||||||
|
You can use the `<Leader>tdd` mapping defined by the option
|
||||||
|
`g:table_mode_delete_row_map` to delete the current table row (provided
|
||||||
|
you are within a table row), this can be preceeded with a [count] to
|
||||||
|
delete multiple rows just like you would with 'dd'.
|
||||||
|
|
||||||
|
- Delete Column :
|
||||||
|
|
||||||
|
You can use the `<Leader>tdc` mapping defined by the option
|
||||||
|
`g:table_mode_delete_column_map` to delete the entire current column
|
||||||
|
(provided you are within a table row), this can also be preceeded with a
|
||||||
|
[count] to delete multiple columns.
|
||||||
|
|
||||||
### Demo
|
### Demo
|
||||||
|
|
||||||
<a href="http://www.youtube.com/watch?v=sK2IH1hiDkw"><img
|
<a href="http://www.youtube.com/watch?v=sK2IH1hiDkw"><img
|
||||||
|
|||||||
Reference in New Issue
Block a user