This is a purely technical blog concerning topics such as Python, Ruby, Linux, open source software, the Web, and lesser-known programming languages. Ad maiorem Dei gloriam inque hominum salutem.
Wednesday, February 14, 2007
Vim: Soft Wrap
Here's another Vim tip, which I'm surprised it took me so long to find out. To make Vim "soft wrap" text, like Microsoft Word does, use ":set wrap linebreak textwidth=0".
The only thing I wish is that it would treat soft wrapped text the way Emacs and Microsoft Word do. I.e., if you press up (i.e. k), it should go up a line on the screen, whether or not there was a \n involved. Oh well. I wonder if there's a setting for that too.
13 comments:
dude you rock! I was just thinking...hmmm I bet Shannon knows and boom...gotcha on google :)
hahaha
That's awesome!
Thanx dude.I love this feature.
thnx!
# aptitude remove gedit
Finally! I can now use vim for prose as well as code. Cheers!
Hahaha, nice ;)
The only thing I wish is that it would treat soft wrapped text the way Emacs and Microsoft Word do. I.e., if you press up (i.e. k), it should go up a line on the screen, whether or not there was a \n involved. Oh well. I wonder if there's a setting for that too.
thanks!!!
@Shannon -jj Behrens:
:map j gj
:map k gk
:map [Up] gk
:map [Down] gj
Just use '<' '>' instead of '[' and ']'
silwilin, thanks!!!
The quality of my life has just improved drastically. Thanks silwilin and Shannon!
how to you revert the command?
Opening a new window or tab is probably the fastest way.
Thanks a ton, this really helped.
Thanks this was very helpful.
Post a Comment