Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riddlew/swap-split.nvim
Swaps your current split with another split
https://github.com/riddlew/swap-split.nvim
Last synced: 13 days ago
JSON representation
Swaps your current split with another split
- Host: GitHub
- URL: https://github.com/riddlew/swap-split.nvim
- Owner: riddlew
- Created: 2022-11-16T17:11:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-16T09:01:22.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T22:54:09.114Z (3 months ago)
- Language: Lua
- Size: 126 KB
- Stars: 39
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# swap-split.nvim
A plugin for NVIM to help you easily swap your split buffers.
![Demo Video](./screenshots/demo.gif)
## Installation
Install using your favorite package manager.
Packer:
`use 'xorid/swap-split.nvim'`## Configuration
While it's not required to use swap-split, you can call the setup funciton if you wish to make any changes to the default settings. Currently, there is only one option, which is the filetypes you want to ignore.
```lua
-- Default settings
require("swap-split").setup({
ignore_filetypes = {
"NvimTree"
}
})
```### Keybinds
The swap function is unbound by default. You can either bind it to the command `:SwapSplit` or as a lua call `require('swap-split').swap()`
Vimscript:
```
nnoremap S SwapSplit
" -- or --
nnoremap S lua require("swap-split").swap()
```Lua:
```lua
local map = vim.api.nvim_set_keymap
map('n', 'S', 'SwapSplit', { noremap = true })
-- or --
local map = vim.api.nvim_set_keymap
map('n', 'S', 'lua require("swap-split").swap()', { noremap = true })
```### Selector Color
Customize this by setting the color of the highlight group `SwapSplitStatusLine`.For example:
`hi SwapSplitStatusLine guifg=#000000 fuibg=#ff8383`