Compare commits

...

4 commits

Author SHA1 Message Date
94b0d93926
wezterm: Add experimental tab naming mapping
This is something I used to use quite a bit in tmux. I have a feeling I
will not be making extensive use of it in wezterm, but can always remove
it if I reach the point of forgetting the mapping later.
2024-08-13 22:55:14 +02:00
2dd5f6e02d
wezterm: Change pane movement mappings
Added mapping `<leader><c-q>` to select a pane which will be moved out
to a new tab.

Slightly changed pane switching on `<leader><s-q>` to keep focus on the
pane instead of switching to the other pane.

Finally, added two simple relative tab movement maps to cycle forward
with `<leader>.` and reverse with `<leader>,`. This replaces the old tab
movement (moving the actual tab around) left and right which are now on
`<leader><s-,>` and `<ledaer><s-.>` respectively.
2024-08-13 22:53:27 +02:00
bec8f4e2e7
nvim: Unify file browsers and telescope as pickers
Since they are all used for file picking (among editing and creating)
I'll just have them run under pickers for now. If the name turns out to
be confusing or not descriptive anymore I can still change it at any
time.
2024-08-13 13:47:10 +02:00
18f12f9068
nvim: Improve markdown rendering
Remove redundant conceallevel fix (not required for quarto files
anymore), add additional filetype injections and do not highlight
codeblocks as much (no sign colum entry, bg not over whole doc width).
2024-08-13 13:19:56 +02:00
5 changed files with 58 additions and 45 deletions

View file

@ -1,26 +0,0 @@
return {
{
"vifm/vifm.vim",
config = function()
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.vifm_replace_netrw = 1
vim.g.vifm_exec_args = '-c "set vifminfo=" -c "set statusline=" -c "only"'
end,
cmd = "Vifm",
keys = {
{ "<leader>E", "<cmd>Vifm<cr>", desc = "buffer file browser" },
{ "<leader>vc", ":Vifm " .. vim.fn.stdpath("config") .. "<cr>", desc = "open config" },
},
event = { "BufEnter" },
}, -- integrate file manager
{
"nvim-tree/nvim-tree.lua", -- integrate file tree
config = true,
dependencies = { "nvim-tree/nvim-web-devicons", config = true },
cmd = "NvimTreeToggle",
keys = {
{ "<leader>se", "<cmd>NvimTreeToggle<cr>", desc = "filetree", silent = true },
},
},
}

View file

@ -1,5 +1,29 @@
return {
-- fuzzy matching
{
"vifm/vifm.vim",
config = function()
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.vifm_replace_netrw = 1
vim.g.vifm_exec_args = '-c "set vifminfo=" -c "set statusline=" -c "only"'
end,
cmd = "Vifm",
keys = {
{ "<leader>E", "<cmd>Vifm<cr>", desc = "buffer file browser" },
{ "<leader>vc", ":Vifm " .. vim.fn.stdpath("config") .. "<cr>", desc = "open config" },
},
event = { "BufEnter" },
}, -- integrate file manager
{
"nvim-tree/nvim-tree.lua", -- integrate file tree
config = true,
dependencies = { "nvim-tree/nvim-web-devicons", config = true },
cmd = "NvimTreeToggle",
keys = {
{ "<leader>se", "<cmd>NvimTreeToggle<cr>", desc = "filetree", silent = true },
},
},
-- fuzzy matching picker
{
"nvim-telescope/telescope.nvim",
dependencies = {

View file

@ -42,22 +42,20 @@ local prose_plugs = {
},
-- displays prettier md rendering
{
"MeanderingProgrammer/markdown.nvim",
"MeanderingProgrammer/render-markdown.nvim",
main = "render-markdown",
opts = {
file_types = { "markdown", "quarto", "pandoc", "vimwiki" },
win_options = {
conceallevel = {
rendered = 2,
},
},
heading = {
width = "block",
},
file_types = { "markdown", "quarto", "pandoc", "vimwiki", "norg", "rmd", "org" },
code = {
sign = false,
width = 'block',
right_pad = 1,
},
},
name = "render-markdown", -- Only needed if you have another plugin named markdown.nvim
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-tree/nvim-web-devicons" }, -- if you prefer nvim-web-devicons
ft = writing_ft,
cmd = "RenderMarkdown",
keys = {
{
"<leader>pp",

View file

@ -662,3 +662,5 @@ command! cmp : if expand('%%c') == expand('%%f')
\ | echo expand('Comparing files: %%"f ...')
\ | cmpinternal %f
\ | endif
" pasting symlinks: al (absolute) or rl (relative)"

View file

@ -35,6 +35,7 @@ local keys = {
mods = "CTRL",
action = act.EmitEvent("ActivatePaneDirection-right"),
},
{ key = "p", mods = "LEADER", action = act.ActivatePaneDirection("Prev") },
{ key = "x", mods = "LEADER", action = act.CloseCurrentPane({ confirm = false }) },
{ key = "z", mods = "LEADER", action = act.TogglePaneZoomState },
{ key = " ", mods = "LEADER", action = act.RotatePanes("Clockwise") },
@ -42,11 +43,18 @@ local keys = {
{
key = "Q",
mods = "LEADER",
action = act.PaneSelect({ mode = "SwapWithActive" }),
action = act.PaneSelect({ mode = "SwapWithActiveKeepFocus" }),
},
{
key = "q",
mods = "LEADER|CTRL",
action = act.PaneSelect({ mode = "MoveToNewTab" }),
},
{ key = "c", mods = "LEADER", action = act.SpawnTab("CurrentPaneDomain") },
{ key = ",", mods = "LEADER", action = act.MoveTabRelative(-1) },
{ key = ".", mods = "LEADER", action = act.MoveTabRelative(1) }, -- workspace selection
{ key = ",", mods = "LEADER", action = act.ActivateTabRelative(-1) },
{ key = ".", mods = "LEADER", action = act.ActivateTabRelative(1) }, -- workspace selection
{ key = "<", mods = "LEADER|SHIFT", action = act.MoveTabRelative(-1) },
{ key = ">", mods = "LEADER|SHIFT", action = act.MoveTabRelative(1) }, -- workspace selection
{
key = "s",
mods = "LEADER",
@ -94,13 +102,20 @@ local keys = {
}),
},
{ key = "e", mods = "LEADER", action = act.EmitEvent("edit-scrollback") },
{
key = "l",
mods = "LEADER",
action = act.EmitEvent("ActivatePaneDirection-Right"),
},
{ key = "a", mods = "CTRL|ALT", action = act.EmitEvent("toggle-leader") },
{ key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") },
{
key = ":",
mods = "LEADER|SHIFT",
action = act.PromptInputLine({
description = "Tab name: ",
action = wezterm.action_callback(function(window, _, line)
if line then
window:active_tab():set_title(line)
end
end),
}),
},
{ key = "Enter", mods = "CTRL", action = wezterm.action({ SendString = "\x1b[13;5u" }) },
{ key = "Enter", mods = "SHIFT", action = wezterm.action({ SendString = "\x1b[13;2u" }) },
}