vim-scripts / autoadapt Goto Github PK
View Code? Open in Web Editor NEWAutomatically adapt timestamps, copyright notices, etc.
Home Page: http://www.vim.org/scripts/script.php?script_id=4654
Automatically adapt timestamps, copyright notices, etc.
Home Page: http://www.vim.org/scripts/script.php?script_id=4654
This is a mirror of http://www.vim.org/scripts/script.php?script_id=4654 DESCRIPTION This plugin automatically adapts information like "last modified" timestamps and copyright notices, or applies any other substitution before each file save. Where and what is replaced can be configured globally and for each individual buffer. The plugin ships with configuration defaults which handle the most common copyright notices, e.g.: Copyright: (C) 2011-2014 Ingo Karkat and modification timestamps such as Last Change: Wed 15 Jan 2014 21:38:00 WEST Modified: 2014 Jan 15 SOURCE - The regular expression for updating copyright notices is derived from http://vim.wikia.com/wiki/Automatically_Update_Copyright_Notice_in_Files RELATED WORKS - autodate.vim (vimscript #291) is an old plugin that can insert and update a time stamp (between a prefix and postfix) in a certain format. - ferallastchange.vim (vimscript #680) is an old plugin that searches for a prefix and then updates the timestamp in a certain format. - timstamp.vim (vimscript #371) takes pattern and replacement parts like this plugin (the replacement part also supports some custom tokens e.g. for hostname), and is functionally very close. - timestamp.vim (vimscript #923) is based on timstamp.vim. It allows only one pattern and feeds the replacement part to strftime(), making it less general. - header.vim (vimscript #1142) insert or updates a header at the top, in a rather primitive way, and limited to shell, Python, Perl, and Vim scripts. - lastmod.vim (vimscript #3578) is a short and simple plugin for replacing one pattern with a timestamp in the first N lines. - better-header.vim (vimscript #4676) can insert and update a header for Python and shell scripts, and requires Python itself. - update-time (vimscript #4786) searches the first and last lines for a single prefix and then automatically updates a following timestamp. USAGE The adaptation happens before every buffer save (BufWritePre event), e.g. with the :write command. No action required. You can configure (g:AutoAdapt_Rules) and disable this, though: :NoAutoAdapt Turn off automatic adapting for the current buffer. :AutoAdapt[!] Turn on automatic adapting for the current buffer, after having it turned off via|:NoAutoAdapt|, or to enable adapting for a buffer when the automatic adapting has been configured to exclude the current buffer via g:AutoAdapt_FilePattern, or (with [!]) to override a configured Predicate which disables adaptation for the buffer. :Adapt[!] Trigger manual adaptation of the current buffer (when automatic adaption has been turned off via :NoAutoAdapt). With [!] also overrides a configured Predicate which disables adaptation for the buffer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.