-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: open currently visible splits as yazi tabs (opt-in) (#359)
If you have multiple splits open in Neovim, yazi will now open all of them in tabs when you open yazi. This is useful when you want to perform file operations to whatever you are working on. This feature is off by default. To enable it, you can set `open_multiple_tabs = true` in your configuration. By default, the number keys currently switch between tabs. See all the default keybindings here: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml Limitations: - the bleeding edge yazi version from yesterday is required (sxyazi/yazi@dac72eb) - yazi can only display up to 9 paths, so only the first 9 files will be opened in tabs
- Loading branch information
1 parent
46bac67
commit c57a4ea
Showing
21 changed files
with
267 additions
and
88 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 |
---|---|---|
|
@@ -36,19 +36,19 @@ jobs: | |
# yazi-fm is the `yazi` executable | ||
crate: yazi-fm | ||
git: https://github.com/sxyazi/yazi | ||
# feat: new extract builtin plugin for archive extracting (#1321) | ||
# https://github.com/sxyazi/yazi/commit/bce0fc1175c855ecb2dbee6f8575857b1e9616d4 | ||
commit: bce0fc1175c855ecb2dbee6f8575857b1e9616d4 | ||
# feat: start with multiple tabs with different paths (#1443) | ||
# https://github.com/sxyazi/yazi/commit/dac72eb39a846d15db7f1a7c54e9261675a90e53 | ||
commit: dac72eb39a846d15db7f1a7c54e9261675a90e53 | ||
|
||
- name: Compile and install yazi from source | ||
uses: baptiste0928/[email protected] | ||
with: | ||
# yazi-cli is the `ya` command line interface | ||
crate: yazi-cli | ||
git: https://github.com/sxyazi/yazi | ||
# feat: new extract builtin plugin for archive extracting (#1321) | ||
# https://github.com/sxyazi/yazi/commit/bce0fc1175c855ecb2dbee6f8575857b1e9616d4 | ||
commit: bce0fc1175c855ecb2dbee6f8575857b1e9616d4 | ||
# feat: start with multiple tabs with different paths (#1443) | ||
# https://github.com/sxyazi/yazi/commit/dac72eb39a846d15db7f1a7c54e9261675a90e53 | ||
commit: dac72eb39a846d15db7f1a7c54e9261675a90e53 | ||
|
||
- name: Run tests | ||
uses: nvim-neorocks/[email protected] | ||
|
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
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
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
20 changes: 20 additions & 0 deletions
20
integration-tests/cypress/e2e/using-ya-to-read-events/utils/yazi-utils.ts
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,20 @@ | ||
import { flavors } from "@catppuccin/palette" | ||
import { rgbify } from "./hover-utils" | ||
|
||
const darkTheme = flavors.macchiato.colors | ||
|
||
export function isFileSelectedInYazi(text: string): void { | ||
cy.contains(text).should( | ||
"have.css", | ||
"background-color", | ||
rgbify(darkTheme.text.rgb), | ||
) | ||
} | ||
|
||
export function isFileNotSelectedInYazi(text: string): void { | ||
cy.contains(text).should( | ||
"have.css", | ||
"background-color", | ||
rgbify(darkTheme.base.rgb), | ||
) | ||
} |
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
8 changes: 8 additions & 0 deletions
8
...ests/test-environment/config-modifications/modify_yazi_config_and_open_multiple_files.lua
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,8 @@ | ||
---@module "yazi" | ||
|
||
require("yazi").setup( | ||
---@type YaziConfig | ||
{ | ||
open_multiple_tabs = true, | ||
} | ||
) |
Oops, something went wrong.