From 2970edd2ab14845bad4a24306bab01985ef68ba2 Mon Sep 17 00:00:00 2001 From: lohhiiccc <96543753+lohhiiccc@users.noreply.github.com> Date: Tue, 19 Aug 2025 16:45:17 +0200 Subject: [PATCH] doc: update docs --- README.md | 12 ++++++++++-- doc/singlechar.txt | 8 +++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f0795d4..e1ac198 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # vim-singlechar -A simple Vim plugin that lets you insert single characters without leaving normal mode. +A simple Vim plugin that lets you insert single characters (including Unicode) without leaving normal mode. ## Overview @@ -8,8 +8,9 @@ A simple Vim plugin that lets you insert single characters without leaving norma ## Features -- Insert characters at or after the cursor position +- Insert characters (supports Unicode) at or after the cursor position - Support for counts to insert a character multiple times +- Input validation: warns if more than one character is entered - Stay in normal mode for efficient editing - Minimal workflow interruption - Works with Vim 9+ @@ -71,6 +72,13 @@ let g:singlechar_prompt = 'Press the character to insert - Press Esc to cancel.. " Disable default mappings (if you want to create your own) let g:singlechar_no_mappings = 1 + +" Show warning if more than one character is entered (default: enabled) +let g:singlechar_keylen_warning = 1 + +" Customize the warning message (default: 'Only the first character will be taken: {char}') +let g:singlechar_warning_message = 'Only the first character will be taken: {char}' + ``` ## Commands diff --git a/doc/singlechar.txt b/doc/singlechar.txt index 17b0258..ab2e7eb 100644 --- a/doc/singlechar.txt +++ b/doc/singlechar.txt @@ -27,7 +27,7 @@ INTRODUCTION *singlechar-introducti vim-singlechar is a minimalist Vim plugin designed to optimize the workflow of inserting single characters during editing. It eliminates the need to enter insert mode for simple edits like adding punctuation, which helps maintain the flow of -normal mode operations. +normal mode operations. Now supports Unicode. =============================================================================== REQUIREMENTS *singlechar-requirements* @@ -111,6 +111,12 @@ Disabling default mappings: > Changing the prompt message: > let g:singlechar_prompt = 'Character to insert (Esc to cancel): ' < +Show warning if more than one character is entered (default: enabled): > + let g:singlechar_keylen_warning = 1 +< +Customize the warning message (default: 'Only the first character will be taken: {char}'): > + let g:singlechar_warning_message = 'Only the first character will be taken: {char}' +< =============================================================================== EXAMPLES *singlechar-examples*