Mac Editor Vim Landscaping

Source: Internet
Author: User
Tags set background git clone

Mac Editor Vim Landscaping

Contents
    • Environment
    • Effect rendering
    • Installation
    • Quick Start
Environment

MAC10.13.6,VIM7 (this version of Mac comes with vim 7), Git

There are two configuration files for vim under Mac

One is the location of all users, located under/usr/share/vim, with the name VIMRC, no suffix

Another place under ~/.vim, is the current user's configuration switch to this user, this configuration will replace the previous configuration

In order not to let their configuration affect other users (if they did not configure their own VIMRC configuration), it is recommended to modify the current user, that is, the ~/.VIM/VIMRC configuration

Effect rendering

The general Vim interface

After the configuration

Interface effect is done by two vim plugins

Color matching is done by the plugin Gruvbox, Gruvbox has two color modes, light and dark mode, can be set

Vim-airline plug-in completion page at the bottom of the current page progress percentage and other information

Installation

To better manage plug-in installation, another plugin is needed vundle help us manage plugins, similar to the role of homebrew

Install the Vundle plugin first

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/vundle.vim

If not, create a new file under ~/.vim VIMRC

Write in VIMRC

? Set nocompatible

? FileType off

    set rtp+=~/.vim/bundle/Vundle.vim

? Call Vundle#begin ()

? Call Vundle#end ()

? FileType plugin indent on

Write plugins to add between call Vundle#begin () and calls Vundle#end ()

In order to manage vundle own this plugin, added this line, can not join

? Plugin ' Vundlevim/vundle.vim '

Add Skin

? Plugin ' Morhetz/gruvbox '

Join Page Info

? Plugin ' Vim-airline/vim-airline '

After: Wq save a bit

:P lugininstall start downloading and installing the appropriate plugins automatically

found that although the page information, that is, the Vim-airline plug-in played a role

But Gruvbox still doesn't work.

Add these two lines under plugin ' Morhetz/gruvbox '

? ColorScheme Gruvbox

? Set Background=dark

Dark is the color of the show, and light.

Save exit and open Vim again to find an error

I can't find a color theme named Gruvbox.

If this happens, then you need to manually complete the installation of the topic

The usual vim comes with the color theme under/usr/share/vim/vim80/colors

We need to copy the Gruvbox theme files to this directory.

Why Vundle installation failed, the reason may be the ordinary user under Vundle help you download the Gruvbox after the right to move the file to/usr/share/vim/vim80/colors

You can see that the Gruvbox plugin is downloaded

The Gruvbox.vim under the/users/zyfselton/.vim/bundle/gruvbox/colors

Switch to root to copy Gruvbox.vim to/usr/share/vim/vim80/colors

Save exit vim, open again, find color matching and picture Show consistent

Quick to use
    1. command line execution git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/vundle.vim

    2. Create a new file under ~/.vim VIMRC

      ? Set nocompatible

      ? FileType off

      ? Set Rtp+=~/.vim/bundle/vundle.vim

      ? Call Vundle#begin ()

      ? Plugin ' Vundlevim/vundle.vim '

      ? Plugin ' Morhetz/gruvbox '

      ? ColorScheme Gruvbox

      ? Set Background=dark

      ? Plugin ' Vim-airline/vim-airline '

      ? Call Vundle#end ()

      ? FileType plugin indent on

    3. Vim General mode input: Plugininstall

    4. Switch to root and copy the Gruvbox.vim under/users/zyfselton/.vim/bundle/gruvbox/colors (your user name Zyfselton need to replace) to/usr/share/vim/vim80/ Colors, complete

Mac Editor Vim Landscaping

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.