Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 9v00668c77cf0000000002a0

Change LaTex itemizations formats

Inspired by the way my professor formats their LaTeX assignments.

Start file
\documentclass{minimal}

\begin{document}

\begin{itemize}

\item[1.] Item 1
\subitem a
\subitem b
\subitem c
\item[2.] Item 2
\subitem a
\subitem b
\item[3.] Item 3
\subitem b
\subitem c
\item[4.] Item 4
\subitem b
\subitem c
\item[5.] Item 5
\subitem b
\subitem c

\end{itemize}

\end{document}
End file
\documentclass{minimal}

\begin{document}

\begin{enumerate}

\item Item 1
\begin{enumerate}
	\item a
	\item b
	\item c
\end{enumerate}
\item Item 2
\begin{enumerate}
	\item a
	\item b
\end{enumerate}
\item Item 3
\begin{enumerate}
	\item b
	\item c
\end{enumerate}
\item Item 4
\begin{enumerate}
	\item b
	\item c
\end{enumerate}
\item Item 5
\begin{enumerate}
	\item b
	\item c
\end{enumerate}

\end{enumerate}

\end{document}

View Diff

5c5
< \begin{itemize}
---
> \begin{enumerate}
7,22c7,32
< \item[1.] Item 1
< \subitem a
< \subitem b
< \subitem c
< \item[2.] Item 2
< \subitem a
< \subitem b
< \item[3.] Item 3
< \subitem b
< \subitem c
< \item[4.] Item 4
< \subitem b
< \subitem c
< \item[5.] Item 5
< \subitem b
< \subitem c
---
> \item Item 1
> \begin{enumerate}
> 	\item a
> 	\item b
> 	\item c
> \end{enumerate}
> \item Item 2
> \begin{enumerate}
> 	\item a
> 	\item b
> \end{enumerate}
> \item Item 3
> \begin{enumerate}
> 	\item b
> 	\item c
> \end{enumerate}
> \item Item 4
> \begin{enumerate}
> 	\item b
> 	\item c
> \end{enumerate}
> \item Item 5
> \begin{enumerate}
> 	\item b
> 	\item c
> \end{enumerate}
24c34
< \end{itemize}
---
> \end{enumerate}

Solutions by @balotchnik:

Unlock 2 remaining solutions by signing in and submitting your own entry
Created by: @dsoto1219

17 active golfers, 103 entries

Solutions by @balotchnik:
75
#8 - jinx balotchnik / @balotchnik

07/13/2024 at 07:06AM

77
#>10 - jinx balotchnik / @balotchnik

07/13/2024 at 07:00AM