aboutsummaryrefslogtreecommitdiff

Vis Chain

This plugin consist of 2 modules. Either of which can be removed entirely by editing init.lua and the line and if you wish respective file.

previous file

Pretty much just from vim. Keeps track of the last file you opened and you can go back to it with (ctrl + 6)

file history

Pseudo harpoon and buffers. Keeps track of ever file opened and puts it in a table.

You can list the files with <Space>l.

You can go to the first 4 files with <Space>1 - <Space>4.

To edit this list do <Space>E then change how you wish.

Then multi selection (NOT SELECT MULTIBLE LINES WITH ONE CURSOR) <C-j/k>. Then visual mode v. Then select the end of the line excluding the new line at the end $h. Then <Space>E.

example config

require('plugins/vis-chain')

with keybinds

local chain = require('plugins/vis-chain')

vis:unmap(vis.modes.NORMAL, "<C-^>")

vis:unmap(vis.modes.NORMAL,"<C-e>")
vis:unmap(vis.modes.NORMAL," E")
vis:unmap(vis.modes.VISUAL," E")
vis:unmap(vis.modes.NORMAL," 1")
vis:unmap(vis.modes.NORMAL," 2")
vis:unmap(vis.modes.NORMAL," 3")
vis:unmap(vis.modes.NORMAL," 4")

vis:map(vis.modes.NORMAL, "<C-^>", chain.last.open_last,"")

vis:map(vis.modes.NORMAL,"<C-e>",chain.hist.select_files)
vis:map(vis.modes.NORMAL," E",chain.hist.list_files)
vis:map(vis.modes.VISUAL," E",chain.hist.set_files)
vis:map(vis.modes.NORMAL," 1",function() chain.hist.open(1) end)
vis:map(vis.modes.NORMAL," 2",function() chain.hist.open(2) end)
vis:map(vis.modes.NORMAL," 3",function() chain.hist.open(3) end)
vis:map(vis.modes.NORMAL," 4",function() chain.hist.open(4) end)