-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
cht
committed
Feb 16, 2022
1 parent
16e5796
commit e9813a2
Showing
4 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# CSV-tools | ||
|
||
## Setup | ||
should not setup or | ||
|
||
```lua | ||
require("csvtools").setup({ | ||
before = 5, | ||
after = 5, | ||
}) | ||
``` | ||
|
||
the number should be as small as possible | ||
|
||
Above is the default setting | ||
|
||
## Defaut key | ||
|
||
| command | use | | ||
| -- | -- | | ||
| TopWindow | open a top window to show the key of csv| | ||
| CloseWindow | close the top window| | ||
|
||
| key | use | | ||
| -- | -- | | ||
|\<leader\> td| close the topwindow ,both topwindow and csv buffer has | | ||
|\<leader\> tf| open a new topwindow | | ||
|
||
## TODO | ||
|
||
* Make the top line and csv shown as a table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
au BufRead,BufNewFile *.csv,*.dat,*.tsv,*.tab set filetype=csv | ||
au FileType csv command! -buffer CloseTopWindow lua require"csvtools".CloseWindow() | ||
au FileType csv command! -buffer TopWindow lua require"csvtools".NewWindow() | ||
"au FIiletype csv autocmd CursorMoved csv lua require"csvtools".Highlight() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
au FileType csv lua require"csvtools".NewWindow() | ||
"au FileType csv lua require"csvtools".NewWindow() | ||
au FileType csv lua require"csvtools".add_mappings() | ||
hi def link WhidHeader Number | ||
hi def link WhidSubHeader Statement |