migrations
This commit is contained in:
parent
d1b0670d71
commit
f2b07c9f30
57 changed files with 2970 additions and 1 deletions
0
10-linux/00-utils/README.md
Normal file
0
10-linux/00-utils/README.md
Normal file
7
10-linux/00-utils/adb/transfer.md
Normal file
7
10-linux/00-utils/adb/transfer.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
```
|
||||
# Просмотр подключённых устройств adb devices
|
||||
# Получить файл с телефона на ноутбук (самое частое)
|
||||
|
||||
adb pull /sdcard/Download/файл.txt ~/Downloads/
|
||||
# Отправить файл на телефон adb push ~/файл.txt /sdcard/
|
||||
```
|
||||
232
10-linux/00-utils/commits.md
Normal file
232
10-linux/00-utils/commits.md
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
## Как писать коммиты как senior девелопер
|
||||
|
||||
Это не просто про формат — это про философию. Senior коммиты рассказывают историю проекта, облегчают отладку и экономят часы времени команде при code review. Вот полный гайд.[dev+5](https://dev.to/aneeqakhan/best-practices-for-git-and-version-control-588m)
|
||||
|
||||
## 📋 Фундаментальный принцип: Atomic Commits
|
||||
|
||||
**Основное правило:** Один коммит = один логический блок работы. Не больше, не меньше.[gitbybit+1](https://gitbybit.com/gitopedia/best-practices/atomic-commits)
|
||||
|
||||
**Bad (как junior):**
|
||||
|
||||
text
|
||||
|
||||
`commit 6a7f9c3: "Добавил купоны, отфиксил ссылки в письмах и рефакторил email scheduler"`
|
||||
|
||||
**Good (как senior):**
|
||||
|
||||
text
|
||||
|
||||
`commit a1b2c3d: "feat(coupons): add coupon validation and application logic" commit d4e5f6g: "fix(email): correct notification template links" commit h7i8j9k: "refactor(scheduler): simplify email scheduling algorithm"`
|
||||
|
||||
Почему? Потому что через месяц ты найдёшь баг в купонах и сделаешь `git bisect` — он точно укажет именно на первый коммит, не трогая остальное.[justinjoyce+2](https://justinjoyce.dev/git-commit-and-commit-message-best-practices/)
|
||||
|
||||
## 🎯 Conventional Commits (стандарт индустрии)
|
||||
|
||||
Используй этот формат — его поддерживают инструменты автоматизации, CI/CD пайплайны генерируют CHANGELOG сами:[philipp-doblhofer+2](https://www.philipp-doblhofer.at/en/blog/automatic-changelog-and-versioning-with-git/)
|
||||
|
||||
text
|
||||
|
||||
`<type>[optional scope]: <description> [optional body] [optional footer(s)]`
|
||||
|
||||
**Типы коммитов:**
|
||||
|
||||
|Тип|Использование|Semver|
|
||||
|---|---|---|
|
||||
|`feat`|Новая фича|MINOR (+0.1.0)|
|
||||
|`fix`|Исправление бага|PATCH (+0.0.1)|
|
||||
|`BREAKING CHANGE`|Ломающее изменение API|MAJOR (+1.0.0)|
|
||||
|`refactor`|Переписал без изменения поведения|PATCH|
|
||||
|`perf`|Улучшил производительность|PATCH|
|
||||
|`docs`|Только документация|-|
|
||||
|`chore`|Build, deps, tooling|-|
|
||||
|`test`|Добавил/изменил тесты|-|
|
||||
|`ci`|Изменения CI/CD конфига|-|
|
||||
|`style`|Форматирование (не логика)|-|
|
||||
|
||||
[opensight+2](https://blog.opensight.ch/git-semantic-versioning-und-conventional-commits/)
|
||||
|
||||
**Примеры:**
|
||||
|
||||
bash
|
||||
|
||||
`# ✅ Good feat(auth): add JWT token refresh mechanism fix(api): handle null response from external service refactor(parser): extract token validation into separate function perf(cache): implement Redis caching for frequently accessed data docs(readme): update installation instructions for Node 18+ # ❌ Bad updated code fix bug changes WIP todo`
|
||||
|
||||
## 📝 Правила написания сообщения
|
||||
|
||||
**Subject (первая строка — максимум 50 символов):**
|
||||
|
||||
1. **Используй повелительное наклонение** (imperative mood) — "Add", "Fix", а не "Added", "Fixed"[gitkraken+3](https://www.gitkraken.com/learn/git/best-practices/git-commit-message)
|
||||
|
||||
- Проверка: "If applied, my commit will **[ваше сообщение]**"
|
||||
|
||||
- "If applied, my commit will **add JWT token refresh**" ✅
|
||||
|
||||
- "If applied, my commit will **added JWT token**" ❌
|
||||
|
||||
2. **Не ставь точку в конце**[gitkraken](https://www.gitkraken.com/learn/git/best-practices/git-commit-message)
|
||||
|
||||
3. **Начни с заглавной буквы**[dev+1](https://dev.to/aneeqakhan/best-practices-for-git-and-version-control-588m)
|
||||
|
||||
4. **Конкретно описывай ЧТО, не ПОЧЕМУ** (ПОЧЕМУ — в body)[dev+2](https://dev.to/this-is-learning/the-power-of-atomic-commits-in-git-how-and-why-to-do-it-54mn)
|
||||
|
||||
|
||||
**Body (опционально, но рекомендуется):**
|
||||
|
||||
- Отдели пустой строкой от subject
|
||||
|
||||
- Обясни **ПОЧЕМУ** ты это сделал, не ЧТО сделал
|
||||
|
||||
- Укажи мотивацию и контекст
|
||||
|
||||
- Упомяни issue/ticket номер
|
||||
|
||||
|
||||
text
|
||||
|
||||
`feat(payment): implement Stripe webhook handler Add webhook endpoint to handle Stripe payment events. This replaces the previous polling mechanism which caused 5-10 second delays in payment confirmation. Supports events: - payment_intent.succeeded - payment_intent.payment_failed Closes #1234 Related-to: #5678`
|
||||
|
||||
## 🎮 Advanced techniques для senior
|
||||
|
||||
## 1. Interactive Staging (`git add -p`)
|
||||
|
||||
Когда в одном файле несколько независимых изменений — stage их отдельно:[dev+2](https://dev.to/theramoliya/git-interactive-add-for-precise-staging-33m1)
|
||||
|
||||
bash
|
||||
|
||||
`# Запустить интерактивный режим git add -p # Git покажет каждый "hunk" (блок) изменений: # (1/2) Stage this hunk [y,n,q,a,d,j,J,k,K,s,e,?]? # Команды: # y = stage this hunk # n = skip # s = split into smaller hunks (если hunk слишком большой) # e = manually edit this hunk`
|
||||
|
||||
**Пример:** Ты отфиксил баг в функции AND случайно отреформатировал другую функцию. Используй `git add -p`, чтобы добавить только багфикс в один коммит, а рефакторинг — в другой.[git-scm+2](https://git-scm.com/book/en/v2/Git-Tools-Interactive-Staging)
|
||||
|
||||
## 2. Commit Often, Squash on PR
|
||||
|
||||
**Local workflow (когда разрабатываешь):**
|
||||
|
||||
Коммиться часто — чуть ли не каждые 5-10 минут:[justinjoyce+1](https://justinjoyce.dev/git-commit-and-commit-message-best-practices/)
|
||||
|
||||
bash
|
||||
|
||||
`# 5 минут работы git commit -m "WIP: parsing implementation" # 5 минут работы git commit -m "add error handling" # 5 минут работы git commit -m "fix edge case"`
|
||||
|
||||
**Перед push на PR:**
|
||||
|
||||
Используй interactive rebase для squash в один красивый коммит:[graphite+2](https://graphite.dev/guides/how-to-squash-git-commits)
|
||||
|
||||
bash
|
||||
|
||||
`# Узнай количество коммитов git log --oneline | head -10 # Rebase последних 3 коммитов git rebase -i HEAD~3`
|
||||
|
||||
В редакторе измени команды:
|
||||
|
||||
text
|
||||
|
||||
`pick a1b2c3d WIP: parsing implementation squash d4e5f6g add error handling squash h7i8j9k fix edge case`
|
||||
|
||||
Сохрани → Git откроет редактор для финального message → напиши нормальный subject:[freecodecamp+2](https://www.freecodecamp.org/news/git-squash-commits/)
|
||||
|
||||
text
|
||||
|
||||
`feat(parser): implement JSON parser with error handling - Parse nested structures - Handle validation errors gracefully - Support edge cases with null/undefined values`
|
||||
|
||||
## 3. Amending commits
|
||||
|
||||
Забыл добавить файл или опечатка в message? Не создавай новый коммит:[datacamp+2](https://www.datacamp.com/tutorial/git-amend)
|
||||
|
||||
bash
|
||||
|
||||
`# Опечатка в message последнего коммита git commit --amend -m "fix(auth): correct typo in comment" # Забыл файл git add forgotten-file.rs git commit --amend --no-edit`
|
||||
|
||||
⚠️ **Важно:** Не амендь коммиты, которые уже pushed в shared branch! Это сломает историю для всех.[kodaschool+2](https://kodaschool.com/blog/amending-the-most-recent-commit-with-git)
|
||||
|
||||
## 4. Reflog для спасения
|
||||
|
||||
Если переборщил с rebase и потерял коммиты — не паникуй:[justinjoyce](https://justinjoyce.dev/git-commit-and-commit-message-best-practices/)
|
||||
|
||||
bash
|
||||
|
||||
`# Увидишь всю историю операций git reflog # Вернёшься на нужное состояние git reset --hard abc123d@{2}`
|
||||
|
||||
## 🎯 Настройки для удобства
|
||||
|
||||
**~/.gitconfig:**
|
||||
|
||||
text
|
||||
|
||||
`[user] name = Your Name email = you@example.com [core] editor = vim # или nano, code, etc. [alias] # Удобные aliases cm = commit -m amend = commit --amend --no-edit co = checkout br = branch unstage = reset HEAD last = log -1 HEAD # Красивый лог lg = log --graph --oneline --all --decorate [rebase] autostash = true # Автоматически stash перед rebase [pull] rebase = true # Rebase вместо merge при pull`
|
||||
|
||||
## 📊 Workflow: step-by-step для PR
|
||||
|
||||
**1. Работаешь над фичей:**
|
||||
|
||||
bash
|
||||
|
||||
`git checkout -b feat/user-authentication # Часто коммитишься (не думаешь об истории) git commit -m "WIP: add login form" git commit -m "add password validation" git commit -m "integrate with auth service" git commit -m "fix bug with token expiry"`
|
||||
|
||||
**2. Перед PR: cleanup история**
|
||||
|
||||
bash
|
||||
|
||||
`# Посмотри что есть git log --oneline origin/main..HEAD # Если совсем много коммитов git rebase -i origin/main # Или если точно знаешь кол-во git rebase -i HEAD~4`
|
||||
|
||||
**3. В редакторе:**
|
||||
|
||||
text
|
||||
|
||||
`pick a1b2c3d WIP: add login form squash d4e5f6g add password validation squash h7i8j9k integrate with auth service squash k9l0m1n fix bug with token expiry`
|
||||
|
||||
**4. Напиши финальный message:**
|
||||
|
||||
text
|
||||
|
||||
`feat(auth): implement JWT-based user authentication Add login/logout functionality with password validation. Tokens refresh automatically after 1 hour. Implements RFC 7519 JWT standard. - User registration with email verification - Secure password hashing with bcrypt - Token refresh mechanism - Logout clears session Closes #456`
|
||||
|
||||
**5. Push:**
|
||||
|
||||
bash
|
||||
|
||||
`git push origin feat/user-authentication`
|
||||
|
||||
## 🚫 Что НЕ делать (как junior)
|
||||
|
||||
- **Огромные коммиты** с кучей фич — невозможно code review[gitbybit+1](https://gitbybit.com/gitopedia/best-practices/atomic-commits)
|
||||
|
||||
- **Вагие сообщения** ("fix bug", "updated", "wip") — потом сам не поймёшь[codefinity+2](https://codefinity.com/blog/7-Best-Practices-of-Git-Commit-Messages)
|
||||
|
||||
- **Смешивать логику и форматирование** — затрудняет `git blame`[gitbybit+1](https://gitbybit.com/gitopedia/best-practices/atomic-commits)
|
||||
|
||||
- **Коммитить commented code** — если не нужно, удали[dev](https://dev.to/aneeqakhan/best-practices-for-git-and-version-control-588m)
|
||||
|
||||
- **Амендить уже pushed коммиты** в shared branch — травма для команды[datacamp](https://www.datacamp.com/tutorial/git-amend)
|
||||
|
||||
|
||||
## Итог для твоего стека
|
||||
|
||||
Если ты backend-разработчик на Rust/FastAPI:
|
||||
|
||||
**Пример реального коммита для Axum middleware:**
|
||||
|
||||
text
|
||||
|
||||
`feat(auth): add rate limiting middleware Implement token bucket algorithm for request rate limiting. Prevents brute force attacks on login endpoint. - Configurable requests-per-minute limit - Per-IP rate limiting with Redis backend - Returns 429 Too Many Requests on limit exceeded - Exports Prometheus metrics for monitoring Performance: ~0.1ms per request overhead Closes #892`
|
||||
|
||||
Это **куда важнее**, чем технические skills — senior ценят за историю, которая сама себя документирует и облегчает дебагинг всвсей команде.
|
||||
|
||||
1. [https://dev.to/aneeqakhan/best-practices-for-git-and-version-control-588m](https://dev.to/aneeqakhan/best-practices-for-git-and-version-control-588m)
|
||||
2. [https://gitbybit.com/gitopedia/best-practices/atomic-commits](https://gitbybit.com/gitopedia/best-practices/atomic-commits)
|
||||
3. [https://www.philipp-doblhofer.at/en/blog/automatic-changelog-and-versioning-with-git/](https://www.philipp-doblhofer.at/en/blog/automatic-changelog-and-versioning-with-git/)
|
||||
4. [https://justinjoyce.dev/git-commit-and-commit-message-best-practices/](https://justinjoyce.dev/git-commit-and-commit-message-best-practices/)
|
||||
5. [https://dev.to/this-is-learning/the-power-of-atomic-commits-in-git-how-and-why-to-do-it-54mn](https://dev.to/this-is-learning/the-power-of-atomic-commits-in-git-how-and-why-to-do-it-54mn)
|
||||
6. [https://codefinity.com/blog/7-Best-Practices-of-Git-Commit-Messages](https://codefinity.com/blog/7-Best-Practices-of-Git-Commit-Messages)
|
||||
7. [https://blog.opensight.ch/git-semantic-versioning-und-conventional-commits/](https://blog.opensight.ch/git-semantic-versioning-und-conventional-commits/)
|
||||
8. [https://dev.to/devsatasurion/automate-changelogs-to-ease-your-release-282](https://dev.to/devsatasurion/automate-changelogs-to-ease-your-release-282)
|
||||
9. [https://www.gitkraken.com/learn/git/best-practices/git-commit-message](https://www.gitkraken.com/learn/git/best-practices/git-commit-message)
|
||||
10. [https://dev.to/theramoliya/git-interactive-add-for-precise-staging-33m1](https://dev.to/theramoliya/git-interactive-add-for-precise-staging-33m1)
|
||||
11. [https://git-scm.com/book/en/v2/Git-Tools-Interactive-Staging](https://git-scm.com/book/en/v2/Git-Tools-Interactive-Staging)
|
||||
12. [https://dev.to/etcwilde/git-and-the-interactive-patch-add](https://dev.to/etcwilde/git-and-the-interactive-patch-add)
|
||||
13. [https://graphite.dev/guides/how-to-squash-git-commits](https://graphite.dev/guides/how-to-squash-git-commits)
|
||||
14. [https://www.freecodecamp.org/news/git-squash-commits/](https://www.freecodecamp.org/news/git-squash-commits/)
|
||||
15. [https://www.datacamp.com/tutorial/git-squash-commits](https://www.datacamp.com/tutorial/git-squash-commits)
|
||||
16. [https://www.datacamp.com/tutorial/git-amend](https://www.datacamp.com/tutorial/git-amend)
|
||||
17. [https://kodaschool.com/blog/amending-the-most-recent-commit-with-git](https://kodaschool.com/blog/amending-the-most-recent-commit-with-git)
|
||||
18. [https://www.codecademy.com/article/git-commit-amend](https://www.codecademy.com/article/git-commit-amend)
|
||||
19. [https://www.cockroachlabs.com/blog/parallel-commits/](https://www.cockroachlabs.com/blog/parallel-commits/)
|
||||
20. [https://stackoverflow.com/questions/68095467/git-interactive-rebase-squash-commits-any-shortcuts](https://stackoverflow.com/questions/68095467/git-interactive-rebase-squash-commits-any-shortcuts)
|
||||
3
10-linux/00-utils/git/replace.md
Normal file
3
10-linux/00-utils/git/replace.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
git push new-origin --all
|
||||
git remote add new-origin ssh://git@git-ssh.21-school.ru:2222/students_repo/rorikstr/CPP1_s21_matrixplus.ID_353533-3.git
|
||||
cd ~/src/me/s21/cpp/CPP1_s21_matrixplus.ID_353533-2
|
||||
143
10-linux/00-utils/helix/buffer.md
Normal file
143
10-linux/00-utils/helix/buffer.md
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
В Helix управление буферами очень удобно. Вот основные команды и действия, чтобы:
|
||||
|
||||
---
|
||||
|
||||
## Как открыть новый буфер
|
||||
|
||||
- Открыть файл в новом буфере:
|
||||
|
||||
text
|
||||
|
||||
`:open filename`
|
||||
|
||||
или клавиша быстрого вызова:
|
||||
|
||||
text
|
||||
|
||||
`<space> f`
|
||||
|
||||
Вызовет **file picker**, где можно выбрать или ввести имя файла.
|
||||
|
||||
- Открыть новый пустой (scratch) буфер:
|
||||
|
||||
text
|
||||
|
||||
`:new`
|
||||
|
||||
Можно использовать также `:vnew` (вертикальный сплит) или `:hsplit` (горизонтальный сплит).
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Как переключаться между буферами
|
||||
|
||||
- Открыть список буферов (buffer picker):
|
||||
|
||||
text
|
||||
|
||||
`<space> b`
|
||||
|
||||
Навигация стрелками для выбора.
|
||||
|
||||
- Следующий буфер:
|
||||
|
||||
text
|
||||
|
||||
`gn`
|
||||
|
||||
- Предыдущий буфер:
|
||||
|
||||
text
|
||||
|
||||
`gp`
|
||||
|
||||
- Перейти к конкретному буферу по номеру (если есть номера в конфиге):
|
||||
|
||||
text
|
||||
|
||||
`:buffer N`
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Как закрыть буфер
|
||||
|
||||
- Закрыть текущий буфер:
|
||||
|
||||
text
|
||||
|
||||
`:buffer-close`
|
||||
|
||||
или короче
|
||||
|
||||
text
|
||||
|
||||
`bc`
|
||||
|
||||
- Закрыть все другие буферы кроме текущего:
|
||||
|
||||
text
|
||||
|
||||
`:buffer-close-others`
|
||||
|
||||
или
|
||||
|
||||
text
|
||||
|
||||
`bca`
|
||||
|
||||
- Закрыть буфер с сохранением:
|
||||
|
||||
text
|
||||
|
||||
`:write-buffer-close`
|
||||
|
||||
или
|
||||
|
||||
text
|
||||
|
||||
`wbc`
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Полезные команды для буферов
|
||||
|
||||
|Команда|Назначение|
|
||||
|---|---|
|
||||
|`<space> b`|Открыть picker буферов|
|
||||
|`gn`|Следующий буфер|
|
||||
|`gp`|Предыдущий буфер|
|
||||
|`bc`|Закрыть текущий буфер|
|
||||
|`bca`|Закрыть все, кроме текущего|
|
||||
|`:open filename`|Открыть файл в новом буфере|
|
||||
|`:new`|Новый пустой буфер (scratch)|
|
||||
|`wbc`|Сохранить и закрыть буфер|
|
||||
|
||||
---
|
||||
|
||||
## Быстрая шпаргалка по буферам
|
||||
|
||||
|Действие|Команда|
|
||||
|---|---|
|
||||
|Открыть файл в буфере|`<space> f` / `:open filename`|
|
||||
|Переключиться|`gn` / `gp` / `<space> b`|
|
||||
|Закрыть буфер|`bc`|
|
||||
|Закрыть другие буферы|`bca`|
|
||||
|Новый пустой буфер|`:new`|
|
||||
|Сохранить и закрыть|`wbc`|
|
||||
|
||||
---
|
||||
|
||||
Это покрывает весь базовый и продвинутый workflow вокруг работы с буферами в Helix, удобно и быстро! 🚀
|
||||
|
||||
1. [https://github.com/helix-editor/helix/discussions/5865](https://github.com/helix-editor/helix/discussions/5865)
|
||||
2. [https://github.com/helix-editor/helix/issues/475](https://github.com/helix-editor/helix/issues/475)
|
||||
3. [https://github.com/helix-editor/helix/discussions/10430](https://github.com/helix-editor/helix/discussions/10430)
|
||||
4. [https://rushter.com/blog/helix-editor/](https://rushter.com/blog/helix-editor/)
|
||||
5. [https://www.youtube.com/watch?v=2P8GP1LEfKE](https://www.youtube.com/watch?v=2P8GP1LEfKE)
|
||||
6. [https://github.com/helix-editor/helix/discussions/6057](https://github.com/helix-editor/helix/discussions/6057)
|
||||
7. [https://www.reddit.com/r/HelixEditor/comments/1i2m50c/i_keep_closing_the_whole_editor_when_i_want_to/](https://www.reddit.com/r/HelixEditor/comments/1i2m50c/i_keep_closing_the_whole_editor_when_i_want_to/)
|
||||
8. [https://github.com/helix-editor/helix/discussions/6983](https://github.com/helix-editor/helix/discussions/6983)
|
||||
9. [https://docs.helix-editor.com/commands.html](https://docs.helix-editor.com/commands.html)
|
||||
10. [https://www.youtube.com/watch?v=S4tTZjz-NTc](https://www.youtube.com/watch?v=S4tTZjz-NTc)
|
||||
97
10-linux/00-utils/helix/changes.md
Normal file
97
10-linux/00-utils/helix/changes.md
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
Отлично! В Helix есть **несколько способов** увидеть несохранённые изменения:
|
||||
|
||||
## 1. Индикатор в статус-баре (самый простой)
|
||||
|
||||
**Смотри на статус-бар внизу экрана**:[github+1](https://github.com/helix-editor/helix/issues/4686)
|
||||
|
||||
text
|
||||
|
||||
`NOR path/to/file.rs [+] 12:34 rust ↑ несохранённые изменения!`
|
||||
|
||||
**`[+]`** (или `[modified]`) означает, что файл изменён но не сохранён.[dev+1](https://dev.to/rajasegar/the-helix-way-36mh)
|
||||
|
||||
Если индикатора нет — файл сохранён ✅
|
||||
|
||||
## 2. Git diff gutter (если файл в git)
|
||||
|
||||
**Цветные полоски слева от номеров строк**:[helix-editor](https://docs.helix-editor.com/master/editor.html)
|
||||
|
||||
text
|
||||
|
||||
`│ 1 fn main() { ~ 2 println!("modified"); ← оранжевая волна = изменено + 3 let x = 5; ← зелёная полоса = добавлено - 4 // deleted line ← красная полоса = удалено │ 5 }`
|
||||
|
||||
Включено по умолчанию для git-репозиториев.[helix-editor](https://docs.helix-editor.com/master/editor.html)
|
||||
|
||||
## 3. Команды навигации по изменениям
|
||||
|
||||
**`]g`** — следующее изменение (goto next change)[helix-editor](https://docs.helix-editor.com/commands.html)
|
||||
**`[g`** — предыдущее изменение (goto prev change)[helix-editor](https://docs.helix-editor.com/commands.html)
|
||||
**`]G`** — последнее изменение (goto last change)[helix-editor](https://docs.helix-editor.com/commands.html)
|
||||
**`[G`** — первое изменение (goto first change)[helix-editor](https://docs.helix-editor.com/commands.html)
|
||||
|
||||
Прыгает курсором между изменёнными строками, чтобы ты мог быстро посмотреть, что менялось.[helix-editor](https://docs.helix-editor.com/commands.html)
|
||||
|
||||
## 4. Проверка при выходе
|
||||
|
||||
Если пытаешься выйти с несохранёнными изменениями:
|
||||
|
||||
**`:q`** или **`:quit`** — Helix покажет **предупреждение**:
|
||||
|
||||
text
|
||||
|
||||
`Error: Unsaved changes! Use :q! to force quit.`
|
||||
|
||||
**`:q!`** или **`:quit!`** — выйти БЕЗ сохранения (потеря изменений).[helix-editor](https://docs.helix-editor.com/commands.html)
|
||||
|
||||
## 5. Список открытых буферов (buffer line)
|
||||
|
||||
Включи **buffer line** в конфиге:[dev](https://dev.to/rajasegar/the-helix-way-36mh)
|
||||
|
||||
text
|
||||
|
||||
`# ~/.config/helix/config.toml [editor] bufferline = "always" # или "multiple"`
|
||||
|
||||
Тогда сверху появится панель со всеми открытыми файлами:
|
||||
|
||||
text
|
||||
|
||||
`file1.rs file2.rs [+] file3.c ↑ несохранённый файл`
|
||||
|
||||
## 6. Diff с сохранённой версией (нет из коробки)
|
||||
|
||||
К сожалению, Helix **пока не поддерживает** встроенную команду "show unsaved changes" (как в VSCode или Sublime). Это feature request.[github+1](https://github.com/helix-editor/helix/discussions/8864)
|
||||
|
||||
**Workaround**: используй git diff:
|
||||
|
||||
bash
|
||||
|
||||
`# В терминале (вне Helix) git diff file.rs`
|
||||
|
||||
Или внутри Helix через shell:
|
||||
**Space+c** → напечатай `!git diff %` (% = текущий файл)
|
||||
|
||||
## Лучшая практика
|
||||
|
||||
Комбинируй:
|
||||
|
||||
1. **Смотри на `[+]`** в статус-баре — главный индикатор[github](https://github.com/helix-editor/helix/issues/4686)
|
||||
|
||||
2. **Используй git diff gutter** — видишь изменения прямо в редакторе[helix-editor](https://docs.helix-editor.com/master/editor.html)
|
||||
|
||||
3. **Прыгай по `]g` / `[g`** — быстро проверить все правки[helix-editor](https://docs.helix-editor.com/commands.html)
|
||||
|
||||
4. **Включи bufferline** — видеть все несохранённые файлы сверху[dev](https://dev.to/rajasegar/the-helix-way-36mh)
|
||||
|
||||
|
||||
Теперь никогда не потеряешь изменения!
|
||||
|
||||
1. [https://github.com/helix-editor/helix/issues/4686](https://github.com/helix-editor/helix/issues/4686)
|
||||
2. [https://dev.to/rajasegar/the-helix-way-36mh](https://dev.to/rajasegar/the-helix-way-36mh)
|
||||
3. [https://docs.helix-editor.com/master/editor.html](https://docs.helix-editor.com/master/editor.html)
|
||||
4. [https://docs.helix-editor.com/commands.html](https://docs.helix-editor.com/commands.html)
|
||||
5. [https://github.com/helix-editor/helix/discussions/8864](https://github.com/helix-editor/helix/discussions/8864)
|
||||
6. [https://forum.sublimetext.com/t/improve-the-diff-shown-by-show-unsaved-changes/62198](https://forum.sublimetext.com/t/improve-the-diff-shown-by-show-unsaved-changes/62198)
|
||||
7. [https://github.com/helix-editor/helix/issues/1125](https://github.com/helix-editor/helix/issues/1125)
|
||||
8. [https://stackoverflow.com/questions/65874120/see-unsaved-changes-in-vscode](https://stackoverflow.com/questions/65874120/see-unsaved-changes-in-vscode)
|
||||
9. [https://github.com/helix-editor/helix/issues/7481](https://github.com/helix-editor/helix/issues/7481)
|
||||
10. [https://github.com/helix-editor/helix/issues/9655](https://github.com/helix-editor/helix/issues/9655)
|
||||
274
10-linux/00-utils/helix/cheatsheet.md
Normal file
274
10-linux/00-utils/helix/cheatsheet.md
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
# Полная Шпаргалка Клавиш Helix
|
||||
|
||||
## Основные Режимы (Mode Keys)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`i`|Insert mode (вставка перед курсором)|
|
||||
|`a`|Append (вставка после курсора)|
|
||||
|`I`|Insert в начале строки|
|
||||
|`A`|Append в конце строки|
|
||||
|`o`|Open line below (новая строка ниже)|
|
||||
|`O`|Open line above (новая строка выше)|
|
||||
|`v`|Select/extend mode (режим выделения)|
|
||||
|`Esc`|Вернуться в Normal mode|
|
||||
|`:`|Command mode (командный режим)|
|
||||
|
||||
## Движение (Movement)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`h`|Влево на символ|
|
||||
|`j`|Вниз на строку|
|
||||
|`k`|Вверх на строку|
|
||||
|`l`|Вправо на символ|
|
||||
|`w`|Следующее слово (начало)|
|
||||
|`b`|Предыдущее слово (начало)|
|
||||
|`e`|Следующее слово (конец)|
|
||||
|`W`|Следующее WORD (с пробелами)|
|
||||
|`B`|Предыдущее WORD|
|
||||
|`E`|Конец WORD|
|
||||
|`0`|Начало строки|
|
||||
|`$`|Конец строки|
|
||||
|`^`|Первый непробельный символ строки|
|
||||
|`gg`|Начало файла|
|
||||
|`ge` или `G`|Конец файла|
|
||||
|`Ctrl-d`|Полстраницы вниз|
|
||||
|`Ctrl-u`|Полстраницы вверх|
|
||||
|`Ctrl-f`|Страница вниз (PageDown)|
|
||||
|`Ctrl-b`|Страница вверх (PageUp)|
|
||||
|`%`|Найти парную скобку|
|
||||
|
||||
## Выделение (Selection)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`x`|Выделить строку целиком|
|
||||
|`X`|Выделить строку (без перевода строки)|
|
||||
|`w`|Выделить слово вперёд|
|
||||
|`b`|Выделить слово назад|
|
||||
|`%`|Выделить весь файл|
|
||||
|`s`|Split selection (поиск по regex)|
|
||||
|`;`|Collapse selection (убрать выделение)|
|
||||
|`,`|Remove primary selection|
|
||||
|`Alt-,`|Remove all secondary selections|
|
||||
|`C`|Duplicate cursor down|
|
||||
|`Alt-C`|Duplicate cursor up|
|
||||
|`&`|Align selections|
|
||||
|
||||
## Match Mode (m + клавиша)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`mm`|Goto matching bracket|
|
||||
|`ms`|Surround add (добавить окружение)|
|
||||
|`mr`|Surround replace|
|
||||
|`md`|Surround delete|
|
||||
|`mi(`|Select inside parentheses|
|
||||
|`ma(`|Select around parentheses|
|
||||
|`mi{`|Select inside braces|
|
||||
|`ma{`|Select around braces|
|
||||
|`mi"`|Select inside quotes|
|
||||
|`ma"`|Select around quotes|
|
||||
|`miw`|Select inside word|
|
||||
|`maw`|Select around word|
|
||||
|`mif`|Select inside function|
|
||||
|`maf`|Select around function|
|
||||
|
||||
## Редактирование (Edit)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`c`|Change (удалить выделение и войти в insert)|
|
||||
|`d`|Delete (удалить выделение)|
|
||||
|`y`|Yank (копировать)|
|
||||
|`p`|Paste after cursor|
|
||||
|`P`|Paste before cursor|
|
||||
|`R`|Replace with yanked text|
|
||||
|`u`|Undo|
|
||||
|`U`|Redo|
|
||||
|`r`|Replace character|
|
||||
|`~`|Toggle case (upper/lower)|
|
||||
|`` ` ``|Convert to lowercase|
|
||||
|` Alt-`` ` ``|Convert to uppercase|
|
||||
|`>`|Indent (вправо)|
|
||||
|`<`|Unindent (влево)|
|
||||
|`=`|Format selection (форматирование)|
|
||||
|`J`|Join lines|
|
||||
|`Alt-J`|Join lines with space|
|
||||
|`K`|Keep selections matching regex|
|
||||
|`Alt-K`|Remove selections matching regex|
|
||||
|
||||
## Поиск (Search)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`/`|Search forward|
|
||||
|`?`|Search backward|
|
||||
|`n`|Next search match|
|
||||
|`N`|Previous search match|
|
||||
|`*`|Search current selection forward|
|
||||
|
||||
## Goto Mode (g + клавиша)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`gh`|Goto line start|
|
||||
|`gl`|Goto line end|
|
||||
|`gs`|Goto first non-whitespace|
|
||||
|`ge`|Goto last line|
|
||||
|`gg`|Goto first line|
|
||||
|`gt`|Goto window top|
|
||||
|`gc`|Goto window center|
|
||||
|`gb`|Goto window bottom|
|
||||
|`gd`|Goto definition (LSP)|
|
||||
|`gy`|Goto type definition|
|
||||
|`gr`|Goto references|
|
||||
|`gi`|Goto implementation|
|
||||
|`ga`|Goto last accessed file|
|
||||
|`gm`|Goto last modified file|
|
||||
|`gn`|Goto next buffer|
|
||||
|`gp`|Goto previous buffer|
|
||||
|`g.`|Goto last modification|
|
||||
|
||||
## View Mode (z + клавиша)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`zz`|Center cursor vertically|
|
||||
|`zt`|Align cursor to top|
|
||||
|`zb`|Align cursor to bottom|
|
||||
|`zm`|Align cursor to middle|
|
||||
|`zj`|Scroll down (одна строка)|
|
||||
|`zk`|Scroll up (одна строка)|
|
||||
|`Z`|Enter **sticky view mode** (прокрутка без движения курсора)|
|
||||
|`Ctrl-d`|Scroll half page down|
|
||||
|`Ctrl-u`|Scroll half page up|
|
||||
|
||||
## Window Mode (Ctrl-w + клавиша)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`Ctrl-w v`|Vertical split|
|
||||
|`Ctrl-w s`|Horizontal split|
|
||||
|`Ctrl-w w`|Switch to next window|
|
||||
|`Ctrl-w h`|Goto left window|
|
||||
|`Ctrl-w j`|Goto bottom window|
|
||||
|`Ctrl-w k`|Goto top window|
|
||||
|`Ctrl-w l`|Goto right window|
|
||||
|`Ctrl-w q`|Close current window|
|
||||
|`Ctrl-w o`|Close all windows except current|
|
||||
|`Ctrl-w H`|Swap window left|
|
||||
|`Ctrl-w J`|Swap window down|
|
||||
|`Ctrl-w K`|Swap window up|
|
||||
|`Ctrl-w L`|Swap window right|
|
||||
|
||||
## Space Mode (Space + клавиша)
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`Space f`|File picker (открыть файл)|
|
||||
|`Space F`|File picker (current directory)|
|
||||
|`Space b`|Buffer picker (открытые файлы)|
|
||||
|`Space k`|Hover (показать документацию LSP)|
|
||||
|`Space s`|Symbol picker (функции/структуры)|
|
||||
|`Space S`|Workspace symbol picker|
|
||||
|`Space a`|Code actions (LSP)|
|
||||
|`Space r`|Rename symbol (LSP)|
|
||||
|`Space d`|Diagnostics picker (ошибки)|
|
||||
|`Space D`|Workspace diagnostics|
|
||||
|`Space h`|Highlight all occurrences|
|
||||
|`Space /`|Global search (ripgrep)|
|
||||
|`Space ?`|Command palette|
|
||||
|`Space y`|Yank (copy) to clipboard|
|
||||
|`Space p`|Paste from clipboard|
|
||||
|`Space P`|Paste from clipboard before|
|
||||
|`Space R`|Replace selections with clipboard|
|
||||
|`Space w`|Save file (:write)|
|
||||
|`Space q`|Quit (:quit)|
|
||||
|
||||
## LSP Специфичные
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`K`|Hover documentation|
|
||||
|`gd`|Goto definition|
|
||||
|`gy`|Goto type definition|
|
||||
|`gr`|Goto references|
|
||||
|`gi`|Goto implementation|
|
||||
|`]d`|Next diagnostic (ошибка)|
|
||||
|`[d`|Previous diagnostic|
|
||||
|`Space a`|Code actions|
|
||||
|`Space r`|Rename symbol|
|
||||
|
||||
## Insert Mode Специфичные
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`Ctrl-x`|Autocomplete|
|
||||
|`Ctrl-w`|Delete word backward|
|
||||
|`Ctrl-u`|Delete to line start|
|
||||
|`Ctrl-k`|Delete to line end|
|
||||
|`Ctrl-h`|Backspace|
|
||||
|`Ctrl-d`|Delete forward|
|
||||
|`Ctrl-j`|Insert newline|
|
||||
|
||||
## Диагностика и Отладка
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`]d`|Next diagnostic|
|
||||
|`[d`|Previous diagnostic|
|
||||
|`]g`|Next git change|
|
||||
|`[g`|Previous git change|
|
||||
|`]f`|Next function|
|
||||
|`[f`|Previous function|
|
||||
|`]c`|Next class|
|
||||
|`[c`|Previous class|
|
||||
|
||||
## Дополнительные
|
||||
|
||||
|Клавиша|Действие|
|
||||
|---|---|
|
||||
|`.`|Repeat last change|
|
||||
|`q`|Record macro (например, `qa` → запись в регистр a)|
|
||||
|`Q`|Replay macro (например, `@a` в Vim, но в Helix просто `Q`)|
|
||||
|`@`|Shell pipe (выполнить shell команду)|
|
||||
|`!`|Shell pipe replace|
|
||||
|`Alt-!`|Shell append output|
|
||||
|`$`|Shell pipe each selection|
|
||||
|
||||
---
|
||||
|
||||
## Командный Режим (после `:`)
|
||||
|
||||
|Команда|Действие|
|
||||
|---|---|
|
||||
|`:w`|Write (save) file|
|
||||
|`:q`|Quit|
|
||||
|`:wq` или `:x`|Write and quit|
|
||||
|`:q!`|Force quit (без сохранения)|
|
||||
|`:open file.txt`|Open file|
|
||||
|`:buffer-close`|Close current buffer|
|
||||
|`:reload`|Reload file from disk|
|
||||
|`:set key value`|Set option|
|
||||
|`:vsplit`|Vertical split|
|
||||
|`:hsplit`|Horizontal split|
|
||||
|`:sh command`|Run shell command|
|
||||
|`:insert-output command`|Insert shell command output|
|
||||
|`:pipe command`|Pipe selection through command|
|
||||
|
||||
---
|
||||
|
||||
Эта шпаргалка покрывает **95% ежедневного использования** Helix. Сохрани в Obsidian и распечатай — первые недели будешь часто подглядывать, потом всё в мышечную память! 🚀
|
||||
|
||||
**Ключевое отличие от Vim:** в Helix **сначала выделение** (selection-first), **потом действие**. Это делает редактирование **предсказуемым** — ты всегда видишь, что изменишь, перед тем как это сделать.
|
||||
|
||||
1. [https://docs.helix-editor.com/keymap.html](https://docs.helix-editor.com/keymap.html)
|
||||
2. [https://github.com/helix-editor/helix/discussions/12270](https://github.com/helix-editor/helix/discussions/12270)
|
||||
3. [https://www.reddit.com/r/HelixEditor/comments/11hvikl/in_editor_keyboard_shortcuts_cheatsheet/](https://www.reddit.com/r/HelixEditor/comments/11hvikl/in_editor_keyboard_shortcuts_cheatsheet/)
|
||||
4. [https://docs.helix-editor.com/remapping.html](https://docs.helix-editor.com/remapping.html)
|
||||
5. [https://github.com/helix-editor/helix/issues/4864](https://github.com/helix-editor/helix/issues/4864)
|
||||
6. [https://news.ycombinator.com/item?id=40492300](https://news.ycombinator.com/item?id=40492300)
|
||||
7. [https://blog.ohheybrian.com/2023/01/this-was-written-with-helix](https://blog.ohheybrian.com/2023/01/this-was-written-with-helix)
|
||||
8. [https://jonathan-frere.com/posts/helix/](https://jonathan-frere.com/posts/helix/)
|
||||
161
10-linux/00-utils/helix/keys.md
Normal file
161
10-linux/00-utils/helix/keys.md
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
**:w** или **:write**
|
||||
**:bc** или **:buffer-close**
|
||||
|
||||
Отлично! В Helix есть мощная LSP-интеграция для навигации по коду. Вот полный гайд:
|
||||
|
||||
## Переход к определению и обратно
|
||||
|
||||
## Основные команды навигации (goto mode)
|
||||
|
||||
Нажми **g** затем:[helix-editor+2](https://docs.helix-editor.com/keymap.html)
|
||||
|
||||
**К определению:**
|
||||
|
||||
- **gd** — Go to **definition** (переход к определению функции/переменной)[helix-editor+2](https://docs.helix-editor.com/commands.html)
|
||||
|
||||
- **gy** — Go to **type definition** (переход к определению типа)[huqingye-1798.xlog+1](https://huqingye-1798.xlog.app/Helix-an-jian-ying-she--zhuan-)
|
||||
|
||||
- **gi** — Go to **implementation** (переход к реализации трейта/интерфейса)[helix-editor+1](https://docs.helix-editor.com/keymap.html)
|
||||
|
||||
|
||||
**К использованиям:**
|
||||
|
||||
- **gr** — Go to **references** (показать все места, где используется функция)[kapeli+2](https://kapeli.com/cheat_sheets/Helix.docset/Contents/Resources/Documents/index)
|
||||
|
||||
|
||||
## Возврат назад (Jumplist)
|
||||
|
||||
После перехода по `gd`, Helix автоматически сохраняет твою предыдущую позицию в **jumplist** (список переходов):[helix-editor](https://docs.helix-editor.com/master/jumplist.html)youtube
|
||||
|
||||
- **Ctrl+o** — jump **Out** (вернуться назад по jumplist)[reddit+1](https://www.reddit.com/r/HelixEditor/comments/1hhae1n/undo_go_to_definition/)youtube
|
||||
|
||||
- **Ctrl+i** — jump **In** (вернуться вперёд по jumplist)youtube[helix-editor](https://docs.helix-editor.com/master/jumplist.html)
|
||||
|
||||
- **Ctrl+s** — вручную сохранить текущую позицию в jumplist[helix-editor](https://docs.helix-editor.com/master/jumplist.html)youtube
|
||||
|
||||
|
||||
**Пример воркфлоу:**
|
||||
|
||||
1. Ты на вызове функции `calculate_sum()`
|
||||
|
||||
2. Жмёшь **gd** → переходишь к определению
|
||||
|
||||
3. Смотришь код, делаешь правки
|
||||
|
||||
4. Жмёшь **Ctrl+o** → возвращаешься к вызову
|
||||
|
||||
5. Если нужно снова к определению — **Ctrl+i**
|
||||
|
||||
|
||||
## Просмотр всего jumplist
|
||||
|
||||
**Space+j** — открыть picker со всеми сохранёнными переходамиyoutube[helix-editor](https://docs.helix-editor.com/master/jumplist.html)
|
||||
|
||||
Это интерактивное меню, где видны все позиции, куда ты прыгал. Можешь выбрать любую стрелками и нажать Enter.youtube
|
||||
|
||||
## Навигация между вызовами функции
|
||||
|
||||
**Найти все использования:**
|
||||
|
||||
1. Встань на имя функции
|
||||
|
||||
2. Нажми **gr** (goto references)[kapeli+1](https://kapeli.com/cheat_sheets/Helix.docset/Contents/Resources/Documents/index)
|
||||
|
||||
3. Откроется picker со всеми местами, где функция вызывается
|
||||
|
||||
4. Используй стрелки для выбора, Enter для перехода[huqingye-1798.xlog](https://huqingye-1798.xlog.app/Helix-an-jian-ying-she--zhuan-)
|
||||
|
||||
|
||||
**Переход между функциями в файле:**
|
||||
|
||||
- **]f** — следующая функция (next function)[helix-editor+1](https://docs.helix-editor.com/keymap.html)
|
||||
|
||||
- **[f** — предыдущая функция (previous function)[huqingye-1798.xlog+1](https://huqingye-1798.xlog.app/Helix-an-jian-ying-she--zhuan-)
|
||||
|
||||
|
||||
Это работает через Tree-sitter (TS), не требует LSP.[helix-editor+1](https://docs.helix-editor.com/keymap.html)
|
||||
|
||||
## Навигация по диагностике (ошибки/предупреждения)
|
||||
|
||||
Бонус для дебага:[huqingye-1798.xlog+1](https://huqingye-1798.xlog.app/Helix-an-jian-ying-she--zhuan-)
|
||||
|
||||
- **]d** — следующая ошибка/предупреждение
|
||||
|
||||
- **[d** — предыдущая ошибка
|
||||
|
||||
- **[D** — первая ошибка в файле
|
||||
|
||||
- **]D** — последняя ошибка в файле
|
||||
|
||||
|
||||
## Полный workflow для Rust-разработки
|
||||
|
||||
**Сценарий 1: Изучение чужого кода**
|
||||
|
||||
text
|
||||
|
||||
`1. Встал на функцию → gd (перешёл к определению) 2. Посмотрел типы → gy (перешёл к type definition) 3. Хочу вернуться → Ctrl+o (назад к вызову) 4. Хочу посмотреть все вызовы → gr (список references) 5. Выбрал другой вызов → Enter 6. Возвращаюсь к первому → Space+j (jumplist picker)`
|
||||
|
||||
**Сценарий 2: Рефакторинг**
|
||||
|
||||
text
|
||||
|
||||
`1. Встал на функцию → gr (показать все вызовы) 2. Перешёл к первому → Enter 3. Сделал правки → Ctrl+s (сохранил позицию в jumplist) 4. Следующий вызов → выбрал из picker 5. Вернулся к предыдущему → Ctrl+o`
|
||||
|
||||
**Сценарий 3: Исследование трейтов**
|
||||
|
||||
text
|
||||
|
||||
`1. Встал на трейт → gy (type definition) 2. Хочу увидеть реализации → gi (implementations) 3. Picker показал все impl блоки → выбираю нужный 4. Возврат → Ctrl+o`
|
||||
|
||||
## Горячие клавиши для закладок (опционально)
|
||||
|
||||
Если хочешь быстро прыгать между важными местами, используй **marks** (закладки):[helix-editor](https://docs.helix-editor.com/remapping.html)
|
||||
|
||||
- **m** затем **буква** — установить закладку (например, `ma` для закладки 'a')
|
||||
|
||||
- **` ** (backtick) затем **буква** — перейти к закладке (например, `` ` a``)
|
||||
|
||||
|
||||
Это полезно для долгой работы над одним участком кода.[helix-editor](https://docs.helix-editor.com/remapping.html)
|
||||
|
||||
1. [https://docs.helix-editor.com/keymap.html](https://docs.helix-editor.com/keymap.html)
|
||||
2. [https://docs.helix-editor.com/commands.html](https://docs.helix-editor.com/commands.html)
|
||||
3. [https://kapeli.com/cheat_sheets/Helix.docset/Contents/Resources/Documents/index](https://kapeli.com/cheat_sheets/Helix.docset/Contents/Resources/Documents/index)
|
||||
4. [https://www.reddit.com/r/HelixEditor/comments/1hhae1n/undo_go_to_definition/](https://www.reddit.com/r/HelixEditor/comments/1hhae1n/undo_go_to_definition/)
|
||||
5. [https://huqingye-1798.xlog.app/Helix-an-jian-ying-she--zhuan-](https://huqingye-1798.xlog.app/Helix-an-jian-ying-she--zhuan-)
|
||||
6. [https://docs.helix-editor.com/master/jumplist.html](https://docs.helix-editor.com/master/jumplist.html)
|
||||
7. [https://www.youtube.com/watch?v=B3vQDHzsU0g](https://www.youtube.com/watch?v=B3vQDHzsU0g)
|
||||
8. [https://docs.helix-editor.com/remapping.html](https://docs.helix-editor.com/remapping.html)
|
||||
9. [https://github.com/helix-editor/helix/issues/3167](https://github.com/helix-editor/helix/issues/3167)
|
||||
10. [https://zed.dev/docs/key-bindings](https://zed.dev/docs/key-bindings)
|
||||
|
||||
В Helix для удаления строки используется **двухнажатийная комбинация** (не одна клавиша, как в некоторых редакторах):
|
||||
|
||||
## Основная команда
|
||||
|
||||
**x d**
|
||||
|
||||
- **x** — выделить текущую строку целиком
|
||||
|
||||
- **d** — удалить выделение
|
||||
|
||||
|
||||
Это самый быстрый и стандартный способ в Helix.[](https://pikabu.ru/story/osnovyi_helix_mini_gayd_13142410)
|
||||
|
||||
|
||||
|
||||
## Удаление нескольких строк
|
||||
|
||||
Если нужно удалить несколько строк подряд:
|
||||
|
||||
- **5x d** — удалить 5 строк (начиная с текущей вниз)
|
||||
|
||||
- **x 3k d** — выделить строку, расширить на 3 строки вверх, удалить
|
||||
|
||||
|
||||
## Удаление и переход в режим вставки
|
||||
|
||||
**x c** — удалить строку и сразу войти в insert mode (аналог vim's `cc`)
|
||||
|
||||
shift + A - это сразу войти в режим i
|
||||
95
10-linux/00-utils/helix/lsps.md
Normal file
95
10-linux/00-utils/helix/lsps.md
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
Отлично! Держи полный список **ключевых LSP** для всех основных языков — это всё, что нужно для профессиональной разработки в Helix.[helix-editor+1](https://docs.helix-editor.com/lang-support.html)
|
||||
|
||||
---
|
||||
|
||||
## 🦀 Systems Programming
|
||||
|
||||
text
|
||||
|
||||
```
|
||||
# Rust rust-analyzer # Официальный LSP от Rust Foundation # C/C++ clangd # LLVM-based LSP (рекомендуется) # или ccls # Альтернатива clangd # Zig zls # Официальный Zig Language Server # Go gopls # Официальный LSP от Google # D serve-d # D Language Server
|
||||
```
|
||||
---
|
||||
|
||||
## 🌐 Web Development
|
||||
|
||||
text
|
||||
|
||||
`# JavaScript/TypeScript nodePackages.typescript-language-server # или nodePackages.vscode-langservers-extracted # HTML/CSS/JSON тоже # Deno (альтернатива Node) deno # Deno встроенный LSP # Vue.js nodePackages.volar # Vue 3 LSP # Svelte nodePackages.svelte-language-server # Tailwind CSS nodePackages."@tailwindcss/language-server"`
|
||||
|
||||
---
|
||||
|
||||
## 🐍 Scripting Languages
|
||||
|
||||
text
|
||||
|
||||
`# Python python3Packages.python-lsp-server # pylsp (рекомендуется) # или pyright # Microsoft LSP (быстрее) # или basedpyright # Fork pyright # Ruby solargraph # Ruby LSP # Lua lua-language-server # sumneko_lua # Perl perlnavigator # Perl LSP`
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ DevOps & Config
|
||||
|
||||
text
|
||||
|
||||
`# Nix nil # Nix LSP (рекомендуется) # или nixd # Альтернатива с лучшей поддержкой flakes # YAML nodePackages.yaml-language-server # TOML taplo # Taplo LSP # JSON nodePackages.vscode-json-languageserver # Terraform terraform-ls # HashiCorp Terraform LSP # Docker nodePackages.dockerfile-language-server-nodejs # Ansible ansible-language-server`
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Functional & Academic
|
||||
|
||||
text
|
||||
|
||||
`# Haskell haskell-language-server # HLS # OCaml ocamlPackages.ocaml-lsp # ocamllsp # Elixir elixir-ls # Elixir Language Server # Erlang erlang-ls # Erlang LS # Clojure clojure-lsp # Clojure LSP # Racket racket-langserver # Racket LS # PureScript nodePackages.purescript-language-server`
|
||||
|
||||
---
|
||||
|
||||
## 🏢 Enterprise & JVM
|
||||
|
||||
text
|
||||
|
||||
`# Java jdt-language-server # Eclipse JDT # Kotlin kotlin-language-server # Scala metals # Scalameta LSP # Groovy groovy-language-server`
|
||||
|
||||
---
|
||||
|
||||
## 📝 Markup & Data
|
||||
|
||||
text
|
||||
|
||||
`# Markdown marksman # Markdown LSP # LaTeX texlab # LaTeX LSP # GraphQL nodePackages.graphql-language-service-cli # Protobuf buf-language-server # Protobuf LSP`
|
||||
|
||||
---
|
||||
|
||||
## 🔥 Special Mention
|
||||
|
||||
text
|
||||
|
||||
`# Helix-GPT (AI completion) helix-gpt # OpenAI/Copilot в Helix # Emmet (HTML/CSS snippets) emmet-ls # Emmet expansion`
|
||||
|
||||
---
|
||||
|
||||
## 📋 Для копирования в Obsidian
|
||||
|
||||
text
|
||||
|
||||
``# Language Servers для Helix ## Systems - `rust-analyzer` — Rust - `clangd` — C/C++ - `zls` — Zig - `gopls` — Go ## Web - `typescript-language-server` — JS/TS - `vscode-langservers-extracted` — HTML/CSS/JSON - `volar` — Vue.js - `svelte-language-server` — Svelte - `@tailwindcss/language-server` — Tailwind ## Scripting - `python-lsp-server` — Python (или `pyright`) - `solargraph` — Ruby - `lua-language-server` — Lua ## DevOps - `nil` — Nix (или `nixd`) - `yaml-language-server` — YAML - `taplo` — TOML - `terraform-ls` — Terraform - `dockerfile-language-server` — Docker ## Functional - `haskell-language-server` — Haskell - `ocaml-lsp` — OCaml - `elixir-ls` — Elixir - `clojure-lsp` — Clojure ## JVM - `jdt-language-server` — Java - `kotlin-language-server` — Kotlin - `metals` — Scala ## Markup - `marksman` — Markdown - `texlab` — LaTeX - `graphql-language-service-cli` — GraphQL ## Bonus - `helix-gpt` — AI completion (OpenAI/Copilot) - `emmet-ls` — HTML/CSS snippets``
|
||||
|
||||
---
|
||||
|
||||
## Проверка установленных LSP
|
||||
|
||||
bash
|
||||
|
||||
`hx --health`
|
||||
|
||||
Покажет, какие LSP найдены и работают.[github+1](https://github.com/helix-editor/helix/discussions/7067)
|
||||
|
||||
1. [https://docs.helix-editor.com/lang-support.html](https://docs.helix-editor.com/lang-support.html)
|
||||
2. [https://langserver.org](https://langserver.org)
|
||||
3. [https://github.com/helix-editor/helix/discussions/7067](https://github.com/helix-editor/helix/discussions/7067)
|
||||
4. [https://discourse.nixos.org/t/helix-lsp-servers/34833](https://discourse.nixos.org/t/helix-lsp-servers/34833)
|
||||
5. [https://github.com/helix-editor/helix/discussions/8474](https://github.com/helix-editor/helix/discussions/8474)
|
||||
6. [https://www.reddit.com/r/NixOS/comments/1gu5q3q/what_lsp_do_you_use/](https://www.reddit.com/r/NixOS/comments/1gu5q3q/what_lsp_do_you_use/)
|
||||
7. [https://en.wikipedia.org/wiki/Language_Server_Protocol](https://en.wikipedia.org/wiki/Language_Server_Protocol)
|
||||
8. [https://docs.codelite.org/plugins/lsp/](https://docs.codelite.org/plugins/lsp/)
|
||||
9. [https://mynixos.com/nixpkgs/package/helix-gpt](https://mynixos.com/nixpkgs/package/helix-gpt)
|
||||
10. [https://github.com/isaacphi/mcp-language-server](https://github.com/isaacphi/mcp-language-server)
|
||||
1
10-linux/00-utils/helix/replace.md
Normal file
1
10-linux/00-utils/helix/replace.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
![[Pasted image 20251115162400.png]]
|
||||
46
10-linux/00-utils/helix/selection.md
Normal file
46
10-linux/00-utils/helix/selection.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
| Действие | Команда |
|
||||
| ---------------------------------- | --------------------- |
|
||||
| Войти в режим выделения | v |
|
||||
| Расширить выделение вниз (колонка) | Shift-CилиAlt-Shift-C |
|
||||
| Войти в мультикурсорный ввод | I(заглавная) |
|
||||
| Ввести текст одновременно | Печатать текст |
|
||||
| Выйти из мультикурсорного режима | Esc |
|
||||
| Добавить курсор ниже | C |
|
||||
| Удалить дополнительные курсоры | , |
|
||||
| Оставить один курсор (удалить все) | ; |
|
||||
|
||||
| Задача | Команда |
|
||||
| ----------------------------- | ------- |
|
||||
| Добавить курсор вниз | C |
|
||||
| Добавить курсор вниз n строк | nC |
|
||||
| Добавить курсор вверх | Alt-C |
|
||||
| Добавить курсор вверх n строк | nAlt-C |
|
||||
|
||||
| Действие | Команда |
|
||||
| ------------------------------------------- | ------- |
|
||||
| Добавить курсор вниз | C |
|
||||
| Добавить курсор вверх | Alt-C |
|
||||
| Добавить курсор вниз n строк | nC |
|
||||
| Добавить курсор вверх n строк | nAlt-C |
|
||||
| Удалить все дополнительные курсоры | , |
|
||||
| Начать выделение | v |
|
||||
| Расширить выделение движением | h/j/k/l |
|
||||
| Расширить выделение n строк вниз | nj |
|
||||
| Расширить выделение n строк вверх | nk |
|
||||
|
||||
|Действие|Команда|
|
||||
|---|---|
|
||||
|Войти в visual mode|v|
|
||||
|Расширить выделение вниз|j|
|
||||
|Расширить выделение вверх|k|
|
||||
|Переключить курсор и anchor|Alt-;|
|
||||
|Удалить все доп. курсоры|,|
|
||||
|Collapse selection|;|
|
||||
|Добавить курсор вниз|C|
|
||||
|Добавить курсор вверх|Alt-C|
|
||||
|
||||
| Действие | Команда / Клавиши | Описание |
|
||||
| ---------------------------------- | -------------------------------- | --------------------------------------------------- |
|
||||
| Переключение каретки в выделении | Alt + ; | Поменять активный конец (каретку) выделения |
|
||||
| Замена всех вхождений по паттерну | %→s→{pattern}→Enter→c→{new text} | Выделить весь файл, найти по паттерну, заменить все |
|
||||
| Логи нажатий (для проверки клавиш) | :log-open | Открыть лог нажатий клавиш для диагностики |
|
||||
90
10-linux/00-utils/jj/Untitled.md
Normal file
90
10-linux/00-utils/jj/Untitled.md
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
|
||||
# Jujutsu: Применение исправлений из stable во все ветки
|
||||
|
||||
Да, **Jujutsu** (`jj`) отлично справляется с этим workflow и делает его **проще**, чем в Git, благодаря своей архитектуре. Вот как это работает:
|
||||
|
||||
## Подход Jujutsu
|
||||
|
||||
Jujutsu не требует «переключения веток» в классическом понимании Git, потому что использует модель **working-copy-as-commit**. Вы можете редактировать любой коммит в репозитории напрямую без `checkout`.
|
||||
|
||||
## Workflow в `jj`
|
||||
|
||||
### Шаг 1: Во время разработки feature обнаружили баг в `stable`
|
||||
|
||||
Не нужно делать `stash` или коммитить незавершённую работу. Просто:
|
||||
|
||||
```bash
|
||||
# Редактируем коммит в stable напрямую
|
||||
jj edit <stable-commit-id>
|
||||
# ИЛИ создаем новый коммит поверх stable
|
||||
jj new stable
|
||||
```
|
||||
|
||||
### Шаг 2: Делаем исправление
|
||||
|
||||
Вносим необходимые изменения (багфикс, оптимизация, рефакторинг). Эти изменения получают уникальный **change ID**, который сохраняется между ветками.
|
||||
|
||||
### Шаг 3: Применяем фикс ко всем нужным веткам
|
||||
|
||||
Здесь `jj` раскрывается во всей красе. Два основных подхода:
|
||||
|
||||
#### Вариант A: Rebase-based propagation
|
||||
|
||||
```bash
|
||||
# Rebase feature веток на обновлённый stable
|
||||
jj rebase -b feature-branch -d stable
|
||||
jj rebase -b another-feature -d stable
|
||||
```
|
||||
|
||||
#### Вариант B: Cherry-pick стиль (дублирование + rebase)
|
||||
|
||||
```bash
|
||||
# Дублируем change с фиксом и rebase на каждую ветку
|
||||
jj duplicate <fix-change-id>
|
||||
jj rebase -r <duplicated-change-id> -d feature-branch
|
||||
```
|
||||
|
||||
### Шаг 4: Селективное применение через revsets
|
||||
|
||||
Для исключения deprecated веток используем мощный язык **revset** в `jj`:
|
||||
|
||||
```bash
|
||||
# Применяем ко всем веткам кроме deprecated
|
||||
jj rebase -b 'branches() & ~(branches(glob:"deprecated*") | branches("old-feature"))'
|
||||
```
|
||||
|
||||
## Ключевые преимущества `jj` для этого workflow
|
||||
|
||||
- **Без загрязнения рабочей директории**: Ваше текущее состояние разработки `feature` остаётся нетронутым, пока вы работаете над фиксом в `stable`.
|
||||
- **Change IDs отслеживаются между ветками**: Одно и то же логическое изменение сохраняет свою идентичность при rebase или дублировании, что упрощает отслеживание применения фикса.
|
||||
- **Автоматическое разрешение конфликтов**: При rebase нескольких веток с фиксом `jj` помогает выявлять и разрешать конфликты инкрементально.
|
||||
- **Нет "detached HEAD" состояний**: В отличие от Git, вы можете свободно навигировать и редактировать любой коммит без риска потерять работу.
|
||||
|
||||
## Практический пример
|
||||
|
||||
```bash
|
||||
# 1. Сейчас работаем над feature
|
||||
jj log
|
||||
|
||||
# 2. Создаём фикс на stable
|
||||
jj new stable -m "Fix critical bug in validation"
|
||||
# Вносим изменения
|
||||
jj commit
|
||||
|
||||
# 3. Получаем change ID вашего фикса
|
||||
FIX_ID=$(jj log -r @ --no-graph -T 'change_id')
|
||||
|
||||
# 4. Rebase всех активных feature веток
|
||||
jj rebase -b 'branches() & ~branches(glob:"deprecated*")' -d stable
|
||||
|
||||
# 5. Возвращаемся к работе над feature
|
||||
jj edit feature
|
||||
```
|
||||
|
||||
## Важные моменты
|
||||
|
||||
- **Разрешение конфликтов**: Если ваш фикс в `stable` конфликтует с изменениями в `feature`-ветках, `jj` создаст conflict markers, которые нужно будет разрешить для каждой ветки.
|
||||
- **Принцип upstream-first**: Как и в GitLab Flow, всегда исправляйте сначала в самой upstream-ветке (`stable`), затем распространяйте downstream.
|
||||
- **Состояние working copy**: После операций используйте `jj status`, чтобы увидеть, к какому коммиту привязана рабочая копия, и `jj edit <branch>` для возврата к работе над `feature`.
|
||||
|
||||
> Да, `jj` абсолютно поддерживает этот workflow и делает его более эргономичным, чем Git, устраняя накладные расходы на переключение контекста и предоставляя мощные revset-запросы для селективных операций с ветками.
|
||||
209
10-linux/00-utils/jj/jj.md
Normal file
209
10-linux/00-utils/jj/jj.md
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
Вот приведённый в порядок Markdown файл:
|
||||
|
||||
***
|
||||
|
||||
# 📚 Шпаргалка по Jujutsu (jj)
|
||||
|
||||
## Основные концепции
|
||||
|
||||
**jj** — это система контроля версий, которая отличается от Git философией. Вместо веток используются **bookmarks** (закладки), вместо staging area — автоматическое отслеживание.
|
||||
|
||||
| Концепция | Описание |
|
||||
|-----------|---------|
|
||||
| `@` | Текущий рабочий коммит (working copy) |
|
||||
| `@-` | Родитель текущего коммита |
|
||||
| Bookmark | Закладка на коммит (аналог Git ветви) |
|
||||
| DAG | Направленный ациклический граф — вся история видна одновременно |
|
||||
|
||||
## Базовые команды
|
||||
|
||||
```bash
|
||||
# Инициализация
|
||||
jj git init # Инициализировать jj в Git репозитории
|
||||
|
||||
# Просмотр истории
|
||||
jj log # Показать историю
|
||||
jj log --graph # С визуализацией
|
||||
jj log --graph --all # Вся история со всеми ветками
|
||||
jj status # Статус текущего коммита
|
||||
|
||||
# Создание коммитов
|
||||
jj new # Создать новый коммит на основе текущего
|
||||
jj new -m "description" # С описанием
|
||||
jj new COMMIT_ID # Создать коммит на основе конкретного
|
||||
|
||||
# Редактирование
|
||||
jj edit COMMIT_ID # "Включить" коммит для редактирования
|
||||
jj describe -m "new message" # Изменить описание текущего коммита
|
||||
jj new HEAD # Создать коммит от HEAD
|
||||
```
|
||||
|
||||
## Работа с закладками
|
||||
|
||||
```bash
|
||||
# Создание и удаление
|
||||
jj bookmark create branch-name # Создать закладку на текущий коммит
|
||||
jj bookmark create branch-name -r COMMIT_ID # На конкретный коммит
|
||||
jj bookmark delete branch-name # Удалить закладку
|
||||
jj bookmark list # Список всех закладок
|
||||
|
||||
# Перемещение закладок
|
||||
jj bookmark set main -r COMMIT_ID # Переместить main на коммит
|
||||
jj bookmark set main -r ready # Переместить на bookmark ready
|
||||
|
||||
# Отслеживание удалённых закладок
|
||||
jj bookmark track main@origin # Импортировать удалённую закладку
|
||||
```
|
||||
|
||||
## Слияние и перебазирование
|
||||
|
||||
```bash
|
||||
# Rebase (перебазирование)
|
||||
jj rebase -r @ -d main # Перебазировать текущий коммит на main
|
||||
jj rebase -b ready -d main # Перебазировать ветку ready на main
|
||||
|
||||
# Squash (объединение коммитов)
|
||||
jj squash -r @ # Объединить текущий коммит с родителем
|
||||
jj squash -r COMMIT_ID # Объединить конкретный коммит с его родителем
|
||||
|
||||
# Abandon (удаление коммита)
|
||||
jj abandon COMMIT_ID # Удалить коммит (но файлы останутся в @)
|
||||
```
|
||||
|
||||
## Git интеграция
|
||||
|
||||
```bash
|
||||
# Экспорт и импорт
|
||||
jj git export # Синхронизировать jj с Git
|
||||
jj git import # Импортировать Git ветки в jj
|
||||
|
||||
# Push и Pull
|
||||
jj git push # Запушить все изменения
|
||||
jj git push -b main # Запушить только bookmark main
|
||||
jj git pull # Потянуть изменения с удалённого
|
||||
|
||||
# Работа с Git напрямую
|
||||
git checkout main # Обычные Git команды работают!
|
||||
git merge BRANCH
|
||||
git push origin main
|
||||
```
|
||||
|
||||
## Разрешение конфликтов
|
||||
|
||||
```bash
|
||||
# При конфликтах во время rebase
|
||||
jj resolve # Разрешить конфликты
|
||||
jj resolve --tool=union # С объединением (берёт всё)
|
||||
jj diff # Посмотреть различия
|
||||
|
||||
# После редактирования файлов вручную
|
||||
jj resolve # Отметить конфликт разрешённым
|
||||
jj squash -r @ # Переместить разрешение в основной коммит
|
||||
```
|
||||
|
||||
## Типичные workflow'ы
|
||||
|
||||
### Создать и слить новую ветку в main
|
||||
|
||||
```bash
|
||||
# Посмотреть состояние
|
||||
jj log --graph
|
||||
|
||||
# Создать новый коммит
|
||||
jj new -m "feature: add something"
|
||||
|
||||
# Работать над коммитом (файлы отслеживаются автоматически)
|
||||
|
||||
# Создать закладку
|
||||
jj bookmark create feature-branch
|
||||
|
||||
# Перебазировать на main
|
||||
jj rebase -r @ -d main
|
||||
|
||||
# Обновить main
|
||||
jj bookmark set main -r @
|
||||
|
||||
# Запушить
|
||||
jj git push -b main
|
||||
```
|
||||
|
||||
### Слить ветку `ready` в `main` с приоритетом ready
|
||||
|
||||
```bash
|
||||
# Перебазировать main на ready
|
||||
jj rebase -b main -d ready
|
||||
|
||||
# Обновить main bookmark
|
||||
jj bookmark set main -r ready
|
||||
|
||||
# Запушить
|
||||
jj git push -b main
|
||||
```
|
||||
|
||||
### Вернуться к старому коммиту и что-то изменить
|
||||
|
||||
```bash
|
||||
# Посмотреть историю
|
||||
jj log --graph --all
|
||||
|
||||
# "Включить" старый коммит для редактирования
|
||||
jj edit OLD_COMMIT_ID
|
||||
|
||||
# Делать изменения (они автоматически добавятся в текущий коммит)
|
||||
|
||||
# Посмотреть что изменилось
|
||||
jj diff
|
||||
|
||||
# Если нужно разветвить от этого коммита
|
||||
jj new -m "new branch from old commit"
|
||||
```
|
||||
|
||||
## Полезные флаги и опции
|
||||
|
||||
```bash
|
||||
# Смотреть только свои коммиты
|
||||
jj log -r "author(myemail)"
|
||||
|
||||
# Смотреть коммиты с конкретным текстом
|
||||
jj log -r "description(disko)"
|
||||
|
||||
# Операции с конкретным range
|
||||
jj log -r "main..@" # Коммиты от main до текущего
|
||||
|
||||
# Отмена последней операции
|
||||
jj undo
|
||||
|
||||
# Помощь по команде
|
||||
jj new --help
|
||||
```
|
||||
|
||||
## Когда использовать Git вместо jj
|
||||
|
||||
Если что-то сложное происходит, всегда можешь вернуться к Git:
|
||||
|
||||
```bash
|
||||
# Экспортировать текущее состояние в Git
|
||||
jj git export
|
||||
|
||||
# Теперь используй обычные Git команды
|
||||
git log --oneline
|
||||
git merge origin/main
|
||||
git push
|
||||
```
|
||||
|
||||
Git интеграция в jj позволяет работать гибридно!
|
||||
|
||||
***
|
||||
|
||||
**Основные улучшения:**
|
||||
|
||||
- Убрал лишние пустые строки между блоками кода
|
||||
- Выровнял таблицу по стандартам Markdown
|
||||
- Переорганизовал структуру: основные концепции → команды → workflow'ы
|
||||
- Унифицировал комментарии в блоках кода (выравнивание и стиль)
|
||||
- Добавил подзаголовки (###) для workflow'ов вместо жирного текста
|
||||
- Упростил финальный абзац
|
||||
|
||||
***
|
||||
|
||||
Готово к добавлению в Obsidian! 🚀
|
||||
2
10-linux/00-utils/rg.md
Normal file
2
10-linux/00-utils/rg.md
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
`rg --pretty 'search_term' | less -R` - вывести результат rg не напрямую в консоль а через less pager
|
||||
|
||||
70
10-linux/00-utils/wezterm/keys.md
Normal file
70
10-linux/00-utils/wezterm/keys.md
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
## Как это работает
|
||||
|
||||
## 1. **Copy Mode** (аналог Helix selection/view mode)
|
||||
|
||||
**Вход:**[](https://dev.to/lovelindhoni/make-wezterm-mimic-tmux-5893)
|
||||
|
||||
|
||||
|
||||
- **Ctrl+Shift+X** — войти в Copy Mode
|
||||
|
||||
- Или настрой LEADER (например, **Ctrl+Space**, затем **Space**)
|
||||
|
||||
|
||||
**Движение (как в Helix):**[](https://github.com/wez/wezterm/issues/4471)
|
||||
|
||||
|
||||
|
||||
- `h/j/k/l` — стрелки
|
||||
|
||||
- `w/b/e` — прыжки по словам
|
||||
|
||||
- `0/$` — начало/конец строки
|
||||
|
||||
- `g/G` — начало/конец файла
|
||||
|
||||
- `Ctrl-d/u` — полстраницы вниз/вверх
|
||||
|
||||
- `Ctrl-f/b` — страница вниз/вверх
|
||||
|
||||
|
||||
**Выделение:**[](https://github.com/wezterm/wezterm/issues/993)
|
||||
|
||||
|
||||
|
||||
- `v` → char-wise selection (как в Helix)
|
||||
|
||||
- `V` → line-wise selection
|
||||
|
||||
- `Ctrl-v` → block selection
|
||||
|
||||
|
||||
**Копирование:**[](https://github.com/wezterm/wezterm/issues/993)
|
||||
|
||||
|
||||
|
||||
- `y` → скопировать и выйти (как в Helix/Vim)
|
||||
|
||||
|
||||
**Выход:**
|
||||
|
||||
- `Escape` или `q` или `Ctrl-c`
|
||||
|
||||
|
||||
## 2. **QuickSelect** (аналог Helix multiple cursors)
|
||||
|
||||
**Вход:**[](https://dev.to/burnskp/wezterm-quickselect-51gh)
|
||||
|
||||
|
||||
|
||||
- **LEADER+f** (если настроил LEADER)
|
||||
|
||||
|
||||
**Что делает:**
|
||||
|
||||
- Показывает **label'ы** на всех совпадениях regex паттернов[](https://dev.to/burnskp/wezterm-quickselect-51gh)
|
||||
|
||||
|
||||
-
|
||||
|
||||
- Печатаешь label → выделяется и копируется
|
||||
Loading…
Add table
Add a link
Reference in a new issue