vis: change shell and global marks edit keys, add new file key
This commit is contained in:
@@ -242,6 +242,7 @@ vis.events.subscribe(vis.events.INIT, function()
|
|||||||
|
|
||||||
vis:map(vis.modes.NORMAL, '<M-k>', '<vis-window-prev>')
|
vis:map(vis.modes.NORMAL, '<M-k>', '<vis-window-prev>')
|
||||||
vis:map(vis.modes.NORMAL, '<M-j>', '<vis-window-next>')
|
vis:map(vis.modes.NORMAL, '<M-j>', '<vis-window-next>')
|
||||||
|
vis:map(vis.modes.NORMAL, '<M-n>', '<vis-prompt-show>open<Enter>')
|
||||||
vis:map(vis.modes.NORMAL, ' K', close_prev_win)
|
vis:map(vis.modes.NORMAL, ' K', close_prev_win)
|
||||||
vis:map(vis.modes.NORMAL, ' J', close_next_win)
|
vis:map(vis.modes.NORMAL, ' J', close_next_win)
|
||||||
|
|
||||||
@@ -258,12 +259,12 @@ vis.events.subscribe(vis.events.INIT, function()
|
|||||||
search(fzf_reload(ripgrep .. ' --with-filename {q} ' .. escape_and_quoted(vis.win.file.path)))
|
search(fzf_reload(ripgrep .. ' --with-filename {q} ' .. escape_and_quoted(vis.win.file.path)))
|
||||||
end, 'fzf: rg current file')
|
end, 'fzf: rg current file')
|
||||||
|
|
||||||
vis:map(vis.modes.NORMAL, ' .', function()
|
vis:map(vis.modes.NORMAL, ' d', function()
|
||||||
local shell = os.getenv('SHELL')
|
local shell = os.getenv('SHELL')
|
||||||
vis:command('!' .. shell)
|
vis:command('!' .. shell)
|
||||||
end, 'run shell')
|
end, 'run shell')
|
||||||
|
|
||||||
vis:map(vis.modes.NORMAL, ' ds', function()
|
vis:map(vis.modes.NORMAL, ' D', function()
|
||||||
local shell = os.getenv('SHELL')
|
local shell = os.getenv('SHELL')
|
||||||
local path = vis.win.file.path
|
local path = vis.win.file.path
|
||||||
if path then
|
if path then
|
||||||
@@ -326,7 +327,7 @@ vis.events.subscribe(vis.events.INIT, function()
|
|||||||
search('cat ~/.config/vis/global-marks.txt | fzf --tac')
|
search('cat ~/.config/vis/global-marks.txt | fzf --tac')
|
||||||
end, 'global marks: jump')
|
end, 'global marks: jump')
|
||||||
|
|
||||||
vis:map(vis.modes.NORMAL, ' em', function()
|
vis:map(vis.modes.NORMAL, ' zm', function()
|
||||||
vis:command('o ~/.config/vis/global-marks.txt')
|
vis:command('o ~/.config/vis/global-marks.txt')
|
||||||
end, 'global marks: edit')
|
end, 'global marks: edit')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user