5/29/2023 0 Comments Vim supertab menuNow let's come down below and I'll start typing in something, just like before. So I'm gonna say something, and we'll say something method, and it doesn't really matter what we put here. So if there would have been multiple items, so if I would have had something and then something else that was something underscore, then that would have given me a few options, and let's actually see what happens if I do that. And it says there below, keyword completion, the only match. Now if I navigate to the end, and I'm in insert mode, if I start typing in just the first few characters and type tab, you can see that that completed for me. I'm gonna create a method, so I'm gonna say def something, we have our nice Endwise end coming up right there. So I'm gonna type in vim and this one's gonna be, let me just create a new one. So just make sure you have bundle/supertab there included, and now let's open up one of our files. And so I'm gonna show you in one of the next guides how we can streamline this and not have to have all of this nearly identical code here. Each one of these, if you notice, is completely identical. So I don't really think you want to watch me copy and paste it over again. So now that we have that, now we can open up our Vim rc file and navigating all the way down I already have included this, so I have vim/bundle/supertab. You can see if you type in ls that we don't have supertab here yet, and now you can just type in get clone, and paste this in. If you click on clone or download here, and click on copy to clipboard, now navigate to your. The supertab one doesn't quite give us that, but it's perfectly fine 'cause I want to show you how you can do this manually. You remember how some of these other ones had instructions like put this in your bundle file, and then clone this. So here if you come to supertab, which I'll have in your show notes, if you come here you may notice something kind of interesting, and that is that we don't actually have a true set of instructions. It's simply another way of being able to make you more efficient.Īnd I also want to install this slightly differently, 'cause not all of these type of plug-ins give you a really nice, clear set of instructions for how to install them, so I wanted to show you how you could install something manually. It's nice, lightweight, kind of like we did with Endwise. That is a type of auto-complete I like inside of Vim. You can simply type out the first few characters, and then you can hit tab and it will auto-complete that for you. So if you defined a method, you don't have to type in the full method name. Instead what it's going to do is, it's simply going to allow you to auto-complete other items that you have in the file. So in other words, supertab's not going to be able to do something like type in a array, and then it's not going to show you all of the various array commands or array methods in Ruby. Now, supertab is another kind of similar to having a auto-complete feature, but not auto-complete in terms of understanding the language. On the cmp/luasnip example, they explain how to achieve a super-tab like autocompletion, but either I'm misunderstanding something or this workflow is not something I jive with.In this guide I'm gonna continue talking about some various plug-ins that I find helpful with Vim, and in this one it's called supertab.
0 Comments
Leave a Reply. |