vim: add vim-visual-multi
plugin for multiple cursors
This commit is contained in:
parent
861c13b7bd
commit
c4495a5e6c
3 changed files with 13 additions and 3 deletions
|
@ -25,6 +25,6 @@ plugin.setup {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.keymap.set('n', '<c-n>', '<cmd>NvimTreeToggle<cr>')
|
vim.keymap.set('n', '<leader>tt', '<cmd>NvimTreeToggle<cr>')
|
||||||
vim.keymap.set('n', '<leader>n', '<cmd>NvimTreeFindFileToggle<cr>')
|
vim.keymap.set('n', '<leader>tf', '<cmd>NvimTreeFindFileToggle<cr>')
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,12 @@ local parts = {
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
||||||
|
visual_multi = function()
|
||||||
|
local ok, infos = pcall(vim.fn.VMInfos)
|
||||||
|
if not ok or not infos.status then return '' end
|
||||||
|
return infos.current .. '/' .. infos.total .. ' ' .. infos.status
|
||||||
|
end,
|
||||||
|
|
||||||
branch = {
|
branch = {
|
||||||
'branch',
|
'branch',
|
||||||
icon = '',
|
icon = '',
|
||||||
|
@ -185,7 +191,7 @@ local parts = {
|
||||||
|
|
||||||
local sections = Table:new {
|
local sections = Table:new {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = { parts.visual_multi },
|
||||||
lualine_c = { parts.branch, parts.diff, parts.split, parts.path },
|
lualine_c = { parts.branch, parts.diff, parts.split, parts.path },
|
||||||
lualine_x = { 'diagnostics', parts.filetype, parts.fileformat, parts.progress },
|
lualine_x = { 'diagnostics', parts.filetype, parts.fileformat, parts.progress },
|
||||||
lualine_y = { parts.location },
|
lualine_y = { parts.location },
|
||||||
|
|
|
@ -17,6 +17,9 @@ vim.g.better_whitespace_filetypes_blacklist = {
|
||||||
|
|
||||||
vim.g.vim_json_syntax_conceal = 0 -- Disable quote concealling.
|
vim.g.vim_json_syntax_conceal = 0 -- Disable quote concealling.
|
||||||
|
|
||||||
|
vim.g.VM_leader = '\\'
|
||||||
|
vim.g.VM_silent_exit = 1
|
||||||
|
|
||||||
return packer().startup(function(use)
|
return packer().startup(function(use)
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
use 'nvim-lua/plenary.nvim'
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
@ -37,6 +40,7 @@ return packer().startup(function(use)
|
||||||
use 'ntpeters/vim-better-whitespace'
|
use 'ntpeters/vim-better-whitespace'
|
||||||
use 'godlygeek/tabular'
|
use 'godlygeek/tabular'
|
||||||
use 'tpope/vim-commentary'
|
use 'tpope/vim-commentary'
|
||||||
|
use 'mg979/vim-visual-multi'
|
||||||
|
|
||||||
-- git --------------------------------------------------------------------
|
-- git --------------------------------------------------------------------
|
||||||
use 'tpope/vim-fugitive'
|
use 'tpope/vim-fugitive'
|
||||||
|
|
Loading…
Add table
Reference in a new issue