From ca2ab526abe7bcbc848aaadcc146a8a55df2e20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Thu, 31 Aug 2023 13:48:58 +0200 Subject: [PATCH] Added the custom function for BlurConfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .config/nvim/init.vim | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index e1138f3..52903a7 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -677,3 +677,26 @@ function! RemoveFortiAddresses() :%!uniq :w! endfunction + +function! BlurForti() + :%g/set uuid .*/d + :%g/set description .*/d + :%g/set comment .*/d + :%g/set comments .*/d + :%s/username .*/username "XXXXXXXXXXXXXXXXXXXXXXX"/g + :%s/dn .*/dn "XXXXXXXXXXXXXXXXXXXXXXX"/g + :%s/psksecret ENC .*/psksecret XXXXXXXXXXXXXXXXXXXXXXX/g + :%s/password ENC .*/password XXXXXXXXXXXXXXXXXXXXXXX/g + :%s/passwd ENC .*/passwd XXXXXXXXXXXXXXXXXXXXXXX/g + :%s/group-name .*/group-name "XXXXXXXXXXXXXXXXXXXXXXX"/g + :%s/ssh-rsa .*/ssh-rsa XXXXXXXXXXXXXXXXXXXXXXX/g + :%s/-----BEGIN OPENSSH PRIVATE KEY.*----/-----BEGIN OPENSSH PRIVATE KEY -----\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/g + :%s/-----BEGIN CERTIFICATE.*----/-----BEGIN CERTIFICATE -----\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/g + :%s/-----BEGIN ENCRYPTED PRIVATE KEY.*----/-----BEGIN ENCRYPTED PRIVATE KEY -----\rXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/g + :%s/"VPN_.*"/"VPN_XXXXX"/g + :%s/\v(\d{1,3}\.){3}\d{1,3}/X.X.X.X/g +endfunction + +function! ColoursFortiSSL() + :%s/next\n/set color 23\rset allow-routing enable\rnext\r/g +endfunction