[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: visually mark off 80th column?

From: Brendan Miller
Subject: Re: visually mark off 80th column?
Date: Fri, 22 Jan 2010 16:02:26 -0800

vline would be ideal... but I don't see a way to pin highlighting to
the 80th column.

Based on this thread and some others I've come up with this using the
highlight-80+ package.

;; highlight all characters past 80
(require 'highlight-80+)
(dolist (hook '(emacs-lisp-mode-hook
  (add-hook hook
            '(lambda () (highlight-80+-mode))))

One minor point, is I really want this to apply to *all* modes, not
just the ones I thought to list here. Is there any global mode hook
that applies to everything? The only files I would ever edit with
emacs would have the 80 line rule apply to them i.e. I don't do word
processing in emacs.

On Fri, Jan 22, 2010 at 2:28 PM, Drew Adams <address@hidden> wrote:
>> M-: (column-marker-1 80)
>> *does* work, but for some reason just having:
>> (add-to-list 'load-path "~/emacs/")
>> (require 'column-marker)
>> (column-marker-1 80)
>> In my .emacs file does nothing! Very confusing. I'll post my whole
>> .emacs file at the end, just in case I'm doing something that
>> conflicts...
> The reason is because `column-marker' is local to the current buffer. Doing 
> what
> you did sets it (only) for the buffer that is current during loading of your
> .emacs.
> Set it in a mode hook, as I suggested, to turn it on automatically for any
> buffer of a particular mode. This is described in the file header.
>> I also notice that when I type M-: (column-marker-1 80) it only
>> highlights the part of the column that have characters, which isn't
>> really what I want. Is there any way to make this highlight the whole
>> column?
> Not that I know of.
> But you might be able to use `vline.el' (with `vline-style' = `compose') to do
> what you want. You will need to create a command that pins the highlighting 
> to a
> particular column.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]