Betty Vim Extension is a Vim plugin, similar to the Betty VS code extension, designed to help you identify and handle Betty coding style and documentation errors and warnings in real-time. This extension is perfect for handling those tricky betty messages, offering you a seamless coding experience.
In this initial release, the Betty Vim Extension offers a comprehensive set of features designed to enhance your coding experience:
-
Toggle Activation: Easily toggle the Betty extension on and off with the shortcut
(Ctrl+a)
. -
Error and Warning Highlights: Make your errors and warnings stand out with distinct highlights, so you never miss them.
-
Error Details: Get quick access to error details with messages displayed directly in the command line.
Before using the Betty Vim extension, ensure you have the following installed:
- Vim Editor
- Betty Style Checker - This extension depends on the Betty Style Checker for code analysis. Ensure it's configured on your system.
Clone the repository to your local machine, navigate to betty-vim-extension
and run the ./install.sh
file.
git clone https://github.com/moufidayoub11/betty-vim-extension.git && cd betty-vim-extension && ./install.sh
No additional configuration needed! The Betty Vim extension works seamlessly with your Vim setup.
- Initial release with basic features like error highlighting and message display.
No known issues at the moment. For problems or suggestions, please report them on GitHub Issues.
Contributing to this extension is a great way to improve it for everyone. Follow the steps below to get started:
- Familiarity with Vimscript
- Vim installed on your machine
- A fork of the Betty Vim Extension repository
- Familiarity with Vimscript
- Vim installed on your machine
- A fork of the Betty Vim Extension repository
-
Clone Your Fork: Clone your forked repository to your local machine.
git clone https://github.com/YOUR_USERNAME/betty-vim-extension.git
-
Navigate to the Vimscript File: Open the project in Vim and navigate to the Vimscript file that contains the main logic.
-
Add Your Feature or Fix: Implement your feature or fix, adhering to the existing coding style and guidelines.
-
Test Your Changes: Before submitting a pull request, make sure to test your changes thoroughly.
-
Commit and Push: Commit your changes and push them to your forked repository.
git add .
git commit -m "Added new feature or fix"
git push origin main
-
Create a Pull Request: Go to the GitHub page of your forked repository and create a new pull request.
- Email: moufidayoub883@gmail.com
- Discord: moufidayoub11
This project is licensed under the GPL License. See the LICENSE file for details.
-
BettyToggle()
: Toggles the extension on and off. It uses the global variableg:betty_isActive
to keep track of the state. -
DisplayCurrentLineMessage()
: Displays the message for the current line if it exists. It uses theg:betty_messages
dictionary to look up messages. -
BettyCheckAndHighlight()
: Checks and highlights issues in the code. It writes the file and then runs the Betty Style Checker on it. -
HandleBettyNotFound()
: Handles the case where the Betty Style Checker is not found on the system. -
ClearOldHighlights()
: Clears old highlights and messages. It usesg:betty_match_ids
to keep track of the highlights. -
ParseBettyOutput()
: Parses the output from the Betty Style Checker and populatesg:betty_messages
. -
ApplyNewHighlights()
: Applies new highlights based ong:betty_messages
.
-
Dictionary:
g:betty_messages
is a dictionary that maps line numbers to messages and their types. It is used for quick look-up. -
Array:
g:betty_match_ids
is an array that stores the match IDs for highlights. It is used for efficient deletion of old highlights.
-
Real-time Feedback: This extension provides real-time feedback, which is crucial for identifying and fixing errors quickly.
-
Code Quality: By adhering to Betty coding standards, the quality of the code is improved, making it more readable and maintainable.
Feel free to reach out for any further clarifications.