A plugin for effortless buffer sharing between nvim sessions.
-
send buffer
-
open BufEx menu
-
select "Send Buffer" window (press
n
to switch between windows) -
select buffer which you want to send and toggle options
-
-
select buffer
-
open BufEx menu
-
press enter on buffer which you want open
-
- host server
- create or select TCP server and host it
- in configuration change
port
,host
andlocal_server
- follow instructions from Usage Local
- Lua (build-in)
- TypeScript
- GoLang
Using vim-plug
Plug 'tomiis4/BufEx.nvim'
Using packer
use 'tomiis4/BufEx.nvim'
Using lazy
{
'tomiis4/BufEx.nvim',
dependencies = {
'nvim-tree/nvim-web-devicons', -- optional
},
lazy = true,
config = function()
require('bufex').setup({
-- config
})
end
},
require('bufex').setup()
Default configuration
require('hypersonic').setup({
transfer = {
---@type string|nil nil = name will be random selected
name = nil,
---@type string|nil password will need to be entered each time
password = nil,
opts = {
allow_edit = true,
allow_save = false, -- NOTE: WIP
---@type 'always'|'never'
need_password = 'always',
server = {
local_server = true,
port = 4200,
host = '127.0.0.1',
}
}
},
float = {
---@type 'none'|'single'|'double'|'rounded'|'solid'|'shadow'|table
border = 'rounded',
---@type number background blur: 0-100
winblend = 0,
---@type boolean allow nvim-web-devicons
icons = true,
keymap = {
next_window = 'n',
quit = 'q',
opts = {
toggle_save = 'S',
toggle_edit = 'E',
toggle_password = 'P',
continue = 'C',
}
}
}
})
- create
- TCP server
- variable
array[array[got_data, client_id]]
- got message
GET
- send all
got_data
from variable joined by,
and all wrapped in{}
- TS example:
'{' + variable.map((buf) => buf[0]).join(',') + '}'
- send all
- other message
- to variable push
[got_data, client_id]
, client_id can be anything unique
- to variable push
- user disconected (optional)
- delte from variable array with client_id
| 📄 LICENSE
| 📄 README.md
|
+-- 📁 lua
| \-- 📁 bufex
| | 📄 config.lua
| | 📄 data.lua
| | 📄 init.lua
| | 📄 utils.lua
| |
| +-- 📁 local
| | 📄 client.lua
| | 📄 local.lua
| | 📄 server.lua
| |
| \-- 📁 ui
| 📄 float.lua
| 📄 input.lua
| 📄 select.lua
|
\-- 📁 plugin
| 📄 bufex.lua
|
\-- 📁 servers
| 📄 ts/main.ts
| 📄 go/main.go
tomiis4 founder |