{"id":13130,"date":"2019-04-01T02:26:18","date_gmt":"2019-04-01T02:26:18","guid":{"rendered":"http:\/\/www.appservgrid.com\/paw92\/?p=13130"},"modified":"2019-04-01T02:26:18","modified_gmt":"2019-04-01T02:26:18","slug":"how-to-make-vim-editor-as-bash-ide-using-bash-support-plugin-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/how-to-make-vim-editor-as-bash-ide-using-bash-support-plugin-in-linux\/","title":{"rendered":"How to Make \u2018Vim Editor\u2019 as Bash-IDE Using \u2018bash-support\u2019 Plugin in Linux"},"content":{"rendered":"<p>An\u00a0<strong>IDE<\/strong>\u00a0(<a href=\"https:\/\/www.tecmint.com\/best-linux-ide-editors-source-code-editors\/\" target=\"_blank\" rel=\"noopener\">Integrated Development Environment<\/a>) is simply a software that offers much needed programming facilities and components in a single program, to maximize programmer productivity. IDEs put forward a single program in which all development can be done, enabling a programmer to write, modify, compile, deploy and debug programs.<\/p>\n<p>In this article, we will describe how to\u00a0<a href=\"https:\/\/www.tecmint.com\/vi-editor-usage\/\" target=\"_blank\" rel=\"noopener\">install and configure Vim editor<\/a>\u00a0as a\u00a0<strong>Bash-IDE<\/strong>\u00a0using\u00a0<strong>bash-support<\/strong>\u00a0vim plug-in.<\/p>\n<h4>What is bash-support.vim plug-in?<\/h4>\n<p><strong>bash-support<\/strong>\u00a0is a highly-customizable vim plug-in, which allows you to insert: file headers, complete statements, comments, functions, and code snippets. It also enables you to perform syntax checking, make a script executable, start a debugger simply with a keystroke; do all this without closing the editor.<\/p>\n<p>It generally makes bash scripting fun and enjoyable through organized and consistent writing\/insertion of file content using shortcut keys (mappings).<\/p>\n<p>The current version plug-in is\u00a0<strong>4.3<\/strong>, version\u00a0<strong>4.0<\/strong>\u00a0was a rewriting of version\u00a0<strong>3.12.1<\/strong>; versions 4.0 or better, are based on a comprehensively new and more powerful template system, with changed template syntax unlike previous versions.<\/p>\n<h3>How To Install Bash-support Plug-in in Linux<\/h3>\n<p>Start by downloading the latest version of\u00a0<a target=\"_blank\" rel=\"nofollow\">bash-support plug-in<\/a>\u00a0using the command below:<\/p>\n<pre>$ cd Downloads\r\n$ curl http:\/\/www.vim.org\/scripts\/download_script.php?src_id=24452 &gt;bash-support.zip\r\n<\/pre>\n<p>Then install it as follows; create the\u00a0<code>.vim<\/code>\u00a0directory in your home folder (in case it doesn\u2019t exist), move into it and extract the contents of\u00a0<strong>bash-support.zip<\/strong>\u00a0there:<\/p>\n<pre>$ mkdir ~\/.vim\r\n$ cd .vim\r\n$ unzip ~\/Downloads\/bash-support.zip\r\n<\/pre>\n<p>Next, activate it from the\u00a0<code>.vimrc<\/code>\u00a0file:<\/p>\n<pre>$ vi ~\/.vimrc\r\n<\/pre>\n<p>By inserting the line below:<\/p>\n<pre>filetype plug-in on   \r\nset number   #optionally add this to show line numbers in vim\r\n<\/pre>\n<h3>How To Use Bash-support plug-in with Vim Editor<\/h3>\n<p>To simplify its usage, the frequently used constructs as well as certain operations can be inserted\/performed with key mappings respectively. The mappings are described in\u00a0<strong>~\/.vim\/doc\/bashsupport.txt<\/strong>\u00a0and\u00a0<strong>~\/.vim\/bash-support\/doc\/bash-hotkeys.pdf<\/strong>\u00a0or\u00a0<strong>~\/.vim\/bash-support\/doc\/bash-hotkeys.tex<\/strong>\u00a0files.<\/p>\n<h5>Important:<\/h5>\n<ol>\n<li>All mappings (<code>(\\)+charater(s)<\/code>\u00a0combination) are filetype specific: they are only work with\u00a0<strong>\u2018sh\u2019<\/strong>\u00a0files, in order to avoid conflicts with mappings from other plug-ins.<\/li>\n<li>Typing speed matters-when using key mapping, the combination of a leader\u00a0<code>('\\')<\/code>\u00a0and the following character(s) will only be recognized for a short time (possibly less than\u00a0<strong>3<\/strong>\u00a0seconds \u2013 based on assumption).<\/li>\n<\/ol>\n<p>Below are certain remarkable features of this plug-in that we will explain and learn how to use:<\/p>\n<h4>How To Generate an Automatic Header for New Scripts<\/h4>\n<p>Look at the sample header below, to have this header created automatically in all your new bash scripts, follow the steps below.<\/p>\n<div id=\"attachment_24518\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Script-Header-Options.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24518\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Script-Header-Options.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Script-Header-Options.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Script-Header-Options-768x437.png 768w\" alt=\"Script Sample Header Options\" width=\"860\" height=\"489\" aria-describedby=\"caption-attachment-24518\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24518\" class=\"wp-caption-text\">Script Sample Header Options<\/p>\n<\/div>\n<p>Start by setting your personal details (author name, author reference, organization, company etc). Use the map\u00a0<code>\\ntw<\/code>\u00a0inside a Bash buffer (open a test script as the one below) to start the template setup wizard.<\/p>\n<p>Select option\u00a0<strong>(1)<\/strong>\u00a0to setup the personalization file, then press\u00a0<strong>[Enter]<\/strong>.<\/p>\n<pre>$ vi test.sh\r\n<\/pre>\n<div id=\"attachment_24519\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-in-Scripts.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24519\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-in-Scripts.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-in-Scripts.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-in-Scripts-768x369.png 768w\" alt=\"Set Personalizations in Scripts File\" width=\"860\" height=\"413\" aria-describedby=\"caption-attachment-24519\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24519\" class=\"wp-caption-text\">Set Personalizations in Scripts File<\/p>\n<\/div>\n<p>Afterwards, hit\u00a0<strong>[Enter]<\/strong>\u00a0again. Then select the option\u00a0<strong>(1)<\/strong>\u00a0one more time to set the location of the personalization file and hit\u00a0<strong>[Enter]<\/strong>.<\/p>\n<div id=\"attachment_24520\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-File-Location.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24520\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-File-Location.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-File-Location.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Set-Personalization-File-Location-768x369.png 768w\" alt=\"Set Personalization File Location\" width=\"860\" height=\"413\" aria-describedby=\"caption-attachment-24520\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24520\" class=\"wp-caption-text\">Set Personalization File Location<\/p>\n<\/div>\n<p>The wizard will copy the template file\u00a0<strong>.vim\/bash-support\/rc\/personal.templates<\/strong>\u00a0to\u00a0<strong>.vim\/templates\/personal.templates<\/strong>\u00a0and open it for editing, where you can insert your details.<\/p>\n<p>Press\u00a0<code>i<\/code>\u00a0to insert the appropriate values within the single quotes as shown in the screenshot.<\/p>\n<div id=\"attachment_24521\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Info-in-Script-Header.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24521\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Info-in-Script-Header.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Info-in-Script-Header.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Info-in-Script-Header-768x505.png 768w\" alt=\"Add Info in Script Header\" width=\"860\" height=\"565\" aria-describedby=\"caption-attachment-24521\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24521\" class=\"wp-caption-text\">Add Info in Script Header<\/p>\n<\/div>\n<p>Once you have set the correct values, type\u00a0<code>:wq<\/code>\u00a0to save and exit the file. Close the Bash test script, open another script to check the new configuration. The file header should now have your personal details similar to that in the screen shot below:<\/p>\n<pre>$ test2.sh\r\n<\/pre>\n<div id=\"attachment_24522\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Auto-Adds-Header-to-Script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24522\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Auto-Adds-Header-to-Script.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Auto-Adds-Header-to-Script.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Auto-Adds-Header-to-Script-768x437.png 768w\" alt=\"Auto Adds Header to Script\" width=\"860\" height=\"489\" aria-describedby=\"caption-attachment-24522\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24522\" class=\"wp-caption-text\">Auto Adds Header to Script<\/p>\n<\/div>\n<h4>Make Bash-support Plug-in Help Accessible<\/h4>\n<p>To do this, type the command below on the\u00a0<strong>Vim<\/strong>\u00a0command line and press [<strong>Enter<\/strong>], it will create a file\u00a0<strong>.vim\/doc\/tags<\/strong>:<\/p>\n<pre>:helptags $HOME\/.vim\/doc\/\r\n<\/pre>\n<div id=\"attachment_24523\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Plugin-Help-in-Vi-Editor.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24523\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Plugin-Help-in-Vi-Editor.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Plugin-Help-in-Vi-Editor.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Plugin-Help-in-Vi-Editor-768x318.png 768w\" alt=\"Add Plugin Help in Vi Editor\" width=\"860\" height=\"356\" aria-describedby=\"caption-attachment-24523\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24523\" class=\"wp-caption-text\">Add Plugin Help in Vi Editor<\/p>\n<\/div>\n<h4>How To Insert Comments in Shell Scripts<\/h4>\n<p>To insert a framed comment, type\u00a0<code>\\cfr<\/code>\u00a0in normal mode:<\/p>\n<div id=\"attachment_24524\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Comments-to-Scripts.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24524\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Comments-to-Scripts.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Comments-to-Scripts.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Comments-to-Scripts-768x437.png 768w\" alt=\"Add Comments to Scripts\" width=\"860\" height=\"489\" aria-describedby=\"caption-attachment-24524\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24524\" class=\"wp-caption-text\">Add Comments to Scripts<\/p>\n<\/div>\n<h4>How To Insert Statements in a Shell Script<\/h4>\n<p>The following are key mappings for inserting statements (<code>n<\/code>\u00a0\u2013 normal mode,\u00a0<code>i<\/code>\u00a0\u2013 insert mode):<\/p>\n<ol>\n<li><code>\\sc<\/code>\u00a0\u2013 case in \u2026 esac\u00a0<strong>(n, I)<\/strong><\/li>\n<li><code>\\sei<\/code>\u00a0\u2013 elif then\u00a0<strong>(n, I)<\/strong><\/li>\n<li><code>\\sf<\/code>\u00a0\u2013 for in do done\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\sfo<\/code>\u00a0\u2013 for ((\u2026)) do done\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\si<\/code>\u00a0\u2013 if then fi\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\sie<\/code>\u00a0\u2013 if then else fi\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\ss<\/code>\u00a0\u2013 select in do done\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\su<\/code>\u00a0\u2013 until do done\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\sw<\/code>\u00a0\u2013 while do done\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\sfu<\/code>\u00a0\u2013 function\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\se<\/code>\u00a0\u2013 echo -e \u201c\u2026\u201d\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\sp<\/code>\u00a0\u2013 printf \u201c\u2026\u201d\u00a0<strong>(n, i, v)<\/strong><\/li>\n<li><code>\\sa<\/code>\u00a0\u2013 array element, ${.[.]}\u00a0<strong>(n, i, v)<\/strong>\u00a0and many more array features.<\/li>\n<\/ol>\n<h4>Insert a Function and Function Header<\/h4>\n<p>Type\u00a0<code>\\sfu<\/code>\u00a0to add a new empty function, then add the function name and press\u00a0<strong>[Enter]<\/strong>\u00a0to create it. Afterwards, add your function code.<\/p>\n<div id=\"attachment_24525\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Insert-New-Function-in-Script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24525\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Insert-New-Function-in-Script.png\" alt=\"Insert New Function in Script\" width=\"744\" height=\"657\" aria-describedby=\"caption-attachment-24525\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24525\" class=\"wp-caption-text\">Insert New Function in Script<\/p>\n<\/div>\n<p>To create a header for the function above, type\u00a0<code>\\cfu<\/code>, enter name of the function, click\u00a0<strong>[Enter]<\/strong>\u00a0and fill in the appropriate values (name, description, parameters and returns):<\/p>\n<div id=\"attachment_24526\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Create-Header-Function-in-Script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24526\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Create-Header-Function-in-Script.png\" alt=\"Create Header Function in Script\" width=\"726\" height=\"644\" aria-describedby=\"caption-attachment-24526\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24526\" class=\"wp-caption-text\">Create Header Function in Script<\/p>\n<\/div>\n<h4>More Examples of Adding Bash Statements<\/h4>\n<p>Below is an example showing insertion of an if statement using\u00a0<code>\\si<\/code>:<\/p>\n<div id=\"attachment_24527\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Insert-Statement-to-Script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24527\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Insert-Statement-to-Script.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Insert-Statement-to-Script.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Insert-Statement-to-Script-768x318.png 768w\" alt=\"Add Insert Statement to Script\" width=\"860\" height=\"356\" aria-describedby=\"caption-attachment-24527\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24527\" class=\"wp-caption-text\">Add Insert Statement to Script<\/p>\n<\/div>\n<p>Next example showing addition of an\u00a0<strong>echo<\/strong>\u00a0statement using\u00a0<code>\\se<\/code>:<\/p>\n<div id=\"attachment_24528\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-echo-Statement-to-Script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24528\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-echo-Statement-to-Script.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-echo-Statement-to-Script.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-echo-Statement-to-Script-768x318.png 768w\" alt=\"Add echo Statement to Script\" width=\"860\" height=\"356\" aria-describedby=\"caption-attachment-24528\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24528\" class=\"wp-caption-text\">Add echo Statement to Script<\/p>\n<\/div>\n<h4>How To Use Run Operation in Vi Editor<\/h4>\n<p>The following is a list of some run operations key mappings:<\/p>\n<ol>\n<li><code>\\rr<\/code>\u00a0\u2013 update file, run script\u00a0<strong>(n, I)<\/strong><\/li>\n<li><code>\\ra<\/code>\u00a0\u2013 set script cmd line arguments\u00a0<strong>(n, I)<\/strong><\/li>\n<li><code>\\rc<\/code>\u00a0\u2013 update file, check syntax\u00a0<strong>(n, I)<\/strong><\/li>\n<li><code>\\rco<\/code>\u00a0\u2013 syntax check options\u00a0<strong>(n, I)<\/strong><\/li>\n<li><code>\\rd<\/code>\u00a0\u2013 start debugger\u00a0<strong>(n, I)<\/strong><\/li>\n<li><code>\\re<\/code>\u00a0\u2013 make script executable\/not exec.(*) (in)<\/li>\n<\/ol>\n<h4>Make Script Executable<\/h4>\n<p>After writing script, save it and type\u00a0<code>\\re<\/code>\u00a0to make it executable by pressing\u00a0<strong>[Enter]<\/strong>.<\/p>\n<div id=\"attachment_24529\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-script-executable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24529\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-script-executable.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-script-executable.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/make-script-executable-768x369.png 768w\" alt=\"Make Script Executable\" width=\"860\" height=\"413\" aria-describedby=\"caption-attachment-24529\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24529\" class=\"wp-caption-text\">Make Script Executable<\/p>\n<\/div>\n<h4>How To Use Predefined Code Snippets To a Bash Script<\/h4>\n<p>Predefined code snippets are files that contain already written code meant for a specific purpose. To add code snippets, type\u00a0<code>\\nr<\/code>\u00a0and\u00a0<code>\\nw<\/code>\u00a0to read\/write predefined code snippets. Issue the command that follows to list default code snippets:<\/p>\n<pre>$ .vim\/bash-support\/codesnippets\/\r\n<\/pre>\n<div id=\"attachment_24530\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/list-of-code-snippets.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24530\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/list-of-code-snippets.png\" sizes=\"auto, (max-width: 830px) 100vw, 830px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/list-of-code-snippets.png 830w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/list-of-code-snippets-768x224.png 768w\" alt=\"List of Code Snippets\" width=\"830\" height=\"242\" aria-describedby=\"caption-attachment-24530\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24530\" class=\"wp-caption-text\">List of Code Snippets<\/p>\n<\/div>\n<p>To use a code snippet such as free-software-comment, type\u00a0<code>\\nr<\/code>\u00a0and use auto-completion feature to select its name, and press\u00a0<strong>[Enter]<\/strong>:<\/p>\n<div id=\"attachment_24531\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Code-Snippet-to-Script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24531\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Code-Snippet-to-Script.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Code-Snippet-to-Script.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/Add-Code-Snippet-to-Script-768x369.png 768w\" alt=\"Add Code Snippet to Script\" width=\"860\" height=\"413\" aria-describedby=\"caption-attachment-24531\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24531\" class=\"wp-caption-text\">Add Code Snippet to Script<\/p>\n<\/div>\n<h4>Create Custom Predefined Code Snippets<\/h4>\n<p>It is possible to write your own code snippets under\u00a0<strong>~\/.vim\/bash-support\/codesnippets\/<\/strong>. Importantly, you can also create your own code snippets from normal script code:<\/p>\n<ol>\n<li>choose the section of code that you want to use as a code snippet, then press\u00a0<code>\\nw<\/code>, and closely give it a filename.<\/li>\n<li>to read it, type\u00a0<code>\\nr<\/code>\u00a0and use the filename to add your custom code snippet.<\/li>\n<\/ol>\n<h4>View Help For the Built-in and Command Under the Cursor<\/h4>\n<p>To display help, in normal mode, type:<\/p>\n<ol>\n<li><code>\\hh<\/code>\u00a0\u2013 for built-in help<\/li>\n<li><code>\\hm<\/code>\u00a0\u2013 for a command help<\/li>\n<\/ol>\n<div id=\"attachment_24532\" class=\"wp-caption aligncenter\">\n<p><a href=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/View-Built-in-Command-Help.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-24532\" src=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/View-Built-in-Command-Help.png\" sizes=\"auto, (max-width: 860px) 100vw, 860px\" srcset=\"https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/View-Built-in-Command-Help.png 860w, https:\/\/www.tecmint.com\/wp-content\/uploads\/2017\/02\/View-Built-in-Command-Help-768x369.png 768w\" alt=\"View Built-in Command Help\" width=\"860\" height=\"413\" aria-describedby=\"caption-attachment-24532\" data-lazy-loaded=\"true\" \/><\/a><\/p>\n<p id=\"caption-attachment-24532\" class=\"wp-caption-text\">View Built-in Command Help<\/p>\n<\/div>\n<p>For more reference, read through the file :<\/p>\n<pre>~\/.vim\/doc\/bashsupport.txt  #copy of online documentation\r\n~\/.vim\/doc\/tags\r\n<\/pre>\n<p>Visit the Bash-support plug-in Github repository:\u00a0<a href=\"https:\/\/github.com\/WolfgangMehner\/bash-support\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/github.com\/WolfgangMehner\/bash-support<\/a><br \/>\nVisit Bash-support plug-in on the Vim Website:\u00a0<a href=\"https:\/\/www.vim.org\/scripts\/script.php?script_id=365\" target=\"_blank\" rel=\"nofollow noopener\">http:\/\/www.vim.org\/scripts\/script.php?script_id=365<\/a><\/p>\n<p>That\u2019s all for now, in this article, we described the steps of installing and configuring Vim as a Bash-IDE in Linux using bash-support plug-in. Check out the other exciting features of this plug-in, and do share them with us in the comments.<\/p>\n<p><a href=\"https:\/\/www.tecmint.com\/use-vim-as-bash-ide-using-bash-support-in-linux\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>An\u00a0IDE\u00a0(Integrated Development Environment) is simply a software that offers much needed programming facilities and components in a single program, to maximize programmer productivity. IDEs put forward a single program in which all development can be done, enabling a programmer to write, modify, compile, deploy and debug programs. In this article, we will describe how to\u00a0install &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/04\/01\/how-to-make-vim-editor-as-bash-ide-using-bash-support-plugin-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Make \u2018Vim Editor\u2019 as Bash-IDE Using \u2018bash-support\u2019 Plugin in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13130","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=13130"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13130\/revisions"}],"predecessor-version":[{"id":13131,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/13130\/revisions\/13131"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=13130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=13130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=13130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}