Skip to content

Instantly share code, notes, and snippets.

@meirish
Forked from chuckha/license_generator.vim
Created April 3, 2012 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save meirish/2294942 to your computer and use it in GitHub Desktop.
Save meirish/2294942 to your computer and use it in GitHub Desktop.
License Generator for SBO projects
function! LicenseGenerator()
let date = strftime("%c")
if &ft == "javascript"
return "/*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, regexp: true, nomen: false, onevar: false, undef: true, plusplus: false, white: true, indent: 2 */\n/*global confirm define interpolate gettext console */\n\n// Created by Matthew Irish (mirish@safaribooksonline.com) on " . date . "\n/*! Copyright (c) 2012 Safari Books Online, LLC. All rights reserved.*/\n\n"
endif
if &ft == "python"
return "# encoding: utf-8\n\n# Created by Matthew Irish (mirish@safaribooksonline.com) on " . date . "\n# Copyright (c) 2012 Safari Books Online, LLC. All rights reserved.\n\n"
endif
endfun
nmap <silent> ,li "=LicenseGenerator()<CR>p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment