tablemode

This commit is contained in:
Christoph J. Scherr 2023-09-06 13:00:21 +02:00
parent e12f0f6eec
commit 9b37ca9461
5 changed files with 19 additions and 7 deletions

View File

@ -9,6 +9,8 @@ require('lazy').setup(vim.tbl_extend('keep', config.user_lazy_opts(), {
spec = {
{ import = 'plex.plugins' },
{ import = 'plex.plugins.extras.ui' },
{ import = 'plex.plugins.extras.treesitter' },
{ import = 'plex.plugins.extras.editor' },
{ import = 'plex.plugins.extras.org' },
{ import = 'plex.plugins.extras.lang.go' },
{ import = 'plex.plugins.extras.lang.json' },

View File

@ -36,8 +36,8 @@ map('n', '<leader>l', '<cmd>Lazy<cr>', { desc = 'Open Lazy UI' })
--map({ 'n', 'x' }, 'J', "<C-d>")
-- Easier line-wise movement
map('n', 'H', 'g^')
map('n', 'L', 'g$')
map({'n', 'v'}, 'H', 'g^')
map({'n', 'v'}, 'L', 'g$')
-- Toggle fold or select option from popup menu
---@return string
@ -75,6 +75,8 @@ map('n', 'zh', 'z4h')
-- Clipboard
-- ===
-- TODO: make <leader>y copy to system
-- Yank buffer's relative path to clipboard
map('n', '<Leader>y', function()
local path = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':~:.')
@ -121,6 +123,8 @@ map('x', '>', '>gv|', { desc = 'Indent Left and Re-select' })
-- Arrows to move identation in normal mode
map('n', '<LEFT>', '<<', { desc = 'Indent Right and Re-select' })
map('n', '<RIGHT>', '>>', { desc = 'Indent Left and Re-select' })
map('v', '<LEFT>', '<', { desc = 'Indent Right and Re-select' })
map('v', '<RIGHT>', '>', { desc = 'Indent Left and Re-select' })
-- Use tab for indenting in visual/select mode
map('x', '<Tab>', '>gv|', { desc = 'Indent Left' })
@ -322,9 +326,6 @@ map('n', '<Leader>a', function()
require('plex.lib.edit').toggle_list('loclist')
end, { desc = 'Open Location List' })
-- Switch with adjacent window
map('n', '<C-x>', '<C-w>x', { remap = true, desc = 'Swap windows' })
map('n', '<leader>%', '<cmd>split<CR>', { desc = 'Split window horizontally' })
map('n', '<leader>"', '<cmd>vsplit<CR>', { desc = 'Split window vertically' })

View File

@ -0,0 +1,8 @@
return {
{
"dhruvasagar/vim-table-mode",
lazy = false,
-- <Leader>tm is automatically set for toggle
-- see <Leader>t menu
},
}

View File

@ -3,8 +3,8 @@ return {
'psliwka/vim-smoothie',
lazy = true,
keys = {
{ "J", '<cmd>call smoothie#do("\\<C-D>") <CR>', desc = "Scroll down" },
{ "K", '<cmd>call smoothie#do("\\<C-U>") <CR>', desc = "Scroll up" },
{ "J", '<cmd>call smoothie#do("\\<C-D>") <CR>', mode = {'n', 'v', 'x'}, desc = "Scroll down" },
{ "K", '<cmd>call smoothie#do("\\<C-U>") <CR>', mode = {'n', 'v', 'x'}, desc = "Scroll up" },
},
},
}

View File

@ -169,6 +169,7 @@ return {
{ '<localleader>t', '<cmd>Telescope lsp_dynamic_workspace_symbols<CR>', desc = 'Workspace symbols' },
{ '<localleader>v', '<cmd>Telescope registers<CR>', desc = 'Registers' },
{ '<localleader>u', '<cmd>Telescope spell_suggest<CR>', desc = 'Spell suggest' },
{ 'z<space>', '<cmd>Telescope spell_suggest<CR>', desc = 'Spell suggest' },
{ '<localleader>S', '<cmd>Telescope persisted<CR>', desc = 'Sessions' },
{ '<localleader>x', '<cmd>Telescope oldfiles<CR>', desc = 'Old files' },
{ '<localleader>;', '<cmd>Telescope command_history<CR>', desc = 'Command history' },