Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ttytm/german-scroll.code
VSCode/Codium extension. Vim-like scrolling that obeys to the rules. Preserves folds and respects scrollOff.
https://github.com/ttytm/german-scroll.code
keyboard-shortcuts scrolling vim vscode vscode-extension
Last synced: 11 days ago
JSON representation
VSCode/Codium extension. Vim-like scrolling that obeys to the rules. Preserves folds and respects scrollOff.
- Host: GitHub
- URL: https://github.com/ttytm/german-scroll.code
- Owner: ttytm
- License: mit
- Created: 2022-06-26T20:34:15.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-25T03:28:42.000Z (5 months ago)
- Last Synced: 2024-10-25T09:18:37.204Z (18 days ago)
- Topics: keyboard-shortcuts, scrolling, vim, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://open-vsx.org/extension/Turiiya/german-scroll
- Size: 199 KB
- Stars: 20
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ️german-scroll\*
> Scrolling that behaves.
**This plugins offers Vim-like scroll commands whilst fixing some of the current keyboard scrolling bummers:**
- Preserves folds
- Won't get stuck at folds
- Respects scrollOff
- Keeps the cursor moving when the document boundary is reached_Basically, it aims to make scrolling behave just like it's expected from it._
## ⌨️ How To Use
You get three scrolling motions.
| **Scroller** | **Default Keymaps** |
| ------------ | -------------------------- |
| Armin | ️️⬆ Ctrl+Down️ |
| | ⬇ Ctrl+Up |
| Berthold | ⬆ Ctrl+PageUp |
| | ⬇ Ctrl+PageDown |
| Christa | ⬆ PageUp |
| | ⬇ PageDown |## Preview
Links to a quick and dirty video example using german-scroll in VSCodium in combination with VSCodeVim.
### ⚙️ Settings
Configure the scrolling distance in your settings.json.
Possible values are ` | "halfPage" | "page"`.
_Default settings:_```json
"germanScroll.armin": 5
"germanScroll.berthold": "halfPage"
"germanScroll.christa": "page"
```### 🍝 Copypasta for a VSCodeVim config
```json
{
"command": "germanScroll.arminUp",
"key": "ctrl+y",
"mac": "cmd+y",
"when": "vim.active && editorTextFocus && vim.mode != 'Insert'"
},
{
"command": "germanScroll.arminDown",
"key": "ctrl+e",
"mac": "cmd+e",
"when": "vim.active && editorTextFocus && vim.mode != 'Insert'"
},
{
"command": "germanScroll.bertholdUp",
"key": "ctrl+u",
"mac": "cmd+u",
"when": "vim.active && editorTextFocus && vim.mode != 'Insert'"
},
{
"command": "germanScroll.bertholdDown",
"key": "ctrl+d",
"mac": "cmd+d",
"when": "vim.active && editorTextFocus && vim.mode != 'Insert'"
},
{
"command": "germanScroll.christaUp",
"key": "ctrl+b",
"mac": "cmd+b",
"when": "vim.active && editorTextFocus && vim.mode != 'Insert'"
},
{
"command": "germanScroll.christaDown",
"key": "ctrl+f",
"mac": "cmd+f",
"when": "vim.active && editorTextFocus && vim.mode != 'Insert'"
},
```## 🗒️ Additional Info:
After using this extension for a while and being happy with its behavior, it should make its way into the public domain.
Since it's still pretty fresh out of the oven and not many eyes have been on it yet, there may be scenarios where the scrolling behaves unexpectedly.If you notice any of these issues, feel free to open an issue or submit a PR.
And of course showing some love and leaving a star on the repo or rating the extension always helps ❤️.
_\*Especially in today's times it's hard to always be politically correct. Additionally the high interconnectedness of people with different cultural backgrounds makes it impossible to prevent misunderstandings sometimes. Therefore I want to add the info that the plugins name and theme is taking the mickey out of our(being from germany myself) german correctness and not a nationalistic discrimination of others._
### Known Issues:
Nothing that would break something but some small things could be observed:
- Scrolling inconsistencies may occur:
- During fast scrolling (e.g., pressing and holding the key) with the "smooth scrolling" setting enabled.
- During scrolling actions between folded sections.
- Selection becomes invisible when scrolling in VisualMode beyond the currently visible range (it reappears when moving the cursor after scrolling).
- There should probably be additional settings that allow the user to disable behaviors such as continuing cursor movement when the document boundary is reached.### Credits & Sources of Inspiration
- [Scroll Viewport](https://github.com/bmalehorn/vscode-scroll-viewport)
- [Neoscroll](https://github.com/karb94/neoscroll.nvim)