Skip to content

A Text Editor, with complete features including syntax highlighting and bracket autocomplete.

License

Notifications You must be signed in to change notification settings

JoelShine/Pyter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyter

The Ultimate Text Editor, with complete features including syntax highlighting and bracket autocomplete, made purely from Python.

Currently, only supports writing, other features will be included shortly.

Screenshot of the Project

Code Structure

The "syntax_pars.py" contains the code for syntax higlighting. The autocomplete feature for brackets and single and double quotation marks is in the below peice of code :

def keyPressEvent(self, event):
        character_list = {
            '[': ']',
            '(': ')',
            "'": "'",
            '"': '"',
            '{': '}'
        }

        closing_char = character_list.get(event.text())

        if closing_char:
            char_cusor = self.textCursor()
            char_position1 = char_cusor.position()

            self.insertPlainText(closing_char)
            char_cusor.setPosition(char_position1)
            self.setTextCursor(char_cusor)
        super().keyPressEvent(event)

Above is a function in the "Pyter.py" file.

Usage and installation

You need to have Python 3.5 or above to run this code. You also need to have PyQt5, which can be installed through pip :

pip install PyQt5

That's All. I have created a release or executable of Pyter. Download from https://github.com/JoelShine/Pyter/releases

Pyter executable download - Download Pyter

About

A Text Editor, with complete features including syntax highlighting and bracket autocomplete.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages