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