-
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 17, 2022
1 parent
8e23c89
commit 4d6901e
Showing
3 changed files
with
33 additions
and
10 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
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,21 @@ | ||
local M = {} | ||
|
||
--@param buf winbuf | ||
--@param line string | ||
function M.Header() | ||
local line = unpack(vim.api.nvim_buf_get_lines(0, 0, 1, true)) | ||
local header = {} | ||
local cout = 1 | ||
local length = 0 | ||
for i = 1, #line do | ||
if line:sub(i, i) ~= "," then | ||
length = length + 1 | ||
else | ||
table.insert(header, length) | ||
length = 0 | ||
cout = cout + 1 | ||
end | ||
end | ||
return header | ||
end | ||
return M |
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