docs: editors

This commit is contained in:
Ryan Yin
2024-01-15 14:59:56 +08:00
parent 4d53f559b1
commit f3f74cfd70
3 changed files with 18 additions and 11 deletions

View File

@@ -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**

View File

@@ -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:

View File

@@ -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: <https://github.com/helix-editor/helix/discussions/6356>
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.