Commit graph

3 commits

Author SHA1 Message Date
lohhiiccc
de7d77d1b4 feature: Add begin/end line singlechar insertion and static cursor option
- Introduce InsertCharBegin and InsertCharEnd commands
to insert a character at the beginning or end of the line (<Leader>I and <Leader>A).
- Add configuration variables for customizable mappings:
 - g:singlechar_map_insert_begin
 - g:singlechar_map_insert_end
- Implement GetInsertCommand() and DoSingleChar() in autoload/singlechar.vim
to support new modes and static cursor feature.
- Add g:singlechar_static_cursor option:
    when enabled, cursor returns to its original position after insertion.
2025-08-21 16:13:10 +02:00
lohhiiccc
e3b5bdd392 feat: improve InsertChar handling for Unicode and input validation
- Use strcharpart for Unicode character support
- Add warning message if more than one character is entered
- Refactor InsertChar to clarify variable names and flow
- Make user input handling robust against accidental multi-char input
- Add global config for warning message
- Update commands and mappings for flexible argument handling
2025-08-19 16:34:43 +02:00
lohhiiccc
8463cdcf4b refactor: migrate core logic to autoload/singlechar.vim
- Move main functions (InsertChar, RepeatSingleChar) to autoload/singlechar.vim, using Vim9script and export for modularity
- Refactor plugin/singlechar.vim to import autoload module and update commands/mappings accordingly
- Prepare for improved maintainability and compatibility with vim-repeat
2025-08-19 11:05:27 +02:00