Phi is a minimal code editor designed to look pretty, run fast, and be easy to configure and use. It's primary function is for editing code.
The editor is still a work in progress. There is a chance it will eat up your battery, run quite slowly, and probably crash frequently.
**Do not edit your precious files with this editor!**
Here's a screenshot of Phi in action:
The editor must:
The editor probably wont:
Perhaps in the future if I have time to get round to some of these I may. Avoiding most of these is to avoid complexity in the code-base and general architecture of the editor.
The editor does not exist as a serious replacement to Sublime Text/Atom/Emacs/[editor name here].
Though one of my big goals for the project is to possibly replace sublime text for my own personal use. Thus the editor is somewhat optimized for my own work-flow.
The code is up purely for people to look at and maybe use or contribute or whatever. Sharing is caring!
Note the editor is still unstable. Please report any bugs you find so I can squash them! It is appreciated if you skim the issue handler to make sure you aren't reporting duplicate bugs.
Just to make sure it's an issue with the editor currently and not due to a broken change, please:
You will need the go compiler installed with the GOPATH/GOBIN/etc setup. In addition you will need the following libraries:
If you're on Linux, you will need:
Either works. This is for copying/pasting.
Here's an example for Ubuntu:
1$ sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev xclip 2$ go get github.com/felixangell/phi 3$ cd $GOPATH/src/github.com/felixangell/phi 4$ go build 5$ ./phi
If you're on macOS, you can do something like this, using homebrew:
1$ brew install sdl2 sdl2_image sdl2_ttf pkg-config 2$ go get github.com/felixangell/phi 3$ cd $GOPATH/src/github.com/felixangell/phi 4$ go build 5$ ./phi
Building on Windows is a bit more involved. It's the same process, though you will need a bit more software:
x86_64-w64-mingw32into your mingw folder specified when installing mingw-w64.
mingwbin folder to the
Once this is complete, open up a terminal and type the following:
1$ go get github.com/felixangell/phi 2$ cd $GOPATH/src/github.com/felixangell/phi 3$ go build 4$ ./phi
Note that you should run
go install so that the dependencies aren't being rebuilt for faster compile times.
Configuration files are stored in
$HOME/.phi-editor/config.toml. Note that this directory is created on first startup by the editor, as well as the configuration files in the 'cfg/' directory are pre-loaded dependening on platform: see 'cfg/linuxconfig.go', for example.
Below is an incomplete configuration file to give you an idea of what the config files are like:
1[editor] 2tab_size = 4 3hungry_backspace = true 4tabs_are_spaces = true 5match_braces = false 6maintain_indentation = true 7highlight_line = true 8 9[render] 10aliased = true 11accelerated = true 12throttle_cpu_usage = true 13always_render = true 14 15[theme] 16background = 0x002649 17foreground = 0xf2f4f6 18cursor = 0xf2f4f6 19cursor_invert = 0x000000 20 21[cursor] 22flash_rate = 400 23reset_delay = 400 24draw = true 25flash = true 26 27[commands] 28[commands.save] 29shortcut = "super+s" 30 31[commands.delete_line] 32shortcut = "super+d"
2018年5月24日社区内部分享，晚上21:00 ，Go协程调度讲解 YY频道：15288615 时 间：2018年5月24日 晚上21:00
原文发布于微信公众号 - Golang语言社区（Golangweb）