spywhere / tmux.nvim Goto Github PK
View Code? Open in Web Editor NEWneovim plugin for turning neovim into terminal multiplexer
License: MIT License
neovim plugin for turning neovim into terminal multiplexer
License: MIT License
Bitmap
00000 1 22222 33333 4 4 55555 66666 77777 88888 99999
0 0 1 2 3 4 4 5 6 7 8 8 9 9 :
0 0 1 22222 33333 44444 55555 66666 7 88888 99999
0 0 1 2 3 4 5 6 6 7 8 8 9 :
00000 1 22222 33333 4 55555 66666 7 88888 99999
Bitmap encoded into numbers
[x, y]=0123456789:
[0, 0]=10111111110 1534
[1, 0]=10110111110 1470
[2, 0]=10110111110 1470
[3, 0]=10110111110 1470
[4, 0]=11111111110 2046
[0, 1]=10001110110 1142
[1, 1]=00000000000 0
[2, 1]=00000000001 1
[3, 1]=00000000000 0
[4, 1]=11111001110 1998
[0, 2]=10111110110 1526
[1, 2]=00111110110 502
[2, 2]=00111110110 502
[3, 2]=00111110110 502
[4, 2]=11111111110 2046
[0, 3]=10100010100 1300
[1, 3]=00000000000 0
[2, 3]=00000000001 1
[3, 3]=00000000000 0
[4, 3]=11011111110 1790
[0, 4]=10110110110 1462
[1, 4]=10110110110 1462
[2, 4]=10110110110 1462
[3, 4]=10110110110 1462
[4, 4]=11111111110 2046
Code to generate encoded bitmap
function digit(x, y)
local y_2 = y % 2
local ey = y // 2
local oy = (y - 1) // 2
if x == 4 then
if y_2 == 0 then
return 2046
else
return 1998 - 208 * oy
end
elseif y == 4 then
return 1462
elseif x == 0 then
if y_2 == 0 then
return 1534 - 8 * ey
else
return 1142 + 158 * oy
end
elseif y_2 == 0 then
return 1470 - 968 * ey
elseif y_2 == 1 then
return 1 - (x % 2)
end
return 0
end
local time = os.date('*t')
local hour = time.hour
local minute = time.min
-- local hour = time.min
-- local minute = time.sec
for y=0, 4 do
local str = ''
for c=0, 4 do
local ch = '#'
local n = 0
if c == 0 then
n = hour // 10
-- ch = tostring(n)
elseif c == 1 then
n = hour % 10
-- ch = tostring(n)
elseif c == 2 then
n = 10 + (time.sec % 2)
-- ch = ':'
elseif c == 3 then
n = minute // 10
-- ch = tostring(n)
elseif c == 4 then
n = minute % 10
-- ch = tostring(n)
end
for x=0, 4 do
local d = digit(x, y)
if (d >> (10 - n)) & 1 == 1 then
str = str .. ch
else
str = str .. ' '
end
end
str = str .. ' | '
end
print(str)
end
Commands such as resize the pane are expected to be repeatable, that is to be able to hold the key sequence to repeat the operation. Currently this would get consumed by vim as the sequence is required 2 steps (prefix then the key).
Create a custom key map table. Pressing prefix would rebind all vim key map to all key bindings starts with prefix. Then if there is no key press after certain amount of time, cancelled the key map back to the previous one.
This would mimicking a custom mode in vim, where pressing prefix could put vim into "tmux" mode.
Use vim count to repeat the key bindings for certain amount of times.
Make a first release of tmux.nvim by providing a basic support for all default key bindings
C-b
Send the prefix key (C-b) through to the application.C-o
Rotate the panes in the current window forwards.!
Break the current pane out of the window."
Split the current pane into two, top and bottom.#
List all paste buffers.%
Split the current pane into two, left and right.&
Kill the current window.'
Prompt for a window index to select.,
Rename the current window.-
Delete the most recently copied buffer of text..
Prompt for an index to move the current window.0
to 9
Select windows 0 to 9.:
Enter the tmux command prompt.;
Move to the previously active pane.=
Choose which buffer to paste interactively from a list.?
List all key bindings.[
Enter copy mode to copy text or view the history.]
Paste the most recently copied buffer of text.c
Create a new window.f
Prompt to search for text in open windows.i
Display some information about the current window.l
Move to the previously selected window.m
Mark the current pane (see select-pane -m).M
Clear the marked pane.n
Change to the next window.o
Select the next pane in the current window.p
Change to the previous window.q
Briefly display pane indexes.r
Force redraw of the attached client.t
Show the time. #3w
Choose the current window interactively.x
Kill the current pane.z
Toggle zoom state of the current pane.{
Swap the current pane with the previous pane.}
Swap the current pane with the next pane.~
Show previous messages from tmux, if any.Page Up
Enter copy mode and scroll one page up.Up
, Down
, Left
, Right
Change to the pane above, below, to the left, or to the right of the current pane.M-1
to M-5
Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled.Space
Arrange the current window in the next preset layout.M-n
Move to the next window with a bell or activity marker.M-o
Rotate the panes in the current window backwards.M-p
Move to the previous window with a bell or activity marker.C-Up
, C-Down
, C-Left
, C-Right
Resize the current pane in steps of one cell.M-Up
, M-Down
, M-Left
, M-Right
Resize the current pane in steps of five cells.Repeatable key bindings will be addressed separately.
More key bindings are planned after client attach and detach is supported.
These are keybindings that involve a client attach and detach feature...
$
Rename the current session.C-z
Suspend the tmux client.(
Switch the attached client to the previous session.)
Switch the attached client to the next session.D
Choose a client to detach.L
Switch the attached client back to the last session.d
Detach the current client.s
Select a new session for the attached client interactively.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.