line breaks.

This commit is contained in:
Gabe Venberg 2024-03-15 12:03:16 -05:00
parent 3017160c46
commit bc251f8790
2 changed files with 82 additions and 103 deletions

View file

@ -124,51 +124,45 @@ Ive noticed that people are rethinking and reinventing tools that have existed s
## The lessons learned from the past
A large amount of the innovation in the area, I think, can be attributed to
lessons that have been learned in 50 years of using software; sharp edges we
have repeatedly cut ourselves on, unintuitive interfaces that repeatedly trip us
up, and growing frustration at the limitations that maintaining decades of
backwards compatibility imposes on our tools.
A large amount of the innovation in the area, I think, can be attributed to lessons that have been learned in 50 years of using software;
sharp edges we have repeatedly cut ourselves on,
unintuitive interfaces that repeatedly trip us up,
and growing frustration at the limitations that maintaining decades of backwards compatibility imposes on our tools.
These lessons have been gathering in the collective conciousness, through
cheatsheets, guides, and FAQs; resources to guide us through esoteric error
messages, complex configurations, and dozens upon dozens of flags.
These lessons have been gathering in the collective conciousness;
through cheatsheets, guides, and FAQs;
resources to guide us through esoteric error messages, complex configurations, and dozens upon dozens of flags.
Id like to go over a couple of the more prominent lessons that I feel terminal
tools have learned in the past several decades.
Id like to go over a couple of the more prominent lessons that I feel terminal tools have learned in the past several decades.
### A good out of the box experience
While configurability is great, one should not need to learn a new configuration
language and dozens or hundreds of options to get a usable piece of software.
While configurability is great,
one should not need to learn a new configuration language and dozens or hundreds of options to get a usable piece of software.
Configuration should be for customization, not setup.
One of the earliest examples of this principle may be the fish shell.
Both zsh and fish have powerful prompt and autocompletion engines, but zsh
requires you to setup a custom prompt and enable completions in order to use the
features that set it apart from the competition. With no config file, zsh is no
better than bash. When starting fish for the first time, however, its powerful
autocompletion and information rich prompt are front and center with no
configuration required. Of course, fish still has the same level of
configurability as zsh, it just also has sensible defaults.
Both zsh and fish have powerful prompt and autocompletion engines,
but zsh requires you to setup a custom prompt and enable completions in order to use the features that set it apart from the competition.
With no config file, zsh is no better than bash.
When starting fish for the first time however,
its powerful autocompletion and information rich prompt are front and center with no configuration required.
Of course, fish still has the same level of configurability as zsh, it just also has sensible defaults.
To demonstrate my point, this is the default prompt for zsh with no
configuration. It *only* shows the hostname, none of the advanced featurs you
can get out of a zsh prompt even without plugins.
To demonstrate my point, this is the default prompt for zsh with no configuration.
It *only* shows the hostname, none of the advanced featurs you can get out of a zsh prompt even without plugins.
![zsh prompt, only shows hostname](zsh_prompt.png)
Here is bash's prompt. It actually gives more info than zsh's, even though zsh
can do more when properly configured.
Here is bash's prompt.
It actually gives more info than zsh's, even though zsh can do more when properly configured.
![bash prompt, shows hostname and current directory](bash_prompt.png)
And here is fish's default prompt. It has a few colours, shows everything the
bash prompt does, and additionally shows the git branch we are on.
![fish prompt, has colours, shows hostname, current directory, and git
info](fish_prompt.png)
And here is fish's default prompt.
It has a few colours, shows everything the bash prompt does, and additionally shows the git branch we are on.
![fish prompt, has colours, shows hostname, current directory, and git info](fish_prompt.png)
Text editors are another great example of the evolution of out of the box
defaults. Vim and Neovim both improved on their predecessors, but so much of
that improvement is locked behind extremely complex configuration experiences
and plugins. Heres four different terminal text editors with no configuration
applied:
Text editors are another great example of the evolution of out of the box defaults.
Vim and Neovim both improved on their predecessors,
but much of that improvement is locked behind extremely complex configuration experiences and plugins.
Heres four different terminal text editors with no configuration applied:
![vi, vim, neovim, and helix editors in their default
configuration](editors.png)
@ -177,33 +171,26 @@ Vi, (top left) is our baseline, and, as far as I can tell, doesnt actually
support much for configuration. What you see out of the box is more or less
whats there.
Vim (top right) greatly improved on Vi, adding things such as syntax highlighting, line
numbers, spellchecking, split windows, folding, and even basic autocompletion.
However, everything but syntax highligting is either extremely clunky or
outright disabled without configuration. (for example, the earliest things I did
when I first made a `.vimrc` was to enable indent folding, make some better
keybinds for navigating windows, and adding a line number ruler to the side)
Vim (top right) greatly improved on Vi, adding things such as syntax highlighting, line numbers, spellchecking, split windows, folding, and even basic autocompletion.
However, everything but syntax highligting is either extremely clunky or outright disabled without configuration.
(for example, the earliest things I did when I first made a `.vimrc` was to enable indent folding,
make some better keybinds for navigating windows, and adding a line number ruler to the side)
Neovim (bottom left) further improved on Vim, adding support for Treesitter and
the Language Server Protocoll, but the out of the box experience is the *exact*
same as vim! In order to take advantage of the LSP and Treesitter support, you
have to install plugins, which means learning a Nvim package manager, learning
how to configure LSPs, and configuring a new LSP for every language you want to
use it with. (Or finding out about Mason and being OK with having multiple
levels of package management in your Nvim install alone). Dont get me wrong,
Neovim is a great editor once you get over the hump, I still use it as my daily
driver, but so much of its functionality is simply hidden.
Neovim (bottom left) further improved on Vim, adding support for Treesitter and the Language Server Protocoll, but the out of the box experience is the *exact* same as vim!
In order to take advantage of the LSP and Treesitter support, you have to install plugins,
which means learning a Nvim package manager, learning how to configure LSPs, and configuring a new LSP for every language you want to use it with.
(Or finding out about Mason and being OK with having multiple levels of package management in your Nvim install alone).
Dont get me wrong, Neovim is a great editor once you get over the hump, I still use it as my daily driver, but so much of its functionality is simply hidden.
Then we have the Helix (bottom right) editor. Colour scheme aside, everything is
just there. Helix doesnt have plugin support
[yet](https://github.com/helix-editor/helix/discussions/3806), but it has so
much stuff in core that, looking through my neovim plugins, pretty much all of
them are in the core editor! (ironically, the one feature that I feel helix is
missing, [folding](https://github.com/helix-editor/helix/issues/1840), is a core
part of neovim, albiet one that requires some configuration to get good use out
of). Helix does have a config file where you can change a huge amount of
settings, but its an extremely usable IDE out of the box, thanks to having all
of its features enabled by default.
Then we have the Helix (bottom right) editor. Colour scheme aside, everything is just there.
Helix doesnt have plugin support [yet](https://github.com/helix-editor/helix/discussions/3806),
but it has so much stuff in core that,
looking through my neovim plugins,
pretty much all of them are in the core editor!
(ironically, the one feature that I feel helix is missing, [folding](https://github.com/helix-editor/helix/issues/1840),
is a core part of neovim, albiet one that requires some configuration to get good use out of).
Helix does have a config file where you can change a huge amount of settings,
but its an extremely usable IDE out of the box, thanks to having all of its features enabled by default.
### Friendly error messages