gokilo

所属分类:代码编辑器
开发工具:GO
文件大小:15KB
下载次数:0
上传日期:2020-02-24 14:30:54
上 传 者sh-1993
说明:  Antirez的kilo文本编辑器到Go编程语言的惯用端口
(An idiomatic port of Antirez s kilo text editor to Go programming language)

文件列表:
LICENSE (1327, 2020-02-24)
dispatch.go (5959, 2020-02-24)
editor.go (6400, 2020-02-24)
fileio.go (1059, 2020-02-24)
go.mod (104, 2020-02-24)
go.sum (207, 2020-02-24)
gokilo.go (1909, 2020-02-24)
lineeditor.go (1523, 2020-02-24)
rawmode (0, 2020-02-24)
rawmode\rawmode_unix.go (2453, 2020-02-24)
rawmode\rawmode_windows.go (2476, 2020-02-24)
runes (0, 2020-02-24)
runes\runes.go (2794, 2020-02-24)
terminal (0, 2020-02-24)
terminal\terminal.go (2928, 2020-02-24)
view.go (4173, 2020-02-24)

GoKilo ====== GoKilo is an attempt to port Antirez's [kilo](http://antirez.com/news/108) text editor from C to [Go Langugae](https://golang.org/). To build this, I have followed this wonderful [tutorial](https://viewsourcecode.org/snaptoken/kilo/index.html) originally in C language that breaks down Kilo editor's development into a series of small steps. At present in GoKilo, chapters [1 through 6](https://viewsourcecode.org/snaptoken/kilo/index.html) of the tutorial are complete and we have a fully functional basic text edtor. ### Update GoKilo has been substantially re-written to a much more idiomatic Go style from the original version that closely mirrored C while retaining much of the logic. However, two substantial changes were made during the rewrite: 1. A small State Machine added to generalize handling of state changes between editing, save prompt for new files, quit prompt in case of unsaved changes and find interaction vs. using embedded screen & keyboard logic 2. A line editor derived from the full Editor used to handle user prompts vs. custom key-handling in find function in the original 3. I am starting development of a tutorial to build a simpler version of GoKilo at github.com/gokilo modeled on the original one Extra Functionality in GoKilo ----------------------------- 1. Search functionality has been made case-insensitive by default and works slightly differently 2. Native Windows console support - you can use GoKilo in PowerShell or Cmd Roadmap ------- 1. **Porting over tutorial to Go:** I plan to then re-write and release the tutorial to work with Go version of kilo. Given how close Go is to C, it should largely port over in sequence but will probalby be simpler with fewer steps due to garbage collection and type safety in Go 2. **Syntax Highlighting**: I haven't yet decided whether to add syntax highlighting to GoKilo Dog-fooding ----------- I'm using `gokilo` as my [default git editor](https://stackoverflow.com/questions/2596805/how-do-i-make-git-use-the-editor-of-my-choice-for-commits). Building -------- ``` go get github.com/srinathh/gokilo go build ```

近期下载者

相关文件


收藏者