{"id":14981714,"url":"https://github.com/sontungexpt/smart-resizing","last_synced_at":"2025-10-29T07:32:40.816Z","repository":{"id":251840468,"uuid":"838602953","full_name":"sontungexpt/smart-resizing","owner":"sontungexpt","description":"The built-in function help you improve the resizing behavior of neovim","archived":false,"fork":false,"pushed_at":"2024-08-07T03:40:50.000Z","size":16,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T23:35:16.964Z","etag":null,"topics":["lua","neovim","nvim","plugin","resizing","window"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sontungexpt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-06T01:51:34.000Z","updated_at":"2024-08-07T03:40:53.000Z","dependencies_parsed_at":"2024-09-24T07:30:24.127Z","dependency_job_id":null,"html_url":"https://github.com/sontungexpt/smart-resizing","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"cf87d0129b67cf254632ba3e76d771dc9754edf5"},"previous_names":["sontungexpt/smart-resizing"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fsmart-resizing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fsmart-resizing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fsmart-resizing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fsmart-resizing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sontungexpt","download_url":"https://codeload.github.com/sontungexpt/smart-resizing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238791894,"owners_count":19531027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","neovim","nvim","plugin","resizing","window"],"created_at":"2024-09-24T14:04:06.328Z","updated_at":"2025-10-29T07:32:35.483Z","avatar_url":"https://github.com/sontungexpt.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"The built-in function help you improve the resizing behavior of neovim.\n\nThis is just a sudden thought, so there may be many functions that are not reasonable. Please give me your feedback.\n\n## Installation\n\n```lua\n\n    --lazy\n    {\n        lazy = true,\n        \"sontungexpt/smart-resizing.nvim\",\n    }\n\n```\n\n## Features\n\n### 🖼️ **Smart Window Resizing:**\n\n- **Calculate the area with a lot of empty space compared to the total window and resize based on that.**\n\n  - Compared with the middle position of vim and choose the side with the most empty space to maximize and least empty space to minimize.\n\n  - If the height cannot be resized further, the window will glide to the bottommost or rightmost position.\n\n### 🚀 **Speed Up When Holding:**\n\n- **Hold the Keybinding:**\n  - When you hold the keybinding, the window will resize faster, allowing you to quickly adjust the window size.\n\n✨ **Elevate your productivity with effortless window management!** Experience a more organized and efficient workspace with just a few keystrokes. 🚀\n\n## What's Bad?\n\nWhen there are more than 3 windows in a direction, the resizing behavior can feel uncomfortable. (It's not very bad, but for me, it sometimes feels uncomfortable, and I still haven't found a better behavior to solve this).\n\nBut I think it's find than the default behavior of neovim since there never seems to be more than 3 windows in a direction.\n\n## Preiview\n\nhttps://github.com/user-attachments/assets/0c87fc05-2415-4470-823e-f88b15e68465\n\nhttps://github.com/user-attachments/assets/3a958a6b-59c6-433b-9585-0afe02ed49b6\n\nhttps://github.com/user-attachments/assets/a0d5861c-930f-4ee9-b558-feaa786bed81\n\n## Usage\n\nBecause this plugin is just contain a builtin function, you need to map it to a keybinding.\nlike this:\n\n```lua\n    -- recommended to use this function since it has a speed up behavior when you hold the keybinding\n    -- You should map the keybinding with the modifier key + h/j/k/l\n\n    vim.keymap.set(\"n\", \"\u003cA-h\u003e\", function() require(\"smart-resizing\").adjust_current_win_width(1, 1) end)\n    vim.keymap.set(\"n\", \"\u003cA-l\u003e\", function() require(\"smart-resizing\").adjust_current_win_width(1, 2) end)\n    vim.keymap.set(\"n\", \"\u003cA-j\u003e\", function() require(\"smart-resizing\").adjust_current_win_height(1, 1) end)\n    vim.keymap.set(\"n\", \"\u003cA-k\u003e\", function() require(\"smart-resizing\").adjust_current_win_height(1, 2) end)\n```\n\n## Built-in function\n\n### Action:\n\n- 1: decrease\n- 2: increase\n\nYou can access this enum by `require(\"smart-resizing\").Action`\n\n### Dimension:\n\n- 1: height\n- 2: width\n\nYou can access this enum by `require(\"smart-resizing\").Dimension`\n\n### Functions:\n\n- `adjust_current_win_width(step, action)`: adjust the width of the current window (speed up behavior when you hold the keybinding)\n\n  - `adjust_current_win_width(1, 1)`: decrease the width of the current window by 1\n  - `adjust_current_win_width(1, 2)`: increase the width of the current window by 1\n\n- `adjust_current_win_height(step, action)`: adjust the height of the current window (speed up behavior when you hold the keybinding)\n\n  - `adjust_current_win_height(1, 1)`: decrease the height of the current window by 1\n  - `adjust_current_win_height(1, 2)`: increase the height of the current window by 1\n\n- `increase_current_win_size(step, dimension)`: increase the size of the current window\n\n  - `increase_current_win_size(1, 1)`: increase the height of the current window by 1\n  - `increase_current_win_size(1, 2)`: increase the width of the current window by 1\n\n- `decrease_current_win_size(step, dimension)`: decrease the size of the current window\n\n  - `decrease_current_win_size(1, 1)`: decrease the height of the current window by 1\n  - `decrease_current_win_size(1, 2)`: decrease the width of the current window by 1\n\n- `increase_current_win_width(step)`: increase the width of the current window by 1\n\n- `decrease_current_win_width(step)`: decrease the width of the current window by 1\n\n- `increase_current_win_height(step)`: increase the height of the current window by 1\n\n- `decrease_current_win_height(step)`: decrease the height of the current window by 1\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsontungexpt%2Fsmart-resizing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsontungexpt%2Fsmart-resizing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsontungexpt%2Fsmart-resizing/lists"}