vidar

command module
v0.0.0-...-bbcbdef Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Unlicense Imports: 23 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package asset contains asset files (logos, icons, etc), as well as go-bindata generated files for the asset files.
Package asset contains asset files (logos, icons, etc), as well as go-bindata generated files for the asset files.
fs
bind
Package bind contains some of the types that the commander package uses to identify types to bind to user input or other events.
Package bind contains some of the types that the commander package uses to identify types to bind to user input or other events.
control
Package control contains types that the commander uses to identify as control flow types.
Package control contains types that the commander uses to identify as control flow types.
Package fsw wraps filesystem watchers to ensure the best experience on the operating system that vidar was built for.
Package fsw wraps filesystem watchers to ensure the best experience on the operating system that vidar was built for.
Package plugin contains logic for registering and binding plugins with vidar.
Package plugin contains logic for registering and binding plugins with vidar.
command
Package command contains types that plugins use to access functionality of the commander.Commander.
Package command contains types that plugins use to access functionality of the commander.Commander.
comments
Package comments contains logic for working with comments.
Package comments contains logic for working with comments.
godef
Package godef contains logc for interacting with the godef command line tool.
Package godef contains logc for interacting with the godef command line tool.
license
Package license contains plugins for working with project licenses.
Package license contains plugins for working with project licenses.
status
Package status contains types that plugins can make use of in their bindables for displaying status to the user.
Package status contains types that plugins can make use of in their bindables for displaying status to the user.
vfmt
Package vfmt contains logic for performing 'v fmt' on vlang files.
Package vfmt contains logic for performing 'v fmt' on vlang files.
vsyntax
Package vsyntax implements plugins for syntax highlighting and parsing for the v language (vlang.io).
Package vsyntax implements plugins for syntax highlighting and parsing for the v language (vlang.io).
Package test includes some common test code specific to the vidar project.
Package test includes some common test code specific to the vidar project.

Jump to

Keyboard shortcuts

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