Show column marker in vim

This is a discussion on Show column marker in vim within the Editors forums in Theory and Concepts category; Hi, I have trawled google, www.vim.org and vim.wikia.com to try and find this one out... Does anyone know if it is possible to make a column marker display in vim - e.g. a thin line at a given column number that runs down the screen so you can see at a glance where that column is. I find such a thing useful for when doing block comments and stuff like that. I used to be able to do this yonks ago when I used EditPlus on windows. Is it possible with Vim? Pete...

Go Back   Application Development Forum > Theory and Concepts > Editors

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-12-2008, 09:09 AM
cubabit@gmail.com
Guest
 
Default Show column marker in vim

Hi,

I have trawled google, www.vim.org and vim.wikia.com to try and find
this one out...

Does anyone know if it is possible to make a column marker display in
vim - e.g. a thin line at a given column number that runs down the
screen so you can see at a glance where that column is. I find such a
thing useful for when doing block comments and stuff like that.

I used to be able to do this yonks ago when I used EditPlus on
windows. Is it possible with Vim?

Pete
Reply With Quote
  #2  
Old 08-12-2008, 08:43 PM
Bob Harris
Guest
 
Default Re: Show column marker in vim

In article
<bb11d1e2-8101-4132-be4d-78fe27a8d1f8@m73g2000hsh.googlegroups.com
>,

cubabit@gmail.com wrote:

> Hi,
>
> I have trawled google, www.vim.org and vim.wikia.com to try and find
> this one out...
>
> Does anyone know if it is possible to make a column marker display in
> vim - e.g. a thin line at a given column number that runs down the
> screen so you can see at a glance where that column is. I find such a
> thing useful for when doing block comments and stuff like that.
>
> I used to be able to do this yonks ago when I used EditPlus on
> windows. Is it possible with Vim?
>
> Pete


Not exactly what you want. The following will highlight
characters greater than column 80.

:match Todo '\%81v.*'
Reply With Quote
  #3  
Old 08-13-2008, 01:06 AM
as
Guest
 
Default Re: Show column marker in vim

Le Tue, 12 Aug 2008 06:09:11 -0700 (PDT),
cubabit@gmail.com a écrit :

> Does anyone know if it is possible to make a column marker display in
> vim -


set cursorcolumn

> e.g. a thin line at a given column number that runs down the
> screen so you can see at a glance where that column is. I find such a
> thing useful for when doing block comments and stuff like that.


not exactly what you want because it follows your moves but it can help
you to align your comment block.


--
Arnaud Schmittbuhl


Reply With Quote
  #4  
Old 08-13-2008, 01:21 AM
Luka Djigas
Guest
 
Default Re: Show column marker in vim

On Wed, 13 Aug 2008 07:06:54 +0200, as <nosp@m.invalid> wrote:

>Le Tue, 12 Aug 2008 06:09:11 -0700 (PDT),
>cubabit@gmail.com a écrit :
>
>> Does anyone know if it is possible to make a column marker display in
>> vim -

>
>set cursorcolumn
>
>> e.g. a thin line at a given column number that runs down the
>> screen so you can see at a glance where that column is. I find such a
>> thing useful for when doing block comments and stuff like that.

>
>not exactly what you want because it follows your moves but it can help
>you to align your comment block.


Well, he can always combine it with
set virtualedit=all

ldigas
Reply With Quote
  #5  
Old 08-13-2008, 02:01 AM
John Beckett
Guest
 
Default Re: Show column marker in vim

cubabit wrote:
>Does anyone know if it is possible to make a column marker display in
>vim - e.g. a thin line at a given column number that runs down the
>screen so you can see at a glance where that column is. I find such a
>thing useful for when doing block comments and stuff like that.


You've had the answer, but here is the tip (recently cleaned up, with
some in-progress comments at the bottom that will be removed soon):

http://vim.wikia.com/wiki/Highlight_...ond_80_columns

John

Reply With Quote
  #6  
Old 08-13-2008, 05:54 AM
cubabit@gmail.com
Guest
 
Default Re: Show column marker in vim

On Aug 13, 7:01*am, John Beckett <nom...@thanks.junk> wrote:
> You've had the answer, but here is the tip (recently cleaned up, with
> some in-progress comments at the bottom that will be removed soon):
>
> http://vim.wikia.com/wiki/Highlight_...ond_80_columns


Thanks everyone!

/\%80v.*

Did the trick. Its not pretty but it does the job. set cursorcolumn
looks nicer but if only you could get the thing to stick in one place.
ah well.

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:41 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.