How to set VIM syntax highlighting in Mac OS x _linux

Source: Internet
Author: User
Tags line editor

Objective

Vim is a considerable force from the UNIX platform of the command line editor, but not to the power, Mac OS x is not a lot of Linux distributions on the top of vim, such as the Cool God Horse Code highlighted AH, automatic indentation and so on.

(Translator note: Usually Linux distributions can change the global vim setting or personalize the ~/.VIMRC for a user by editing the/ETC/VIMRC file)

To remedy this shortcoming, follow these steps:

Implementation methods

Mainly to modify the ~/.vimrc file

The contents of the document are as follows:

Set AI         "Auto indenting
set history=100     " Keep lines of history
set ruler        "show the cursor posi tion
syntax on        "syntax highlighting
set Hlsearch      " highlight the last searched
term Plugin   on ' Use the file type plugins

' When editing a file, always jump to the last cursor position
AUTOCM d bufreadpost *
\ If! exists ("G:leave_my_cursor_position_alone") |
\ If line ("' \") > 0 && Line ("" ") <= Line (" $ ") |
\ exe "normal g '" "|
\ endif |
\ endif

Save exit.

Summarize

The above is the entire content of this article, I hope the content of this article for everyone to learn or operate VIM can help, if you have questions you can message exchange. Thank you for your support to the cloud-dwelling community.

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.