Feature/begin end #3
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: loic/vim-singlechar#3
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feature/begin-end"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request adds new functionality and improves configurability for the
vim-singlecharplugin. Most notably, it introduces new commands and mappings to insert characters at the beginning and end of a line, and adds an option to keep the cursor static after insertion. Documentation and configuration options have been updated to reflect these changes.New features and functionality
:InsertCharBeginand:InsertCharEndfor inserting characters at the beginning and end of the line, respectively. Corresponding mappings[count]<Leader>Iand[count]<Leader>Ahave also been added. [1] [2] [3] [4] [5] [6]g:singlechar_static_cursoroption, allowing users to keep the cursor at its original position after insertion. [1] [2] [3] [4]Documentation and configuration updates
README.mdanddoc/singlechar.txt) to include the new commands, mappings, and configuration options. [1] [2] [3] [4] [5] [6] [7]g:singlechar_map_insert_begin,g:singlechar_map_insert_end) in the plugin setup. [1] [2]Codebase improvements
GetInsertCommandfor determining the correct Vim insert command, andDoSingleCharfor handling insertion and cursor positioning. [1] [2]Minor updates
Pull Request Overview
This PR adds new functionality to the vim-singlechar plugin, introducing commands and mappings for inserting characters at the beginning and end of lines, along with a new static cursor option.
InsertCharBeginandInsertCharEndwith corresponding<Leader>Iand<Leader>Amappingsg:singlechar_static_cursoroption to keep cursor position after insertionReviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
[nitpick] Consider using boolean comparison instead of numeric comparison for better readability:
if resetCursor@ -30,15 +30,32 @@ if !exists('g:singlechar_map_insert_after')g:singlechar_map_insert_after = '<Leader>a'The comment 'Toggle off static cursor' is misleading. This variable enables/disables the static cursor feature, not toggles it off.
Spelling error: 'warnign' should be 'warning'.