013231
V2EX  ›  Vim

怎样在新建特定扩展名的文件时自动执行特定动作?

  •  
  •   013231 · Jan 22, 2012 · 4114 views
    This topic created in 5297 days ago, the information mentioned may be changed or developed.
    比如说, 新建.sh文件时自动在文件头部插入#!/bin/bash, 新建.py时自动插入#!/usr/bin/python, 并执行chmod u+x %.
    2 replies    1970-01-01 08:00:00 +08:00
    fanzeyi
        1
    fanzeyi  
       Jan 22, 2012
    autocmd
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5389 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 07:02 · PVG 15:02 · LAX 00:02 · JFK 03:02
    ♥ Do have faith in what you're doing.