.
This commit is contained in:
parent
725d1d1ead
commit
dc6995c0e1
4 changed files with 43 additions and 10 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
fontname=IBM Plex Mono 13
|
fontname=IBM Plex Mono 13
|
||||||
selchars=-A-Za-z0-9,./?%&#:_
|
selchars=-A-Za-z0-9,./?%&#:_
|
||||||
scrollback=1000
|
scrollback=1000
|
||||||
bgcolor=rgba(0,0,0,0.64)
|
bgcolor=rgba(3,5,3,0.734266)
|
||||||
fgcolor=rgb(222,221,218)
|
fgcolor=rgb(222,221,218)
|
||||||
palette_color_0=rgb(0,0,0)
|
palette_color_0=rgb(0,0,0)
|
||||||
palette_color_1=rgb(192,28,40)
|
palette_color_1=rgb(192,28,40)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
local lexers = vis.lexers
|
local lexers = vis.lexers
|
||||||
local colors = {
|
local colors = {
|
||||||
['bg'] = '#010101',
|
['bg'] = '#00000000',
|
||||||
['fg'] = '#aaaaaa',
|
['fg'] = '#aaaaaa',
|
||||||
--['bg'] = '#eeeeee',
|
--['bg'] = '#eeeeee',
|
||||||
--['fg'] = '#010101',
|
--['fg'] = '#010101',
|
||||||
|
|
@ -62,7 +62,7 @@ lexers.STYLE_CURSOR_LINE = 'back:'..colors.dim1 -- cursor line
|
||||||
lexers.STYLE_COLOR_COLUMN = lexers.STYLE_CURSOR_LINE -- color column
|
lexers.STYLE_COLOR_COLUMN = lexers.STYLE_CURSOR_LINE -- color column
|
||||||
lexers.STYLE_SELECTION = 'back:'..colors.ylw -- visual selection
|
lexers.STYLE_SELECTION = 'back:'..colors.ylw -- visual selection
|
||||||
lexers.STYLE_STATUS = 'fore:'..colors.bblk..',back:'..colors.dim2 -- inactive statusline
|
lexers.STYLE_STATUS = 'fore:'..colors.bblk..',back:'..colors.dim2 -- inactive statusline
|
||||||
lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.fg..',back:'..colors.dim2 -- active statusline
|
lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.fg..',back:'..colors.bg -- active statusline
|
||||||
lexers.STYLE_SEPARATOR = lexers.STYLE_COMMENT -- vertical split color
|
lexers.STYLE_SEPARATOR = lexers.STYLE_COMMENT -- vertical split color
|
||||||
lexers.STYLE_BRACKETS = 'fore:'..colors.red..',bold' -- matched brackets, e.g [__]__
|
lexers.STYLE_BRACKETS = 'fore:'..colors.red..',bold' -- matched brackets, e.g [__]__
|
||||||
lexers.STYLE_INFO = 'bold' -- messages from `vis:info()`
|
lexers.STYLE_INFO = 'bold' -- messages from `vis:info()`
|
||||||
|
|
|
||||||
|
|
@ -23,13 +23,46 @@ vis.events.subscribe(vis.events.INIT, function()
|
||||||
vis:map(vis.modes.NORMAL, ' d', '"+d')
|
vis:map(vis.modes.NORMAL, ' d', '"+d')
|
||||||
vis:map(vis.modes.NORMAL, ' x', '"+x')
|
vis:map(vis.modes.NORMAL, ' x', '"+x')
|
||||||
|
|
||||||
vis:map(vis.modes.NORMAL, ' m', function()
|
vis:command_register("grep", function(argv, force, win, selection, range)
|
||||||
|
local text = argv[1]
|
||||||
|
if selection.anchored then
|
||||||
|
text = win.file:content(selection.range)
|
||||||
|
end
|
||||||
|
if not text then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local escaped = text:gsub("'","'\\''")
|
||||||
|
local proc = io.popen("grep -n -I -R -- "..escaped .." | tr '\t' ' ' | fzy")
|
||||||
|
if not proc then return false end
|
||||||
|
local sel = proc:read("*a") or ""
|
||||||
|
proc:close();
|
||||||
|
|
||||||
|
local path, line = sel:match("^(.-):(%d+):")
|
||||||
|
if not path or not line then return false end
|
||||||
|
selection:remove()
|
||||||
|
selection.anchored = false
|
||||||
|
vis:command("e "..path)
|
||||||
|
vis.win.selection:to(tonumber(line), 1)
|
||||||
|
vis:redraw()
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
|
||||||
|
vis:map(vis.modes.VISUAL, ' g', function()
|
||||||
|
vis:command("grep")
|
||||||
|
end)
|
||||||
|
|
||||||
|
vis:map(vis.modes.NORMAL, ' f', function()
|
||||||
vis:command("!make; read a")
|
vis:command("!make; read a")
|
||||||
end)
|
end)
|
||||||
vis:map(vis.modes.NORMAL, ' c', function()
|
|
||||||
|
vis:map(vis.modes.NORMAL, 'mm', function()
|
||||||
|
vis:command("!make; read a")
|
||||||
|
end)
|
||||||
|
vis:map(vis.modes.NORMAL, 'mc', function()
|
||||||
vis:command("!make check; read a")
|
vis:command("!make check; read a")
|
||||||
end)
|
end)
|
||||||
vis:map(vis.modes.NORMAL, ' t', function()
|
vis:map(vis.modes.NORMAL, 'mt', function()
|
||||||
vis:command("!make test; read a")
|
vis:command("!make test; read a")
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,9 @@ focusfollowsmouse no
|
||||||
fontname "Iosevka:pixelsize=14:bold"
|
fontname "Iosevka:pixelsize=14:bold"
|
||||||
|
|
||||||
# Appearance
|
# Appearance
|
||||||
borderwidth 2
|
borderwidth 3
|
||||||
color activeborder "#ccccff"
|
color activeborder "#45282c"
|
||||||
color inactiveborder "#565656"
|
color inactiveborder "#343335"
|
||||||
color urgencyborder "#cc241d"
|
color urgencyborder "#cc241d"
|
||||||
|
|
||||||
# Menu colors
|
# Menu colors
|
||||||
|
|
@ -122,7 +122,7 @@ bind-key 4-s screenshot
|
||||||
|
|
||||||
# Open menus
|
# Open menus
|
||||||
bind-key 4-f menu-window
|
bind-key 4-f menu-window
|
||||||
bind-key 4-d "dmenu_run -sb '#ccccff' -sf '#000000'"
|
bind-key 4-d "dmenu_run -nb '#000000' -sb '#353047' -sf '#ffffff'"
|
||||||
|
|
||||||
# Volume control
|
# Volume control
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue