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

VIM justify and others.




During the last meeting, I commented on justifying text using vim.  Here's a
little on that.

First, my settings.. (:set)

  background=dark     backspace=2         modified            textwidth=78  viminfo='20,"50
  formatoptions=tcql

Note the textwidth (tw is a shortcut). The mw setting may work the same;
haven't tried it though.

Here's a clip from the VIM docs (avail via F1):
Operators that can be used are:
        ~       switch case                                     |v_~|
        d       delete                                          |v_d|
        c       change                                          |v_c|
        y       yank                                            |v_y|
        >       shift right (1)(*)                              |v_>|
        <       shift left (1)(*)                               |v_<|
        !       filter through external command (1)             |v_!|
        =       filter through 'equalprg' option command (1)    |v_=|
->      gq      format lines to 'textwidth' length (1)          |v_gq|

Next you go to the place you want to justify.  just press 'gq' and a
directional command or direction while in command mode.

A nice one for shooting a paragrpah at a time is (in command mode) "gq{" (sans
quote) That is the equiv of ^J in pico.  It justifies until the next
linebreak.

Another fun (but somewhat hazardous) modification of that is "gqG" (sans "")
which justifies all text to the EOF.

Well, that's all of that :-)  Vim is my baby. 

I enjoyed the meeting immensly tonight, as did Mike McGrath.  Great meeting.

--Michael David  (The big guy from SHS) :)

-- 
  --= Damacus =-- (damacus@bastion.cnsnet.net)
     ==* Co-Administrator @ CNSnet, Inc.*==
     ==* President of SITE @ SHS, 1998 *===
    ----= PGP key available on request =----

Like I always say, If you can't compile it, you don't deserve to run it.
				-Unixboy  <unixboy@imsa.edu> regarding 
				packages and the benefits of compiling.


--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.