Close

GitHub has made Markdown an essential for pretty much any project, and being a hopeless Vim addict I spend at least some of my time editing Markdown files in there.

For at least a year now I’ve been meaning to configure Vim to auto-wrap at 80 characters for these files, and only this week got round to googling it. First a Filetype for Markdown:

autocmd BufRead,BufNewFile *.md set filetype=Markdown

And then for this file type set the width to wrap at…

au Filetype Markdown setlocal wrap textwidth=80

Lovely.

To stay up-to-date with the latest tech news and views, be sure to check out our weekly tech round-up posts - and sign up to our mailing list to have them delivered direct to your inbox.

About the author

Box UK

Box UK

Box UK's team of simply brilliant thinkers, consultants and application developers mastermind simply brilliant solutions to the world's toughest, performance-critical web and software assignments.

Related content

Tech round-up: Nov 25th

By Steve Anderson

Tech round-up: Feb 19th

By Matt Jones

We're hiring. Let's talk. View available roles