Skip to content

Commit

Permalink
Auto-generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 20, 2024
1 parent 255e949 commit e20fad9
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion doc/winmove.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,21 @@ active during modes.
right = "l", -- Swap right
},
},
resize = {
highlight = "Todo", -- Highlight group for resize mode
default_resize_count = 3, -- Default amount to resize windows
keymaps = {
-- When resizing, the anchor is in the top-left corner of the window by default
left = "h", -- Resize to the left
down = "j", -- Resize down
up = "k", -- Resize up
right = "l", -- Resize to the right
left_botright = "<c-h>", -- Resize left with bottom-right anchor
down_botright = "<c-j>", -- Resize down with bottom-right anchor
up_botright = "<c-k>", -- Resize up with bottom-right anchor
right_botright = "<c-l>", -- Resize right with bottom-right anchor
},
},
},
})
<
Expand Down Expand Up @@ -125,7 +140,8 @@ Get the current version of `winmove`.

WINMOVE.CURRENT_MODE

Check which mode is currently active. Returns `"move"`, `"swap"`, or `nil`.
Check which mode is currently active. Returns `"move"` (`winmove.Mode.Move`),
`"swap"` (`winmove.Mode.Swap`), `"resize"` (`winmove.Mode.Resize`), or `nil`.


WINMOVE.START_MODE
Expand All @@ -140,6 +156,7 @@ Start a mode.
winmove.start_mode(winmove.Mode.Move)
winmove.start_mode("swap")
winmove.start_mode("move")
winmove.start_mode(winmove.Mode.Resize)
<


Expand Down Expand Up @@ -225,6 +242,34 @@ with another window will swap the two selected windows.
<


WINMOVE.RESIZE_WINDOW

Resize a window (does not need to be the current window). The window can be
resized relative to an anchor in the top-left or bottom-right corner of the
window.

Resizing respects the global `winwidth`/`winminwidth` and
`winheight`/`winminheight` options respectively, with the largest value taking
priority. If a window being resized would shrink another window’s size beyond
the values of those options, the whole row/column of windows are adjusted
except if all windows in the direction of resizing are as small as they can
get.

See |winmove-this-showcase|.

>lua
---@param win_id integer
---@param dir winmove.Direction
---@param count integer
---@param anchor winmove.ResizeAnchor?
winmove.resize_window(win_id, dir, count, anchor)

-- Example:
winmove.resize_window(1000, "j", 3, winmove.ResizeAnchor.TopLeft)
winmove.resize_window(1000, "l", 1, winmove.ResizeAnchor.BottomRight)
<


CONTRIBUTING *winmove-contributing*

See here </CONTRIBUTING.md>.
Expand Down Expand Up @@ -271,6 +316,15 @@ windows, splitting into a window will move it next to a target window.
https://github.com/user-attachments/assets/4bf49e27-d08b-4926-9f17-57bf2e702c64


RESIZING WINDOWS ~


https://github.com/user-attachments/assets/8f77c9c4-dca1-4647-9049-8695e5351431


https://github.com/user-attachments/assets/8f1fff43-2830-48f5-a29b-0b1aa7d865b2


MOVING AS FAR AS POSSIBLE IN A DIRECTION ~


Expand Down

0 comments on commit e20fad9

Please sign in to comment.