[Tex/LaTex] shortcut for inserting matching endsomething in Windows

auto-completion

I would like to automatically inserting closing environments In MiKTeX-TeXWorks. And i have found Shortcut for inserting matching \end{something} in VIM. Any other same options are available in Windows?

Best Answer

In Texworks, type \beg and TAB, you will get \begin{. Then type doc as in \begin{doc and again press TAB you will get

\begin{document}



\end{document}

with cursor in between.

Then type, say, \beg and TAB to get \begin{ and type ite (\begin{ite) press TAB to get

\begin{document}

\begin{itemize}
\item

\end{itemize}•

\end{document}

There are many other short cuts that are defined in files like tw-latex.txt. To find these, go to HelpSettings and Resources. You will get this window:

enter image description here

Click on the link and the folder C:\Users\HK\AppData\Local\MiKTeX\2.9\TeXworks\0.4 opens (HK may be different for you). Get inside the completion folder where you will find four files → tw-basix.txt, tw-beamer.txt, tw-context.txt and tw-latex.txt. You need tw-latex.txt where these shortcults can be found.

enter image description here

Foe example, type bsubeq and press TAB and see yourself.


In winedt, type

\begin{document}}   %%<--- extra brace

to get

\begin{document}

\end{document}

or to close the environment that is open, type

\end{{

In winedt, to find short cuts, do something like this:

Go to OptionsOptions Interface, then press Main Menu once. Press the arrow head as shown and you will find shortcuts, click on shortcuts. Now all shortcuts are copied to clip board. Open a new file and paste.

enter image description here

Related Question