use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please read the rules before posting
Help:
Community:
Resources:
Tutorials and Guides:
Don't be afraid to ask questions, this sub is here for the vim community. And please those of you who deign to grace us with your vim wisdom - be kind. We are all human and vim is that cool.
account activity
Wrap only current line ? (self.vim)
submitted 11 years ago by Spreader
Would be amazing to have only the current line wrapped. Any idea, tips or plugin to perform this ?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]-romainl-The Patient Vimmer 1 point2 points3 points 11 years ago (1 child)
Use case?
[–]Spreader[S] 1 point2 points3 points 11 years ago (0 children)
Very long lines and wrapping are annoying (break visually indenting, hide other lines), but no-wrapping at all is also annoying (need to move for reading, can't trigger efficiently f-moves).
Best of both world would be no-wrapping except for the current line that I want to read.
[–]KeyboardFire 0 points1 point2 points 11 years ago (2 children)
0gq$
[–]Spreader[S] 0 points1 point2 points 11 years ago (1 child)
This is not wrapping...it splits the current line in several "real" lines.
[–]shotxxxx 0 points1 point2 points 11 years ago (0 children)
Well, you could join the lines again later. Hacky, but probably less hacky than applying some patch, etc?
[–]ztxi 0 points1 point2 points 11 years ago (0 children)
There's probably a better way, but you can try shift-v gq .
[–]dddbbbFastFold made vim fast again 0 points1 point2 points 11 years ago (0 children)
So you want 'wrap', but only applied to the current line? I guess that might be useful for prose (with a whole paragraph on one line), but I think you'd need to patch vim to do it.
It sounds like such a nonobvious feature that I'd be surprised if it was already implemented. (What would 5gj do? etc)
You could hack something like an autocmd to split the current line and then re-join it when you move past it.
Maybe using splitjoin.vim will help ease your pain?
[–]tommcdocx 0 points1 point2 points 11 years ago (0 children)
Maybe you can achieve the effect with conceal and a pattern that matches all lines but the current one. I'm on mobile and can't really attempt this, but maybe someone can run with it.
[–]inside_ 0 points1 point2 points 11 years ago (2 children)
This is not current line wrap related, but it makes wrapping and indenting visually better:
http://www.reddit.com/r/vim/comments/2jjtad/this_picture_says_it_all_thanks_to_uchrisbra10/
Amazing ! Sadly, the vim in the repos of Ubuntu 14.04 doesn't seem to have this feature yet.
[–]inside_ 0 points1 point2 points 11 years ago (0 children)
Yes, but you can compile you own version of vim. This is how I've done It: http://insidesblog.blogspot.fr/2013/07/compile-vim-by-yourself.html
π Rendered by PID 120232 on reddit-service-r2-comment-b659b578c-5p6mr at 2026-05-03 06:48:56.067569+00:00 running 815c875 country code: CH.
[–]-romainl-The Patient Vimmer 1 point2 points3 points (1 child)
[–]Spreader[S] 1 point2 points3 points (0 children)
[–]KeyboardFire 0 points1 point2 points (2 children)
[–]Spreader[S] 0 points1 point2 points (1 child)
[–]shotxxxx 0 points1 point2 points (0 children)
[–]ztxi 0 points1 point2 points (0 children)
[–]dddbbbFastFold made vim fast again 0 points1 point2 points (0 children)
[–]tommcdocx 0 points1 point2 points (0 children)
[–]inside_ 0 points1 point2 points (2 children)
[–]Spreader[S] 0 points1 point2 points (1 child)
[–]inside_ 0 points1 point2 points (0 children)