Mac configuration vim from zero

Source: Internet
Author: User
Tags install homebrew git clone

This is an imported old blog, may have a timeliness problem.

1. Install Homebrew (Package Manager, used to install vim)
& /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2.安装Vim(系统自带的Vim不是最新版)
& brew install wget

3.建立并编辑配置文件 (不使用任何插件情况下一些有用的配置)
& CD ~
& Touch. VIMRC
& Vim. VIMRC
Edit the configuration file as:

Input: Make compiles and runs the set makeprg=clear;gcc\%\ &&\./a.out

"Current row highlighted au Winleave * set nocursorline nocursorcolumnau winenter * Set Cursorlineset cursorline

ColorScheme Default Color theme

Syntax enable parse shading set tabstop=4 set tab space Number set softtabstop=4 "Set Input TA Number of spaces represented by B set expandtab "tab as several spaces
Set backspace=2 "Setting backspace key available Set number" displays line numbers
Set ShowCmd "show full command set Hlsearch" in the lower right corner to highlight all results when searching for strings: Nohlsearch Suppress highlighting

4. Install Vundle (Vim plugin manager)
& Git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/vundle.vim

& Vim. VIMRC
Add the following configuration at the beginning of the configuration file:

"---START of vundle---set Nocompatiblefiletype off set Rtp+=~/.vim/bundle/vundle.vimcall vundle#begin () Plugin ' Vundlevim/vundle.vim ' "Plugins start" Plugins endcall vundle#end () filetype plugin indent on "---end of vundle---

5. General process for installing plug-ins with Vundle
Find the plugin on GitHub and write down the name.
& Vim. VIMRC
In the configuration file "Plugins Start and End comments, add:
Plugin ' [plugin name] '
: Wq
& Vim. VIMRC
:P Lugininstall

The commands to clear plugins not in this list are:
:P Luginclean

6. Install the color theme with Vundle Molokai
In the configuration file, add:
Plugin ' Tomasr/molokai '
and installation (see 5th).

ColorScheme the default line in the configuration file to read:
ColorScheme Molokai

7. Install the Youcompleteme plugin with vundle (for C + +)
& Xcode-select--install
& Brew Python
& Pip Install Future
& Brew CMake

In the configuration file, add:
Plugin ' Valloric/youcompleteme '
and installation (see 5th).

& CD ~/.vim/bundle/youcompleteme
&./install.py--clang-completer

In the configuration file---END of vundle---note, add:
Let g:ycm_global_ycm_extra_conf = ' ~/.vim/bundle/youcompleteme/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py '

Mac configuration vim from zero

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.