<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by David Ondrich on Medium]]></title>
        <description><![CDATA[Stories by David Ondrich on Medium]]></description>
        <link>https://medium.com/@dbo1093?source=rss-879d8c967a93------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*W9WZEAPOQB4wDews.</url>
            <title>Stories by David Ondrich on Medium</title>
            <link>https://medium.com/@dbo1093?source=rss-879d8c967a93------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 22:47:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dbo1093/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Communication Is More Important Than Your Coding Skills]]></title>
            <link>https://levelup.gitconnected.com/communication-is-more-important-than-your-coding-skills-de1f204bc197?source=rss-879d8c967a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/de1f204bc197</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[David Ondrich]]></dc:creator>
            <pubDate>Sun, 30 Aug 2020 20:48:20 GMT</pubDate>
            <atom:updated>2021-01-11T21:45:21.906Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5zppeXHmjcDZAjLRs1RoQ.jpeg" /><figcaption>Look Familiar?</figcaption></figure><h4>TL;DR</h4><blockquote>Communication is More Important Than Your Coding Skills</blockquote><p>A few short months ago when I started writing on Medium I vowed never to write a post with a clickbait title. So, there you have it. The title is the thesis to this whole post. Feel no obligation to continue reading (reading only the title is a common practice anyways, right?).</p><h4>Communication and Coding</h4><p>There’s a famous quote attributed to Phil Karlton<em>:</em></p><blockquote>There are only two hard things in Computer Science: cache invalidation and naming things.</blockquote><p>That quote is certainly true while purely discussing the topic of computer science. If we expand to include areas that <em>use </em>computer science though, it’s clear that <em>communication</em> takes the cake as the hardest part.</p><h4><strong>It Doesn’t Matter How Well You Code, If You Can’t Communicate</strong></h4><p>It’s true. Sure you need to be <em>competent,</em> but most developers already are, and have been for a long time. Communication is the skill that takes a junior, or medior, and makes them a senior. Or take a senior and makes them an even more effective senior. Communication is the skill that takes a good team member and makes them invaluable.</p><p>With that said let’s walk through many, if not all, aspects of being a developer and see why communication is important.</p><h4>Pull Requests/Code Reviews</h4><p>I hope you’re already doing code reviews for all new pull requests wherever it is that you work! If you’re not this is also something that can help take your skills to the next level. The opportunity to talk through your code with someone else and hear their perspective is extremely valuable and can help you learn a ton.</p><p>But at the end of the day, code reviews are only as valuable as you make them. You need to be able to clearly explain your thought processes and decisions to enable the reviewer to truly grasp the whole picture. Some coding choices might seem strange at first to a reviewer who lacks full context of the problem being solved. They will rely on your communication to decide whether or not you’ve found the best possible solution to a problem.</p><h4>Design Reviews</h4><p>At many companies, large projects will often start with a design review. This is a meeting with stakeholders (or just interested people) where engineering architecture and design are discussed to find possible faults, or potential improvements.</p><p>However much like the code reviews the efficacy depends on your ability to articulate your thoughts. If you have the most brilliant architecture for a new product or tool in your head, its development can be hindered by your ability to convey it properly to your colleagues. Why would your VP of Engineering choose to invest time into a project that you yourself cannot explain. In theory it should be much easier to make a deck for a new project, then to actually execute it. Being able effectively convey potential designs and project plans will help you develop better projects, and will demonstrate that you can be trusted with interesting and tough assignments.</p><h4>Writing Documentation</h4><p>Let’s be honest, writing documentation probably isn’t your favorite aspect of development. Yeah, me either. On the flip side, how amazing is it when you find an awesome tool (package, API, SDK, etc.) <em>and </em>it has awesome documentation along with it? An okay tool with great docs is always more useful than an extraordinary tool with no docs. Useful tools are only useful if you know how to use them.</p><p>With that in mind, you can boost the effectiveness of your own work simply by documenting it. That’s a pretty amazing thing, don’t you think? If you write decent code that does its job, and you can document it so that other people can easily use your code, it magically becomes 10x better code! Writing good documentation can be your X-factor.</p><h4>Writing Comments</h4><p>I’m sure you’ve heard that your code should be clear enough that it doesn’t require comments to be understood. Your variable names should be perfect. Line length should be no more than 79 (nice, round number) characters. Functions and/or methods should be no more than 10 lines long. Right.</p><p>If you’ve worked on a large software project you also know that it’s not always possible to adhere to this. You wish it were, but it’s just not. Sometimes a well-placed and succinct comment can really make all the difference.</p><p>Kevlin Henney is a really great developer and speaker with many interesting (and hilarious) talks on YouTube. In one of his talks he said something along the lines of “If someone can’t write clear code, what makes you think they can write clear comments”. It’s a funny thought (and was delivered perfectly and got a big laugh from the audience), but I don’t really believe it to be true. Development skills are separate from communication (in this case written) skills. I’d argue the reason that comments are frowned upon is because most of them aren’t effective, not that they <em>can’t</em> be effective. If you stumble upon a difficult piece of code that takes you a while to figure out, and can leave behind a short, sweet, and helpful comment, you should go for it! The person behind you will praise your name.</p><h4>Managing Expectations</h4><p>Have you ever gotten an impossible ask? A feature request that would require more computing power than exists on the planet? A UI design that looks more like a Picasso than the Material component library your whole product is built on?</p><p>As developers it’s our jobs to make the magic happen. It’s not always clear to the folks giving you the work (be they product managers, executives, or whomever) what’s possible to do and what isn’t. It’s their job to ask, and it’s your job to answer.</p><p>Let’s say your VP of Product comes to you with an impossible new feature or offering. If you can’t explain to them clearly, in less-than technical terms, why something can’t be done, it switches from a technical problem to a you problem.</p><p>If you can explain in layman’s terms the technical limitations, they’ll understand that not everything they can dream up is doable. Plus you’ll be surprised at the ingenuity that arises when you get close to those limitations. You might just be able to dream up something better than your VP originally had planned.</p><h4>Managing Timelines</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*RtKhcx-VJbU07icHVq3p5A.jpeg" /></figure><p>Presumably every task you have has a deadline. Presumably a lot of those tasks aren’t done by that deadline. It happens to everyone. Especially in the world of estimates == deadlines, which is this world.</p><p>Managers know not everything will be done on time. It’s not (always) a problem if something is late, but it is always a problem if something’s late without warning. Delays should be communicated early and often. Emails, slacks, task management tools, ticketing systems, whatever you use. The more you communicate your status the happier your higher-ups will be with your work. That’s not to say everything should be done late. But if something’s going to be late, which is inevitable, let it be known sooner than later.</p><h4>Job Interviews</h4><p>It’s obvious that communication is important in job interviews. You have to answer qualitative questions about yourself, your past experience, etc. The HR portion of the interview as they say. However, what if I told you that communication is equally as important in the technical portion, including the dreaded whiteboard interviews.</p><p>That’s right! Even if you come up with the smartest solution an interviewer has ever seen, it won’t matter if you can’t clearly explain your thought process. This <a href="https://www.youtube.com/watch?v=XKu_SEDAykw&amp;t=1267s">video</a> from Google about how to answer Google interview questions demonstrates this perfectly. You need to have a good answer in an interview, of course, but it <em>needs</em> to be accompanied by an even better explanation.</p><p>The reason for this is companies are hiring you to be part of a team. They want to see that you can communicate effectively so that your PRs, DRs, documentation, everything we’ve touched on before, will be valuable to the entire team.</p><h4>Going Forth and Prospering</h4><p>It would be so simple if all we had to do as developers was code. It’s clear that communication is just as important as our coding skills. Luckily communication is also important for just about everything, and because of that there is an abundance of resources out there to help you improve.</p><p>Two great books I’ve read on the subject, that you might find helpful are:</p><p><strong>How to Win Friends and Influence People</strong> — by Dale Carnegie<br><strong>The Pyramid Principle</strong> — Barbara Minto<br><strong>How to Have Impossible Conversations: A Very Practical Guide</strong> — by James Lindsay and Peter Boghossian</p><p>Just being aware of how you’re communicating and the role it plays in your day-to-day work is an important first step. If you have any useful tips or tricks, or great resources please share them in the comments!</p><h4>P.S.</h4><p>Some clickbait titles I would have considered were:</p><ul><li><em>This One Skill Will Make You a 10x Dev</em></li><li><em>The Secret No One Tells You About Excelling as a Developer</em></li><li><em>Transcend Your Peers and Achieve Engineering Nirvana… With This Skill</em></li></ul><p>That last one might have been a stretch.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de1f204bc197" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/communication-is-more-important-than-your-coding-skills-de1f204bc197">Communication Is More Important Than Your Coding Skills</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vim For Developers: Part 5— Plugins]]></title>
            <link>https://dbo1093.medium.com/vim-for-developers-part-5-plugins-41e36aff346a?source=rss-879d8c967a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/41e36aff346a</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[vim]]></category>
            <dc:creator><![CDATA[David Ondrich]]></dc:creator>
            <pubDate>Tue, 11 Aug 2020 02:12:55 GMT</pubDate>
            <atom:updated>2021-01-11T21:11:46.917Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*UoH-CG_m2KUb1Obol3icvA.png" /></figure><blockquote>Check out the previous posts in this series if you haven’t already!<br><a href="https://medium.com/@dbo1093/vim-for-developers-part-0-why-vim-95e68dc5d3a1">Vim for Developers: Part 0 — Why Vim?</a><br><a href="https://medium.com/@dbo1093/vim-for-developers-part-1-the-basics-663619ca122a">Vim for Developers: Part 1 — The Basics</a><br><a href="https://medium.com/@dbo1093/vim-for-developers-part-2-advanced-basics-857c0dbda905">Vim for Developers: Part 2 — Advanced Basics</a><br><a href="https://medium.com/swlh/vim-for-developers-part-3-advanced-vim-6055081751bd">Vim for Developers: Part 3 — Advanced Vim</a><br><a href="https://medium.com/@dbo1093/vim-for-developers-part-4-custom-configurations-7f1db2f1ef3d">Vim For Developers: Part 4 — Custom Configurations</a></blockquote><blockquote>TL;DR — If you’re somewhat familiar with NeoVim/Vim and you’re just looking for a badass config, you can check out my dotfiles <a href="https://github.com/d-ondrich/dotfiles">here</a>.</blockquote><h4>Extending Vim?</h4><p>If you’ve been following along this whirlwind of a ride that is learning Vim, you’ve probably noticed that this inconspicuous, little text-editor has seemingly endless functionalities and features. Why then would we need to add plugins? There’s already too many features for one man or woman to know!</p><p>The first answer is: <strong>abstraction</strong> — as developers that’s our bread and butter right? Some things are just a <em>little </em>cumbersome to accomplish in Vim, and can be made absolutely delightful with a little plugin.</p><p>The second answer is: <strong>go beyond the limits of text-editor </strong>— I said it way back in the <a href="https://medium.com/swlh/vim-for-developers-part-0-why-vim-95e68dc5d3a1">first post</a> of this series.</p><blockquote>The thing about Vim is it’s not an IDE <br>- Myself, on Vim</blockquote><p>And it’s still true. Vim is a text-editor, not an IDE. Plugins will allow us to take the very most-useful features of IDEs, and bless our dear Vim with them.</p><h4>How to Add Plugins to Your Vim</h4><p>Given that this series is called <strong><em>Vim For Developers </em></strong>I’m going to assume you’re familiar with the concept of package managers. Luckily for us, Vim has many great ones to choose from for us to manage our plugins with!</p><p>The particular one I prefer is called <strong><em>vim-plug </em></strong>and comes to us from the prolific <a href="https://github.com/junegunn">junegunn</a>. You will see him crop up often in the world of Vim plugins, he’s written some of the best and most useful plugins out there. Some of them we’ll see in this post.</p><h4>Installing Vim-Plug</h4><p>Vim-Plug has some excellent documentation on its <a href="https://github.com/junegunn/vim-plug">GitHub</a>, but installing it is a piece of cake. Run the commands below for your relevant OS and preferred Vim (Vim or NeoVim).</p><h4>Vim</h4><p>Unix</p><pre>curl -fLo ~/.vim/autoload/plug.vim --create-dirs \<br>    <a href="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim">https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim</a></pre><p>Windows (PowerShell)</p><pre>iwr -useb <a href="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim">https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim</a> |`<br>    ni $HOME/vimfiles/autoload/plug.vim -Force</pre><h4>Neovim</h4><p>Unix, Linux</p><pre>sh -c &#39;curl -fLo &quot;${XDG_DATA_HOME:-$HOME/.local/share}&quot;/nvim/site/autoload/plug.vim --create-dirs \<br>       <a href="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim&#39;">https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim&#39;</a></pre><p>Linux (Flatpak)</p><pre>curl -fLo ~/.var/app/io.neovim.nvim/data/nvim/site/autoload/plug.vim \<br>    <a href="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim">https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim</a></pre><p>Windows (PowerShell)</p><pre>iwr -useb <a href="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim">https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim</a> |`<br>    ni &quot;$env:LOCALAPPDATA/nvim-data/site/autoload/plug.vim&quot; -Force</pre><h4>How To Use Plugins With Your .vimrc</h4><p>Now that we’ve got vim-plug installed it’s time to start putting it to use. Like we’ve done in previous posts I figured we’d walk through <a href="https://github.com/d-ondrich/dotfiles/blob/master/init.vim">my .vimrc file</a> and show you how to use plugins, and which plugins I’m using.</p><p>It should be noted that some of these plugins require additional setup beyond the .vimrc to get going. They’re mostly all well-documented on their respective GitHub pages better than I could explain here, so check them out if you decide to use any.</p><pre>call plug#begin(&#39;~/.config/nvim/bundle&#39;)<br>Plug &#39;neoclide/coc.nvim&#39;, {&#39;branch&#39;: &#39;release&#39;}<br>Plug &#39;/usr/local/opt/fzf&#39;<br>Plug &#39;junegunn/fzf.vim&#39;<br>Plug &#39;scrooloose/nerdtree&#39;<br>Plug &#39;Xuyuanp/nerdtree-git-plugin&#39;<br>Plug &#39;scrooloose/syntastic&#39;<br>Plug &#39;tpope/vim-surround&#39;<br>Plug &#39;bling/vim-airline&#39;<br>Plug &#39;morhetz/gruvbox&#39; &quot; Theme<br>Plug &#39;scrooloose/nerdcommenter&#39;<br>Plug &#39;jiangmiao/auto-pairs&#39;<br>Plug &#39;tpope/vim-fugitive&#39; &quot; Git Wrapper<br>Plug &#39;wesQ3/vim-windowswap&#39; &quot; Window swapper<br>Plug &#39;ryanoasis/vim-devicons&#39; &quot; Icons for NERDTree&quot;<br>Plug &#39;terryma/vim-smooth-scroll&#39;<br>call plug#end()</pre><h4>Breakdown</h4><p>The first line you’ll see is:</p><pre>call plug#begin(&#39;~/.config/nvim/bundle&#39;)</pre><p>This is how you start the section of your config file that tells Vim which plugins to load. The file-path &#39;~/.config/nvim/bundle&#39; is the default location for NeoVim. If you’re using regular Vim it will likely be:</p><pre>call plug#begin(&#39;~/.vim/plugged&#39;)</pre><p>Finally after all your plugins you call:</p><pre>call plug#end()</pre><p>This is the same for both NeoVim and Vim.</p><h4><strong>Installing Your Plugins</strong></h4><p>To use your new plugins you must first install them. This is an easy two-step process.</p><p>From your current Vim window run:</p><pre>:source &lt;path to your config file&gt;<br>//Default NeoVim<br>:source ~/.nvim/init.vim<br>//Default Vim8<br>:source ~/.vimrc</pre><p>This updates your current session with your newly saved config file.<br>Then run:</p><pre>:PlugInstall</pre><p>A new window will open and you’ll see the repos being cloned from GitHub. And that’s it! Vim-Plug handles it all for you that simply!</p><h4>Plugins I Use</h4><pre>Plug &#39;neoclide/coc.nvim&#39;, {&#39;branch&#39;: &#39;release&#39;}</pre><p>This is likely the most useful plugin of them all, <a href="https://github.com/neoclide/coc.nvim">coc.nvim</a>. Despite its unfortunate name, we’re very fortunate to have it! This plugin gives us the sweet, sweet IntelliSense that we’ve come to know and love in IDEs, and brings it to Vim.</p><p>CoC.nvim uses Microsoft’s language server protocol, so it should give you almost the exact experience as VS Code does, assuming you follow the install-guide correctly. Luckily coc.nvim is super-documented!</p><pre>Plug &#39;/usr/local/opt/fzf&#39;<br>Plug &#39;junegunn/fzf.vim&#39;</pre><p>These two go together as they’re sort of a special case. Fzf is a fuzzy finder that is not specific to Vim, so you may have used it before. It is ported into Vim by the likes of junegunn and his extension <a href="https://github.com/junegunn/fzf.vim">fzf.vim</a>. The first line is the path to your local instance of fzf, and the second line is the actual plugin. Check out the docs they’re superb.</p><pre>Plug &#39;scrooloose/nerdtree&#39;</pre><p>NERDTree is a great extension that gives the sort of file-tree directory you’re used to seeing at the left (usually) of your IDEs. It’s great if you can’t remember what your file is called, but you know where it is!</p><pre>Plug &#39;Xuyuanp/nerdtree-git-plugin&#39;</pre><p>You might be able to tell from the name… this plugin shows little icons to the left of the line corresponding to git changes. For example, if you add a line you’ll see a little green plus, remove a line you’ll see a little red minus, etc.</p><pre>Plug &#39;scrooloose/syntastic&#39;</pre><p>This is a great syntax checking plugin that has a scary amount of support for different languages. If your syntax is incorrect a little popup will tell you what might have gone wrong.</p><pre>Plug &#39;tpope/vim-surround&#39;</pre><p>I can’t tell you how useful I find this plugin. Besides coc.nvim it might be my most used plugin. It’s used to surround words or lines with things(?). It can also be used to change one type of thing to another (?). I’ll just show you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*Q1uZu3-MHrcwL1aMUsxxjA.gif" /></figure><p>See what I mean! You can find all the commands on <a href="https://github.com/tpope/vim-surround">vim-surround’s GitHub</a>.</p><pre>Plug &#39;bling/vim-airline&#39;</pre><p>This plugin gives you a nice little bar down by your command bar, like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*8FuifozftKr46ZcP5wDAHw.gif" /><figcaption><a href="https://github.com/vim-airline/vim-airline">Borrowed from vim-airline’s GitHub</a></figcaption></figure><pre>Plug &#39;morhetz/gruvbox&#39;</pre><p>This is the theme I use, and I think it’s super sweet.</p><pre>Plug &#39;scrooloose/nerdcommenter&#39;</pre><p>This allows you to comment out/in lines easily with the correctly denoted sign, based on the filetype you’re working in.</p><pre>Plug &#39;jiangmiao/auto-pairs&#39;</pre><p>This plugin auto-closes your “” and ‘’ and [] and {}. Basically anything that can be opened, it will auto-close.</p><pre>Plug &#39;tpope/vim-fugitive&#39;</pre><p>This useful plugin brings the power of Git into your Vim. I use it most often for git blame (I hate the term blame, let’s vote to switch it to git whomst-should-I-ask-about-this), and for viewing diffs.</p><pre>Plug &#39;wesQ3/vim-windowswap&#39;</pre><p>This is a nice one for re-arranging your different window-splits.</p><pre>Plug &#39;ryanoasis/vim-devicons&#39;</pre><p>This plugin is really a nice, little touch. But it’s the little things that count right?? It extends your NERDTree with little icons that correspond to the filetypes.</p><pre>Plug &#39;terryma/vim-smooth-scroll&#39;</pre><p>Finally we have another nice, little touch. This plugin provides smooth-scrolling for your vim commands. For example, if you do ctrl-f without the smooth-scroll I find it tough to track where I was exactly. This adds a little animation to it.</p><h4>Recap</h4><p>There you have it, folks. Those are all the plugins I use every day, with my Vim, as a full-time software engineer. I firmly believe with a setup like this (feel free to steal mine exactly, I’d be flattered), you can be just as, if not more, productive than with an IDE.</p><p>Full disclosure: some of these plugins are easier than others to get working. It’s been a while since I’ve configured them so I don’t recall the specific tricks. But if you’re trying to set up any of them and run into trouble, drop me a comment and I’d be happy to help you out!</p><h4>Up Next</h4><p>If you’ve been following along up to this post, you probably know all the foundations to start using Vim as your everyday IDE. Of course, it will take some sweat and perseverance to start feeling comfortable, but you’ll be surprised at home quickly it comes. My advice would be to give it two weeks of full immersion to start seeing some improvements.</p><p>As for next posts in this series. I’ll write sporadically on Vim, smaller subjects and tricks, when they come to me or if I learn something new and useful. But besides Vim I plan to post regularly on developer-related topics. So stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41e36aff346a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vim For Developers: Part 4 — Custom Configurations]]></title>
            <link>https://dbo1093.medium.com/vim-for-developers-part-4-custom-configurations-7f1db2f1ef3d?source=rss-879d8c967a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f1db2f1ef3d</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[David Ondrich]]></dc:creator>
            <pubDate>Fri, 17 Jul 2020 01:51:23 GMT</pubDate>
            <atom:updated>2021-01-11T21:04:54.630Z</atom:updated>
            <content:encoded><![CDATA[<h3>Vim For Developers: Part 4 — Custom Configurations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*fpMJqPNl7_iOcunbv2zfog.jpeg" /><figcaption>It’s a metaphor</figcaption></figure><blockquote>Check out the previous posts in this series if you haven’t already!<br><a href="https://medium.com/@dbo1093/vim-for-developers-part-0-why-vim-95e68dc5d3a1">Vim for Developers: Part 0 — Why Vim?</a><br><a href="https://medium.com/@dbo1093/vim-for-developers-part-1-the-basics-663619ca122a">Vim for Developers: Part 1 — The Basics</a><br><a href="https://medium.com/@dbo1093/vim-for-developers-part-2-advanced-basics-857c0dbda905"><em>Vim for Developers: Part 2 — Advanced Basics</em></a><em><br></em><a href="https://medium.com/swlh/vim-for-developers-part-3-advanced-vim-6055081751bd">Vim for Developers: Part 3 — Advanced Vim</a></blockquote><blockquote>TL;DR — If you’re somewhat familiar with NeoVim/Vim and you’re just looking for a badass config, you can check out my dotfiles <a href="https://github.com/d-ondrich/dotfiles">here</a>.</blockquote><h4>Making Vim Your Own</h4><p>We’ve covered a lot in this series so far. We’ve learned many commands, some you’ll learn to love more than others. And for every command we’ve seen, there are 10 more (maybe 100 more) out there waiting to be discovered.</p><p>Some things about Vim you might not love so much, and that’s okay! Some of the commands can feel like an arduous task, and for some the juice doesn’t feel worth the squeeze. Fear not!</p><p>Vim provides a way to customize almost any command, and the looks, and the feels of your Vim setup. Basically, you can customize anything and everything.</p><h4>init.vim or .vimrc</h4><p>These configuration files are found in two separate places for Vim and Neovim. One of the few differences between the programs.</p><p>For Vim the file can be found at:</p><pre>~/.vimrc</pre><p>And for NeoVim at:</p><pre>~/.config/nvim/init.vim</pre><p>If you navigate to the respective directory and don’t find the file it’s no big deal, just create your own with the correct name and it will be loaded when you start a new Vim session.</p><h4>Real World Config</h4><p>Like I said, there are endless customizations possible through your config file, and you’ll probably want to make your config your <em>own</em>. To get a gist of how you’d go about doing just that, I thought we’d walk through my own config (available on my <a href="https://github.com/d-ondrich/dotfiles">GitHub</a>).</p><p>I’m going to paste my config below, and walk through each line. However, I’m going to exclude all the lines concerning plugins, and most of the comments. We will get to plugins in the next post in this series. And away we go!</p><pre>&quot; ---------- Custom Hotkeys -<br>let mapleader = &quot;,&quot; &quot; map leader key as ,<br>:imap jj &lt;Esc&gt;<br>:nmap &lt;Space&gt;&lt;Space&gt; :<br>:nmap &lt;leader&gt;s :split&lt;Cr&gt;<br>:nmap &lt;leader&gt;vs :vsplit&lt;Cr&gt;</pre><pre>&quot; ---------- Terminal Controls ----<br>:nmap &lt;leader&gt;vt :vsplit term://zsh&lt;Cr&gt;<br>:nmap &lt;leader&gt;ht :split term://zsh&lt;Cr&gt;<br>:tnoremap jj &lt;C-\&gt;&lt;C-n&gt; &quot; Exit Insert Mode</pre><pre>&quot; ---------- Basics ---------<br>set encoding=utf8<br>set autoindent<br>set smartindent<br>set shiftwidth=4<br>set smarttab<br>set clipboard=unnamed<br>set number<br>set relativenumber<br>set incsearch &quot; jump to search match as typing<br>set nohlsearch &quot; don&#39;t highlight my searches<br>set ignorecase<br>set smartcase<br>set noswapfile<br>autocmd BufWritePre * %s/\s\+$//e &quot;Auto-remove trailing whitespace on save</pre><pre>&quot; ---------- Theme ---------<br>&quot; Display tabs and trailing spaces visually<br>set list listchars=tab:\ \ ,trail:·<br>syntax enable</pre><p>She’s a beaut.</p><pre>&quot; ---------- Custom Hotkeys -</pre><p>This is a comment to help organize the config file. Commented lines are preceded with a &quot;</p><pre>let mapleader = &quot;,&quot; &quot; map leader key as ,</pre><p>This might be the most important line in the config file. The <em>leader key</em> is a special key that you can use to prefix commands. It’s helpful since most of the usual key pairs (i.e. shift + a letter, or ctrl + a letter) already do something else. The leader acts as a way to expand the possible, yet simple, key bindings. I’ve chosen , because I like it 🤷‍♂ but there are other common ones, like ; or &#39; It’s usually a key you don’t have to access with the shift key.</p><pre>:imap jj &lt;Esc&gt;</pre><p>Here we see our first custom binding. :imap stands for Insert Mode map. Then it’s followed by the custom binding, in this case jj , then the key you’re mapping to, in this case &lt;Esc&gt; . Last-generation MacBook Pro users rejoice! We have an easier way to hit the Escape key. I chose jj because my finger is usually resting on the j and I rarely need to actually type jj in Insert Mode, but again whatever works for <em>your</em> fingers!</p><pre>:nmap &lt;Space&gt;&lt;Space&gt; :</pre><p>Similar to above but slightly different we see :nmap . You guessed it! Normal Mode map. Here I’m mapping spacebar x2 to : . This allows me to quickly enter commands.</p><pre>:nmap &lt;leader&gt;s :split&lt;Cr&gt;<br>:nmap &lt;leader&gt;vs :vsplit&lt;Cr&gt;</pre><p>Here we see the emergence of our leader key. That’s how you reference it: &lt;leader&gt; . These two commands split the pane in the Normal Mode. ,s for horizontal split, and ,vs for vertical split. Even your custom bindings should have mnemonics, unless you’re a raging lunatic.</p><pre>&quot; ---------- Terminal Controls ----<br>:nmap &lt;leader&gt;vt :vsplit term://zsh&lt;Cr&gt;<br>:nmap &lt;leader&gt;ht :split term://zsh&lt;Cr&gt;<br>:tnoremap jj &lt;C-\&gt;&lt;C-n&gt; &quot; Exit Insert Mode</pre><p>We haven’t discussed it but you can open a terminal session <em>in </em>Vim. Which is already <em>in</em> a terminal session. Woah. Meta. These commands split the window, much like you would do normally, but they start a Z shell session in that split. The benefits being you can use your Vim commands on the terminal window. Here I have :tnoremap which is <strong>t</strong>erminal Normal Mode map.</p><blockquote>These next settings usually differ between NeoVim and Vim. The functionality is generally the same, only the setting names differ. Just a heads up for the Vim folks.</blockquote><pre>set encoding=utf8</pre><p>Sets the encoding to utf-8 as you might have guessed.</p><pre>set autoindent</pre><p>Uses the same indent as the line above it.</p><pre>set smartindent</pre><p>Like autoindent but it can recognize some code syntax and automagically indent more/less/stay the same.</p><pre>set shiftwidth=4</pre><p>Sets the default “tab” to 4 spaces.</p><pre>set smarttab</pre><p>Tells your tab key to listen to shiftwidth</p><pre>set clipboard=unnamed</pre><p>This one is key!!! It tells Vim to use your system clipboard for copy/paste/cut</p><pre>set number</pre><p>Turns on line numbers. Cool.</p><pre>set relativenumber</pre><p>Turns on line numbers relative to your cursor. Very Cool.</p><pre>set incsearch</pre><p>Jumps to matching search terms while typing, however won’t move cursor there until you hit enter</p><pre>set nohlsearch</pre><p>Doesn’t keep searches highlighted. You may remember the :noh for clearing search highlights… this is that, but always.</p><pre>set ignorecase</pre><p>Ignores case in your search.</p><pre>set smartcase</pre><p>Includes case in your search if you use any caps.</p><pre>set noswapfile</pre><p>You might have noticed Vim creating .swp files. They hold changes that you’ve made to a buffer and allow you to recover those changes should you need. I’m a frequent saver and got tired of randomly committing .swp files to repos. This turns them off.</p><pre>autocmd BufWritePre * %s/\s\+$//e &quot;Auto-remove trailing whitespace on save</pre><p>This fancy little command I’m proud of. autocmd BufWritePre is an auto-command (a hook) that runs before a buffer is written (saved). The * is a glob for all buffer writes. %s/\s\+$//e is a regex that searches for trailing whitespace and removes it.</p><pre>set list listchars=tab:\ \ ,trail:·</pre><p>Sets trailing whitespace characters to little · characters, even though they’ll be removed by the previous autocmd</p><pre>syntax enable</pre><p>Finally, this enables syntax highlighting, usually paired with a theme.</p><h4>There You Have It</h4><p>That’s all folks! The point of this post really wasn’t to make you fluent in the language of Vim config files. Trust me, you’ll need to look up how to do most things for a long time, and always.</p><p>The point of this post was really to show you what kind of customizations you can achieve through the config file, and some common changes people do to make their Vim experience 10x.</p><p>One thing you’ll notice about my config file, especially if you’ve checked out some others floating around the web, is that it’s <em>tiny. </em>Granted, I omitted the plugins, but still by Vim config file standards this is small. It’s important to remember that while you certainly <em>can</em> change anything and everything in Vim, it doesn’t necessarily mean you <em>should.</em></p><p>Why’s that? It goes back to Vim’s real benefit being its ubiquity. You can really only take full advantage of that if you become a master at vanilla Vim commands. Sure you’ll usually have you dotfiles just a git clone away, but not <em>always. </em>Don’t go config-crazy and forget where you came from!</p><h3>Up Next</h3><p>Coming up next we’re going to kick Vim into full IDE-mode and learn all about extending functionality with plugins.</p><h4><a href="https://medium.com/@dbo1093/vim-for-developers-part-5-plugins-41e36aff346a">Vim For Developers: Part 5 — Plugins</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f1db2f1ef3d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vim for Developers: Part 3— Advanced Vim]]></title>
            <link>https://medium.com/swlh/vim-for-developers-part-3-advanced-vim-6055081751bd?source=rss-879d8c967a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/6055081751bd</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[David Ondrich]]></dc:creator>
            <pubDate>Sat, 04 Jul 2020 14:57:45 GMT</pubDate>
            <atom:updated>2021-01-11T20:55:57.484Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*bcePqIQxesOf6KlEjNk3og.jpeg" /><figcaption>How You’ll Look and Feel After This</figcaption></figure><blockquote><em>Check out the previous posts in this series if you haven’t already!<br></em><a href="https://medium.com/@dbo1093/vim-for-developers-part-0-why-vim-95e68dc5d3a1"><em>Vim for Developers: Part 0 — Why Vim?</em></a><em><br></em><a href="https://medium.com/@dbo1093/vim-for-developers-part-1-the-basics-663619ca122a"><em>Vim for Developers: Part 1 — The Basics</em></a><em><br></em><a href="https://medium.com/@dbo1093/vim-for-developers-part-2-advanced-basics-857c0dbda905">Vim for Developers: Part 2 — Advanced Basics</a></blockquote><blockquote><em>TL;DR — If you’re somewhat familiar with NeoVim/Vim and you’re just looking for a badass config, you can check out my dotfiles </em><a href="https://github.com/d-ondrich/dotfiles"><em>here</em></a><em>.</em></blockquote><h4>Taking It to the Next Level</h4><p>By now hopefully you’ve read the previous posts and you’re hopping about text files, sans mouse and arrow-keys, with ease.</p><p>But what about really using Vim to code? Projects usually have more than one file. How can we really start working with a bunch of different files and directories as efficiently as we do with a standard IDE? I’m glad you asked! Let’s find out.</p><h4>Words of Encouragement</h4><p>Before we go on I wanted to say that some of the things you’ll see in this post will be slightly cumbersome. At some point you’ll probably think to yourself “This is <em>not</em> better than an IDE, why bother?” I want to promise you that when we get into plugins, many of these things will get much, <em>much</em> easier. But before that I think it’s important to learn what’s really going on under the hood in Vim, so you have an idea of what your plugins are actually doing. Plus when your PagerDuty goes off in the middle of the night, and you’re SSH-ing into some Linux server, you’ll want to be proficient in plain ‘ole vanilla Vim. You won’t have time to clone your dotfiles.</p><p>With that in mind hang in there! Some things will be tough because they’re new. Some things will be tough because they’re tough, but <em>will</em> get better once we get plugins involved. Either way if you stick with it you’ll look back on things you thought were annoying, and think <em>“how did ever I live without that?”</em></p><h4>Windows</h4><p>You’re probably used to working in your IDE with many tabs open. Each tab is a file in the project you’re working in. If you’re anything like I used to be, by lunchtime you have so many tabs open you can’t even see the names of the files anymore. To find the one you’re looking for you’ll probably elect to search for it in the search feature, rather than click through each file.</p><p>You’ve also probably noticed that Vim doesn’t have this sort of “tab” feature. So how do you know what files have been opened, or what files are even in your current directory?</p><p>Before we get into that we must touch on windows. A window is what you’re actually looking at when you open Vim in your terminal. When you open a new file in Vim you’re looking at a blank window.</p><p>A handy move in IDEs is often to split the current file you’re working with in half, so you can look at two different parts of it at the same time. Or, to have two different files open side-by-side. Let’s see how to accomplish that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d-3M-7xuB5FkGOvT-D9t-w.gif" /><figcaption>Splitting Window, Jumping Between Windows, Closing Window</figcaption></figure><p>So what happened in the GIF above. As you can see my cursor is navigating around the Vim tutor file. I split the pane horizontally with the command:</p><pre>:split</pre><p>Alternatively, you can split the pane vertically with the command:</p><pre>:vsplit</pre><p>Makes sense. Then to hop the cursor between the two windows you use:</p><pre>ctrl + w (x2)</pre><p>I then closed the bottom window with the command :q which we covered in previous posts. And yes you can split the splits and so on and so forth to your heart’s desire.</p><p>When you have a bunch of splits it may feel be annoying to constantly ctrl + w to keep jumping to the next pane. But have no fear! Just as you can navigate your cursor normally with hjkl you can navigate your cursor jumps!</p><pre>ctrl + w  + h (or) j (or) k (or) l</pre><p>The above command will jump in the respective direction of the hjkl you choose.</p><p>Finally, you may want to resize your various split windows. The following commands will help you with that:</p><pre>ctrl + w + +/- :increase/decrease height<br>ctrl + w + &gt;/&lt; :increase/decrease width<br>ctrl + w + _   :set height<br>ctrl + w + |   :set width</pre><p>All the above commands can be multiplied, for example:</p><pre>10 + ctrl + w + &gt;</pre><p>will expand the current split 10 columns to the right. And with the set height/width command the number you multiply the command by is the height/width you will set.</p><h4>Buffers</h4><p>Now for the good stuff. I bet you’re thinking to yourself “okay I <em>still</em> <em>only</em> know how to work with one file at a time”. That ends now.</p><p>If you’re familiar with buffers in the programming sense, that’s exactly what they are in Vim. When you open a file it creates a buffer to that file, and the data is displayed in your window.</p><p>If you’re not familiar with buffers, then think about in your current IDE. When you have a bunch of files open, and all their tabs are at the top of your IDE, each one of those would be considered a buffer. But Vim doesn’t have those tabs, it has a different way to manage the buffers (files) that you open.</p><p>Let’s walk through a fake-real-life workflow. In GIF form!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-pE6HYez228d6JqKD1D4kQ.gif" /></figure><p>In the GIF above I start out by opening Vim without any arguments, so it opens a blank window in my current directory which is vim_examples . Then to check what files are in the directory I use the command:</p><pre>:E - e for explore perhaps? get creative they&#39;re your mnemonics!</pre><p>As you can see that opens up a menu of sorts that shows any files or directories in your current directory. You might notice there’s a bunch of stuff above the line of ===== ignore it for now (but let me tell you that’s a damn feature-packed menu you’re looking at).</p><p>You can move up and down in the menu with your trusty jk keys, and you can even traverse upwards through directories by selecting the .. menu option. To select from the menu you hit enter/return as you may have guessed.</p><p>Now you’ve opened a buffer! In this case to a file called text_file_1.txt . What might we do next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PFRkO398DZAkZP7JqqpYiA.gif" /></figure><p>A lot happened in the above GIF so let’s step through it. From my original buffer text_file_1.txt I used the :E command to check out the other files, and I opened up a new buffer text_file_2.txt .</p><p>What happened to the buffer for text_file_1.txt ? I switched to a new buffer, but I didn’t explicitly close the original one. And it’s not closed!</p><pre>:ls - list open buffers</pre><p>If you’re familiar with *nix terminals this probably looks familiar to you. The trusty :ls command allows us to see a list of open buffers. Unfortunately, you can’t just select a buffer from that list, you’ll notice it prompts you for another command. In this case I go to the next buffer in the list with:</p><pre>:bn - buffer next</pre><p>I then go back to the previous buffer with:</p><pre>:bp - buffer previous</pre><p>You might have also noticed each buffer has a number next to it. If you have many open buffers it might be annoying to cycle through with :bn and :bp . A useful command is:</p><pre>:bN</pre><p>where N in this case refers to the number of the buffer. It will take you right to that buffer!</p><p>Let me stress that this is something specifically that will get exponentially easier with plugins.</p><h4>Windows + Buffers</h4><p>Continuing with our fake-real-life workflow. Let’s say I want to split my window and work with two buffers at once. Let’s see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ATC1lH787pwRk6P7AqA0ig.gif" /><figcaption>Opening two buffers horizontally</figcaption></figure><p>To start out I’m looking at buffer for text_file_1.txt, with the trusty :ls command I see I also want to open text_file_2.txt , to open it and split my window horizontally I used the command:</p><pre>:sbuffer 3 - split buffer 3(the number of the buffer from menu)</pre><p>I then hopped my cursor to the original buffer and closed it with :q . It’s important to note this doesn’t actually close the buffer, it closes the split window. If you :ls you will still see that buffer in the list.</p><p>How might you split the window vertically?</p><pre>:vert sb N - vertical split buffer N (buffer number)</pre><p>N in this case is the number of the buffer from the :ls menu.</p><p>Again, I want to stress I know this is cumbersome. Soon enough we’ll see ways to make buffer and pane management much simpler.</p><h4>Macros</h4><p>Remember the dot operator from P<a href="https://medium.com/@dbo1093/vim-for-developers-part-2-advanced-basics-857c0dbda905">ost 2</a>. You might have noticed that the dot operator only works for repeating the very last thing you did. But what if you want to repeat a few commands together. That’s where macros come in, and let me be the first to tell you, they kick ass.</p><p>Macros record a series of commands/movements and allow you to save them to a register. You can save up to 26 macros at any one time. One for each letter of the alphabet.</p><p>Macros are super useful for applying the same series of commands on different texts, and they absolutely crush repetitive tasks.</p><p>Perhaps you’re working in python and have a list of labels, and want to create an enum for them.</p><pre>LABEL_1<br>LABEL_2<br>LABEL_3</pre><p>The layperson would probably have to select each word, copy it, type = , type &quot;&quot; , then paste the word. I lost count of the keystrokes there, probably a million if I had to guess. THEN YOU HAVE TO DO IT AGAIN FOR EACH LABEL. And you’re probably using the mouse too. Yikes. All to get this:</p><pre><strong>class</strong> <strong>Labels</strong>(Enum):<br>    LABEL_1 = &quot;LABEL_1&quot;<br>    LABEL_2 = &quot;LABEL_2&quot;<br>    LABEL_3 = &quot;LABEL_3&quot;</pre><p>Let’s see how using macros can save some time, some keystrokes, and depending on the task, some sanity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JyK7BFZz_iVPa_PZepFzBg.gif" /><figcaption>Macros being awesome</figcaption></figure><p>To start recording a macro you hit:</p><pre>q + &lt;letter&gt;</pre><p>Like I said you can save up to 26 macros using a different letter for each. In this case I chose q and you can see at the bottom of Vim it says:</p><pre>recording @q</pre><p>This means whatever commands you enter are being saved in the macro. What keystrokes did I save? It was:</p><pre>^ - jump to the start of the line<br>yw - yank word (copy word)<br>A - append (enter Insert Mode) at end of line<br>--in Insert Mode I typed --<br>= &quot;&quot;<br>esc - exit Insert Mode to Normal Mode<br>p - put/paste (the word I had yanked)<br>q - to stop recording macro (always `q` regardless of which letter you&#39;re recording to)</pre><p>Wow, she’s beautiful. Brings a tear to my eye.</p><p>And once it’s saved you run this magical macro with:</p><pre>@q — @ runs a macro, q was the letter I saved it under</pre><p>Pretty easy right? With macros you’re really only limited by your own ingenuity.</p><p>The only thing to point out about the macro I made, and with using them in most situations, is to keep them “general”. What do I mean by that? Check out the first command in the macro:</p><pre>^ - jump to the start of the line</pre><p>That’s actually super important because when you j down to the next line, without ^ if you yw you’ll only yank the last character since that’s where your cursor lies. Also the A command to append at the end of the line, regardless of the line length. In this case, all the lines have the same number of characters, so if you l to the end then i it would still work in <em>this</em> case, but not every case.</p><p>Like I said above the only limit to macros is what you can dream up!</p><h4>Searching</h4><p>We covered that you search with:</p><pre>/&lt;search term&gt;</pre><p>then you cycle through the matches with n</p><p>Okay you’ve found what you’re looking for, how to remove the highlighting?</p><pre>:noh - no highlight</pre><p>A common refactoring move may be to search and replace all the terms in a file. This would look like:</p><pre>:%s/&lt;search term&gt;/&lt;replace term&gt;/g</pre><p>This is really an augmented s — substitute command, but it’s within the search realm. Also since Vim is the best in the business you can search and replace within a specified range of lines:</p><pre>:&lt;start line&gt;,&lt;end line&gt;s/&lt;search term&gt;/&lt;replace term&gt;/g</pre><p>That’s a nice little move I legitimately haven’t come across in any IDEs.</p><h4>Vim Mastery</h4><p>This post was long and covered a bunch. I’ll be frank with you. You now know a lot of Vim, but also no Vim. This thing is feature-packed to the brim. By now we’ve covered the core-concepts of vanilla Vim. Like I’ve said many times, a lot of these things will get simpler/abstracted away with the use of plugins. But where would we be without the fundamentals?</p><h4>Coming Up</h4><p>Next, we’ll touch on customizing your Vim to your liking using the init.vim file (or .vimrc if you’re choosing not to use NeoVim). We’ll be able to change keybindings, change the look and feel of your Vim setup, and really start making it your own. It’s going to be epic.</p><p><a href="https://medium.com/@dbo1093/vim-for-developers-part-4-custom-configurations-7f1db2f1ef3d">Vim For Developers: Part 4 — Custom Configurations</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6055081751bd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/vim-for-developers-part-3-advanced-vim-6055081751bd">Vim for Developers: Part 3— Advanced Vim</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vim for Developers: Part 2 — Advanced Basics]]></title>
            <link>https://medium.com/swlh/vim-for-developers-part-2-advanced-basics-857c0dbda905?source=rss-879d8c967a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/857c0dbda905</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[David Ondrich]]></dc:creator>
            <pubDate>Wed, 01 Jul 2020 02:43:43 GMT</pubDate>
            <atom:updated>2021-01-11T20:57:49.299Z</atom:updated>
            <content:encoded><![CDATA[<h3>Vim for Developers: Part 2 — Advanced Basics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*Hwo4RkTkyphmQ5NhdxFXwA.jpeg" /><figcaption>Did You?</figcaption></figure><blockquote>Check out the previous posts in this series if you haven’t already!<br><a href="https://medium.com/@dbo1093/vim-for-developers-part-0-why-vim-95e68dc5d3a1">Vim for Developers: Part 0 — Why Vim?</a> <br><a href="https://medium.com/@dbo1093/vim-for-developers-part-1-the-basics-663619ca122a">Vim for Developers: Part 1 — The Basics</a></blockquote><blockquote>TL;DR — If you’re somewhat familiar with NeoVim/Vim and you’re just looking for a badass config, you can check out my dotfiles <a href="https://github.com/d-ondrich/dotfiles">here</a>.</blockquote><h4>Advanced Basics</h4><p>An oxymoron as a title?? These are un-chartered waters. Hopefully by now you’ve checked out <a href="https://medium.com/@dbo1093/vim-for-developers-part-1-the-basics-663619ca122a">Part 1</a> of this series and learned the very basic Vim commands.</p><p>The reason I’m calling this post advanced basics is everything I’m going to teach you is plain-old vanilla Vim. No extensions or nothing. But these are slightly more complicated commands and use-cases, and rely on a working knowledge of the material outlined in <a href="https://medium.com/@dbo1093/vim-for-developers-part-1-the-basics-663619ca122a">Part 1</a>.</p><p>So without further ado, let’s get this Vim-party started.</p><h4>Pairing Commands</h4><p>To be frank with you, I’m not really sure if the real Vim-term for this is called <em>pairing</em>. You could probably call it <em>combining</em>, and I wouldn’t be surprised if there was an official word for it. The bottom line is we’re putting multiple different commands together to perform some enhanced functionality.</p><blockquote>The Whole is Greater than the Sum of its Parts <br>— Aristotle <br> —Myself (on Vim)</blockquote><p>So, let’s say that your cursor is on the start of a word and you want to delete it, but remain in Normal Mode. Before you answer, remember the mnemonics. Speak the Vim-grammar.</p><p>d — delete we learned d will delete and remain in Normal Mode.</p><p>w — word we learned w will jump the cursor to the next word.</p><p>You guessed it…</p><p>dw — delete word it really works just that simple. Isn’t Vim freakin’ epic.</p><p>You might have noticed that dw deletes the word and the space after it. I’ve found this is usually what I want to do. However, let’s say you just want to <em>delete </em>until the <em>end</em> of the word, and keep the space. (See what I did there in italics)</p><p>de — delete to end of word We learned e jumps the cursor to the end of the current word, so de deletes to the end of the word!</p><p>What about if you’re in the middle of a line and want to delete everything backwards, to the first character in the line?</p><p>d^ — deletes everything to the first character in the line</p><p>You see how there’s real logic to everything? The mysticism of Vim is starting to unravel. And guess what? If you want to do all these these commands, but enter Insert Mode after… just substitute c for d since c — change enters into Insert Mode.</p><p>There’s endless combinations like this, and even to this day I find myself discovering new ones. Let’s see some slightly more exotic, and more magical ones.</p><pre>// Example JS Code<br>const printHello = () =&gt; {<br>    console.log(&quot;Hello!&quot;);<br>};</pre><p>Let’s say you have the Javascript function above and you want to <em>change</em> what’s <em>inside</em> of the <em>“”. </em>The command would be:</p><p>ci&quot; — change inside &quot; Yup. I know.</p><p>You can perform this if your cursor is on either &quot; or anywhere between the &quot;&quot; . And guess what? It doesn’t even stop at &quot;&quot; . Imagine you decide you want to change everything inside the function:</p><p>ci{ — change inside {<br>ci} — change inside }</p><p>Both will do the same thing if your cursor is on either {} or anywhere between them. This is when things start going from 0 to 100 in your coding efficiency.</p><p>The possibilities with these pairings, I presume, are nearly endless. When you’re going about your Vim-business and wonder <em>“hmmm I wonder if I can delete everything to the </em><em>s in this line?”</em></p><p>dts — delete to/towards s</p><p>The answer is yes, yes you can. Just keep using Vim and these will become second-nature soon enough. It always brightens my day when I discover a new pairing I never knew about.</p><h4>Marks</h4><p>Now that we’ve covered pairing commands, it seems like a good time to introduce marks. Remember that marks allow you to place a marker in a specific location in a file.</p><p>The example I gave in the previous post was, if you’re working in a massive file and find yourself constantly returning to the same place, you can set your mark to help you get back there easily.</p><p>You set a mark by typing m&lt;some letter&gt; . You can set up to 26 marks because you can use all 26 letters as a different mark. I usually find myself using mm because it’s easy to type the same letter twice, and I rarely set more than one mark per file.</p><p>But how do you get back to the mark you just set? Another pairing of course! If you set mm then from anywhere in the file you’d type:</p><p>j&#39;m — jump to m — another perfect mnemonic command pairing!</p><p>The fun doesn’t stop here. Just like all the other pairings we saw you can use just about any command with &#39;m . Let’s say you have a big block of code you want to <em>delete. </em>You could just set you m mark at the end of the block and hit:</p><p>d&#39;m — delete to mark m</p><p>Amazing and amazingly useful. I generally use those two examples the most, but the possibilities are endless.</p><h4>Multiplying Commands</h4><p>Again, there might be a more correct Vim-term for this, but you’ll get the point nonetheless.</p><p>Let’s say you want to yank (copy) the line you’re on, plus the two underneath it, then put (paste) it somewhere. Well it’s time for some Vim-math.</p><p>yy — yanks entire line that your cursor is currently on.</p><p>So really you just want to yy three times. You guessed it.</p><p>3yy — yanks entire line x 3</p><p>Then wherever you want to put the lines simply p .</p><p>This type of command multiplying is especially useful when using the hjkl navigation keys. If you want to edit a line 10 down from your current position: 10j and boom you’re ready to rock and roll.</p><h4>Dot Operator</h4><p>Okay you just learned a bunch of super cools commands. Let’s say you nailed an awesome command, but realize you’ll need to do it a few times.</p><pre>// Example JS Class<br>class Example {<br>    static printHello() {<br>        console.log(&quot;Hello&quot;);<br>    }</pre><pre>    static printBye() {<br>        console.log(&quot;Bye&quot;);<br>    }<br>}</pre><p>For example you have the class above and you want to <em>delete </em>everything <em>inside </em>the printHello method. You learned that you can quickly do this with di{ or di} . But let’s say you want to do the same with the printBye method too. It’s easy enough to jump down and hit di{ again, but there’s got to be a better way because this is Vim and there’s always a better way!</p><p>. — remembers you last command and repeats it</p><p>So if you hop down to printBye and hit . presto! You’ve saved two keystrokes, and trust me those keystrokes add up.</p><p>The dot operator makes mince-meat of repetitive tasks and will come to be one of your closest friends.</p><h4>Visual Mode</h4><p>We talked previously about Visual Mode. It’s mostly used to highlight blocks of text, and then perform a command on the entire block. For example, you highlight a block and delete the entire thing. To enter Visual Mode:</p><p>v — Visual Mode</p><p>You’ll notice after you hit v if you move your cursor with hjkl you’ll start highlighting text. You can then perform commands on this highlighted text. For example if you typed:</p><p>vjjjd — you would see that you’ve entered Visual Mode, highlighted down three lines, and deleted them. And, just like all the other commands we’ve seen you can pair v with almost anything. Example:</p><p>ve — visual mode hightlights to end of word</p><h4>%</h4><p>% — jump to closing pair i.e. (), {}, []</p><p>I didn’t include this command in the previous piece because I don’t think it’s necessarily a critical command, but it kind of is for development work. This command will jump from one opening bracket or parentheses , to its closing counterpart, and vice versa. I use it constantly, especially if you’re working with large JSONs, or much-too-long classes. It’s the best.</p><h4>Miscellaneous Commands</h4><p>Here are some miscellaneous commands you might find useful as you start getting more proficient with Vim.</p><p>ctrl + o — this is a magical commands that remembers where your cursor has been, and jumps you back to those place.<strong> Trust me this is SUPER USEFUL.</strong></p><p>ctrl — i — this undoes ctrl+o and is also <strong>SUPER USEFUL.</strong></p><p>ctrl + f — full — jumps your cursor down a <em>full </em>“page”</p><p>ctrl + b — back-up — jumps you cursor <em>back</em> up a full “page”</p><p>ctrl + d — down — jumps cursor <em>down</em> a half “page”</p><p>ctrl + u — up — jumps cursor <em>up</em> a half “page”</p><p>H — high— jumps cursor to <em>highest </em>(top)<em> </em>line of the “page”</p><p>M — middle — jumps cursor to <em>middle</em> line of the “page”</p><p>L — last— jumps cursor to <em>last </em>line of the “page”</p><p>zz — ??? — moves line that cursor is on to the middle of the “page”. No mnemonic, but you’ll remember it because it’s so useful.</p><p>&gt; — indent line — will indent a line <strong>while in Visual Mode</strong>. Will work on blocks on highlighted text too.</p><p>&lt; — dedent line — will dedent a line <strong>while in Visual Mode. </strong>Will work on blocks on highlighted text too. Will also work in Normal Mode if you press it twice.</p><h3>Coming Up</h3><p>Continue on your journey to Vim-stardom with the next post in this series:</p><ul><li><a href="https://medium.com/@dbo1093/vim-for-developers-part-3-advanced-vim-6055081751bd">Vim for Developers: Part 3 — Advanced Vim</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=857c0dbda905" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/vim-for-developers-part-2-advanced-basics-857c0dbda905">Vim for Developers: Part 2 — Advanced Basics</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vim for Developers: Part 1 — The Basics]]></title>
            <link>https://medium.com/analytics-vidhya/vim-for-developers-part-1-the-basics-663619ca122a?source=rss-879d8c967a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/663619ca122a</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[David Ondrich]]></dc:creator>
            <pubDate>Tue, 30 Jun 2020 17:27:25 GMT</pubDate>
            <atom:updated>2020-10-25T21:02:35.196Z</atom:updated>
            <content:encoded><![CDATA[<h3>Vim for Developers: Part 1 — The Basics</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*vzWtjD2P4hlFGQ-JO_pNFA.jpeg" /></figure><blockquote>Check out <a href="https://medium.com/@dbo1093/vim-for-developers-part-0-why-vim-95e68dc5d3a1">Part 0 of this series</a> if you haven’t already! It will tell you what you can expect from these posts.</blockquote><blockquote>TL;DR — If you’re somewhat familiar with NeoVim/Vim and you’re just looking for a badass config, you can check out my dotfiles <a href="https://github.com/d-ondrich/dotfiles/tree/master">here</a>.</blockquote><h4>The Basics</h4><p>This post will walk you through the very most basic functionalities of Vim. These are the fundamentals and are important to master before moving onto more complicated use-cases.</p><h4>Installing NeoVim</h4><p>Installing NeoVim is very simple and well-documented. You can find the details, by operating system, <a href="https://github.com/neovim/neovim/wiki/Installing-Neovim">here</a>. I’m a Mac user and installing it was as simple as:</p><pre>brew install neovim</pre><p>and voila! We’ve done it!</p><h4>Modes</h4><p>Before we go ahead and open Vim up for her maiden voyage we must talk about modes. Modes, in my opinion, are the real genius of Vim, especially for coding purposes. There are a number of Modes in Vim, but I’ll highlight the most important (you’ll use them 99.9% of the time) ones below.</p><p>It’s well known that code is read more than it is written and/or changed. So why then are most IDEs always in “edit” mode. That is, when you type letters on your keyboard they are spit out wherever your cursor currently happens to be.</p><p>Not in Vim. In Vim when you fire it up you’ll find yourself in something called Normal Mode.</p><h4>Normal Mode</h4><p>This is where you’ll spend most of your time. This is where you will read code and navigate files. Since in Normal Mode you aren’t editing text, we are now free to use all the keys on the keyboard to navigate text. This is Vim’s secret-sauce. More about navigating below.</p><h4>Insert Mode</h4><p>Insert Mode is entered whenever you’re ready to edit text. There are a few ways to enter Insert Mode which we’ll walk through later in this post. The main thing to remember is you’ll only want to enter Insert Mode when you want to change text, and you’ll want to leave it as soon as you’re finished editing. This is because you lose your ability to navigate efficiently whilst in Insert Mode.</p><h4>Visual Mode</h4><p>Visual Mode is probably used a little less than the first two modes mentioned, but can still be extremely useful. It’s mostly used to highlight blocks of text, and then perform a command on the entire block. For example, you maybe highlight a block and indent the entire thing.</p><h4>Command Mode</h4><p>Commands are essential for Vim, and will be used heavily, especially when we get to plugins. Commands, as we’ll see, make Vim <em>do</em> something. To enter a command you simply type : while in Normal Mode and then the command.</p><h4>Opening NeoVim</h4><p>Once you’ve got NeoVim installed you can launch it by typing:</p><pre>nvim</pre><p>I’ve aliased it in my terminal (I use iTerm2 and Z shell btw):</p><pre>alias n=&quot;nvim&quot;</pre><p>Then you can launch NeoVim by simply typing n in your terminal. Imagine that?? One character and <em>BOOM </em>your (soon-to-be) IDE is good to go. You’ll notice that Vim launches near instantaneously. That’s a user-experience that just can’t be matched by IntelliJ, or even VS Code which is much lighter and speedier than IntelliJ.</p><p>To open a file in Vim, it’s as easy as putting the file name (or path to the file) after the command. For example:</p><pre>nvim my_file.txt</pre><p>If you omit a filename Vim will open up in whatever your present working directory is, but you won’t see anything just yet.</p><h4>Closing Vim</h4><p>There’s an old adage:</p><blockquote>How do you make a random-string generator? <br>Open Vim and ask a non-Vim user to close it.</blockquote><p>Or something like that. It’s true though, Vim doesn’t close like most programs because it runs <em>inside</em> your terminal. You don’t want to close your terminal just to exit Vim. So how do you do it? Simply type…</p><pre>:q</pre><p>Simple sure, but still a little strange. Let’s break it down.</p><pre>:</pre><p>The colon will become very familiar to you while using Vim. Typing : brings you into Command Mode, from Normal Mode, as we learned above. It can be a little cumbersome to always be typing : because you have to Shift+; but we’ll get to a workaround later.</p><pre>q</pre><p>This is your first lesson in mnemonics. You can remember q: quit and with that…</p><h4>Mnemonics</h4><p>Mnemonics are the key to learning the Vim-grammar. From the outside it looks like knowing Vim is just memorizing a bunch of hotkeys. <em>Nope</em>. It’s really speaking the language of hotkeys, using mnemonics. In the next section you’ll see that almost all commands have a mnemonic, and it makes them 1000x easier to remember.</p><h4>Navigation Commands</h4><p>These commands will all be used in Normal Mode to help you navigate files efficiently. They take practice, but soon you’ll find yourself loving them, and missing them when you’re Vim-less.</p><pre>h - cursor left 1 character<br>j - cursor down 1 line<br>k - cursor up 1 line<br>l - cursor right 1 character</pre><p>These are the very basis of Vim. Goodbye arrow-keys, and more importantly goodbye mouse. The most genius feature of Vim is you don’t need to move your hand from the main typing position to navigate. This accounts for 50% of Vim’s speed right off the bat. Practice, practice, practice them. Really. Don’t touch those arrow-keys (some people even disable them, we’ll cover it), and definitely do not reach for your mouse.</p><p>Now let’s go through the entire alphabet. Some of these I use more than others. You’ll find which ones resonate with you.</p><p>a — append — brings you from Normal to Insert mode and places your cursor after the character it’s currently on.</p><p>A — append at end EOL — brings you from Normal to Insert mode <em>BUT</em> it places your cursor at the <em>end</em> of the current line.</p><p>b — back — moves your cursor back an entire word.</p><p>c — change — change is often paired with other commands, we’ll get to pairing in a later post.</p><p>d — delete — as the name suggests, however this too, like c , needs to be paired. For example: dd — deletes the entire line you’re currently on.</p><p>e — end (of word) — jumps cursor to last character of current/next word.</p><p>f — find — is paired with a character and will jump cursor to the next instance of the character in the current line. For example: fa will jump to the next a in the line. If there is no such character the cursor will not move.</p><p>g — go — another pairing command. Two common and useful examples are:<br>gg — jumps cursor to first top of the current file.<br>G — jumps cursor to bottom of the file.</p><p>i — insert — most common way to enter Insert Mode. It enters directly when your cursor is.<br>I — insert at end of line — enters Insert Mode at beginning of the current line.</p><p>m — mark — marks are a very useful trick in Vim. I will cover them in the next post about pairing commands.</p><p>n — next (occurrence of a search-term) — when searching a file if there’s more than one match, this will bring you to the next match (and cycle through them).</p><p>o — open — creates a blank, new line under the current line, enters Insert Mode, and places the cursor at the start of the new line.</p><p>p — put or paste — pastes whatever is in clipboard.</p><p>q — honestly idk a good mnemonic for this — how you record macros, which are hugely useful. We’ll cover them in the next post.</p><p>r — replace — this commands is paired with a letter, and will replace the character you’re currently on with that letter. For example typing rb will replace the current character with a b .</p><p>s — substitute — deletes the character the cursor is currently on, and enters Insert Mode.</p><p>t — to or towards — t combined with a letter will place the cursor directly in front of the next occurrence of that letter in the line. If there is no such character the cursor will not move.</p><p>u — undo — un-does the last command.</p><p>v — visual — enters Visual Mode.</p><p>w — word — jumps cursor forward an entire word.</p><p>x — cross-out — deletes the character the cursor is currently on, but stays in Normal Mode.</p><p>y — yank — essentially this is the copy command</p><p>z — fold — bad mnemonic, we’ll covers folds later, they aren’t critical to know just yet.</p><p>Woohooo! Now you know the Vim-bc’s and you’re ready to conquer the world. I just want to touch on a few more things to know which don’t fall into the alphabet.</p><p>0 — 0mg I&#39;m at the beginning of the line — bad mnemonic again, my apologies. But, this commands jumps your cursor to the very start of the current line.</p><p>^ — just remember this — jumps your cursor to the first character in the line. I’ve found I use this more than 0 but they both have their moments.</p><p>$ — also remember this — jumps your cursor to the end of the line.</p><p>/ — search within a file — typing forward-slash plus your search-term, then hitting enter/return will search within the file. If there are multiple occurrences you can cycle through them by hitting n — next</p><p>esc — escape insert mode — brings you from Insert Mode to Normal Mode.</p><p>ctrl + [ — also brings you from Insert Mode to Normal Mode.</p><h4>Practice</h4><p>That was a lot all at once, and the only way to get it down-pat is to practice. My tip is to start small. Don’t try using Vim at work all at once. But perhaps you have a quick task that requires a small refactor, such as renaming some variables or functions. That’s a great way to start, with some true text-editing tasks.</p><h4>Vimtutor</h4><p>If you’re really looking to maximize you Vim-ninja skills I recommend checking out the tutor. You can access it in NeoVim with the command :Tutor you can also access the Vim version from your terminal by simply typing vimtutor. The tutor will open a text-file with <em>TONS</em> of information about commands, and a series of challenges, i.e. go to line X and delete word Y. Check it out!</p><h4>Disclaimer</h4><p>Vim has endless functionality, and this just scratches the surface. It’s a jumping-off point. If you run into something you think you need that’s not on the list, drop me a comment and I’ll help you out!</p><h3><strong>Up Next in the Series:</strong></h3><p><a href="https://medium.com/@dbo1093/vim-for-developers-part-2-advanced-basics-857c0dbda905">Vim for Developers: Part 2 — Advanced Basics</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=663619ca122a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/vim-for-developers-part-1-the-basics-663619ca122a">Vim for Developers: Part 1 — The Basics</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vim for Developers: Part 0 — Why Vim?]]></title>
            <link>https://levelup.gitconnected.com/vim-for-developers-part-0-why-vim-95e68dc5d3a1?source=rss-879d8c967a93------2</link>
            <guid isPermaLink="false">https://medium.com/p/95e68dc5d3a1</guid>
            <category><![CDATA[vim]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[neovim]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[David Ondrich]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 00:10:18 GMT</pubDate>
            <atom:updated>2021-01-12T03:04:21.894Z</atom:updated>
            <content:encoded><![CDATA[<h3>Vim for Developers: Part 0 — Why Vim?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*5xyiEYh7sxvjVcZkVJawGg.gif" /></figure><blockquote>**Note: I will be using NeoVim for this series. I address why below. But <strong>99.99% of everything I cover will work exactly the same in Vim8</strong>. So, if you’d prefer to use Vim8 you can still learn a lot! From here on out I will use Vim and NeoVim interchangeably, unless noting differences.</blockquote><h4>What is Vim?</h4><p>Once I, a dog-lover, was talking to my friend, a cat-lover, about cats and their general disdain for humanity. That’s when he said something I’ll never forget. “The thing you don’t understand about cats is they’re not dogs”. Woah. Profound. What he meant was if you approach a cat the same way you would a dog, it’s just not going to work. With that in mind:</p><blockquote>The thing about Vim is it’s not an IDE</blockquote><p>Vim isn’t an IDE, it’s a text editor. It’s a lightning-fast, feature-packed text-editor with more secrets than Hogwarts, and I’d argue that with a little tweaking it has the potential to be as good, if not better, than your current IDE.</p><p>I’ve been working as a software developer for circa ~2.5 years now, and for the last ~1 year I’ve been using Vim as my “daily driver”. About 80% of my time is spent with Javascript, and the other 20% in Python. Prior to using Vim I used VS Code and the IntelliJ IDEs (WebStorm and PyCharm in my case). All great tools, but all had their weaknesses and left me wondering “is there something better?”.</p><p>I started noticing some of the coding superheroes (you know the type) at my company were using Vim. At first I assumed it was something they used because they superheroes. But, soon I started to wonder if they were superheroes because they used Vim. Well the truth is Vim won’t make you a 10x developer by itself, but if you commit some time to learning its ways, it certainly can help (or can’t hurt). If you’re willing to take the plunge read on.</p><h4>What I Look For in an IDE?</h4><p>There are some key features of IDEs that boost productivity so much that they’re non-negotiable for me in a dev environment.</p><ul><li>Code completion/Intellisense</li><li>Go to definition of functions/variables/etc.</li><li>Directory navigation and searching</li></ul><p>By the end of this series we will use the power of Vim plugins to expand the functionality to encompass all these features.</p><h4>Why Use Vim?</h4><p>There’s many reasons to use Vim as we’ll see in this series. It enhances productivity, it’s super cool (okay maybe only devs <em>might</em> think that), but I think most importantly it’s goddam ubiquitous. Seriously. Vim is everywhere. It’s shipped preloaded on almost every computer (for sure Mac and Linux and I’d be shocked if not Windows too). It’s on Linux servers that you’ll SSH into. It’s on the ancient, brick of a computer you may be asked by a random company to do some in-person coding on for an interview. If you have Vim at your disposal you’re efficient no matter your hardware setup.</p><p>This last point might seem like a stretch. I mean, hopefully you’re not SSH-ing into production servers and writing code directly on them very often (this does happen though and in those moments, trust me, you want to be fast). But it’s much more than that. To really be a super-powered-developer, you need to be a super-user of your dev environment. Sure the company you work at now provides the IntelliJ suite of products, and you know every nook and cranny of WebStorm. But your next company might not pay for IntelliJ, and then what? Or sure you’re a wizard at VS Code, and it’s free and open-source, so there’s no reason you can’t have it anywhere? Maybe your next role is for the Government, or some other large enterprise, you’d be surprised what it’s like to get the permission to download software at some of these places. Even if it’s free.</p><p>This is really the amazing thing about Vim’s reach. You can be certain anywhere you go, you can hit-the-ground-running right from the get-go.</p><h4>Vim vs. NeoVim</h4><p>I know I just preached my heart out about Vim’s ubiquity being it’s secret weapon. But, I have a confession. I actually use NeoVim.</p><p>But why? NeoVim isn’t everywhere? What gives!?</p><p>It’s true NeoVim isn’t everywhere. And to be honest at this point in time. <em>There really isn’t a difference between Vim8 and NeoVim. </em>The reason I use NeoVim is more of a long-term and principled philosophy and also long-term mindset. NeoVim is maintained by a large community of developers and because of this is very community-driven. Vim on the other hand is maintained by a small core of developers (bus factor, jk). And seriously, at this moment they’re almost indistinguishable. In fact, I’ll be using NeoVim for this series but 99.99% of the tips and tricks I share <em>will work exactly the same on Vim8</em>.</p><p>The reason I choose NeoVim is because sure <em>today</em> they’re basically identical, but one day they may not be. I plan on being a dev for many years to come and I’d rather put my eggs in the community-driven wagon (not sure I nailed that metaphor).</p><h4><strong>Why Did I Write This? Do We Need Another Vim Tutorial?</strong></h4><p>I’ve read every Vim blog post. I’ve watched every configuration video on YouTube. I’m in all the subreddits. Although there’s tons of great content out there, I’ve often found there’s a key detail glossed over, or a concept not fully explained. My goal is to teach you everything from scratch. Every command will be explained fully. Every line of the init.vim/.vimrc will be explained. You will know your Vim setup inside and out.</p><h4>What Can You Expect to Learn From This Series?</h4><p>You can away with to come away from this series with:</p><ul><li>A working knowledge of vanilla Vim (commands, mnemonics, buffers, modes, and macros)</li><li>Ability to customize your Vim using the config file (.vimrc/init.vim)</li><li>Knowledge to enhance your Vim setup using the power of plugins.</li><li>The confidence to begin using Vim in your day-to-day work.</li></ul><h3>Take The Dive</h3><ol><li><a href="https://medium.com/@dbo1093/vim-for-developers-part-1-the-basics-663619ca122a">Vim for Developers: Part 1 — The Basics</a></li><li><a href="https://medium.com/@dbo1093/vim-for-developers-part-2-advanced-basics-857c0dbda905">Vim for Developers: Part 2 — Advanced Basics</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95e68dc5d3a1" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/vim-for-developers-part-0-why-vim-95e68dc5d3a1">Vim for Developers: Part 0 — Why Vim?</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>