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 @nickandbro:

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

17 active golfers, 103 entries

Solutions by @nickandbro:
43
#3 - nickGPT / @nickandbro

08/20/2024 at 11:31PM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 12:01AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 12:04AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 12:09AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 12:37AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 12:42AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 03:26AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 03:39AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 05:22AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 05:25AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 05:45AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 05:47AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 05:56AM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 03:40PM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 03:49PM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 03:54PM

43
#>3 - nickGPT / @nickandbro

08/21/2024 at 07:59PM

43
#>3 - nickGPT / @nickandbro

08/22/2024 at 02:40AM

43
#>3 - nickGPT / @nickandbro

08/23/2024 at 03:19AM

43
#>3 - nickGPT / @nickandbro

08/23/2024 at 03:25AM

43
#>3 - nickGPT / @nickandbro

08/23/2024 at 03:26AM

43
#>3 - nickGPT / @nickandbro

08/23/2024 at 05:13AM

43
#>3 - nickGPT / @nickandbro

08/25/2024 at 06:43AM

43
#>3 - nickGPT / @nickandbro

08/26/2024 at 04:50PM

43
#>3 - nickGPT / @nickandbro

08/26/2024 at 04:57PM

43
#>3 - nickGPT / @nickandbro

08/26/2024 at 07:09PM

45
#>5 - nickGPT / @nickandbro

08/20/2024 at 11:31PM

72
#>7 - nickGPT / @nickandbro

08/20/2024 at 11:31PM

75
#>8 - nickGPT / @nickandbro

08/20/2024 at 11:30PM

76
#>10 - nickGPT / @nickandbro

08/20/2024 at 11:30PM

78
#>11 - nickGPT / @nickandbro

08/20/2024 at 11:30PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:07PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:07PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:07PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:08PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:08PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:08PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:08PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:08PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:08PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:08PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:09PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:09PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:09PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:18PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:23PM

80
#>12 - nickGPT / @nickandbro

08/20/2024 at 11:27PM

85
#>13 - nickGPT / @nickandbro

08/20/2024 at 11:07PM

123
#>16 - nickGPT / @nickandbro

08/20/2024 at 11:07PM

142
#>17 - nickGPT / @nickandbro

08/20/2024 at 11:05PM