Two factors recently caused me to look less than positively toward writing Bash scripts. First, I have started actively using Python more, and performing tasks in it that I would have previously written in Bash. Second, I came across a number of Python-specific, and more general purpose programming related, improvements to my vim experience. Relatively, writting Bash scripts just got worse.
Luckily, another awesome post at The Geek Stuff shook me from my unproductive stupor. After installing the bash-Support plugin the post describes how to install and use, Bash scripting is easier and slightly more pleasurable.
- The first handy feature to notice is that any new file ending in .sh will include a header with things like name, purpose, etc. By customizing its template, you can create consistent, helpful headers for all your new scripts.
- The trigger completion ability to quickly create functions and other bash constructs is something I had gotten quite accustomed to when writing Python, so it’s good to have that in place.
- Another essential addition is the built-in help. Simply place your cursor over a Bash built-in command you need information on and press “Leader (default ‘\’) hh”. A window will open with man-page assistance.
- Quick formatted comments, custom snippets and more make bash-Support simply essential for writing Bash scripts.
There are definitely cases where a programming task can be more quickly accomplished in a Bash script as compared to one written in Python. It takes a certain length of code or task for the increased (and welcome) verbosity of Python to be “worth it”. But don’t languish when those times arise, try out the bash-Support plugin!
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.









Pingback: Review of Hacking Vim 7.2 | tail -f findings.out