zoukankan      html  css  js  c++  java
  • vim加脚本注释和文本加密

    vim /etc/vimrc

    一、李导版本

    autocmd BufNewFile *.py,*.cc,*.sh,*.java exec ":call SetTitle()"

    func SetTitle()

        if expand("%:e") == 'sh'  
            call setline(1, "#!/bin/bash")
            call setline(2, "##############################################################")  
            call setline(3, "# File Name: ".expand("%"))
            call setline(4, "# Version: V1.0")
            call setline(5, "# Author: oldboy")
            call setline(6, "# Organization: www.oldboyedu.com")
            call setline(7, "##############################################################")
        endif  
    endfunc 
    二、51cto版本
    https://blog.51cto.com/thedream/1873060
    三、自己
    autocmd BufNewFile *.sh,*.script exec ":call XYY()"
    " ****************************************************************** ")
     function XYY()
              call append(0,"#!/bin/bash                      ")
              call append(1,"#******************************************")
              call append(2,"#Author:          zhangjingzhi      ")
              call append(3,"#Create_Time:     ".strftime("%Y-%m-%d" ))
              call append(4,"#Version:         v1.o                 ")
              call append(5,"#Mail:            1570649754@qq.com    ")
              call append(6,"#Description:     doyouwanttodo         ")
              call append(7,"#******************************************")
     endfunction
    四、vim加密文本
    法一
    [root@zjz ~]# vim -x  aa.sh
    法二
    编辑完后,按Esc
    :set key=密码




  • 相关阅读:
    LeetCode120 Triangle
    LeetCode119 Pascal's Triangle II
    LeetCode118 Pascal's Triangle
    LeetCode115 Distinct Subsequences
    LeetCode114 Flatten Binary Tree to Linked List
    LeetCode113 Path Sum II
    LeetCode112 Path Sum
    LeetCode111 Minimum Depth of Binary Tree
    Windows下搭建PHP开发环境-WEB服务器
    如何发布可用于azure的镜像文件
  • 原文地址:https://www.cnblogs.com/zjz20/p/11344644.html
Copyright © 2011-2022 走看看