new pattern for vim edits
authorChris Koeritz <fred@gruntose.com>
Fri, 18 Apr 2025 00:44:20 +0000 (20:44 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 18 Apr 2025 00:44:20 +0000 (20:44 -0400)
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.

infobase/patterns/vi/pattern_auto_replacement [deleted file]
infobase/patterns/vi/pattern_fix_commented_formal_parameters.txt [deleted file]
infobase/patterns/vim/pattern_auto_replacement [new file with mode: 0644]
infobase/patterns/vim/pattern_fix_commented_formal_parameters.txt [new file with mode: 0644]
infobase/patterns/vim/redoing_bash_first_line_using_vim.txt [new file with mode: 0644]

diff --git a/infobase/patterns/vi/pattern_auto_replacement b/infobase/patterns/vi/pattern_auto_replacement
deleted file mode 100644 (file)
index 6794d44..0000000
+++ /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 (file)
index 2544473..0000000
+++ /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 (file)
index 0000000..6794d44
--- /dev/null
@@ -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 (file)
index 0000000..2544473
--- /dev/null
@@ -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 (file)
index 0000000..9917f2a
--- /dev/null
@@ -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/
+
+
+