Add the possibility to turn off the automatic serial update.
Some users may want to explicitly update the DNS serial number. Instead of forcing them to update on each write, a new configuration option is used so they can chose turn it off.
This commit is contained in:
parent
d54d2f0991
commit
a4c03b38a5
2 changed files with 16 additions and 4 deletions
|
@ -17,3 +17,9 @@ I know this not the first vim plugin available to update a DNS-zone serial numbe
|
||||||
* it lacks functionalities.
|
* it lacks functionalities.
|
||||||
|
|
||||||
It chose not to fork the original plugin but to write a new one from scratch mainly for legal purposes, but also because I did not found the code as simple as I expected.
|
It chose not to fork the original plugin but to write a new one from scratch mainly for legal purposes, but also because I did not found the code as simple as I expected.
|
||||||
|
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
-------------
|
||||||
|
|
||||||
|
You can turn off the automatic serial update by setting `let g:dnsserial_auto_update = 0` in your vimrc.
|
||||||
|
|
|
@ -13,7 +13,13 @@
|
||||||
" limitations under the License.
|
" limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
if !exists('g:dnsserial_auto_update')
|
||||||
|
let g:dnsserial_auto_update = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
if g:dnsserial_auto_update
|
||||||
augroup dnsserial
|
augroup dnsserial
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufWritePre <buffer> DNSSerialUpdate
|
autocmd BufWritePre <buffer> DNSSerialUpdate
|
||||||
augroup END
|
augroup END
|
||||||
|
endif
|
||||||
|
|
Reference in a new issue