You are not logged in.

#1 2009-09-25 17:31:56

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

restrict line length in vim/urxvt

So in my programming class the max line length we can use is 80 characters. Is it possible to show something / notify myself in vim/urxvt when I reach this limit so I know to move to the next line (something other than the character count in the bottom right, something more noticeable)

Offline

#2 2009-09-25 17:44:36

Garns
Member
Registered: 2008-05-28
Posts: 239

Re: restrict line length in vim/urxvt

You can set textwidth to 80 to automatically break lines once you reach the 80 character limit.

You may find this interesting as well.

Offline

#3 2009-09-25 17:54:03

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: restrict line length in vim/urxvt

Thanks, also is there a way to set how many spaces I get when I press tab, so that I can reduce characters that was as well?

Offline

#4 2009-09-25 17:56:05

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: restrict line length in vim/urxvt

:help sw
:help ts
:help sts

archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#5 2009-09-25 19:28:45

N30N
Member
Registered: 2007-04-08
Posts: 273

Re: restrict line length in vim/urxvt

Dethredic wrote:

Is it possible to show something / notify myself in vim/urxvt when I reach this limit so I know to move to the next line (something other than the character count in the bottom right, something more noticeable)

hi OverLength cterm=reverse
match OverLength "\%81v.*"

Offline

#6 2009-09-25 22:00:00

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: restrict line length in vim/urxvt

FYI, there is a .vimrc thread where you might be able to get more tips.


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#7 2009-09-27 15:09:13

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: restrict line length in vim/urxvt

thanks a lot guys

Offline

#8 2009-09-28 18:07:32

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: restrict line length in vim/urxvt

Ok, I added a bunch of settings to my .vimrc but none of them seemed to take effect

Offline

#9 2010-12-22 09:13:05

sickill
Member
Registered: 2010-01-12
Posts: 10

Re: restrict line length in vim/urxvt

In VIM 7.3:

set colorcolumn=80

Offline

#10 2010-12-22 19:42:49

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: restrict line length in vim/urxvt

Oops, my bad, didn't realize this was an old thread.  Shame on the person above me.

Last edited by Trent (2010-12-22 19:43:48)

Offline

Board footer

Powered by FluxBB