Releases
(2024-09-01)
- add a space between author and email when falling back to OS user name and host
- Neovim error messages no longer throw errors of their own
- standard headers now identify Creative Commons licenses by full name, not SPDX id; machine readable format will print the id as before
- new supported file type: Cpp2/cppfront #43
- new file extension mappings for Pascal:
*.dpk
,*.dpr
and*.lpr
- several new internationalized Creative Commons variants
(2023-07-30)
- a regression that spoiled generated copyright lines was rolled back; author name and email will be separated by a space like before
- many new additions from the latest version of the SPDX License List
(2023-07-23)
Python 2 hosts are no longer supported. For NeoVim, 3.7 or later is required.
- the
:CPYwrite
command will try to add an@author
tag to existing JavaDoc comments above the main class in Java files - comment headers in Pascal files are now enclosed by
(*...*)
- new option,
g:cpywrite#java#add_class_doc
, to (dis/en)able adding the@author
tag to JavaDoc comments
(2022-01-10)
- copyright now appears in the correct place in GPL v1 and v2 license headers. Previously, an overly permissive regex would match the historical ZIP code of the Free Software Foundation (a regression dating from version 0.4.0 )
- makefiles and Dockerfiles with no extension are no longer treated as shell scripts
- generic dotfiles no longer match with Vim script
- running the
cpywrite
module as a script will not make a backup of newly created files - new files generated by the
cpywrite
module will not be padded with null bytes - unit tests no longer hang on neovim
- by default, executable script files no longer have their shebang lines replaced with a
template. Setting
g:cpywrite#preserve_shebangs
to0
restores the old behaviour - the
&syntax
property is now always considered when detecting file type
- new
:CPYwriteKeepShebangs
command for settingg:cpywrite#preserve_shebangs
- new supported file types:
- Config
- Dockerfile
- (DOS) INI
- Makefile
- Properties
- reStructuredText
- Xresources (detected by
&syntax
, i.e., works in vim sessions only) - YAML
Note.
Typical make- and Dockerfiles with no extension will be prepended with bash-style
#
comments as before, without a shebang line (see above).
Makefile extensions .mk
and .mak
will also match the Make file type; the
.dockerfile
extension matches the Dockerfile type.
(2021-10-01)
- prevent authorship regex from matching publication dates in the verbatim text of the Apache 2.0, GD and X11 licenses
- running the
cpywrite
module as a Python script will not overwrite existing files
- new
g:cpywrite#machine_readable
option to format license and copyright as tags; can be set with:CPYwriteToggleStyle
- new
g:cpywrite#no_anonymous
option to always state the copyright holder above Public Domain licenses; can be set with:CPYwriteAllowAnonymous
- support for DOS Batch files
(2021-07-03)
- fallback to a system user name if no git email exists
- preserve existing markup, encoding and doctype declarations at the top of XML, HTML or PHP files
- support for these file types:
- Julia
- Prolog (detected by
&syntax
when the extension is*.pl
) - XML
(2021-05-24)
- include user's email in the ECL-1.0 header
- the initial value of
g:cpywrite#default_license
is now'Apache-2.0'
- drop the deprecated FreeBSD variant of the BSD 2-Clause License
- detect more styles of authorship template, like a generic range of years
(e.g.
<yyyy, yyyy>
), or an actual year that's merely historical (e.g. copyright notice of the 0BSD). The old matching rules are retained for the licenses that need them (e.g. the GFDLs, the ECLs, the older GPLs, etc.)
- include recent additions to the SPDX License List
(2021-04-04)
- prevent copyright year regex from accidentally matching older versions of the Mozilla Public License
- don't throw an exception if the full name of a license doesn't start with The
- don't print angle brackets when
user.email
is empty
- try to detect the user's interpreter program when modifying a shell script
- remove example GIF from plugin assets and use a hyperlink instead
(2021-03-08)
- (temporarily) request ALL full text licenses from the previous release versions (with the exception of the Unlicense and BSD-1-Clause as before). A future release will probably start using a different repository when these versions fall too far behind the officially recognized templates
- minor refactoring of some redundant code
(2020-12-28)
- replace double-quotes with single-quotes when filetypes use
"
as their comment delimiter (i.e. VimL, Smalltalk) - (temporarily) avoid requesting defective copies of the full Unlicense and BSD-1-Clause
- minor pruning of some unreachable code (overlooked in last release)
- match the
.mkd
extension with Markdown files - support for these file types:
- Eiffel
- PureScript
- R
- ReasonML
- Smalltalk
- Vala
(2020-10-26)
- use reStructuredText in project documentation
- call
re.escape()
on emails when searching authorship templates in case they contain regex symbols, e.g.[email protected]
(2020-10-12)
- options that were prefixed with
cpywrite_
now start withcpywrite#
; this will allow future options to be loaded from theautoload
directory - licenses are now identified by full name when there's no standard header
Note. To keep longer names like (e.g.) the LGPLvX.X
from running off
the screen, enable line wrapping in your vimrc
or init.vim
:
set lbr
set tw=500 "break after 500 characters
set wrap "wrap lines
- HTTP responses are now cached in the user's temp directory
- the option to hide the current buffer's name in license headers by setting
g:cpywrite#hide_filename
to a non-zero value - a
:CPYwriteToggleFilename
command for setting the above option - detect
.vimrc
,.gvim
,.ideavim
and.exrc
as Vim files - support for these file types:
- D
- Edn (.edn)
- Fennel
- Markdown
- ReactJS (.jsx) and ES Module (.mjs)
- Scala
- Swift
(2020-08-16)
- improve load time of
autoload/cpywrite.vim
- refactor regex that was inserting authorship at random places in full license text
- recognize
.vimrc
as VimL - prevent copyright notice for appearing on public domain (i.e. copyright-free) licenses, in both modes
- leave one blank line after header
- support for these file types:
- Ada
- Assembler
- Coffescript
- Elixir
- Elm
- Erlang
- Kotlin
- Lua
- Objective-C
- Pascal
(2020-08-13)
- extract feature tests and core functions to
autoload
directory to improve startup time (#2)
- document suggestion to use set wildmenu for faster completions when not using neovim
(2020-07-25)
- brief notices are now fully capitalized
- better-looking standard headers for the older GPL and GFDL licenses families
- convenience commands for getting/setting global options:
:CPYwriteDefaultLicense
-- supports<tab>
completion:CPYwriteToggleMode
-- switchesg:cpywrite#verbatim_mode
on/off
- relaxed file naming rules to accept full paths
- recognize CMakeLists files with the
.txt
extension - apply line wrapping to keep standard headers within 80 chars (you should still configure vim to wrap lines for best results)
(2020-06-18)
- initial release