Gary Johnson wrote:
On 2012-05-16, skeept wrote:
If I have a latex table with long line I always enter newline after //
But if I select the table visually and use the Q command to format it
puts the // in the middle of the text.

I would like to know if there is an option to tell vim not format
the table, but enter a newline after it sees a //.

Any other options on how to format latex tables?
I use Chip Campbell's Align plulgin:

     http://vim.sourceforge.net/scripts/script.php?script_id=1195

Install the plugin, open your LaTeX file, visually-select the lines
of your table (V), and type \tt.
Thanks, Gary!

In addition, there's also AutoAlign which works with Align.vim...

AutoAlign typically allows one to auto-align on =s as one types.

    a=1
    bbb=2
    z=4

becomes, as one types: (the following looks correct in monospaced fonts)

    a   = 1
    bbb = 2
    z   = 4

It also provides AutoAlign-ing for a number of other things, such as Latex tables (it triggers auto-align'ing on pairs of backslashes).

You can get AutoAlign from:

http://vim.sourceforge.net/scripts/script.php?script_id=884
  -or-
http://mysite.verizon.net/astronaut/vim/index.html#AUTOALIGN (most up-to-date)

To install it:

    vim autoalign.vba.gz
    :so %
    :q

(presuming that you have gunzip so that the vimball can be decompressed; if you're on Windows,
 see  :help vimball-windows  for how to get a gunzip tool)

Regards,
Chip Campbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to