4 ms·
What I would really like is an editor where I can fix the cursor line on the screen and have the document move around that line. I hate looking at the bottom of
by protomyth 6y ago
What I would really like is an editor where I can fix the cursor line on the screen and have the document move around that line. I hate looking at the bottom of the window all the time when writing long documents.
- ducktective 6y agoIn vim, set `scrolloff` to a large value. https://vim.fandom.com/wiki/Keep_your_cursor_centered_vertically_on_the_screen https://vim.fandom.com/wiki/Keep_your_cursor_centered_vertic...
- protomyth 6y agoclose, but I want it to stay about a quarter of way down the screen.
- txutxu 6y agoThis can be done playing with a number of lines... like 10 or 15. And it will stay at such distance (in lines) from the top or bottom... Don't know a way to set it to a percent, but could be nice too, indeed.
- ducktective 6y agoI think the percentage is do-able with some autocmd shenanigans...even the link I posted has a snippet for it. Changing that `/2` to a `*3/4` might work. https://vim.fandom.com/wiki/Keep_your_cursor_centered_vertically_on_the_screen#Centering_automatically_with_autocmds https://vim.fandom.com/wiki/Keep_your_cursor_centered_vertic...
- qbasic_forever 6y agoThis is why I like rich text editors like google docs instead of IDEs jammed with markdown extensions. Rich editors come from a lineage of word-processing tools that are first and foremost for writing paragraphs of text and content. They go out of their way to make the experience of reading and writing pleasant, not mechanical.
- txutxu 6y agoMe too. What I do in my ~/.vimrc is: " Number of lines (context) around the cursor " You may like 3, or 5, or 10 " A high number keeps the cursor in the middle of the editor set scrolloff=999 Then... it's always in the middle of the screen/window, even when working at really big resolutions.
- y2bd 6y agoiA Writer has a “typewriter” mode that behaves like that.
- protomyth 6y agoThanks for that info. That is the feature.