Making VIM support markdown syntax highlighting in Linux system

Time:2020-6-2

Markdown is a popular file format for programmers.

However, the default VIM setting in Linux does not support syntax highlighting in markdown format.

Here’s how to set the file format of markdown to enjoy syntax highlighting in vim.

First, install a VIM plug-in management tool:

vim-pathogen

Its source code address:

https://github.com/tpope/vim-…

First, create two folders under ~ /. VIM:

mkdir -p ~/.vim/autoload ~/.vim/bundle

Then download VIM pathogen:

curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim

Add three lines to ~ /. Vimrc:

execute pathogen#infect()

syntax on

filetype plugin indent on

After you restart VIM, you can highlight markdown!

For more original articles on Jerry, please pay attention to the official account of “Wang Zixi”: