All Projects → lysee → Tcodeedit

lysee / Tcodeedit

Licence: mit
Lightweight and syntax hilighted UNICODE editor

Programming Languages

pascal
1382 projects
delphi
115 projects

Projects that are alternatives of or similar to Tcodeedit

V Emoji Picker
🌟 A Lightweight and customizable package of Emoji Picker in Vue using emojis natives (unicode).
Stars: ✭ 231 (+755.56%)
Mutual labels:  lightweight, unicode
Utf8.h
📚 single header utf8 string functions for C and C++
Stars: ✭ 875 (+3140.74%)
Mutual labels:  unicode
Nim Unicodedb
Unicode Character Database (UCD, tr44) for Nim
Stars: ✭ 19 (-29.63%)
Mutual labels:  unicode
Broken
Lightweight Unit Testing for C++
Stars: ✭ 8 (-70.37%)
Mutual labels:  lightweight
Alfred Unicode
Preview Unicode characters and emoji in Alfred
Stars: ✭ 23 (-14.81%)
Mutual labels:  unicode
Ostrio Analytics
📊 Visitor's analytics tracking code for ostr.io service
Stars: ✭ 9 (-66.67%)
Mutual labels:  lightweight
Unicopy
Unicode command-line codepoint dumper
Stars: ✭ 16 (-40.74%)
Mutual labels:  unicode
Pysamesame
This is a python version of samesame repo to generate homograph strings
Stars: ✭ 20 (-25.93%)
Mutual labels:  unicode
Myanmar Unicode Fonts
Fonts preview for list of Myanmar Unicode fonts
Stars: ✭ 14 (-48.15%)
Mutual labels:  unicode
Librg
🚀 Making multi-player gamedev simpler since 2017
Stars: ✭ 813 (+2911.11%)
Mutual labels:  lightweight
Cross
Cross++ Lightweight Crossplatform Game Engine
Stars: ✭ 26 (-3.7%)
Mutual labels:  lightweight
Git Praise
A nicer git blame.
Stars: ✭ 24 (-11.11%)
Mutual labels:  unicode
Idutf8lib
Idiot's UTF-8 Library
Stars: ✭ 12 (-55.56%)
Mutual labels:  unicode
Lexical Sort
Sort Unicode strings lexicographically
Stars: ✭ 23 (-14.81%)
Mutual labels:  unicode
Unicode 9.0.0
JavaScript-compatible Unicode data. Arrays of code points, arrays of symbols, and regular expressions for Unicode v9.0.0’s categories, scripts, blocks, bidi, and other properties.
Stars: ✭ 15 (-44.44%)
Mutual labels:  unicode
Nepali Romanized Pro
Nepali Romanized Keyboard Layout with installer for macOS
Stars: ✭ 18 (-33.33%)
Mutual labels:  unicode
Lightcomm4j
Yet another lightweight asynchronous network library for java
Stars: ✭ 25 (-7.41%)
Mutual labels:  lightweight
Cicada
🚀 Fast lightweight HTTP service framework.
Stars: ✭ 851 (+3051.85%)
Mutual labels:  lightweight
Php Confusable Homoglyphs
A PHP port of https://github.com/vhf/confusable_homoglyphs
Stars: ✭ 27 (+0%)
Mutual labels:  unicode
Humblelogging
HumbleLogging is a lightweight C++ logging framework. It aims to be extendible, easy to understand and as fast as possible.
Stars: ✭ 15 (-44.44%)
Mutual labels:  lightweight

TCodeEdit

A lightweight and syntax hilighted UNICODE editor.
一个小巧、语法加亮、使用UNICODE编码的代码编辑器。

Why it is here

TCodeEdit is a component of my lysee project for editing pascal and lysee codes, and it is easy to be extended to fit other developing languages. On the whole, TCodeEdit is small, simple, easy to use and might be useful to other coders, so I put it in here open source.
TCodeEdit起初是为我的Lysee项目开发的Pascal/Lysee代码编辑器,后来发现可以很轻松的扩展它用于编辑其他编程语言。总体上,TCodeEdit具有小巧、简单、易用的特点,对其他程序员也许也有用处,因此我把它放在这里,开放源代码供大家使用。

Develping status

TCodeEdit is in development and lack of some helpful functions.
TCodeEdit还在开发完善中,除了基本的语法加亮编辑功能,其他一些辅助功能还有待添加:

  • print and preview(打印和打印预览).
  • convert code to HTML(将代码转换为HTML编码).
  • bookmark(书签,按Ctrl+数字键跳转的那种).
  • autocomplete(代码辅助完成).
  • more language syntax(更多的的编程语言语法)  - ....

License

TCodeEdit was release under the MIT license. Just use it as you will.
TCodeEdit使用MIT许可,可以放心使用.

Version

Maybe has just completed 60%, so current version is 0.6.0.
也许刚刚完成60%,所以版本暂定为0.6.0.

How to use it.

  1. Get TCodeEdit and add it to your Lazarus/Delphi project.
    下载TCodeEdit后加入你的开发项目。

  2. Use codeedit.pas in your form unit and declare class field to hold TCodeEdit
    将codeedit.pas加入需要使用TCodeEdit的窗口单元并声明类成员变量。

    uses codeedit;
    
    type
      TMainForm = class(TForm)
      private
        FEdit: TCodeEdit;
        procedure EditStatus(Sender: TObject);
      end;
    
  3. Palce a TCodeEdit at where you want by calling PlaceACodeEdit().
    调用PlaceACodeEdit函数把TCodeEdit放置到需要的位置。

    procedure TMainForm.FormCreate(Sender: TObject);
    begin
      FEdit := PlaceACodeEdit(Self);
      FEdit.OnStatus := @EditStatus;
    end;
    
  4. Reponds OnStatus event to display editor status and enable/disable menu or buttons.
    响应OnStatus事件显示编辑器状态,修改相关菜单、按钮等组件的属性。

    procedure TMainForm.EditStatus(Sender: TObject);
    begin
      EditUndoMenu.Enabled := (FEdit.Undos.Last <> nil);
      EditRedoMenu.Enabled := (FEdit.Redos.Last <> nil);
      EditCutMenu.Enabled := FEdit.Selection.Selected;
      EditCopyMenu.Enabled := FEdit.Selection.Selected;
      EditPasteMenu.Enabled := HasTextFormat;
      StatusBar.Panels[0].Text := Format('%d, %d', [FEdit.Caret.LineIndex + 1, FEdit.Caret.TextIndex]);
      if FEdit.Modified then
        StatusBar.Panels[1].Text := 'Changed' else
        StatusBar.Panels[1].Text := '';
      StatusBar.Panels[2].Text := FEdit.Syntax.Language;
    end;
    
  5. How to open a file.
    如何打开文件。

    procedure TMainForm.FileOpenMenuClick(Sender: TObject);
    begin
      CloseDialogs;
      if OpenDialog.Execute then
        FEdit.Lines.LoadFromFile(OpenDialog.FileName);
    end;
    

    Base on file extension, TCodeEdit will choose prefered language syntax automatically.
      打开文件后,TCodeEdit根据文件后缀自动选择匹配的语法加亮类。

  6. How to use syntax class manually.
    如何手动设置语法加亮类。

    FEdit.Syntax.SyntaxClass := TPascalSyntax;
    FEdit.Syntax.SyntaxClass := FindSyntax('Pascal');
    FEdit.Syntax.SyntaxClass := FindSyntaxByFileExt('.pas');
    FEdit.Syntax.SyntaxClass := FindFileSyntax('~/editor/frmmain.pas');
    
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].