【发布时间】:2010-10-26 05:36:50
【问题描述】:
例如,如果我在 vim 中打开一个全新的文件,其中已经包含以下文本:
/*
The MIT License
Copyright (c) 2009 Apphacker apphacker@gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
必须为每个新文件键入/复制并粘贴它会很烦人。
【问题讨论】:
-
就纯粹的美学观点而言...您为什么觉得有必要将其放入每个文件中?您不能将它放在一个单独的文件中(例如 LICENSE.txt),然后将它包含在您分发的任何内容中吗?源代码分发中每个文件顶部的许可证对于那些阅读/检查您的代码文件的人来说本来就很烦人。
标签: vim