mirror of
https://github.com/zaphar/sheetsui.git
synced 2025-07-22 13:00:22 -04:00
parent
8af5212e5c
commit
753874687c
@ -40,11 +40,11 @@ The interface will start out in navigation mode. You can navigate around the tab
|
||||
* `Ctrl-n` moves to the next sheet
|
||||
* `Ctrl-p` moves to the prev sheet
|
||||
|
||||
Sheet navigation moves loops around when it hits the end or beginning sheets.
|
||||
Sheet navigation moving will loop around when you reach the ends.
|
||||
|
||||
**Numeric prefixes**
|
||||
|
||||
You can prefix each of the keybinds above with a numeric prefix to do them that many times. So `typing 123h` will move to the left 123 times. Hitting `Esc` will clear the numeric prefix if you want to cancel it.
|
||||
You can prefix each of the keybinds above with a numeric prefix to do them that many times. So typing `123h` will move to the left 123 times. Hitting `Esc` will clear the numeric prefix if you want to cancel it.
|
||||
|
||||
**Modifying the Sheet or Cells**
|
||||
|
||||
@ -84,13 +84,13 @@ You enter command mode by typing `:` while in navigation mode. You can then type
|
||||
|
||||
The currently supported commands are:
|
||||
|
||||
* `write [path]` save the current spreadsheet. If the path is provided it will save it to that path. If omitted it will save to the path you are currently editing.
|
||||
* `insert-row [number]` Inserts a row into the sheet at your current row. If the number is provided then inserts that many rows. If omitted then just inserts one.
|
||||
* `insert-column [number]` Just line `insert-row` but for columns.
|
||||
* `write [path]` save the current spreadsheet. If the path is provided it will save it to that path. If omitted it will save to the path you are currently editing. `w` is a shorthand alias for this command.
|
||||
* `insert-rows [number]` Inserts a row into the sheet at your current row. If the number is provided then inserts that many rows. If omitted then just inserts one.
|
||||
* `insert-cols [number]` Just line `insert-rows` but for columns.
|
||||
* `rename-sheet [idx] <name>` rename a sheet. If the idx is provide then renames that sheet. If omitted then it renames the current sheet.
|
||||
* `new-sheet [name]` Creates a new sheet. If the name is provided then uses that. If omitted then uses a default sheet name.
|
||||
* `select-sheet <name>` Select a sheet by name.
|
||||
* `edit <path>` Edit a new spreadsheet at the current path.
|
||||
* `quit` Quits the application
|
||||
* `edit <path>` Edit a new spreadsheet at the current path. `e` is a shorthand alias for this command.
|
||||
* `quit` Quits the application. `q` is a shorthand alias for this command.
|
||||
|
||||
<aside>Note that in the case of quit and edit that we do not currently prompt you if the current spreadsheet has not been saved yet. So your changes will be discarded if you have not saved first.</aside>
|
||||
<aside>Note that in the case of `quit` and `edit` that we do not currently prompt you if the current spreadsheet has not been saved yet. So your changes will be discarded if you have not saved first.</aside>
|
||||
|
@ -108,7 +108,7 @@ fn try_consume_new_sheet<'cmd, 'i: 'cmd>(
|
||||
return Ok(None);
|
||||
}
|
||||
if input.remaining() > 0 && !is_ws(&mut input) {
|
||||
return Err("Invalid command: Did you mean to type `write <arg>`?");
|
||||
return Err("Invalid command: Did you mean to type `new-sheet <arg>`?");
|
||||
}
|
||||
let arg = input.span(0..).trim();
|
||||
return Ok(Some(Cmd::NewSheet(if arg.is_empty() {
|
||||
@ -129,11 +129,11 @@ fn try_consume_select_sheet<'cmd, 'i: 'cmd>(
|
||||
return Ok(None);
|
||||
}
|
||||
if input.remaining() > 0 && !is_ws(&mut input) {
|
||||
return Err("Invalid command: Did you mean to type `write <sheet-name>`?");
|
||||
return Err("Invalid command: Did you mean to type `select-sheet <sheet-name>`?");
|
||||
}
|
||||
let arg = input.span(0..).trim();
|
||||
if arg.is_empty() {
|
||||
return Err("Invalid command: Did you forget the sheet name? `write <sheet-name>`?");
|
||||
return Err("Invalid command: Did you forget the sheet name? `select-sheet <sheet-name>`?");
|
||||
}
|
||||
return Ok(Some(Cmd::SelectSheet(arg)));
|
||||
}
|
||||
@ -189,7 +189,7 @@ fn try_consume_insert_column<'cmd, 'i: 'cmd>(
|
||||
if let Ok(count) = arg.parse() {
|
||||
count
|
||||
} else {
|
||||
return Err("You must pass in a non negative number for the row count");
|
||||
return Err("You must pass in a non negative number for the column count");
|
||||
}
|
||||
})));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user