博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
.vimrc
阅读量:5916 次
发布时间:2019-06-19

本文共 3725 字,大约阅读时间需要 12 分钟。

#cat  ~/.vimrcset nocompatiblesource $VIMRUNTIME/vimrc_example.vim"source $VIMRUNTIME/mswin.vim"behave mswinset ruler"set nusyntax onsyntax enableset ts=4set noerrorbellsset sw=4"set autoindent"set smartindentfiletype onset foldlevel=100"set ignorecase smartcaseset so=5colo desertautocmd FileType c,py  setl fdm=syntax | setl fen"let g:sh_fold_enabled= 1set nobackup"set cursorline"set cursorcolumn:runtime macros/matchit.vimau  BufNewFile,BufRead  *.t2t   set ft=txt2tags"set foldcolumn=4set mouse-=anmap # I#
jmap
:tabnew
set encoding=utf-8set termencoding=utf-8set fileencodings=ucs-bom,utf-8,gb18030,gbk,gb2312,big5,euc-jp,euc-kr,latin1,cp936autocmd BufNewFile *.sh,*.pl,*.py exec ":call SetTitle()""autocmd BufWrite *.sh,*.pl,*.py exec ":call ModifyTitle()"autocmd BufWrite *.sh,*pl,*py if getline(6) != "# Modify Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") || split(getline(7))[3] != strftime("%F") | call ModifyTitle() | endifautocmd BufNewFile,BufRead *.py exec ":call SetTable()"func SetTable() set expandtab set tabstop=4 set shiftwidth=4endfuncfunc SetTitle() if &filetype == 'sh' call setline(1, "\#!/bin/sh") call append(line("."), "\#****************************************************************#") call append(line(".")+1, "\# ScriptName: ".expand("%") ) call append(line(".")+2, "\# Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") ) call append(line(".")+3, "\# Create Date: ".strftime("%F %R")) call append(line(".")+4, "\# Modify Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") ) call append(line(".")+5, "\# Modify Date: ".strftime("%F %R")) call append(line(".")+6, "\# Function: " ) call append(line(".")+7, "\#***************************************************************#") call append(line(".")+8, "") :8 elseif &filetype == 'perl' call setline(1, "\#!/usr/bin/perl") call append(line("."), "\#****************************************************************#") call append(line(".")+1, "\# ScriptName: ".expand("%") ) call append(line(".")+2, "\# Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") ) call append(line(".")+3, "\# Create Date: ".strftime("%F %R")) call append(line(".")+4, "\# Modify Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") ) call append(line(".")+5, "\# Modify Date: ".strftime("%F %R")) call append(line(".")+6, "\# Function: ") call append(line(".")+7, "\#***************************************************************#") call append(line(".")+8, "") :8 elseif &filetype == 'python' call setline(1, "\#!/usr/bin/python") call append(line("."), "\#****************************************************************#") call append(line(".")+1, "\# ScriptName: ".expand("%") ) call append(line(".")+2, "\# Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") ) call append(line(".")+3, "\# Create Date: ".strftime("%F %R")) call append(line(".")+4, "\# Modify Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") ) call append(line(".")+5, "\# Modify Date: ".strftime("%F %R")) call append(line(".")+6, "\# Function: ") call append(line(".")+7, "\#***************************************************************#") call append(line(".")+8, "") :8 endifendfuncfunc ModifyTitle() if getline(6) =~ "# Modify Author:.*" call setline(6, "\# Modify Author: ".expand("$SHTERM_REAL_USER@alibaba-inc.com") ) call setline(7, "\# Modify Date: ".strftime("%F %R")) endifendfunc

转载于:https://www.cnblogs.com/muahao/p/9287334.html

你可能感兴趣的文章
Flow Guide for Beginners
查看>>
手机免ROOT支持Xposed
查看>>
配置ReactNative开发环境
查看>>
WireShark黑客发现之旅(8)—针对路由器的Linux木马
查看>>
【译】为什么教Ruby
查看>>
newrelic python agent 源码分析-1
查看>>
马克笔记—Android 端开源的 Markdown 笔记应用
查看>>
程序员全国不同地区,微信(面试 招聘)群。
查看>>
JavaEE进阶知识学习-----SpringCloud(一)概述
查看>>
Android自定义view-手把手教你画直方图,饼图.
查看>>
[算法总结] 17 题搞定 BAT 面试——链表题
查看>>
Spring boot 入门(一)
查看>>
Kotlin实现单例模式
查看>>
React Native 上传图片至七牛云存储
查看>>
Android开发:使用EasyPay打造全能移动支付框架
查看>>
土鳖的jsp改造
查看>>
不知道是不是最通俗易懂的《数据一致性》剖析了
查看>>
什么样的经历,才能领悟成为架构师?
查看>>
深入学习Redis(3):主从复制
查看>>
Java集合(3)一 红黑树、TreeMap与TreeSet(上)
查看>>