Skip to content

Lua plugin to swap buffers easily between split windows without changing the window layout

License

Notifications You must be signed in to change notification settings

dmolin/swap-buffers.nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Lua plugin to swap buffers easily between split windows without changing the window layout

NOTE: this was born as a fork of swap-buffers.nvim, with further tweakings and refinements.

How to use

call the lua function swap_buffers giving it on of h j k l as a parameter:

nnoremap <C-h> <cmd>lua require('swap-buffers').swap_buffers('h')<CR>

This will map Ctrl-h to swap the current buffer with the one on the left. The same can be done for right, top and bottom.

Configuration

Default values:

require('swap-buffers').setup({
  ignore_filetypes = {'NvimTree'}
})

Installation

Using packer.nvim

require('packer').startup {
  use {"caenrique/swap-buffers.nvim"}
}

About

Lua plugin to swap buffers easily between split windows without changing the window layout

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%