I've switched from sudo to doas (and, since I didn't need sudo anymore, uninstalled sudo). Unfortunately, If I forget to write "doas" before "micro /path/to/read-only/file/" if I try to save changes micro doesn't recognize that sudo isn't installed and can't save the changes. For those who don't know, doas is like sudo but without a bunch of features most desktop users don't use anyways. It's a BSD thing but is also ported to Linux. The reason why [most] people switch to doas is that it's source-code is smaller and less code -> probably less bugs -> smaller attack surface, so having both sudo and doas is pointless (since it would only increase attack surface).
Zachary Yedidia
@zyedidia
You can use the sucmd option to configure micro to use doas instead of sudo for saving
You've made transition from GUI text editors to a terminal text editor so easy!
Zachary Yedidia
@zyedidia
I'm glad! The javascript syntax highlighting is fairly primitive and doesn't have support for embedded html like that. It might be worth opening an issue to see if other people have solutions for this.
The code runs without any issues. It's not pure javascript, it's javascript+reactjs. The html-like code you are seeing is JSX and it works perfectly fine with react
Zachary Yedidia
@zyedidia
Yeah unfortunately micro doesn't have good syntax highlighting support for jsx/non-standard javascript.
completely ignoring JSX code would be a good-enough solution for me
Zachary Yedidia
@zyedidia
To disable syntax highlighting you can turn the syntax option off. In ~/.config/micro/settings.json you could make a local option that disables syntax highlighting for *.js files (see the section "Global and local settings" in > help options).
:point_up: Edit: Hello, I enjoy using the Micro text editor, but, unfortunately, I know neither Go or Lua. Is this the right place to request features/report bugs?