[oclug] vi / emacs holy war

Vic Gedris vic at worldwidepunk.com
Wed Jan 10 00:26:46 EST 2001


On Tue, 9 Jan 2001, Dave O'Neill wrote:

> Oh wait, that could never happen.  =^)  If you want to enable CTRL-J
> to work the same in vim as it does in PICO, you can add the following
> line to your ~/.vimrc:
> 
> nmap <C-J> vipgq
> 
> This will map CTRL-J to format the current paragraph to fit in
> whatever number of columns the variable 'textwidth' is defined as
> (usually 78).

And Mike Soulier wrote:
> :help gq


Thanks guys!  I now have a really sweet setup for email (Pine with vim
as alternate editor).  Syntax hilighting, CTRL-J paragraph formatting,
quote indenting, etc..etc...

In case anyone cares, here's what I did:

1) Created ~/.vimrc-mail where I store my additional email commands:
   :set ft=mail
   :set textwidth=72
      ....this sets formatting/hilighting style to email, and makes sure
      lines get wrapped at 72 columns.
   Also updated .vimrc to handle CTRL-J:
   :nmap <C-J> vipgq


2) Tell PINE to use an alternate editor (From main menu, type "SC"):
            [X]  enable-alternate-editor-cmd                
            [X]  enable-alternate-editor-implicitly
            editor                   = vim -s /home/vic/.vimrc-mail
(Enable alt editor by default, and tell vim to execute the commands in
my .vimrc-mail file after the regular .vimrc stuff)

I also read a hell of alot of the VIM docs.  Maybe "Vim/Emacs Holy War"
can be a theme for an upcoming meeting.  Seriously.  Have demos of some
of the coolest features of each editor.

Cheers,
Vic

-- 
------------------------------------------------------------------------
vic at worldwidepunk.com    WORLD WIDE PUNK    http://www.worldwidepunk.com
------------------------------------------------------------------------




More information about the OCLUG mailing list