Question: I would like to document some scripts written in vimscript. How can I do this with the listing package? I haven't found a supported language by listings for vimscript.

Example to set with lstlisting:

```
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible

" allow backspacing over everything in insert mode
set backspace=indent,eol,start

```

Thank you very much!

Answer: 
I started to write my own definition for vim. Here you see my first approach:

```
    \lstdefinelanguage{vim}
{
  % list of keywords
  morekeywords={
  set, let
  map, nmap,
  filetype,
  on, off,
  autocmd,
  Plugin,
  call,
   },
morecomment=[l]{"}, % l is for line comment
morestring=[b]' % defines that strings are enclosed in double quotes
}

```
The `listings` package does not support vimscript out of the box. You'd have to write your own highlighting rules. Here I present an alternative, which is the `minted` package. It uses the external program `pygmentize` to format source code and therefore needs shell escape (and `pygmentize` installed of course). It is also recommended to use an alternative font, like `lmodern` which comes with bold teletype font. In my opinion the results are much better than with `listings`.

```
\documentclass{article}
\usepackage{lmodern,minted}
\begin{document}

\begin{minted}{vim}
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible

" allow backspacing over everything in insert mode
set backspace=indent,eol,start  
\end{minted}

\end{document}

```

[![enter image description here](https://i.stack.imgur.com/wa9yr.png)](https://i.stack.imgur.com/wa9yr.png)