nvim-old
This commit is contained in:
parent
dbba54cfd8
commit
6380f390ea
26 changed files with 2704 additions and 0 deletions
19
nvim-old/lua/tmux_split_even_horizontal.lua
Normal file
19
nvim-old/lua/tmux_split_even_horizontal.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
local M = {}
|
||||
|
||||
function M.tmux_split_even_horizontal()
|
||||
local status, err = pcall(function()
|
||||
local filepath = vim.fn.expand('%:p')
|
||||
if filepath ~= '' then
|
||||
local tmux_command = "tmux split-window -h -c '" .. vim.fn.expand('%:p:h') ..
|
||||
"' && tmux send-keys -t '.tmux.active-pane' 'nvim " ..
|
||||
vim.fn.shellescape(filepath) .. "' Enter && tmux select-layout even-horizontal"
|
||||
vim.fn.system(tmux_command)
|
||||
end
|
||||
end)
|
||||
if not status then
|
||||
print("Error in tmux_split_even_horizontal: " .. err)
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue