Hi, my name is Dave Morris and this is my first podcast for HPR. I want to talk to you on the subject of VIM plugins. I started using VI, Fair Time Ago when I was given the job of administering a bunch of multi-use, a unique systems. I found that VI was available on most of these systems. If it wasn't, then the alternative was a thing called edge, which was appalling. Anyway, whatever happened, EMAX was quite hard to combine. Certainly wasn't available on the machines out of the box. I'm not quite sure when I moved from VI to VIM and GIVIM. I might even be as long as 15 years ago. But since then, it's been my editor of choice and I've tended to use GIVIM and have it configured up as an IDE. It's not quite as smooth as a purpose-built IDE, but it's not bad as long as you know. It's a strangeness. Now for this talk, I'm assuming you know the basics of VIM. If you don't know how to install plugins, then I've pointed you to a very useful article in the show notes. The show notes all look so tell you where to get each of the plugins. And you'll notice that some of them have not been updated for a while. But my choice is the plugins tend to have quite high ratings. So hopefully they'll be useful to you. There are a few images in the notes, all of which are set up using GIVIM, for example. You need to have a good read of the help test text for each plugin if you decide to use them. So the first one I want to talk about is called Nerd Tree. I'm not quite sure where they came up with that name, but certainly a tree and it's used by this nerd. Anyway, it's a file browser which when you invoke it tends to sit on the left hand side of your window. I don't know if I'm assuming you know a bit about VIM Windows. Whatever it splits the main window and drops itself on the left hand side. You invoke it with a colon command. The colon commands open up the command line at the bottom of the window. You would type Nerd Tree and it's quite important to get the capitalization right. It's capital NERDT. Lowercase RW. Then you follow that with the directory name. I prefer to use Nerd Tree with GIVIM because it tends to be a generally more usable. You can use the mouse to click on things and scroll it and so on and so forth. Which I just generally find more usable. There are lots of key mappings within Nerd Tree, far too many to talk about here, but just give you a flavor. If you put your cursor on a directory in the Nerd Tree itself, then pressing T will open a new tab with that tree in it so you can be editing multiple files out of the same directory in different tabs. If you're not up to speed with VIM tabs, then I'll leave you to do a bit of investigation on that. It's a very, very powerful feature. I definitely recommend to use it. The other one I use quite a lot is putting the cursor on a directory pressing lowercase R, will of course the directory to be refreshed. Nerd Tree also offers bookmarks which you can create through various commands or key sequences which I won't go into. There are lots and lots of configuration options that you can put in the dot VIM or C file and I've given you some examples in the show notes where I make sure that Nerd Tree is only invoked when I'm in GVIM mode and not in standard VIM mode. I'll mention probably mention for every plugin actually the though the way that you get help, but mostly it's pretty much the same. You would type call on H or help if you wish H is the abbreviation followed by the name of the plugin and I didn't know myself actually but just discovered that pretty much all of these plugins don't care about the case of the the name that you type after the H and that's largely because the authors have made sure that the relevant tags are in the in the help files that will get you to where you want to be regardless of what case you you give. The other note though I thought you might be interested in is if you put your cursor in the Nerd Tree window and press the question mark then you get a quick help which is a quick abbreviation list of abbreviations for how to use the plugin. Okay so the next one it's called bash support. It this offers a lot of facilities that you'd expect to find in an IDE and as you can guess it's specifically designed for working with bash scripts. It adds a menu to GVIM called bash not surprisingly. Now you can look at the show notes to get an image of what it what it looks like with the menu open. I use it particularly to start each group with a standard header so that all of my scripts look pretty much the same contain the same sort of comments and and that type of thing. You can also do things like maintain a library of code snippets so you can you can paste into your code so thereby saving you from hunting about all over the place for ways to do things that you might have forgotten. It can do stuff like check the syntax of a script run it debug it and as usual there's a whole bunch of keyboard shortcuts. These in general begin with a backslash so a backslash CT lowercase inserts current date and time at the cursor which is great for putting time stamps in your in your comments or anything about sort of code and not too surprisingly help for this is invoked with call on h bash hyphen support or indeed bash without the hyphen support bash support just as one word so this particular writer has made sure that lots of tags in the file will get you to where you want to be in the help text. From the same stable as bash support is another plugin called Pearl support you're probably gathered that I'm a bash and Pearl scripter spend a fair bit of time writing these things. This one gives you equivalent facilities for editing Pearl scripts and it adds a Pearl menu to GVIM. I say that way because there are no menus in standard VIM. It's another bunch of GVIM of course and again I use it to form standard headers and I've got boiler plate which will create me a sort of standard empty script that I can then populate. Again you can manage code snippets with it and it will check syntax run on and debug a script. One of the functions I use quite a lot and it's called Pearl tidy. This is actually a standalone utility that you can use for the print when building a pulse script. It's abbreviation is backslase backslashri and what Pearl tidy does is to reformate your code and it does that according to its own built-in style but you can you can change that you can adjust it. So you can set up your own personal or house style. If you're part of a group doing collaborative programming it's it's amazingly important to have similar style otherwise you find it difficult to read somebody else's code. The way you can figure it is through a dot Pearl tidy RC file and there's loads of documentation about this. I personally prefer to use it through GVIM because it's a bit of a hassle to use standalone I find if to remember more. The other one I use the other part of the pulse pod that I use is Pearl critic. This is invoked with backslashriPC. This is a thing that does a compliance check with the best practices book written by Damian Conway is a big name in the Pearl community. There's an image in the show notes that shows a script being subjected to this. There's a certain sort of school-marmish feel to the way that it criticizes your code. It's times when you throw it out the window but on the whole it does some really useful things. You can turn up and down its level of criticism. Again it's more convenient to use through an editor than it is to use the standalone version. And finally you can invoke help for Pearl support by typing call on H Pearl support with or out without the hyphen. Next I want to mention plug-in called man-page view. Not too surprisingly this allows you to view man pages from within the editor. You invoke it by typing call on man with capital M, MAN space and then the topic. Or you can position your cursor on an editing window and press capital K and it will invoke the viewer. If it can if if the keyword has a man-page entry is relevant to man-page. So once you've got your man-page up you can search it and scroll it about cut and paste from it which is always very useful. There'll be good examples often in a man-page that you might want to try out. I certainly find this amazing in the useful saves hopping out of the editor and going to look at something on another window perhaps. It's help as usual is invoked with call on H man-page view. The next plug-in view is called surround. It allows you to add, delete or change so-called surroundings. By this I mean things like pairs of quotes, pairs of braces, parentheses and so forth. This one is driven entirely by key sequences. The examples that I've given you some examples in the show notes because it's it really needs something that you can look at to fully appreciate. But I'll just see whether I can speak about a couple of them. If your cursor is in an editing window inside a string enclosed in quotes then if you type ds both lowercase quote and then that's it yeah that's all your type. If you type that then it just deletes the quote ds quote deletes the quote. If you're inside a string in brackets square brackets then if you type cs square bracket closed that's closed square bracket closed parentheses then it will delete the square brackets and replace with parentheses. So you can see it's actually quite a powerful thing. Little hard to get your head round but personally I think well worth the trouble. Again as always you can get lots of help about how to use this with call on h surround. Next comes fugitive. This is an interface to the get version control system that you can use within the editor and I've put an example of what what the screen looks like if you type the command call on capital G status that's the equivalent of the command line get status that shows you the current state of repository. It gives access to pretty much all of the the get commands through one means or another either with direct commands or with commands to which you can add arguments. Again it's help is in book through call on h fugitive. Tag list is my next example. This is a plugin that lets you help. It gives you help with browsing source code. It creates a menu within gvm a menu is called tags and when you when you're editing a piece of source code then you'll find that the tags menu is populated with the functions classes and other major elements of your source code. You simply need to go to the menu and click on a tag to position the editor at that particular point. So if you're trying to find a the declaration of a subroutine whatever language you're dealing with then clicking on it will take you take you there. Under the hood it uses a package called exuberant c tags which is the most fantastic name and its job is to build a list of tags so it has syntactic knowledge of a whole bunch of languages which uses to build a tag file and this is then used by the tag list. There are other tag features within built into to them which I won't go into now but this I believe gives you a quite easy route to using this particular feature. There's an image in the show notes that gives you some idea of what you can do with it and now this there is not been telling you about how to get the help is that there are a few instances that don't conform to the normal normal way of doing it and in this this is one particular case. In this case you need to type call on hspace taglist.txt that's because the tag list is already a name within the standard them help file so that particular command invokes the things specific for this plugin. And my last plugin is called super tab. I think this is slightly controversial, partly because I'm not sure I like it. This provides word completion via the tab key. There's an example of it doing this in the show notes. So you type at least one character of the word that you're hoping to type you've forgotten how to spell it or something. You press tab and pop up menu comes up with the various options that this could be the various words that could match this. The thing that I'm not sure a like about this is that it hijacks the tab key and this means that if you want to enter a real tab for a new reason then you need to use control tab to do it which I'm not sure I want. I would like to be able to switch this on and off as I need it and I haven't yet found a way of doing it. There are other tab completion plugins available which I have not tested yet. I think I'm going to do that and see if there's something better than this. This seems to be the most popular one judging by the rating though. So that's my list of plugins. This is quite a quick review. There's a lot to be said about each one. Each could have a podcast to itself, I guess, if anybody would ever listen. The other thing to tell you is there's a whole world of plugins available on www.vim.org. Very very large and about you can browse through. So hope you found that useful. You have been listening to Hector Public Radio as Hector Public Radio does our we are a community podcast network that releases shows every week that you want to take the Friday. Today's show by GoR shows was contributed by a HPR listener like yourself. If you ever consider recording a podcast then visit our website to find out how easy it really is. Hector Public Radio was founded by the digital.power and the economic and computer cloud. HPR is funded by the binary revolution at bingreff.com. All bingreff projects across this sponsored by Lena Pages. From shared hosting to custom private clouds, go to LenaPages.com for all your hosting needs. On this otherwise stages, today's show is released on your creative comments at the future. Share and like. He does our life as well.