-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add mapping to toggle full window width #82
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This is a comment to avoid closing :-/ |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This is another comment to avoid closing :-/ |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
! |
. |
This seems to do what you are asking for: -- centers the editor to the screen
{
"folke/zen-mode.nvim",
config = function()
require("zen-mode").setup({
window = {
width = .70
},
plugins = {
options = {
-- you may turn on/off statusline in zen mode by setting 'laststatus'
-- statusline will be shown only if 'laststatus' == 3
laststatus = 3, -- turn off the statusline in zen mode
}
}
})
vim.keymap.set("n", "<leader>z", ":ZenMode<CR>", {desc="Toggle zen mode"})
end,
} |
@majordoobie Well you're basically just configuring the |
The toggle I made disables zen, doesn't that do the same thing? Gives you 100% of your view. |
Not sure I can follow: I already have a mapping for But what I want is, when zen mode is active I still want more control over the window width. E.g. I want to go from 120 width to 100% width (and back). |
Did you check the docs?
Is your feature request related to a problem? Please describe.
While a window width of 120 is perfect for most code it would be nice to toggle to full width when checking a log file.
Describe the solution you'd like
I suggest a key mapping like
f
to toggle full width. The mapping should be restricted to the zen window.Describe alternatives you've considered
I've tried to add a mapping via
on_open
but I failed due to 2 problems:window.width
config while the window is openf
mapping is also still active when the zen window is closed.Additional context
No response
The text was updated successfully, but these errors were encountered: