This is a simple text editor created using Python Tkinter, a popular GUI toolkit. The editor provides essential features for text editing along with some additional functionalities to enhance the user experience.
The editor displays line numbers, making it easier to navigate through the document.
Supports syntax highlighting for various programming languages, enhancing code readability.
Users can customize the editor's appearance by defining their color schemes using a JSON-based configuration file.
Allows users to search for specific text within the document and replace it with another string.
Users can customize the font style, size, and other related properties according to their preferences.
- Python 3.x installed on your system
- Required Python libraries (Tkinter, json, etc.)
git clone https://github.com/nabekabebe/simple-text-editorcd simple-text-editorRun the following command to start the text editor:
python texteditor.pyThe color scheme is defined in a JSON file (scheme_color.json) which can be customized by the user. Here's an example of the color scheme configuration:
{ "fg": "#000000", "bg": "#c4bbbc", "tfg": "#000000", "tbg": "#eceed9" }The editor supports customization through an IDE-like configuration format. The configuration is defined in a JSON file (highlight_config.json) and follows this structure:
{
"category": {
"keywords": {
"color": "orange",
"matches": ["for", "def", "while", "from", "import", "as", "with", "self"]
},
"variables": {
"color": "red",
"matches": ["True", "False", "None"]
},
"conditionals": {
"color": "green",
"matches": ["try", "except", "if", "else", "elif"]
},
"functions": {
"color": "blue",
"matches": ["int", "str", "dict", "list", "set", "float", "print"]
},
"builtins": {
"color": "brown",
"matches": "dir"
}
},
"numbers": {
"color": "purple"
},
"strings": {
"color": "pink"
},
"parenthesis": {
"color": "teal"
}
}Feel free to contribute and submit pull requests to enhance the functionality of the text editor.
Happy Coding!