In Vim/Neovim, running
:normal gg=G will reindent your current file depending on its filetype.
$ pandoc -t markdown --reference-links
- format your file to Pandoc's extended Markdown
- use Setext-style headers for level 1 and 2
- use reference links, i.e. all your inline links will be referenced at the end of your file
If you want to alter this behavior, you just need to add the following to your
let g:pandoc#formatting#equalprg = "pandoc -t markdown --no-wrap --atx-headers"
With the following, you'll keep your inline links, won't wrap the lines and use Atx-style headers
A lot of other options are available to suit your needs, feel free to take a look at the full documentation.