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.