Nice work by the author. Honestly, though, it doesn't scratch an itch for me personally, since I'm pretty happy with https://github.com/fatih/vim-go ... This is like the ultimate vim plugin for Go and includes the kitchen sink, remarkably via included go tools for the most part:
- More colors than a christmas tree
- Autocomplete via gocode
- Auto-gofmt and auto-goimports
- Safe refactoring / renaming support
- Follow references / callers / callees via go oracle
- Show test coverage
- Show godocs
- golint, go vet,
And I'm still not remembering like 30 other features. If you're a vim user and haven't checked out vim-go, give it a look.
As someone else had pointed out, this new editor has pointed me in the direction of https://github.com/gdamore/tcell which looks mighty interesting indeed...
Oh thank god -- from the description of internal testing, it sounds like tcell Did It Right in avoiding absurdly global references to the tty, something that's quite painful in termbox. If it's as good as it sounds, I can't wait to change my applications over to this.
The implementation of checking if a buffer is dirty seems a bit... odd. It compares the saved text with the buffer text. Seems like a bool should do fine based on other operations I saw in that file.
The reason I do the check that way is because if the user adds a character, and then deletes it, the buffer has not been modified, but if you just set a bool to true when an insert event happens, it will think the buffer has been modified.
If there is a better way to do this please let me know.
In general, you should optimize for common use cases. In a file editor, you will be modifying the file and when you go to save it, it will be different.
* Execute commands (edit: to manage the editor settings).
* Support for shortcuts we're all very accustomed to in other software C+S to save, Ctrl+c to copy, Ctrl+v to paste, etc
* Mouse Support
Nano serves it's purpose but sometimes I need something that feels "modern" so I use TextAdept (works on the terminal as well). I might give Micro a try though.
In addition to those features, micro also supports colors better. You can make colorschemes for it so that syntax highlighting is consistent across filetypes, and it supports 256, and true color, while nano only supports 16 colors.
Micro can also easily interface with the system clipboard (Ctrl-c, Ctrl-x, Ctrl-v).
As someone else had pointed out, this new editor has pointed me in the direction of https://github.com/gdamore/tcell which looks mighty interesting indeed...