Skip to content
/ vidar Public

vidar is a highly experimental Go editor, written in Go, using gxui

License

Notifications You must be signed in to change notification settings

nelsam/vidar

Repository files navigation

vidar

Join the chat at https://gitter.im/nelsam/vidar Go Report Card

Vidar is the Norse god of silence, patience, and revenge. Sounds perfect for an editor, right?

The code repository and development has moved from github to https://git.sr.ht/~nelsam/vidar.

Screenshot

screenshot

Vidar is a text editor written in go, designed for writing go. It supports plugins, performs reasonably well, and has some nice go-specific features that help with navigating go code. While I don't think it's going to replace your favorite editor, I am pretty damn proud of what we've got, and I think it will support most use cases fairly well. Panics are caught before any in-progress work is lost most of the time (we prioritize fixing those problems quickly), input is reasonably responsive, the usual editor features (copy/paste, find, regexp find, etc) are mostly working as you'd expect, and language-specific features can be loaded per file.

Quick start

$ go get github.com/nelsam/vidar
$ vidar

On Linux: Install Plugins!

If you're running linux, you will also probably want to install plugins, since most go-specific features are kept out of the main editor source code. See the Makefile for plugin build and install commands.

Other OSes will currently get all the go plugins baked directly into the binary.

Go Version

I'm only supporting the latest stable version of Go. This doesn't necessarily mean that vidar won't work with older versions, but I promise nothing.

Optional Dependencies

  • gocode - needed for the gocode plugin to work
  • goimports - needed for the goimports plugin to work
    • This will some day be configurable, but it currently is not
  • godef - needed for the godef plugin to work

Configuration

Vidar uses xdg to decide where to save config files. On linux systems, this will probably end up in ~/.config/vidar/; for Windows and OS X, you'll likely need to check the xdg package to see what it uses.

Config files are written as toml by default, but can be parsed from json or yaml as well. Currently, there are three config files:

  • settings: Only used to configure a fonts list, which should be a list of names of fonts installed on your system in order of preference. Note that only truetype fonts are supported right now, and many of those display incorrectly. My current favorites are Inconsolata-Regular and PTM55F.
  • projects: A list of projects with name, path, and gopath keys. This can be added to with the add-project command (ctrl-shift-n by default).
  • keys: The key bindings. This file will be written on first startup with the default key bindings, so you can edit the file with any changes or aliases you'd like. Multiple bindings per command are supported.

History

Vidar started as a repository that I had named gxui_playground. It was quite literally just a place for me to mess around with gxui. Three weeks later, I had something that I was actually starting to use for development.

Vidar is still missing some important features, but it's pretty close to being a fully featured editor. It's definitely much more respectable for editing go code than for editing other types of files, but with the plugin system in place, that's less and less a core problem with the editor, and more a problem with the lack of support from third party plugins.

Current Features

Important Missing Features

These are all planned, but have yet to be implemented.

  • Plugins on operating systems other than linux.
  • Configurability
    • When you open a new project, you can set up some basic configuration in the UI, but very little else.
    • Most settings will require editing a config file manually, at the moment.
  • Polish
    • There are some frustrating, but difficult-to-solve, bugs lingering around. I squash them when I can, but some of the less annoying ones that either have difficult solutions or are difficult to reproduce regularly are going to be there for a while.
    • The biggest source of frustration for me, personally, is related to the find command always creating multiple cursors. At the time of writing, gxui provides no way to highlight a bit of text without also selecting it. There is also no way to scroll to the next/previous match right now, and the matches are not displayed along the scroll bar as they should be.
    • We also need to do a better job of making cursor history work, so that you can go back to a previous mark, or mark a selection start and then search for the end.

About

vidar is a highly experimental Go editor, written in Go, using gxui

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •