Re: [Vim-latex-devel] Re: Review of vim-latex status
Brought to you by:
srinathava,
tmaas
From: Carl M. <cm...@ma...> - 2002-12-31 01:48:15
|
Dear Srinath, On Sun, Dec 29, 2002 at 07:23:11PM -0800, Srinath Avadhanula wrote: > I remember that you used the fact that > amsmath is used to change some behaviors... The presence of \usepackage{amsmath} was used for the function key macros for entering environments, and to replace them. I picked out the most common environments in each case (most common for me). " KEY LATEX AMSLATEX " " F1 equation equation " F2 \[...\] equation* " F3 eqnarray align " F4 eqnarray* align* " F5 asks for environment asks for environment For me, the environments are logically ordered in this way, that is, one-line, with numbering one-line, without numbering mulitine, with numbering mulitine, without numbering Of course, the current scheme of picking out an environment with a number is nice, too. The user can always bind the function keys if he/she wants to save an extra key stroke or 2. Maybe, the choices presented to the user could depend on the presence of \usepackage{amsmath}. In general, I like to use the fewest number of keystrokes. That's why, for \mathbf, I have the user type a letter and then press <Alt-b> (which then capitalizes the letter and encloses it in \mathbf{} ). Then I realized that with this method, the same key could be used for several purposes, depending on the key that preceded it. For instance, <Alt-l> preceded by a bracket inserts \left...\right, but if it is not preceded by a bracket, it produces \label{}. Actually, the "smart brackets" were the earliest case of this that I know of; These were part of emacs auctex. In general, we should pay close attention to existing packages. In addition to emacs auctex, there is a related emacs package called ultratex. It has the auctex mappings, but also has "lightning completion", which is sort of the same thing as word completion with <C-N> or <C-P>. But you do not have the option of rejecting the completion. This never appealed to me, but I know a number of mathematicians who like it. Also, in ultratex, typing $$ results in $$ $$ Typing more dollar signs will make the environment cycle through \begin{equation}...\end{equation}, and so on. I decided that it was easier to just get what you want with a single keystroke, with F1 - F4. Best wishes, Carl |