diff --git a/docs/configuration/keymap.md b/docs/configuration/keymap.md index e4c28035..fbb349e9 100644 --- a/docs/configuration/keymap.md +++ b/docs/configuration/keymap.md @@ -101,6 +101,19 @@ If you haven't created and used your own configuration file yet, please see [Con - rename: Rename a file or directory. - `--force`: Overwrite the destination file directly if it exists, without showing the confirmation dialog. + - `--cursor`: Specify the cursor position of the renaming input box. + - `"end"`: The end of the filename. + - `"start"`: The start of the filename. + - `"before_ext"`: Before the extension of the filename. + - `--empty`: Empty a part of the filename. + - `"stem"`: Empty the stem. e.g. `"foo.jpg"` -> `".jpg"`. + - `"ext"`: Empty the extension. e.g. `"foo.jpg"` -> `"foo."`. + - `"dot_ext"`: Empty the dot and extension. e.g. `"foo.jpg"` -> `"foo"`. + - `"all"`: Empty the whole filename. e.g. `"foo.jpg"` -> `""`. + + You can also use `--cursor` with `--empty`, for example, `rename --empty=stem --cursor=start` will empty the file's stem, and move the cursor to the start. + + Which causes the input box content for the filename `foo.jpg` to be `|.jpg`, where "|" represents the cursor position. - copy: Copy the path of files or directories that are selected or hovered on. diff --git a/docs/plugins/layout.md b/docs/plugins/layout.md index 4b70d333..1298bba7 100644 --- a/docs/plugins/layout.md +++ b/docs/plugins/layout.md @@ -190,6 +190,10 @@ You can also use `ui.Paragraph.parse(string)` to parse an [ANSI escape sequence] Methods (all methods return `self`): - `ui.Paragraph:style(style)` - Set the style of the paragraph, which accepts a [Style](#uistyle) +- `ui.Paragraph.wrap(wrap)` - Set the wrap of the paragraph, which accepts the following constants: + - `ui.Paragraph.WRAP_NO` - No wrap + - `ui.Paragraph.WRAP` - Wrap at the end of the line + - `ui.Paragraph.WRAP_TRIM` - Wrap at the end of the line, and trim the leading whitespace - `ui.Paragraph:align(alignment)` - Set the alignment of the paragraph. It accepts the following constants: - `ui.Paragraph.LEFT` - `ui.Paragraph.CENTER`