From 366df8852f503523cc4f9046d82ba9a99dd51d7f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 12 Feb 2023 12:13:49 +0530 Subject: new art: lapse --- docs/posts/bash_harder_with_vim/index.html | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'docs/posts/bash_harder_with_vim/index.html') diff --git a/docs/posts/bash_harder_with_vim/index.html b/docs/posts/bash_harder_with_vim/index.html index 099733a..96210d5 100644 --- a/docs/posts/bash_harder_with_vim/index.html +++ b/docs/posts/bash_harder_with_vim/index.html @@ -28,7 +28,7 @@ 31/07 — 2019
- 24.37 + 24.38 cm   @@ -42,18 +42,26 @@ Bash Harder With Vim
-

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.

+

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.

Man pages inside vim

Source this script to get started:

runtime ftplugin/man.vim
-

Now, you can open manpages inside vim with :Man! It adds nicer syntax highlighting and the ability to jump around with Ctrl-] and Ctrl-T.

-

By default, the manpage is opened in a horizontal split, I prefer using a new tab:

+

Now, you can open manpages inside vim with :Man! It adds +nicer syntax highlighting and the ability to jump around with +Ctrl-] and Ctrl-T.

+

By default, the manpage is opened in a horizontal split, I prefer +using a new tab:

let g:ft_man_open_mode = 'tab'
-

Scratchpad to test your commands

-

I often test my sed substitutions, here is a sample from the script used to generate this site:

+

Scratchpad to test your +commands

+

I often test my sed substitutions, here is 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"
-

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

+

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

  • Yank the line into a register:
-- cgit v1.2.3