From 359a92f770e621828e628f319290bb5736b1f67b Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 9 Feb 2020 10:24:03 +0530 Subject: new styles, new post! --- docs/posts/bash_harder_with_vim/index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs/posts/bash_harder_with_vim') diff --git a/docs/posts/bash_harder_with_vim/index.html b/docs/posts/bash_harder_with_vim/index.html index 7d6d7b3..c9303a6 100644 --- a/docs/posts/bash_harder_with_vim/index.html +++ b/docs/posts/bash_harder_with_vim/index.html @@ -10,6 +10,7 @@ + Bash Harder With Vim - peppe.rs
@@ -36,7 +37,7 @@ Bash Harder With Vim
-

Bash is tricky, don’t let your editor get in your way. Here’s a couple of neat +

Bash is tricky, don't let your editor get in your way. Here's a couple of neat additions you could make to your vimrc for a better shell programming experience.

@@ -44,7 +45,7 @@ experience.

Source this script to get started:

-
runtime ftplugin/man.vim
+
runtime ftplugin/man.vim
 

Now, you can open manpages inside vim with :Man! It adds nicer syntax highlighting @@ -61,7 +62,7 @@ and the ability to jump around with Ctrl-] and Ctrl-T. a sample from the script used to generate this site:

# a substitution to convert snake_case to Title Case With Spaces
-echo "$1" | sed -E -e "s/\..+$//g"  -e "s/_(.)/ \u\1/g" -e "s/^(.)/\u\1/g"
+echo "$1" | sed -E -e "s/\..+$//g"  -e "s/_(.)/ \u\1/g" -e "s/^(.)/\u\1/g"
 

Instead of dropping into a new shell, just test it out directly from vim!

@@ -80,7 +81,7 @@ echo "$1" | sed -E -e "s/\..+$//g" -e "s/_(.)/ \u\1/g&
syntax off            # previously run commands
 edit index.html       # in a buffer!
 w | so %
-!echo "new_post.md" | sed -E -e "s/\..+$//g"  --snip--
+!echo "new_post.md" | sed -E -e "s/\..+$//g"  --snip--
 ^--- note the use of '!'
 
  • Hit enter with the cursor on the line containing your command!

    -- cgit v1.2.3