vimscript - vim delete or replace entire section
ringa_lee
ringa_lee 2017-05-16 16:41:00
0
5
672

There is a text like this

As of initscripts-2012.07.5, the default format of /etc/rc.conf and
/etc/crypttab have changed. See their respective man pages for 
more details.

--BEGIN--
The purpose of this change is to unify the configuration of systemd
and initscripts. This will allow us to share code and documentation, 
and should make maintenance of initscripts simpler in the long-run.
--END--

The old format is still supported, so old config files should still
work unchanged.

Hopefully --BEGIN-- Delete all the lines between --END--. Is there any direct method for vim?

Another additional question is how to add a piece of content when there is already a
--BEGIN-- mark.

The above all hope to process text files in a scripted manner.


Just an example, the number of lines between --BEGIN--,--END-- is uncertain
Marking this manually is a bit laborious. The actual file is not small and has a similar structure
More.

ringa_lee
ringa_lee

ringa_lee

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!