Feature: Add scrolloff #9

Open
opened 2025-09-03 21:06:12 +00:00 by xsty · 1 comment
xsty commented 2025-09-03 21:06:12 +00:00 (Migrated from codeberg.org)

Implements the scrolloff functionality similar to vim, where the screen scrolls according to the cursor position on the screen.

Here's an example:

Let's imagine we have a 5 line big screen, and a 7 line big file.

1 |  #include <stdio.h>
2 |
3 |  int main() {
4 |      printf("Hello World!");
5 |  }█

As soon as the cursor goes beyond the screen, the screen should scroll to new lines in the current file, i.e:

3 |  int main() {
4 |      printf("Hello World!");
5 |  }
6 |  
7 |  █* Insert more amazing code here */

An option would maybe allow the height required for the cursor to go off screen to be increased.
Example: scrolloff = 3 would've made our cursor start scrolling at line 2.

Implements the scrolloff functionality similar to vim, where the screen scrolls according to the cursor position on the screen. Here's an example: Let's imagine we have a 5 line big screen, and a 7 line big file. ``` 1 | #include <stdio.h> 2 | 3 | int main() { 4 | printf("Hello World!"); 5 | }█ ``` As soon as the cursor goes beyond the screen, the screen should scroll to new lines in the current file, i.e: ``` 3 | int main() { 4 | printf("Hello World!"); 5 | } 6 | 7 | █* Insert more amazing code here */ ``` An option would maybe allow the height required for the cursor to go off screen to be increased. Example: `scrolloff = 3` would've made our cursor start scrolling at line 2.
amartin commented 2025-09-12 14:16:04 +00:00 (Migrated from codeberg.org)

Update: Implemented, however there is no horizontal scrolloff yet.

Update: Implemented, however there is no horizontal scrolloff yet.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
NTBBloodbath/koa#9
No description provided.