axiaoxin / my-vimrc

VIM configuration file: used to write Golang, Python, Markdown, etc. with VIM on macOS
154 stars 76 forks source link

my-vimrc

中文文档

This repository stores my VIM configuration files. Usually, VIM is mainly used to write Golang, Python and Markdown.

At present, there are two branches. The master branch is the configuration of the old version of vim and is no longer maintained.

The vim-8 branch is the configuration currently being used on macOS with VIM 8.1.

VIM Version

VIM - Vi IMproved 8.1 (2018 May 18, compiled Oct 15 2019 10:20:59)
macOS version

Features

Plugins

use vim-plug manage plugins: the .vimrc will automatic download the vim-plug

Custom key mapping

Screenshots

Some screenshots may not be up-to-date, just for reference.

Launch interface

Daily coding

Open a go file

Open a python file and run

Open nginx configuration file

Code complete

File search

Show calendar

Color preview

Markdown preview

Rainbow parentheses

Format single json line in text file

Markdown table mode

Install & Usage

[!] VIM version must be above 8 and python version is 3.x.x

For VIM upgrade, please refer to wiki: https://github.com/axiaoxin/my-vimrc/wiki/Upgrade-VIM-to-8.x

For Python upgrade, please refer to wiki: https://github.com/axiaoxin/my-vimrc/wiki/Upgrade-Python-to-3.x

External dependence

Using this configuration requires the following commands to install some external dependencies:

brew install cmake python mono go nodejs pygments global cppcheck
brew unlink ctags && brew install --HEAD universal-ctags/universal-ctags/universal-ctags
[sudo] pip3 install isort yapf flake8 autopep8 pylint pyright
npm -g install instant-markdown-d prettier markdownlint

Install plugins

  1. Copy the .vimrc file to your $HOME directory, open VIM, execute :PlugInstall, and wait for the plugins installation to complete.
  2. Install vim-go binaries: open a go file then run :GoInstallBinaries
  3. Install vim-go go_fmt_command tool: go get -u github.com/segmentio/golines
  4. Setting the YouCompleteMe: https://github.com/ycm-core/YouCompleteMe#macos
cd ~/.vim/plugged/YouCompleteMe
python3 install.py --all
  1. Install nerdfont: https://www.nerdfonts.com/font-downloads
  2. Install LeaderF C Extension(Optional): :LeaderfInstallCExtension
  3. Install Markdown preview tool: [sudo] npm -g install instant-markdown-d

Stargazers over time

Stargazers over time