Home

Awesome

<h1 align="center"> šŸ”„ NeoSwap.nvim </h1> <p align="center"> <a href="http://www.lua.org"> <img alt="Lua" src="https://img.shields.io/badge/Lua-blue.svg?style=for-the-badge&logo=lua" /> </a> <a href="https://neovim.io/"> <img alt="Neovim" src="https://img.shields.io/badge/NeoVim-%2357A143.svg?&style=for-the-badge&logo=neovim&logoColor=white" /> </a> </p>

demo

šŸ“¢ Introduction

NeoSwap simplifies word swapping in Neovim, making it easy to quickly rearrange words within your code.

āœØ Features

šŸ› ļø Usage

To swap the position of adjacent words to the right of the cursor, use the NeoSwapNext command:

:NeoSwapNext

To swap the position of adjacent words to the left of the cursor, use the NeoSwapNext command:

:NeoSwapPrev

You can also create keybindings to swap words more conveniently:

vim.keymap.set("n", "<leader>s", "<cmd>NeoSwapNext<cr>", { noremap = true, silent = true })
vim.keymap.set("n", "<leader>S", "<cmd>NeoSwapPrev<cr>", { noremap = true, silent = true })

šŸ“¦ Installation

  1. Install via your favorite package manager.
{
  "ecthelionvi/NeoSwap.nvim",
  opts = {}
},
use "ecthelionvi/NeoSwap.nvim"
  1. Setup the plugin in your init.lua. This step is not needed with lazy.nvim if opts is set as above.
require("NeoSwap").setup()

šŸ™ Acknowledgments

Special thanks to LostNeophyte for their contributions to the development of NeoSwap. Your help is greatly appreciated!