官术网_书友最值得收藏!

  • Mastering Vim
  • Ruslan Osipov
  • 247字
  • 2021-06-10 18:51:24

Verifying and troubleshooting the installation

Regardless of the platform you used to install Vim, it's good to make sure that, with Vim, all the right features enabled. On a command line, run the following command:

$ vim --version

You will see the following output, with a set of features having a + and a - in front of them:

In the preceding screenshot, you can see that my Vim was actually compiled with Python 2 support (+python) instead of Python 3 support (-python3). To correct the issue, I'd have to either recompile Vim with +python3 enabled or find a package which distributes a compiled version of Vim with +python3 enabled.

For a list of all features Vim can have enabled, see  :help feature-list .

For instance, if we wanted to recompile Vim 8.1 with Python 3 support on Linux, we would do the following:

$ git clone https://github.com/vim/vim.git
$ cd vim/src
$ ./configure --with-features=huge --enable-python3interp
$ make
$ sudo make install
We're passing the  --with-features=huge flag in order to compile Vim with most features enabled. However,  --with-features=huge does not install language bindings, so we need to explicitly enable Python 3.

In general, if your Vim is not behaving like other Vim installations (including behavior described in this book), you might be missing a feature.

Depending on your system and features you require, the process might be slightly or vastly different. A quick web search along the lines of Installing Vim <version> with +<feature> on <operating system> should help.

主站蜘蛛池模板: 武定县| 新巴尔虎右旗| 荃湾区| 边坝县| 建昌县| 汝南县| 遵义市| 大理市| 教育| 云龙县| 陆良县| 红原县| 大悟县| 安福县| 绍兴县| 休宁县| 磐安县| 同心县| 绵阳市| 新野县| 辽阳县| 安塞县| 肥城市| 壶关县| 壶关县| 礼泉县| 井冈山市| 区。| 蓬安县| 达拉特旗| 安新县| 黄石市| 施秉县| 武清区| 磐安县| 米林县| 泽普县| 桦南县| 滕州市| 平陆县| 盖州市|