终端中的表格文件
Sheets Spreadsheets in Your Terminal

原始链接: https://github.com/maaslalani/sheets

## Sheets:终端电子表格 Sheets 将电子表格功能带到你的终端。你可以启动它来直接读取通过 stdin 管道传入的 CSV 数据,或者打开现有的 CSV 文件。导航侧重于键绑定,允许使用 `h, j, k, l` 在单元格之间移动,并使用 `gg`(顶部)或 `B9`(单元格 B9)等命令快速跳转到特定位置。 Sheets 支持通过直接赋值 (`B7=10`) 和插入模式 (`i`) 修改单元格。强大的功能包括搜索 (`/`)、标记 (`ma`)、跳转列表 (`ctrl+o`) 和视觉选择 (`v`),用于复制、剪切和粘贴。公式可以在视觉模式下使用 `=` 插入。 保存、打开其他文件和退出都通过激活 `:` 的命令提示符来完成。安装很简单,可以使用 Go (`go install...`) 或下载预构建的二进制文件。该项目采用 MIT 许可,并欢迎用户反馈。

对不起。
相关文章

原文

Spreadsheets in your terminal.

Sheets

Launch the TUI

Read from stdin:

> sheets <<< ID,Name,Age
1,Alice,24
2,Bob,32
3,Charlie,26

Read a specific cell:

> sheets budget.csv B9
2760

Or, range:

> sheets budget.csv B1:B3
1200
950
810

Modify a cell:

> sheets budget.csv B7=10 B8=20
  • h, j, k, l: Move the active cell
  • gg, G, 5G, gB9: Jump to the top, bottom, a row number, or a specific cell
  • 0, ^, $: Jump to the first column, first non-empty column, or last non-empty column in the row
  • H, M, L: Jump to the top, middle, or bottom visible row
  • ctrl+u, ctrl+d: Move half a page up or down
  • zt, zz, zb,: Align the current row to the top, middle, or bottom of the window
  • /, ?: Search forward or backward
  • n, N: Repeat the last search
  • ma, 'a: Set a mark and jump back to it later
  • ctrl+o, ctrl+i: Move backward or forward through the jump list
  • q, ctrl+c: Quit
  • i, I, c: Edit the current cell, edit from the start, or clear the cell and edit
  • ESC: Leave insert, visual, or command mode
  • enter, tab, shift+tab: In insert mode, commit and move down, right, or left
  • ctrl+n, ctrl+p: In insert mode, commit and move down or up
  • o, O: Insert a row below or above and start editing
  • v, V: Start a visual selection or row selection
  • y, yy: Copy the current cell, or yank the current row(s)
  • x, p: Cut the current cell or selection, and paste the current register
  • dd: Delete the current row
  • u, ctrl+r, U: Undo and redo
  • .: Repeat the last change
  • =: In visual mode, insert a formula after the selected range =|(B1:B8).

Press : to open the command prompt, then use commands such as:

  • :w to save
  • :w path.csv to save to a new file
  • :e path.csv to open another CSV
  • :q or :wq to quit
  • :goto B9 or :B9 to jump to a cell

Install with Go:

go install github.com/maaslalani/sheets@main

Or download a binary from the releases.

MIT

I'd love to hear your feedback on improving sheets.

Feel free to reach out via:


zzz

联系我们 contact @ memedata.com