Simple configuration of Vim

Source: Internet
Author: User

Vim is a well-known, powerful, highly customizable text editor similar to VI, which improves and adds many features on the basis of VI.
As a Linux enthusiast, Vim is the most commonly used text editor, the default vim configuration file. VIMRC does not exist, we can configure the file according to our own needs.
[[Email protected]| ~/python/test]#Cat/root/. Vimrcset encoding=utf-8set Numbersyntax enableset background=Darkautocmd Bufnewfile*.SH, *.py exec"Call Settitle ()"func settitle ()if&filetype = ='SH'Call Setline (1,"\#!/usr/bin/env Bash") Call Append ("."),"\# Author:sam") Call Append (".")+1,"\# created time:". Strftime ("%y-%m-%d%h:%m:%s") Call Append (".")+2," ") ElseIf&filetype = ='python'Call Setline (1,"\#!/usr/bin/env python") Call Append ("."),"\#-*-coding:utf-8-*-") Call Append (".")+1,"\# Author:sam") Call Append (".")+2,"\# created time:". Strftime ("%y-%m-%d%h:%m:%s") Call Append (".")+3," ") Endifendfuncautocmd Bufnewfile* Normal G

Simple configuration of vim

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.