tablemode
This commit is contained in:
parent
e12f0f6eec
commit
9b37ca9461
2
init.lua
2
init.lua
|
@ -9,6 +9,8 @@ require('lazy').setup(vim.tbl_extend('keep', config.user_lazy_opts(), {
|
||||||
spec = {
|
spec = {
|
||||||
{ import = 'plex.plugins' },
|
{ import = 'plex.plugins' },
|
||||||
{ import = 'plex.plugins.extras.ui' },
|
{ import = 'plex.plugins.extras.ui' },
|
||||||
|
{ import = 'plex.plugins.extras.treesitter' },
|
||||||
|
{ import = 'plex.plugins.extras.editor' },
|
||||||
{ import = 'plex.plugins.extras.org' },
|
{ import = 'plex.plugins.extras.org' },
|
||||||
{ import = 'plex.plugins.extras.lang.go' },
|
{ import = 'plex.plugins.extras.lang.go' },
|
||||||
{ import = 'plex.plugins.extras.lang.json' },
|
{ import = 'plex.plugins.extras.lang.json' },
|
||||||
|
|
|
@ -36,8 +36,8 @@ map('n', '<leader>l', '<cmd>Lazy<cr>', { desc = 'Open Lazy UI' })
|
||||||
--map({ 'n', 'x' }, 'J', "<C-d>")
|
--map({ 'n', 'x' }, 'J', "<C-d>")
|
||||||
|
|
||||||
-- Easier line-wise movement
|
-- Easier line-wise movement
|
||||||
map('n', 'H', 'g^')
|
map({'n', 'v'}, 'H', 'g^')
|
||||||
map('n', 'L', 'g$')
|
map({'n', 'v'}, 'L', 'g$')
|
||||||
|
|
||||||
-- Toggle fold or select option from popup menu
|
-- Toggle fold or select option from popup menu
|
||||||
---@return string
|
---@return string
|
||||||
|
@ -75,6 +75,8 @@ map('n', 'zh', 'z4h')
|
||||||
-- Clipboard
|
-- Clipboard
|
||||||
-- ===
|
-- ===
|
||||||
|
|
||||||
|
-- TODO: make <leader>y copy to system
|
||||||
|
|
||||||
-- Yank buffer's relative path to clipboard
|
-- Yank buffer's relative path to clipboard
|
||||||
map('n', '<Leader>y', function()
|
map('n', '<Leader>y', function()
|
||||||
local path = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ':~:.')
|
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
|
-- Arrows to move identation in normal mode
|
||||||
map('n', '<LEFT>', '<<', { desc = 'Indent Right and Re-select' })
|
map('n', '<LEFT>', '<<', { desc = 'Indent Right and Re-select' })
|
||||||
map('n', '<RIGHT>', '>>', { desc = 'Indent Left 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
|
-- Use tab for indenting in visual/select mode
|
||||||
map('x', '<Tab>', '>gv|', { desc = 'Indent Left' })
|
map('x', '<Tab>', '>gv|', { desc = 'Indent Left' })
|
||||||
|
@ -322,9 +326,6 @@ map('n', '<Leader>a', function()
|
||||||
require('plex.lib.edit').toggle_list('loclist')
|
require('plex.lib.edit').toggle_list('loclist')
|
||||||
end, { desc = 'Open Location List' })
|
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>split<CR>', { desc = 'Split window horizontally' })
|
||||||
map('n', '<leader>"', '<cmd>vsplit<CR>', { desc = 'Split window vertically' })
|
map('n', '<leader>"', '<cmd>vsplit<CR>', { desc = 'Split window vertically' })
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"dhruvasagar/vim-table-mode",
|
||||||
|
lazy = false,
|
||||||
|
-- <Leader>tm is automatically set for toggle
|
||||||
|
-- see <Leader>t menu
|
||||||
|
},
|
||||||
|
}
|
|
@ -3,8 +3,8 @@ return {
|
||||||
'psliwka/vim-smoothie',
|
'psliwka/vim-smoothie',
|
||||||
lazy = true,
|
lazy = true,
|
||||||
keys = {
|
keys = {
|
||||||
{ "J", '<cmd>call smoothie#do("\\<C-D>") <CR>', desc = "Scroll down" },
|
{ "J", '<cmd>call smoothie#do("\\<C-D>") <CR>', mode = {'n', 'v', 'x'}, desc = "Scroll down" },
|
||||||
{ "K", '<cmd>call smoothie#do("\\<C-U>") <CR>', desc = "Scroll up" },
|
{ "K", '<cmd>call smoothie#do("\\<C-U>") <CR>', mode = {'n', 'v', 'x'}, desc = "Scroll up" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -169,6 +169,7 @@ return {
|
||||||
{ '<localleader>t', '<cmd>Telescope lsp_dynamic_workspace_symbols<CR>', desc = 'Workspace symbols' },
|
{ '<localleader>t', '<cmd>Telescope lsp_dynamic_workspace_symbols<CR>', desc = 'Workspace symbols' },
|
||||||
{ '<localleader>v', '<cmd>Telescope registers<CR>', desc = 'Registers' },
|
{ '<localleader>v', '<cmd>Telescope registers<CR>', desc = 'Registers' },
|
||||||
{ '<localleader>u', '<cmd>Telescope spell_suggest<CR>', desc = 'Spell suggest' },
|
{ '<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>S', '<cmd>Telescope persisted<CR>', desc = 'Sessions' },
|
||||||
{ '<localleader>x', '<cmd>Telescope oldfiles<CR>', desc = 'Old files' },
|
{ '<localleader>x', '<cmd>Telescope oldfiles<CR>', desc = 'Old files' },
|
||||||
{ '<localleader>;', '<cmd>Telescope command_history<CR>', desc = 'Command history' },
|
{ '<localleader>;', '<cmd>Telescope command_history<CR>', desc = 'Command history' },
|
||||||
|
|
Loading…
Reference in New Issue