command module
v0.1.1 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2018 License: MIT Imports: 9 Imported by: 0



Phi is a minimal text editor designed to look pretty, run fast, and be easy to configure and use. It's primary function is for editing code.

Note that this is a work in progress and is very buggy! The editor is written as if it's a game, so it will probably eat up your battery, as well as run possibly quite slow - especially if you dont have a dedicated GPU - and probably crash frequently.

Do not edit your precious files with this editor!

Here's a screenshot of Phi in action:


The editor must:

  • run fast;
  • load and edit large files with ease;
  • look pretty; and finally
  • be easy to use


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!

reporting bugs/troubleshooting

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.

before filing an issue

Just to make sure it's an issue with the editor currently and not due to a broken change, please:

  • make sure the repository is up to date
  • make sure all the dependencies are updated, especially ""
  • try removing the ~/.phi-config folder manually and letting the editor re-load it



You will need the go compiler installed with the GOPATH/GOBIN/etc setup. In addition you will need the following libraries:

  • sdl2
  • sdl2_image
  • sdl2_ttf

If you're on Linux, you will need:

  • xsel
  • xclip

Either works. This is for copying/pasting.


Here's an example for Ubuntu:

$ sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev xclip
$ go get
$ cd $GOPATH/src/
$ go build
$ ./phi-editor

If you're on macOS, you can do something like this, using homebrew:

$ brew install sdl2 sdl2_image sdl2_ttf pkg-config
$ go get
$ cd $GOPATH/src/
$ go build
$ ./phi-editor

If you're on windows, you have my condolences.


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 a (non-exhaustive) configuration file to give you an idea of what the config files are like:

tab_size = 4
hungry_backspace = true
tabs_are_spaces = true
match_braces = false
maintain_indentation = true
highlight_line = true

aliased = true
accelerated = true
throttle_cpu_usage = true
always_render = true

background = 0x002649
foreground = 0xf2f4f6
cursor = 0xf2f4f6
cursor_invert = 0x000000

flash_rate = 400
reset_delay = 400
draw = true
flash = true

shortcut = "super+s"

shortcut = "super+d"


MIT License


The Go Gopher

There is no documentation for this package.


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL