![]() ![]() I tried a couple of different ones, but landed on this combination:įzf is a really well built/maintained fuzzy search that works in both the command line and vim. There has been a bunch of solutions for file searching over the years, as indicated by the multitude of answers in forums. FYI, as far as I can tell, Vundle isn't regularly maintained anymore. I like it, and I’ve had no issues with it. I landed on Plug for no particular reason. Note: There are a few plugin managers out there. In order to add plugins, we have to have a mechanism to manage them. ![]() The real catalyst for wanting to switch to Vim was watching Kyle Mathews (creator of Gatsby.js) using it during a demo. If you know VIM…you don’t have to worry about that! Let’s say, for example, changing an SSH key on Digital Ocean. Probability is high that you’ve ever edited a file on a Linux server, and couldn’t figure out how to exit the file. Wouldn’t it be nice if your code editor and your command line worked in concert? I’m under the impression that the more you expose yourself to things like bash, the better programmer you are going to be.Ĭhances are, you have a pretty sweet command line setup. Part of the journey of learning VIM is exposing yourself to how UNIX works. That’s just the surface of amazing shorthand things you can do with Vim. To delete everything in between two objects (parentheses, quotes, etc), it's as simple as: ![]() The biggest eye-opener for me was this little tidbit: You tell it what you want, and it does it for you. Vim is built around the idea that you are directly communicating with your computer. My favorite quote that describes what it’s like to code in VIM: Okay, so maybe 65 isn’t really that fast anymore, but hey, this was 1994! Yeah, okay, maybe that doesn’t sound so bad, but, those 3 minutes could be spent writing a function, or refactoring code, not flailing your hand about like your Harry Potter! Whether that be to scroll, navigate to a new file, or something similar.Ħ00 (wasted time in ms) x 60 (times per hour) x 5 (hours I am actually coding) = 180,000ms wasted = On average, for sake of argument, I do that once a minute while I’m writing code. It takes 600ms to move my hand from the “home keys” to the mouse. For the rest of us simple humans, it takes time. And hey, maybe you’re a black belt in mouse movement, and you can move back in forth with a speed invisible to the naked eye. When you are solely using the keyboard, there is going to be an inherent speed boost just from not having to physically move your hands. There are lots of reasons to use Vim, so here’s a few of mine. If you’ve heard about Vim, and want to try it out, I hope this article can provide a bit of familiarity you’d find from VSCode. I’m only writing this because I found a level of productivity in Vim that I haven’t had in any of the editors I used before (Sublime Text, Atom or VSCode). You can use whatever text editor you want. I want to start by saying, this is not an editor-shame article. NB: To check if you have a key bound, and what it is, you can always press CTRL+ SHIFT+ P and type Add Cursor Below and if there's a keybinding it will show to the right of that text.Hot tips to bring the awesomeness of Visual Studio Code to Vim. Then just type " then END then " and all your lines are surrounded by quotes. Keep doing that until you have a cursor in front of all your words. Place the cursor at the start of the first line, press CTRL+ ALT+ DOWN to add another cursor below on the next line. What you are after though is not really that efficient like that. Change your language mode with CTRL+ SHIFT+ P and type Change Language Mode ENTER and select something like JavaScript where this is supported. So this will not work in a "plaintext" file, for example. The language syntax must define opening and closing braces, e.g. Selecting some text and pressing " already works in VSCode to surround a single item, and works for multi-line selections as well. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |