Giter VIP home page Giter VIP logo

Comments (9)

junegunn avatar junegunn commented on August 17, 2024

There are three options that determine horizontal scrolling:

  • wrap
  • sidescroll
  • sidescrolloff

It seems that your vim is set to nowrap, right? In that case, I recommend that you try the following settings.

set sidescroll=1
set sidescrolloff=0

Hmm, maybe I could make sidescroll automatically set to 1 for Goyo windows, I'll think about it.

And for me, Goyo takes only about 0.1 sec

> time vim -c "e ~/.vimrc" -c qa!
real    0m0.348s
user    0m0.279s
sys     0m0.058s

> time vim -c "e ~/.vimrc" -c "Goyo" -c qa!
real    0m0.444s
user    0m0.324s
sys     0m0.077s

I think some of your plugins are causing the delay, try disabling some heavy ones and see how it turns out.

from goyo.vim.

tlvince avatar tlvince commented on August 17, 2024

Thanks for that.

Simply setting set sidescrolloff=0 does the trick for me. Looks like it'd be good addition for Goyo.

Edit, I'm using vim-sensible, which sets sidescrolloff=5 by default. Sorry for the noise. Setting side scroll still might make sense in the context of Goyo.

from goyo.vim.

junegunn avatar junegunn commented on August 17, 2024

So now, Goyo will use those option values by default.

And hey it's not noise, I appreciate your report. Since I have set wrap in my .vimrc, I haven't given enough thought about horizontal scrolling.

Did you find the culprit that introduces delay to Goyo command?

from goyo.vim.

tlvince avatar tlvince commented on August 17, 2024

👍

With regards to the delay, I'll do some debugging and open another issue if necessary.

from goyo.vim.

junegunn avatar junegunn commented on August 17, 2024

Alright, thanks!

from goyo.vim.

mlongval avatar mlongval commented on August 17, 2024

Hello junegunn,

I like Goyo very much. Thanks for writing it.

I am not very good at VIM and would like to change the top and bottom margins.

I have found that I should be doing something like this:

:set goyo_margin_top=0 

But when I do it I get an error "Unknown option: goyo_margin_top"

Thanks again,

Mike

from goyo.vim.

junegunn avatar junegunn commented on August 17, 2024

@mlongval Hi, you should use let instead of set. Add the following lines to your .vimrc

let g:goyo_margin_top = 0
let g:goyo_margin_bottom = 0

However, please note that due to the limitation of the current implementation, you can't reduce the top and bottom margin down to zero. They will still take 2-3 lines even if you set g:goyo_margin_top and g:goyo_margin_bottom to zero.

from goyo.vim.

mlongval avatar mlongval commented on August 17, 2024

Thanks junegunn.

Cheers! ;)

from goyo.vim.

kartikynwa avatar kartikynwa commented on August 17, 2024

I had this issue too. Using vim-pencil causes lines to not wrap immediately sometimes when textwidth is exceeded. I fixed this by let g:goyo_width = 90. Just thought I would leave this here.

Thanks for this great extension by the way.

from goyo.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.