From: Chris Koeritz Date: Fri, 18 Apr 2025 00:44:20 +0000 (-0400) Subject: new pattern for vim edits X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=a846d05876132a6cda2282674eab256b91e54296;p=feisty_meow.git new pattern for vim edits this one fixes the old school bash line that looks like this: #!/bin/bash to look like the more modern version: #!/usr/bin/env bash also renamed the directory to be vim for uhh modernity. --- diff --git a/infobase/patterns/vi/pattern_auto_replacement b/infobase/patterns/vi/pattern_auto_replacement deleted file mode 100644 index 6794d440..00000000 --- a/infobase/patterns/vi/pattern_auto_replacement +++ /dev/null @@ -1,9 +0,0 @@ - - -pattern that automates making changes in a lot of files with vi. -system_config is to be changed to path_config. substitute as needed. - -:1,$s/system_config/path_config/g -:wn - - diff --git a/infobase/patterns/vi/pattern_fix_commented_formal_parameters.txt b/infobase/patterns/vi/pattern_fix_commented_formal_parameters.txt deleted file mode 100644 index 2544473d..00000000 --- a/infobase/patterns/vi/pattern_fix_commented_formal_parameters.txt +++ /dev/null @@ -1,6 +0,0 @@ - -:1,$s/\/\*\([a-zA-Z_][a-zA-Z0-9_]*\)\*\//formal(\1)/g -:wn - - - diff --git a/infobase/patterns/vim/pattern_auto_replacement b/infobase/patterns/vim/pattern_auto_replacement new file mode 100644 index 00000000..6794d440 --- /dev/null +++ b/infobase/patterns/vim/pattern_auto_replacement @@ -0,0 +1,9 @@ + + +pattern that automates making changes in a lot of files with vi. +system_config is to be changed to path_config. substitute as needed. + +:1,$s/system_config/path_config/g +:wn + + diff --git a/infobase/patterns/vim/pattern_fix_commented_formal_parameters.txt b/infobase/patterns/vim/pattern_fix_commented_formal_parameters.txt new file mode 100644 index 00000000..2544473d --- /dev/null +++ b/infobase/patterns/vim/pattern_fix_commented_formal_parameters.txt @@ -0,0 +1,6 @@ + +:1,$s/\/\*\([a-zA-Z_][a-zA-Z0-9_]*\)\*\//formal(\1)/g +:wn + + + diff --git a/infobase/patterns/vim/redoing_bash_first_line_using_vim.txt b/infobase/patterns/vim/redoing_bash_first_line_using_vim.txt new file mode 100644 index 00000000..9917f2a8 --- /dev/null +++ b/infobase/patterns/vim/redoing_bash_first_line_using_vim.txt @@ -0,0 +1,8 @@ + +use this command on any that has the old school #!/bin/bash hardcoded at the top of the file. +although, hmmm, this actually replaces them throughout the file. hmmm. + +:1,$s/#!\/bin\/bash/#!\/usr\/bin\/env bash/ + + +