lualine.nvim/lua/lualine/components/mode.lua

20 lines
381 B
Lua
Raw Normal View History

local function mode()
2020-12-30 14:48:51 +00:00
local mode_map = {
['__'] = '------',
['n'] = 'NORMAL',
['i'] = 'INSERT',
['v'] = 'VISUAL',
['V'] = 'V-LINE',
[''] = 'V-BLOCK',
['R'] = 'REPLACE',
['r'] = 'REPLACE',
['Rv'] = 'V-REPLACE',
['c'] = 'COMMAND',
['t'] = 'TERMINAL',
2021-01-06 13:52:05 +00:00
['s'] = 'SELECT',
2020-12-30 14:48:51 +00:00
}
return mode_map[vim.fn.mode()]
end
return mode