vim: better visual queue for paste mode
This commit is contained in:
parent
bef5e01951
commit
bb5fe60f53
1 changed files with 7 additions and 9 deletions
|
@ -23,7 +23,11 @@ else
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local progress = { '%3p%%×%L %3l:%-2v', padding = { left = 0, right = 1 } }
|
local paste = {
|
||||||
|
function() return 'P' end,
|
||||||
|
color = { fg = colors.base3, bg = colors.yellow, gui = 'bold' },
|
||||||
|
cond = function() return vim.opt.paste:get() end
|
||||||
|
}
|
||||||
local relative_path = { 'filename', path = 1 }
|
local relative_path = { 'filename', path = 1 }
|
||||||
local encoding = function ()
|
local encoding = function ()
|
||||||
local fenc = vim.opt.fileencoding:get()
|
local fenc = vim.opt.fileencoding:get()
|
||||||
|
@ -33,6 +37,7 @@ local encoding = function ()
|
||||||
return vim.opt.encoding:get()
|
return vim.opt.encoding:get()
|
||||||
end
|
end
|
||||||
local fileformat = { 'fileformat', padding = { left = 0, right = 1} }
|
local fileformat = { 'fileformat', padding = { left = 0, right = 1} }
|
||||||
|
local progress = { '%3p%%×%L %3l:%-2v', padding = { left = 0, right = 1 } }
|
||||||
|
|
||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
|
@ -57,14 +62,7 @@ require('lualine').setup {
|
||||||
},
|
},
|
||||||
|
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {
|
lualine_a = { 'mode', paste },
|
||||||
'mode',
|
|
||||||
{
|
|
||||||
function() return 'PASTE' end,
|
|
||||||
color = { bg = colors.yellow },
|
|
||||||
cond = function() return vim.opt.paste:get() end
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_b = { 'diagnostics', 'branch' },
|
lualine_b = { 'diagnostics', 'branch' },
|
||||||
lualine_c = { relative_path },
|
lualine_c = { relative_path },
|
||||||
lualine_x = { 'filetype' },
|
lualine_x = { 'filetype' },
|
||||||
|
|
Loading…
Add table
Reference in a new issue