From d42afdbcb29d07ac72e46ddc401951612df30d17 Mon Sep 17 00:00:00 2001 From: dacctal Date: Tue, 28 Apr 2026 10:11:46 +0000 Subject: changed some display stuff and added simple template to README.md --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index aa9d4d0..fecffae 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,49 @@ modal is a status line colorizer for vis -right now, it's very opinionated, but I will eventually add the ability to customize it \ No newline at end of file +# Installation +To install vis-modal, clone this repository in your `~/.config/vis/plugins/` directory +Then, you can use it with the default configuration by putting this into your `~/.config/vis/visrc.lua`: +``` +local modal = require('plugins/modal') +``` + +# Customization +You can change the colors and mode descriptors in vis-modal to your liking, with this template: +``` +local modal = require('plugins/modal') +modal.MODES = { + [vis.modes.NORMAL] = ' NORMAL ', + [vis.modes.INSERT] = ' INSERT ', + [vis.modes.VISUAL] = ' VISUAL ', + [vis.modes.REPLACE] = ' REPLACE ', + [vis.modes.VISUAL_LINE] = ' VISUAL_LINE ', + [vis.modes.OPERATOR_PENDING] = ' OPERATOR_PENDING ' +} +modal.STYLES = { + [vis.modes.NORMAL] = { + REGULAR = 'fore:default,back:yellow', + INVERTED = 'fore:yellow,back:black', + }, + [vis.modes.INSERT] = { + REGULAR = 'fore:default,back:green', + INVERTED = 'fore:green,back:black', + }, + [vis.modes.VISUAL] = { + REGULAR = 'fore:default,back:magenta', + INVERTED = 'fore:magenta,back:black', + }, + [vis.modes.REPLACE] = { + REGULAR = 'fore:default,back:blue', + INVERTED = 'fore:blue,back:black', + }, + [vis.modes.VISUAL_LINE] = { + REGULAR = 'fore:default,back:magenta', + INVERTED = 'fore:magenta,back:black', + }, + [vis.modes.OPERATOR_PENDING] = { + REGULAR = 'fore:default,back:blue', + INVERTED = 'fore:blue,back:black', + }, +} +``` -- cgit v1.2.3