From f3f74cfd70b5bd4378ae0b3e4e082f63e7dd1168 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 15 Jan 2024 14:59:56 +0800 Subject: [PATCH] docs: editors --- home/base/desktop/editors/Glossary.md | 1 + home/base/desktop/editors/README.md | 22 +++++++++++----------- home/base/desktop/editors/helix/README.md | 6 ++++++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/home/base/desktop/editors/Glossary.md b/home/base/desktop/editors/Glossary.md index 27f54308..90538acc 100644 --- a/home/base/desktop/editors/Glossary.md +++ b/home/base/desktop/editors/Glossary.md @@ -8,6 +8,7 @@ The Language Server Protocol (LSP) is an open, JSON-RPC-based protocol for use between source code editors or integrated development environments (IDEs) and servers that provide programming language-specific features like: +- motions such as go-to-definition, find-references, hover. - **code completion** - **marking of warnings and errors** - **refactoring routines** diff --git a/home/base/desktop/editors/README.md b/home/base/desktop/editors/README.md index 474afd2e..e84218c3 100644 --- a/home/base/desktop/editors/README.md +++ b/home/base/desktop/editors/README.md @@ -61,17 +61,17 @@ I mainly use Zellij for terminal related operations, here is its terminal shortc > https://vimhelp.org/motion.txt.html -| Action | Command | -| --------------------------------------------------- | ---------------------------------------- | -| Move to the start/end of the buffer | `gg`/`G` | -| Move the line number 5 | `5gg` / `5G` | -| Move left/down/up/right | h/j/k/l or `5h`/`5j`/`5k`/`5l` | -| Move to the matchpairs, default to `()`, `{}`, `[]` | `%` | -| Move to the start/end of the line | `0` / `$` | -| Move a sentence forward/backward | `(` / `)` | -| Move a paragraph forward/backward | `{` / `}` | -| Move a section forward/backward | `[[` / `]]` | -| Jump to various positions | `'` + some other keys(neovim has prompt) | +| Action | Command | +| --------------------------------------------------- | -------------------------------------------------- | +| Move to the start/end of the buffer | `gg`/`G` | +| Move the line number 5 | `5gg` / `5G` | +| Move left/down/up/right | h/j/k/l or `5h`/`5j`/`5k`/`5l` or `Ctr-n`/`Ctrl-p` | +| Move to the matchpairs, default to `()`, `{}`, `[]` | `%` | +| Move to the start/end of the line | `0` / `$` | +| Move a sentence forward/backward | `(` / `)` | +| Move a paragraph forward/backward | `{` / `}` | +| Move a section forward/backward | `[[` / `]]` | +| Jump to various positions | `'` + some other keys(neovim has prompt) | Text Objects: diff --git a/home/base/desktop/editors/helix/README.md b/home/base/desktop/editors/helix/README.md index 4eebb4a3..9e31723a 100644 --- a/home/base/desktop/editors/helix/README.md +++ b/home/base/desktop/editors/helix/README.md @@ -7,6 +7,10 @@ But its configuration is a bit complex, and finding the right plugins, writing c That's why I'm interested in Helix, Helix is similar to Neovim, but it's more opinionated, and it's batteries included. Whether I'll switch my main editor to Helix or not, it gives me a lot of ideas on how to improve my Neovim workflow. +## Tutorial + +Use `:tutor` in helix to start the tutorial. + ## Differences between Neovim and Helixer 1. Neovim have a very activate plugin ecosystem, and it's easy to find plugins for almost everything. @@ -22,6 +26,8 @@ Whether I'll switch my main editor to Helix or not, it gives me a lot of ideas o 1. It seems Helix lacks a substitution command, you should run it in another window(via wm or Zellij). 1. Neovim's substitution command allow you to preview the changes before you apply it, and it's very useful. if I switch to Helix, I'll need to find some other tools with similar feature(such as https://github.com/ms-jpq/sad). 2. The downside of Neovim's substitution command is that it's unable to save the command we just typed. If I made some things wrong, I have to type the whole substitution command again. +1. Complexity and Maintenance Costs vs Batteries Included: + I think Use Helix/Neovim within a terminal file manager(Yazi/ranger/Broot) and Zellij is a good idea. It's quite different from the workflow I migrated from VSCode/JetBrains before, I'm very interested in it.