Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


*tex_alt.txt*	For Vim version 7.3		Last change: 2012 December 25

CONTENTS						*tex_alt-contents*

	1. Purpose .................................... |tex_alt-purpose|
	2. Installation ............................... |tex_alt-installation|
	3. Usage ...................................... |tex_alt-usage|
	4. Contact &c. ................................ |tex_alt-contact|

1. Purpose						*tex_alt-purpose*

tex_alt is an alternative, lightweight support for LaTeX in Vim. There are
many bundles that aim to do the same thing and possibly do it better, but this
one is mine. Also, it scrolls so much faster.

The problem with the out-of-the-box support, is that its both missing many
useful features, and slow. Packages such as atp-vim and others are fantastic
proofs of Vim’s extensibility, but they add so many features that doing some
actual writing might become unbearably slow. And the fact is, I don’t use
some 90% of those features anyway.

So here’s tex_alt. It’s not a lot of a bundle, really, but it will give you
a syntax highlighting, autocompletion where it’s most needed, it will set
some settings to make writing TeX in Vim much more pleasurable, and it will
not burden and slow Vim down too much.

Note that I’m a linguist and tex_alt is essentially my own settings bundled
together. It’s not made with mathematics in mind. It doesn’t really provide
any support for it. I’m afraid you’ll need to add it yourself. Sorry.


What tex_alt provides:
* lighter, faster and less complete syntax highlighting,
* autocompletion for commands and tags,
* auto tag regeneration on file open and save,
* basic compilation with a QuickFix window,
* some more convenience settings and mappings.

What tex_alt doesn’t provide:
* support for BibTeX,
* support for mathematics, and
* almost any IDE kind of behaviour in general.

2. Installation						 *tex_alt-installation*

The Git repo will be cloned together with a directory structure. Simply copy
the files to the corresponding directories in your ~/.vim folder. (You might
need to create them first.)

The _ctags file needs to be copied to ~/.ctags (mind the dot before the name).
If you already have this file, do not overwrite it. Append the contents to it.

After the installation, you will probably need to run >
    :helptags ~/.vim/doc
to be able to access this file through Vim’s help.


If you want to make full use of tex_alt, you will also need to install:
* Ctags (http://ctags.sourceforge.net/),
* Kellys colorscheme (http://www.vim.org/scripts/script.php?script_id=2463),
* SnipMate (http://www.vim.org/scripts/script.php?script_id=2540), and
* Tagbar (http://www.vim.org/scripts/script.php?script_id=3465).

Ctags are required by tagbar, which displays a nice outline of the document.
Kellys is a colorscheme of mine which goes well with tex_alt’s syntax
definition. I don’t guarantee it will be very useful with any other scheme.
SnipMate implements very useful TextMate-like snippets for Vim.

3. Usage						*tex_alt-usage*

You can change the default LaTeX flavour by setting >
    let b:tex_alt_flavour = "INSERT YOUR FLAVOUR HERE"

If you notice slowdowns, you might try setting >
    let b:tex_alt_auto_tags = 0
to disable auto regeneration of tags on file open and save.


tex_alt will map three keys:
* <F9> to compile the currently focused file and open the |quickfix| window,
* <F12> to toggle the |tagbar| window, and
* <Leader>w to toggle line wrapping on and off.

Also the behaviour of the arrows and <Home> and <End> will be redefined to
make moving through long lines more Word-like.

tex_alt will automatically open a completion popup (|ins-completion|) when it
recognizes that you typed a backslash, ‘include{’, ‘includegraphics{’,
‘input{’, or ‘ref{’. You can keep typing, or use the arrow keys or <C-n> and
<C-p> to choose the word you meant to write. When it is highlighted (the first
proposition is highlighted automatically, hit Enter, Tab or <C-y> to insert
it. Cancel by pressing <C-e> or <Right>.
The dictionary is in ftplugin/tex_alt.dict. You can add and delete words in it
to better adjust it to your needs.

If you installed |snipMate| (see above), you will be also able to use snippets.
The list in tex_alt is not too long, and essentially only includes the basic
environments and sections, but snipMate snippets are very easy to write (see
the ‘snippets’ directory). To give you an idea, type ‘beg’ and press <Tab>.

tex_alt also provides Ctags definitions for TeX which I think are smarter than
what can be found on the web, because they extract labels from inside section
names. It’s not very nice to have tagbar display section name that begins
with ‘\label{…’.

Apart from the above, some options will be set to make writing LaTeX in vim
more pleasurable. In particular, this includes mappings for more intuitive
moving through wrapped lines, ignoring LaTeX auxiliary files when completing
file names in the command lines, and others. You can inspect and adjust them
in ftplugin/tex_alt.vim.

4. Contact &c.						*tex_alt-contact*

The license is GPL3+. You can contact me at kamil.stachowski@at@gmail.com.
There is absolutely no guarantee whatsoever. Potentially, this bundle could
even drink up your coffee.

0.21	2012.12.25
	bugfixes mostly
	added more snippets
	added easier navigation through wrapped lines
0.2	2012.12.18
	syntax rewritten from scratch
	added autocompletion for commands, includes and tags
	added auto tag regeneration
	added graphics to _ctags
0.1	2012.12.10
	initial release