Live data from Hacker News

Micro v1.0 – a terminal-based text editor written in Go

github.com

31–40 of 47 posts

Re: Micro v1.0 – a terminal-based text editor written in Go

#32
post #7

8.5Mb is a little too much for editor named micro. Whole DD-WRT/OpenWRT Linux Image is twice smaller.

Relative to: Atom, VS, Sublime Text, the mac Notes app, and modern hard drive sizes - it's pretty small. No, it's not as small as Nano, but I have a hard time getting my hackles up over a single binary I can download in under a second.

The Notes app executable is 2.4MB uncompressed and Notes handles a whole bunch of stuff this thing doesn't. Sublime is 12.5MB.

Re: Micro v1.0 – a terminal-based text editor written in Go

#33

just curious -- what motivated you to write a new text editor?

I know people for whom Vim was overwhelming to learn and they gave up or didn't use it properly. I'm trying to make an terminal-based editor which gives them as much as possible of the power of Vim or Emacs, while making it dead simple to learn and use.

It's AWESOME.

I have used emacs, vim, micro-emacs, sublime, notepad++, wscite, etc etc. This might not be so feature rich, but in my first try, this felt just right!

Re: Micro v1.0 – a terminal-based text editor written in Go

#35

Any way to bind the mac command key (⌘)?

Unfortunately it is impossible to bind the mac command key because the terminal does not forward those key events to the applications (for example pressing Cmd-Q closes the terminal, not the app running in the terminal). See this issue: https://github.com/zyedidia/micro/issues/19.

Re: Micro v1.0 – a terminal-based text editor written in Go

#36
post #21

Why does it seem like Go programmers need to include "in Go" on the tail end of product announcements?

"in language X" tells me, "I'm comfortable hacking in language X, I'm happy with the idea of using a product written in something I can hack". A pretty good reason, I think.

Re: Micro v1.0 – a terminal-based text editor written in Go

#37
post #21

Why does it seem like Go programmers need to include "in Go" on the tail end of product announcements?

There's also already a reasonably-popular Go project called "Micro," though honestly both projects could have picked better names. https://github.com/micro

Yes it's unfortunate that there is already a popular Go project called "micro." The name here is a play on "nano" editor and I had already started the project by the time I saw https://github.com/micro. Oh well, I still like the name.

Re: Micro v1.0 – a terminal-based text editor written in Go

#38
post #7

8.5Mb is a little too much for editor named micro. Whole DD-WRT/OpenWRT Linux Image is twice smaller.

And kilo[1] is 28k but it doesn't have as many features. Also a "keyboard" vs "keystroke" editor, editors built before ginormous keyboards became ubiquitous use various keystrokes for commands, ones that came to exist in an assumed presence of a ginormous keyboard use special keys for commands. (example, if the only way to move the cursor up in your editor is the cursor up arrow key, you are a "keyboard" based editor. Not that either choice is better or worse just something I find an interesting distinction.

[1] https://github.com/antirez/kilo

Re: Micro v1.0 – a terminal-based text editor written in Go

#39
post #29
post #27

Earlier quoted context omitted.

also statically linked, at least on osx.

All go binaries are statically linked. It's supposed to be one of the selling points of the language.

Go packages are statically linked into Go executables, yes. That doesn't mean that C libraries are, though -- and I think it's that level of static linkage that the parent meant.

If you're on macOS, try running $ otool -L some-go-program, or on linux:

  $ ldd ./team-service
        linux-vdso.so.1 (0x00007ffe492af000)
        libpthread.so.0 => /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/libpthread.so.0 (0x00007f47ef267000)
        libssl.so.1.0.0 => /nix/store/v9mq9iv2sg017r7i0fpw8qlifvlpvlks-openssl-1.0.2h/lib/libssl.so.1.0.0 (0x00007f47eeff6000)
        libcrypto.so.1.0.0 => /nix/store/v9mq9iv2sg017r7i0fpw8qlifvlpvlks-openssl-1.0.2h/lib/libcrypto.so.1.0.0 (0x00007f47eeba4000)
        libc.so.6 => /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/libc.so.6 (0x00007f47ee803000)
        /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/ld-linux-x86-64.so.2 (0x00007f47ef484000)
        libdl.so.2 => /nix/store/9xsjqbsldr86vvs7p5ps4qlkjv9dhc0k-glibc-2.23/lib/libdl.so.2 (0x00007f47ee5ff000)

Re: Micro v1.0 – a terminal-based text editor written in Go

#40

just curious -- what motivated you to write a new text editor?

I know people for whom Vim was overwhelming to learn and they gave up or didn't use it properly. I'm trying to make an terminal-based editor which gives them as much as possible of the power of Vim or Emacs, while making it dead simple to learn and use.

This is great work. I hated the usability of both Vim and Emacs coming from a Windows background. I knew it could be more intuitive. You've definitely accomplished that. One problem I ran into is figuring out how to close current document but keep editor open. I didn't see it skimming help tutorial or help commands. In most editors, it's called "close" (with "quit" as separate option) or "new." I suggest adding that if the command doesn't exist or putting it in help near "save" and "quit" if it does exist.
Post reply on HN