vis: use lf instead of yazi, shorter keys for lf and lsp commands
This commit is contained in:
@@ -260,9 +260,9 @@ vis.events.subscribe(vis.events.INIT, function()
|
||||
vis:map(vis.modes.NORMAL, ' K', close_prev_win)
|
||||
vis:map(vis.modes.NORMAL, ' J', close_next_win)
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' l[', ':lspc-prev-diagnostic<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ' l]', ':lspc-next-diagnostic<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ' l=', ':lspc-format<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ' [', ':lspc-prev-diagnostic<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ' ]', ':lspc-next-diagnostic<Enter>')
|
||||
vis:map(vis.modes.NORMAL, ' =', ':lspc-format<Enter>')
|
||||
|
||||
for num = 1, 9 do
|
||||
vis:map(vis.modes.NORMAL, ' r' .. num, function() set_file_slot(num) end, 'set file slot ' .. num)
|
||||
@@ -330,20 +330,16 @@ vis.events.subscribe(vis.events.INIT, function()
|
||||
end)
|
||||
end, 'fzf change directory')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' yy', function()
|
||||
vis:command('!yazi')
|
||||
end, 'yazi')
|
||||
vis:map(vis.modes.NORMAL, ' l', ':!lf<Enter>', 'lf file manager')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' y.', function()
|
||||
vis:map(vis.modes.NORMAL, ' L', function()
|
||||
local path = vis.win.file.path
|
||||
if path then
|
||||
local dir = path:match('^.*/')
|
||||
local arg = escape_and_quoted(dir)
|
||||
vis:command('!cd ' .. arg .. ' && yazi')
|
||||
vis:command('!lf ' .. escape_and_quoted(path:match('^.*/')))
|
||||
else
|
||||
vis:command('!yazi')
|
||||
vis:command('!lf')
|
||||
end
|
||||
end, 'yazi in file directory')
|
||||
end, 'lf file manager in current file directory')
|
||||
|
||||
vis:map(vis.modes.NORMAL, ' ma', add_global_mark, 'global marks: add')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user