013231
V2EX  ›  Vim

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

  •  
  •   013231 · Jan 22, 2012 · 4029 views
    This topic created in 5240 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   ·   5367 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 09:05 · PVG 17:05 · LAX 02:05 · JFK 05:05
    ♥ Do have faith in what you're doing.