Start work on using oil.nvim for navigation
This commit is contained in:
parent
8ffca7f6b5
commit
972d2dee11
|
@ -1,10 +1,20 @@
|
||||||
|
local function store_select()
|
||||||
|
require("oil").select({}, function()
|
||||||
|
local f = io.open("/tmp/oil_dir", "w")
|
||||||
|
if f then
|
||||||
|
f:write(require("oil").get_current_dir())
|
||||||
|
f:close()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'stevearc/oil.nvim',
|
'stevearc/oil.nvim',
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" }, lazy = true,
|
dependencies = { "nvim-tree/nvim-web-devicons" }, lazy = true,
|
||||||
opts = {
|
opts = {
|
||||||
keymaps = {
|
keymaps = {
|
||||||
["g?"] = "actions.show_help",
|
["g?"] = "actions.show_help",
|
||||||
["<CR>"] = "actions.select",
|
["<CR>"] = store_select,
|
||||||
["<leader>v"] = "actions.select_vsplit",
|
["<leader>v"] = "actions.select_vsplit",
|
||||||
["<leader>s"] = "actions.select_split",
|
["<leader>s"] = "actions.select_split",
|
||||||
["<leader>p"] = "actions.preview",
|
["<leader>p"] = "actions.preview",
|
||||||
|
@ -16,7 +26,6 @@ return {
|
||||||
["~"] = "actions.tcd",
|
["~"] = "actions.tcd",
|
||||||
["g."] = "actions.toggle_hidden",
|
["g."] = "actions.toggle_hidden",
|
||||||
},
|
},
|
||||||
-- Set to false to disable all of the above keymaps
|
|
||||||
use_default_keymaps = false,
|
use_default_keymaps = false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,6 +262,7 @@ alias wget=wget --hsts-file="$XDG_DATA_HOME/wget-hsts"
|
||||||
alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config"
|
alias xbindkeys="xbindkeys -f $XDG_CONFIG_HOME/xbindkeys/config"
|
||||||
alias python=python3
|
alias python=python3
|
||||||
alias r=". ranger"
|
alias r=". ranger"
|
||||||
|
alias v="vim . && cd \"\$(cat /tmp/oil_dir)\""
|
||||||
alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1"
|
alias cpr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1"
|
||||||
alias mvr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files"
|
alias mvr="rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files"
|
||||||
alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
|
alias rg="rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'"
|
||||||
|
|
Loading…
Reference in New Issue