Episode: 2140 Title: HPR2140: Vim Plugins I Use Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr2140/hpr2140.mp3 Transcribed: 2025-10-18 14:49:59 --- This episode of HPR is brought to you by Ananasthos.com. Get 15% discount on all shared hosting with the offer code HPR15, that's HPR15. Better web hosting that's honest and fair at Ananasthos.com. Hello HACO Purple Grideo fans, this is BeeEasy once again, signing in for another episode. Now I'm currently working with Dave Morris, the canoe awk series, but I figured I'd go in a little extra show because I know we still need shoes. And I wanted to try something new. Right now I'm actually driving at, hmm, I'll just say the local speed limit. And my car with one of my head buns in and the speaker on and I figured I'd try a mobile episode going directly into my phone through the generic sound recorder app. And here we go. So please excuse me if I have to interrupt it or for your beeps or screeches or I die in a car crash. Hopefully that won't happen. But I want to try something new. So here's my show, it's about my VEM plug-ins. Now this show is specifically for people who are interested in the VEM tech center. I'm a big fan of VEM. I'm almost right exclusively in VEM and hate when I have to use a word processor or a spreadsheet or some other type of way of documenting things that is in plain text. But I do it when I have to, but when I don't, I use VEM. And there's a bunch of things that I use besides the default installation of VEM. And I thought I'd share them because why not. And I don't know if I'm going to get to all of them because like I said, I'm driving and I'm not going to offer what in the type of script or anything. But I figured I'd try and do my best off the top of my head to see what I remember about my VEM setup. So a lot of what I do in VEM is obviously writing. I write a lot of notes and mark down. I also edit a lot of text including code and various data files as well as CSV files and other delimited files. And I use a bunch of different plugins that make that process easier. So a bunch of the plugins that I'm going to talk about and I hope I remember them all. But T-POP is an author of a bunch of them. So if you go to T-POP's GitHub page, I'm pretty sure it's GitHub.com slash T-POP. You'll see a lot of VEM plugins including VEM repeat, surround VEM and probably some others. I think I'm not using T-POP's VEM mark down anymore. I'm using plastic boys. So there's, okay, there we go, already three. So VEM surround, VEM repeat, and I know there's another one speed dating. And then like I said, VEM mark down and there's another one called VEM mark down folding. Hopefully I'll go back and listen to this and add all these things to the notes. But these are a bunch of plugins that I use almost every day. So surround VEM or VEM surround is a way of using, it's basically making shortcuts on putting text or some type of symbols to surround existing text. Some of this text includes parentheses, single quote, double quotes, brackets of all sorts. And it's very useful when you are coding or even working in mark down. And you want to have a group of text that is surrounded by single quotes and you want to change it to double quotes. Or you have some text that's not quoted at all, you want to put quotes around it, a put brackets around it, a put parentheses around it. That's the job of VEM surround. Another one, like I said, is VEM repeat. There's a lot of plugins, I mean there's a lot of native functionality that you can repeat and just by hitting the dot command. And then a lot of Tim Pope's little plugins work in a way where if you just use the native functionality, the dot command wouldn't work anymore. But being a great person, he also made a plugin called repeat, VEM repeat. And it takes a lot of his plugins and makes it so that the dot command works on them. Basically turning a lot of the items into text objects and making it so that you can use dot to repeat the function, which is great. So I haven't even tried to use the Tim Pope plugins without VEM repeat because we just seem why would you not want that if you're going to use this. What else did I say? Speed dating is a way that, so a native functionality in VEM is whether you can increment or decrement a number or numeric value by using control A or control X and normal mode. And I always forgot, I wanted to give a little bit of a disclaimer at the beginning of the episode that if you're not interested in VEM, I'm sorry, but it's very interesting to me. And so you could probably just skip this episode. But there's some people who like it and including me, there's a bunch of other people. So why not talk about it? Anyway, so going along with, oh look, I think I can stop driving in Park now. Great. Parking at Costco without a working. So along with VEM speed dating and surround up VEM, I also use a plugin called Tabular, which is... And actually, I don't know why I still use to. I use a line dash VEM and Tabular as ways to align text in different formats. So a lot of what I do in Markdown, I make tables and to make the tables, I use the pipe delimiting tables and get helpfully marked down. And to make it look nice in a text file, you can line up all the pipes together so they look like columns. And to do that by hand is really annoying and you could write your own macro to do it, but there's also the Tabular plugin that does it pretty easily. There's also the align plugin that does a lot more. So I use the Tabular plugin the most because it's the most simple and the one whose commands I remember off the top of my head. But if you want to do a lot of complex aligning where you want to go right justified left justified centered using multiple or complex delimitors in between your columns, VEM align is a better choice for you. But like I said, I don't use it as much as I used to and I'm not quite sure why I still have it installed. I used to use it when I used to do more programming that was not Python, but since I like to follow Pepe pretty closely, I don't do crazy stuff with aligning assigned characters like you do and other languages where you want to line up all the equal signs in the row so that it looks all pretty. So I don't really use the align VEM anymore, but I still have an install. So I just switched from power line to airline, which is a tool that controls your prompt at the bottom of your screen. The regular status line in VEM is like the last two one or two lines at the bottom of your terminal or GVEM screen or if you're using Mac or whatever, whatever, the iter, whatever you're using. It's the last couple of lines and you can control your status lines. It's a pretty way of and a pretty cool looking way of controlling your status line. Like I said, I just switched from VEM power line, which is kind of outdated now to airline and I'm happy with it so far. It has a lot more options when it comes to theming and making it look pretty. So, you know, I'm not, I don't really, I didn't really need all the prettiness, but it's nice to have. It matches my regular theme that I use, which is groove box, so I have a groove box theme and a groove box airline theme and it looks really nice together. Once again, like I said before, I use plastic boys, VEM markdown theme, which adds some extra functionality including some extra leader key maps and ways of with quick short cuts to adjust the header line. So, if I want to go from H2 to H1 or vice-vert or going the other way or turning a line into an image tag or a link tag, it's very nice. Another one that goes alongside of that one is VEM markdown folding, which adds some extra folding, like text folding functionality. And markdown, so I like to use the nested folding type, folding type, which means if I have a H1, you know, header one, and I have a whole bunch of headers underneath of that, sub headers underneath of that, I can do ZA and collapse them all down to just one line. And so sometimes when I have, like I write all types of documents, sometimes the documents are a couple hundred lines long and I can collapse an entire heading down the one line and have the whole file with all the H1s just there and I can quickly just go down three keys and be at hundreds of lines down the file because it's all collapsed. Very nice plugin to use. What else can I remember off the top of my head? I have a plugin that manages, so it's probably going to be useless to most people, but I have a plugin that's for reading RDF syntax. So anytime if you're working with a semantic web, building ontologies or taxonomies, you work with turtle files, RDF XML files, it just goes highlighting to those files, which is pretty neat. One that I just started using is a plugin called Venn CSV or CSV Venn, and it's a way of doing some cool highlighting and gives a lot of functionality using delimited files. So it will automatically recognize different delimitors, so if it's a CSV file or the pipe element file, automatically match those and it doesn't have to be lined up, but it will automatically color code the different columns. So if it's all, if you don't format the file, different lines are going to be different lengths for a specific column and you'll be able to easily just by eye see the different columns because it alternates color every other column. And it gives you a functionality where you can move the entire column over, you can search going down in the column instead of going through the entire file, you can duplicate a column, you can delete a column. So some really cool functionality in that plugin. What else do we see? I use a lot of plugins, I just realized control P is a great plugin for doing a fuzzy search on a file name. So you can do, as the name of it implies, control P and then start typing some text and then the quick fix menu at the bottom, you'll get a list of files that fuzzy match that whatever text you typed. So there's also control T, I don't use that one, but it's another one that's very similar. Another one I use is Ack-Vim, so I talked about in a previous episode the command Ack and Ack-Vim brings the Ack command into Vim. So you can just go colon capital ACK, Ack and then type in string and then the quick fix menu below and it'll do Ack. And you can choose out of all the files that are listed below on the lines listed below. You can just check on them and go down and click enter or click as and click T and open up that file at that line in a new tab or the same window or in a split window. So find that very useful because I work a lot in, like I said, doing notes and stuff. And so sometimes I'll be in a directory and I'll just go, hmm, I know somewhere in this directory or maybe I'm not in the directory I want to. I'll just CD into the directory I want to go into and then say I know somewhere in directory I wrote some notes about and map. So I'll just go colon Ack and map and then all the files where I have in map and in the text I'll find it. One of the benefits of using plain text files is that indexing the text is very fast and built into units like systems. I know you could do similar things in Windows but you have to do like the whole indexing thing and then read all those binary files. So it's just easy to read and play in text. Okay, a couple more that I use include Python mode because I do a lot of stuff in Python nowadays. And Python mode, especially if you have a newer version of them that's been compiled with Python 3 and you use Python 3. And you go into Python mode, you get to get basically an IDE type experience in Python. That within the combination of the next one which is Alta Snips, which is another Python enabled way to bring in snippets. I use VIM snippets and Alta Snips in combination with Python mode to get a IDE type experience and type completion inside of them. In Python but Alta Snips works with a lot of languages and it's extensible so you can add your own snippets to any language that you want to. I use VIM's built-in file type detection to give you what you want to add in a specific situation. So for instance the Shebang or like the hash exclamation point and then tab and a bash file it'll put bin bash. If you get tab complete at that level it'll do bin bash following. If you do it in Python it'll do user bin on Python. If you do it in other languages it'll follow suit so it is file type aware. And with Python you get a lot of extra things like when you're building a class or a def or a function and you do class and then tab or def class it'll automatically put in doc strings for you to fill in so it encourages you to put in documentation and comment your code as you go which is very nice. And you use control B I think and control Z to like go to the next place in your the next stop in your type of mission so if you go class tab it'll go to the name of the class and type in the name. If you control B again it'll go inside the brackets so you can say what arguments will pass. If you control tab again it'll go to the doc string, control B again and it'll go to the knit function until and actually how you want to initialize. Sometimes it's a little bit overboard when you're trying to do something simple but if you're doing something really formal it's really nice to have all that functionality. So a couple other ones from Tim Pope nerd tree and nerd commenter so nerd tree along with all those other things I've been saying Python mode and everything else really gets you into a nice little development environment. Nerd tree puts a tree view on the left hand side of your screen so you can it's like a little file explorer and a tree format so you can go through your files and the folders and pick different files and bookmark the different ones and open them in new tabs, open them in split windows. All from there nerd commenter is a way to it's a file type of way of commenting your code so you can click the same key combination and it will comment code and bash and HTML and Python and Ruby and JavaScript no matter what language you do you can use the same couple of keys and I'll put in the right letters or characters at the beginning of the line. Getting into the line the commented out it's very useful one more I think it's by Tim Pope as well is them unimpaired very useful it allows you to use a key combination of open and closed square bracket and a letter. To do lots of different types of functionality for instance if you're in it depends on once again it's file type of where it depends on what type of file you're in but if you do for instance if you do back or open right on square bracket space it'll put a space it'll put a new line above your current cursor if you do the opposite bracket in space it'll do a new line after your current bracket after a current cursor place if you do open bracket be it'll switch to the next buffer is the same as be next if you do the other way it'll do be previous so it's a nice way of the reason why it's called unimpaired it's the way that you can use a lot of paired combinations of keys so Cnex is control is open square bracket C and close is and C previous is the opposite bracket C you can do the same thing with a lot of there's a lot of different combinations including I don't know if this is built in functionality or part of the extension or we're doing spelling correction Brett open bracket S is going to the next word that's wrong so very useful it actually builds upon a lot of the native functionality with the square brackets and adds a lot more items in context every once well I have to go through and and just to go to the help section because I really like all these plugins but I sometimes forget what they all do or I find myself only using a small percentage of their functionality so once we're all going to the help and find some other nice little thing to do and do some more of that oh and then one bonus I don't use it on all my computers but I use it on one and that is Vim wiki it's a way and I'm thinking about using it more I'm thinking about replacing all the mark down that I do with with wiki with docky wiki I think it's docky wiki that it does and it's it has a lot of key bindings to like make linking to other files and creating formatting very quick but it uses like I said wiki format so if you do square bracket square bracket and then type in text in the square bracket it'll automatically make that into a link and then if that file or exist it'll link it'll go to it if it doesn't exist it'll make it I mean just use the Vim wiki stuff that I use when I keep a journal and Vim wiki format and I've been writing in it for the last maybe six months and then really like I really love mark down but it's almost worth switching to writing in wiki or media wiki because of Vim wiki I really enjoy it it has a lot of good functionality but to do list we're taking a key combination will allow to do item to either go check or unchecked or if you put in the advanced version of to do it'll go from uncomplete to 25% complete to 50% complete to 75% to all the way complete just by toggling that button over and over again it makes doing formatting and working with tables really nice when you click tab it goes to the next column you click enter it goes to the next line in the column it's really nice for in a lot of circumstances and like I said I just I just don't use it for everything but it really makes me want to I just don't want to reformat everything it's probably one thing to hold me back right now and as one extra bonus the plugin manager that I use is pathogen just because it's easy all you have to do is just get clone the different plugins into your dot Vim slash bundle folder or if you zoom windows the Vim file slash bundle folder and then what it basically does is it puts I believe the way it works at least the way it looks like it works is that it puts it has the same folder structure as the main dot Vim folder so you have like a docs folder which has your your help file and then it has the auto the FC plugin and FD indent and the syntax and all the different regular files folders in there and I think it either does it or it pretends to basically do dynamic linking to those other folders saying if you're if I'm inside of for instance Python mode and I see a folder called FD detect pretend that this FD detect folder was in my regular dot Vim folder and so just so treated just like it was a part of a standard configuration of them so it makes it really easy to manage and I keep all my configuration in my Git repository which if I remember I will reference in the show notes but okay this is my bonus podcast episode for this month I will be continuing following up Mr. Morris on the awk series but I want to give this just because I was in the car driving back from a client and I'm opening my garage now made it home so this is easy sign it out you've been listening to Hacker Public Radio at Hacker Public Radio dot org we are a community podcast network that releases shows every weekday Monday through Friday they show like all our shows was contributed by an HBR listener like yourself if you ever thought of recording a podcast then click on our contributing to find out how easy it really is Hacker Public Radio was founded by the digital dog pound and the infonomicon computer club and it's part of the binary revolution at binrev.com if you have comments on today's show please email the host directly leave a comment on the website or record a follow-up episode yourself unless otherwise stated today's show is released on the creative comments, attribution, share a live 3.0 license