I tend to use a lot of vertical splits in my vim (version 8.1, via Arch Linux official repos) usage (on top of tabs, horizontal splits, tmux, etc.), and it gets frustrating when many of my lines wrap and eat up vertical real-estate when there's plenty of indent-borne whitespace.

I want to be able to read the tail of my code, but I also don't want those indents to eat up proportionally huge amounts of real-estate when I have vertical splits.

Now, I know I can use horizontal scroll commands (e.g. zh, zl) when I have nowrap set in Vim. These commands, however, seem to be disabled when I set wrap.

How can I get the same effect with wrap set (or similar)?

i.e. having the tail of the text wrap to the first visible column and still have horizontal scroll commands

  • Do you mean zh, zl, & co.? – D. Ben Knoble Dec 25 '18 at 21:56
  • Yes, those commands (edited question to clarify). They don't appear to function when I have set wrap in play. I'd be fine with solutions involving other convenient commands. – user Dec 25 '18 at 22:01
  • What version are you using? – D. Ben Knoble Dec 25 '18 at 22:09
  • 1
    That would be important information, wouldn't it... Version 8.1. Edited question to clarify. – user Dec 25 '18 at 22:57
  • From the docs: “only works when 'wrap' is off” – D. Ben Knoble Dec 25 '18 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.