<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Mike From CodeSpectre</title>
    <description>The latest articles on Forem by Mike From CodeSpectre (@codespectremike).</description>
    <link>https://forem.com/codespectremike</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F673944%2F61bab5df-a7d2-48bc-bf6e-54279273270b.PNG</url>
      <title>Forem: Mike From CodeSpectre</title>
      <link>https://forem.com/codespectremike</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/codespectremike"/>
    <language>en</language>
    <item>
      <title>Using Axios Interceptors In Javascript and Typescript</title>
      <dc:creator>Mike From CodeSpectre</dc:creator>
      <pubDate>Sun, 22 Aug 2021 15:54:52 +0000</pubDate>
      <link>https://forem.com/codespectremike/using-axios-interceptors-in-javascript-and-typescript-4g93</link>
      <guid>https://forem.com/codespectremike/using-axios-interceptors-in-javascript-and-typescript-4g93</guid>
      <description>&lt;p&gt;&lt;strong&gt;Axios&lt;/strong&gt; is a robust, easy to use, promise-based http client for javascript and node.js. Axios provides developers with tools to handle all http-related functions. Axios interceptors are one of the essential tools Axios provides us for dealing with HTTP requests and responses. &lt;/p&gt;

&lt;p&gt;Axios is a great way to handle any sort of HTTP requests in javascript or typescript, and I use it in all of my projects that require accessing an API. It provides all the necessary functions for passing data to and from APIs and then accessing it on the frontend. &lt;/p&gt;

&lt;p&gt;If you've never used Axios, I suggest checking out the documentation here: &lt;a href="https://axios-http.com/docs/intro"&gt;https://axios-http.com/docs/intro&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Interceptors
&lt;/h2&gt;

&lt;p&gt;Interceptors are exactly what they sound like. They "intercept" requests and responses. &lt;/p&gt;

&lt;p&gt;This can be useful if you need to perform some validation on the data before sending a request or when retrieving a response. &lt;/p&gt;

&lt;p&gt;Here's an example of intercepting a request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interceptors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

&lt;span class="c1"&gt;// if name not in request config then reject&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Error: Please Include a name&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also use it on responses like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interceptors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; 
&lt;span class="c1"&gt;// filter out null or undefined values using filter()&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;filtered_names&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;names&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;filtered_names&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the response example, we're filtering an array of names that was passed back to make sure no null or undefined values are included. &lt;/p&gt;

&lt;h3&gt;
  
  
  Custom Axios Instances
&lt;/h3&gt;

&lt;p&gt;One of the nicest use cases of Axios interceptors is the ability to add them to a custom axios instance for your project.&lt;/p&gt;

&lt;p&gt;If you are unfamiliar with Axios instances, it is a way to add all the data you need to send with each request automatically. &lt;/p&gt;

&lt;p&gt;For example: in our project we need to always have an access token header and the base URL of our api. We can create a custom instance like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;customInstance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;baseURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://mytestingapi.com/api&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;access_token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;custom_token&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now whenever we need to perform a request with Axios, we can call &lt;em&gt;customInstance&lt;/em&gt; instead and all our data will be included automatically. &lt;/p&gt;

&lt;h3&gt;
  
  
  Adding Interceptors To Custom Instances
&lt;/h3&gt;

&lt;p&gt;Adding interceptors to Axios instances is done in the same way you'd do it normally, except instead of using the axios keyword, we'll use the name of our instance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;customInstance&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;interceptors&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;&lt;span class="cm"&gt;/* do stuff here */&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;I hope you found this simple introduction to interceptors to be useful. It is worth checking out the Axios documentation if you want to learn more. &lt;/p&gt;

&lt;p&gt;Also don't forget to follow me on twitter &lt;a class="mentioned-user" href="https://dev.to/codespectremike"&gt;@codespectremike&lt;/a&gt; to get notifications for my latest videos and articles.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/codespectreMike"&gt;https://twitter.com/codespectreMike&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>typescript</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Complete Introduction To Insomnia For REST APIs</title>
      <dc:creator>Mike From CodeSpectre</dc:creator>
      <pubDate>Wed, 18 Aug 2021 14:40:00 +0000</pubDate>
      <link>https://forem.com/codespectremike/complete-introduction-to-insomnia-for-rest-apis-13af</link>
      <guid>https://forem.com/codespectremike/complete-introduction-to-insomnia-for-rest-apis-13af</guid>
      <description>&lt;p&gt;Insomnia is a great new graphical tool for testing and building REST APIs with an easy to use and slick interface. &lt;/p&gt;

&lt;p&gt;Learn how to get up and running with Insomnia, and how to use it to test and build APIs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Organizing collections of requests&lt;/li&gt;
&lt;li&gt;Completing any type of HTTP request&lt;/li&gt;
&lt;li&gt;Creating new APIs based on standard specifications&lt;/li&gt;
&lt;li&gt;Importing and exporting data&lt;/li&gt;
&lt;li&gt;Customizable and user-friendly interface&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reason I started using Insomnia is primarily the interface. I used to do all my API testing using &lt;em&gt;Node.js&lt;/em&gt; scripts and &lt;em&gt;Axios&lt;/em&gt;, but I saw the light when I started with Insomnia. It's so easy to get up and running. Its possible to organize collections, duplicate requests, make all sorts of comments, and it supports pretty much every protocol you can think of (&lt;em&gt;GRPC, SOAP, REST, XML&lt;/em&gt;). It's an all in one toolbox for API development. &lt;/p&gt;

&lt;h3&gt;
  
  
  Initial Setup
&lt;/h3&gt;

&lt;p&gt;Before starting make sure you download and install Insomnia from &lt;br&gt;
 &lt;a href="https://insomnia.rest" rel="noopener noreferrer"&gt;the homepage&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Overview
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft68vozhi0oqy224vz1qg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft68vozhi0oqy224vz1qg.png" alt="Insomnia Overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Insomnia's main page lays out all the features pretty simply. You can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create new environments and set environment variables&lt;/li&gt;
&lt;li&gt;Set cookies&lt;/li&gt;
&lt;li&gt;Create requests or folders for requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Insomnia lets you organize your requests and folders very nicely, and they give you a pretty straight forward layout that lets you see what you have available right away.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr5iqnfeg6vbxm3vbx1z4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr5iqnfeg6vbxm3vbx1z4.png" alt="Folders"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Requests
&lt;/h3&gt;

&lt;p&gt;To create our first request, navigate to the little plus button on the sidebar and select request from the dropdown. It will prompt you to name your request. This can be any name of your choosing. I like to give them descriptive names to keep my data organized. &lt;/p&gt;

&lt;p&gt;You can create any type of &lt;em&gt;HTTP&lt;/em&gt; request with Insomnia. &lt;/p&gt;

&lt;p&gt;A request lets you do a few different things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set your request body in a number of formats, such as &lt;em&gt;JSON, XML, etc&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Set your authentication method (&lt;em&gt;Oauth, Basic, Bearer, and more&lt;/em&gt;)&lt;/li&gt;
&lt;li&gt;If there are any URL query parameters in your request, there is the option to add them in the query section and they'll be formatted automatically for you&lt;/li&gt;
&lt;li&gt;Set any additional request headers you may need&lt;/li&gt;
&lt;li&gt;Write any docs associated with an endpoint that you are interested in.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you are ready to send requests, hit the big purple send button, and you'll see your response on the right hand side. This will show any errors, returned data, or headers. &lt;/p&gt;

&lt;h3&gt;
  
  
  Collections and Design Documents
&lt;/h3&gt;

&lt;p&gt;When you click the &lt;strong&gt;Dashboard&lt;/strong&gt;, Insomnia will take you to a zoomed out view of all your existing &lt;strong&gt;Collections&lt;/strong&gt;. Collections are their own modular areas, each with their own environments, folders, and requests. This is a great way to keep track of all the different projects you are working on, especially if you interact with many api's regularly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcneku2d0xity20cvekbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcneku2d0xity20cvekbx.png" alt="Overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also click &lt;strong&gt;Create&lt;/strong&gt; in the right corner, which brings down a dropdown for other features. This is where you'll find &lt;strong&gt;Design Documents&lt;/strong&gt;. When you create a Design Document, it takes you to a new page where you can create a specification for your API using &lt;em&gt;OpenAPI *standards. (*Note&lt;/em&gt;: If you are interested in learning more about *OpenAPI *specs, I suggest checking out the  &lt;a href="https://swagger.io/resources/open-api/" rel="noopener noreferrer"&gt;Swagger.io documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can create YAML specs of your API here. Here's a small example using the Swagger Petstore API from the documentation:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb85ulzb3t3yvolcmzogv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb85ulzb3t3yvolcmzogv.png" alt="openAPI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Insomnia gives you all the tools you need to rapidly test and build APIs. I hope you found this to be a useful introduction to Insomnia. It has been an indispensable tool for me, and I hope it can be for you as well! If you are interested in learning more from me, don't forget to follow, or check me out on YouTube at &lt;br&gt;
&lt;a href="https://www.youtube.com/channel/UCThpP2HFUtWBgpLjGb0YG2A" rel="noopener noreferrer"&gt;Codespectre&lt;/a&gt;&lt;/p&gt;

</description>
      <category>api</category>
      <category>rest</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The Ultimate Guide To Neovim and Tmux in 2021 for fullstack engineers</title>
      <dc:creator>Mike From CodeSpectre</dc:creator>
      <pubDate>Mon, 26 Jul 2021 14:38:54 +0000</pubDate>
      <link>https://forem.com/codespectremike/the-ultimate-guide-to-neovim-and-tmux-in-2021-for-fullstack-engineers-1g40</link>
      <guid>https://forem.com/codespectremike/the-ultimate-guide-to-neovim-and-tmux-in-2021-for-fullstack-engineers-1g40</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Getting into Vim can be a pretty daunting task. I know it was for me. I didn't start truly learning how to use it well into the 3rd year of my career as a full-stack engineer. Over the course of the past year I've began the Vim journey and I must say I couldn't be happier. Everything with Vim is faster, more agile, and all around an awesome experience. I'm going to show you how to set up NeoVim to meet all your needs as a modern fullstack developer. &lt;/p&gt;

&lt;h2&gt;
  
  
  My Initial Setup (Zsh &amp;amp; Tmux)
&lt;/h2&gt;

&lt;p&gt;I code on both a macbook and a Linux desktop. On the linux desktop, I use Terminator as my main terminal, while on Mac I use Iterm2. On both machines I use Zsh with oh-my-zsh. I'm not going to really talk about setting up oh-my-zsh today, but its worth checking out here: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://ohmyz.sh/"&gt;https://ohmyz.sh/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also use Tmux for swapping between windows on Mac. If you are unfamiliar with Tmux, its an abbreviation for Terminal Multiplexer, &amp;amp; it is a great way to have multiple tabs and panes open and swap &lt;br&gt;
between them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install tmux
tmux -V
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;First things first, we have to install neovim. If you're on linux you can use whatever package manager you usually use.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;sudo&lt;/span&gt; &lt;span class="nx"&gt;apt&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt; &lt;span class="nx"&gt;neovim&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're on Mac use Homebrew.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;brew&lt;/span&gt; &lt;span class="nx"&gt;install&lt;/span&gt; &lt;span class="nx"&gt;neovim&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, we need to install vim-plug, which we'll be using to install plugins that we need. &lt;/p&gt;

&lt;p&gt;You can find the plugin at [github.com/junegunn/vim-plug(github.com/junegunn/vim-plug)&lt;/p&gt;

&lt;p&gt;You can copy this command from here or from their Github repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;sh&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;c&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s1"&gt;
       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Neovim Configuration
&lt;/h2&gt;

&lt;p&gt;Our next step is to configure Neovim for our needs. Let's create our config file first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;mkdir&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="sr"&gt;/.config/&lt;/span&gt;&lt;span class="nx"&gt;nvim&lt;/span&gt;
&lt;span class="nx"&gt;touch&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="sr"&gt;/.config/&lt;/span&gt;&lt;span class="nx"&gt;nvim&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;init&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;vim&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's open up our init.vim file we just made, and add a section for our plugins.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;call plug#begin&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"~/.vim/plugged"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="s2"&gt;"Our plugins will go in the middle
call plug#end()
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have that, lets set up the plugins we need to install. This is my current plugin configuration for fullstack web development.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;call plug#begin&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"~/.vim/plugged"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
Plug &lt;span class="s1"&gt;'junegunn/fzf'&lt;/span&gt;, &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;'do'&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt; -&amp;gt; fzf#install&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
Plug &lt;span class="s1"&gt;'junegunn/fzf.vim'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'pangloss/vim-javascript'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'peitalin/vim-jsx-typescript'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'leafgarland/typescript-vim'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'dracula/vim'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'scrooloose/nerdtree'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'ryanoasis/vim-devicons'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'neoclide/coc.nvim'&lt;/span&gt;, &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;'branch'&lt;/span&gt;:&lt;span class="s1"&gt;'release'&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;g:coc_global_extensions &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'coc-tsserver'&lt;/span&gt;,
&lt;span class="se"&gt;\'&lt;/span&gt;coc-python&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-pydocstring&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-json&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-html-css-support&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-css&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-sql&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-yaml&lt;span class="s1"&gt;']
" Plug '&lt;/span&gt;sheerun/vim-polyglot&lt;span class="s1"&gt;',
Plug '&lt;/span&gt;preservim/nerdcommenter&lt;span class="s1"&gt;'
Plug '&lt;/span&gt;jparise/vim-graphql&lt;span class="s1"&gt;'
Plug '&lt;/span&gt;vim-airline/vim-airline&lt;span class="s1"&gt;'
Plug '&lt;/span&gt;vim-airline/vim-airline-themes&lt;span class="s1"&gt;'
" post install (yarn install | npm install) then load plugin only for editing supported files
Plug '&lt;/span&gt;prettier/vim-prettier&lt;span class="s1"&gt;', {
\ '&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="s1"&gt;': '&lt;/span&gt;yarn &lt;span class="nb"&gt;install&lt;/span&gt;&lt;span class="s1"&gt;',
\ '&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="s1"&gt;': ['&lt;/span&gt;javascript&lt;span class="s1"&gt;', '&lt;/span&gt;typescript&lt;span class="s1"&gt;', '&lt;/span&gt;css&lt;span class="s1"&gt;', '&lt;/span&gt;less&lt;span class="s1"&gt;', '&lt;/span&gt;scss&lt;span class="s1"&gt;', '&lt;/span&gt;json&lt;span class="s1"&gt;', '&lt;/span&gt;graphql&lt;span class="s1"&gt;', '&lt;/span&gt;markdown&lt;span class="s1"&gt;', '&lt;/span&gt;vue&lt;span class="s1"&gt;', '&lt;/span&gt;yaml&lt;span class="s1"&gt;', '&lt;/span&gt;html&lt;span class="s1"&gt;'] }
call plug#end()
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Neovim all you need to do to install all these plugins is run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:PlugInstall
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We're also going to add a few lines to the top of our init.vim.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;scrolloff&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8
&lt;span class="nb"&gt;set &lt;/span&gt;number
&lt;span class="nb"&gt;set &lt;/span&gt;relativenumber
&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;tabstop&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4
&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;shiftwidth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4
&lt;span class="nb"&gt;set &lt;/span&gt;expandtab
&lt;span class="nb"&gt;set &lt;/span&gt;smartindent
&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;utf8
&lt;span class="nb"&gt;let &lt;/span&gt;g:airline_powerline_fonts &lt;span class="o"&gt;=&lt;/span&gt; 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Theming
&lt;/h2&gt;

&lt;p&gt;Now let's enable our colorscheme. I use Dracula at the moment, but I tend to swap back and forth between Dracula and Gruvbox Dark. &lt;/p&gt;

&lt;p&gt;Add these lines below our plugin declarations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;has&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"termguicolors"&lt;/span&gt;&lt;span class="o"&gt;))&lt;/span&gt;
&lt;span class="nb"&gt;set &lt;/span&gt;termguicolors
endif
syntax &lt;span class="nb"&gt;enable
&lt;/span&gt;colorscheme dracula
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Keymapping
&lt;/h2&gt;

&lt;p&gt;Next we're going to set up some nice keymappings. I like setting mapleader to &lt;code&gt;space&lt;/code&gt;, but I know some people aren't too fond of this. It's all personal preference honestly, if you find you're not using it, don't hesitate to switch to something else. &lt;/p&gt;

&lt;p&gt;One mapping that I love to use is &lt;em&gt;jk&lt;/em&gt;. I use &lt;em&gt;jk&lt;/em&gt; to automatically escape, save, and then return when I'm in insert mode. I've found it to be a very useful little shortcut. The other shortcuts are for searching files and such. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The &lt;em&gt;pv&lt;/em&gt; map opens up a new tab to the side. &lt;/li&gt;
&lt;li&gt;The &lt;em&gt;pf&lt;/em&gt; map opens up a finder that we can use for quickly searching. &lt;/li&gt;
&lt;li&gt;The &lt;em&gt;Ctrl-P&lt;/em&gt; map is for searching for files within a Git repository. This is useful for finding files inside your software project.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;let &lt;/span&gt;mapleader &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt;
nnoremap &amp;lt;leader&amp;gt;pv :Vex&amp;lt;CR&amp;gt;
nnoremap &amp;lt;leader&amp;gt;pf :Files&amp;lt;CR&amp;gt;
inoremap jk &amp;lt;esc&amp;gt;:w&amp;lt;CR&amp;gt;
nnoremap &amp;lt;C-p&amp;gt; :GFiles&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Nerdtree Configuration
&lt;/h2&gt;

&lt;p&gt;To add IDE-like file navigation to Neovim, I use a plugin called &lt;strong&gt;NerdTree&lt;/strong&gt;. I've mapped the toggle for Nerdtree to &lt;code&gt;Ctrl-A&lt;/code&gt;, which I've found works pretty well for me.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;NERDTreeShowHidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;NERDTreeMinimalUI&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;g&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;NERDTreeIgnore&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;node_modules&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;NERDTreeStatusLine&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;NERDTree&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; Automaticaly close nvim if NERDTree is only thing left open
autocmd bufenter * if (winnr(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;$&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;) == 1 &amp;amp;&amp;amp; exists(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;NERDTree&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;) &amp;amp;&amp;amp; b:NERDTree.isTabTree()) | q | endif
&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;Toggle&lt;/span&gt;
&lt;span class="nx"&gt;nnoremap&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;silent&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;C&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; :NERDTreeToggle&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;CR&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final Configurations
&lt;/h2&gt;

&lt;p&gt;I have a couple more small configurations at the end of my init.vim. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Opening an inline terminal with &lt;code&gt;Ctrl-n&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Setting prettier to auto format and to prefer to use the prettier config file in the project, instead of the default&lt;/li&gt;
&lt;li&gt;A setting to open new panes to the right and below
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; open new split panes to right and below
set splitright
set splitbelow
&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;turn&lt;/span&gt; &lt;span class="nx"&gt;terminal&lt;/span&gt; &lt;span class="nx"&gt;to&lt;/span&gt; &lt;span class="nx"&gt;normal&lt;/span&gt; &lt;span class="nx"&gt;mode&lt;/span&gt; &lt;span class="kd"&gt;with&lt;/span&gt; &lt;span class="nx"&gt;escape&lt;/span&gt;
&lt;span class="nx"&gt;tnoremap&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Esc&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;C&lt;/span&gt;&lt;span class="err"&gt;-\&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;C&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="na"&gt;n&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
" start terminal in insert mode
au BufEnter * if &lt;span class="err"&gt;&amp;amp;&lt;/span&gt;buftype == 'terminal' | :startinsert | endif
" open terminal on ctrl+n
function! OpenTerminal()
split term://zsh
resize 10
endfunction
nnoremap &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;c&lt;/span&gt;&lt;span class="err"&gt;-&lt;/span&gt;&lt;span class="na"&gt;n&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; :call OpenTerminal()&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;CR&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
let g:prettier#autoformat_config_present = 1
let g:prettier#config#config_precedence = 'prefer-file'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope you find this guide useful! This is my current Neovim setup and I've been very happy with the result. If you're not interested in following along. I'm including the full init.vim file below.&lt;/p&gt;

&lt;p&gt;Don't forget to follow me on Twitter: &lt;a class="mentioned-user" href="https://dev.to/codespectremike"&gt;@codespectremike&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Init.Vim
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;scrolloff&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8
&lt;span class="nb"&gt;set &lt;/span&gt;number
&lt;span class="nb"&gt;set &lt;/span&gt;relativenumber
&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;tabstop&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4
&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;shiftwidth&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;4
&lt;span class="nb"&gt;set &lt;/span&gt;expandtab
&lt;span class="nb"&gt;set &lt;/span&gt;smartindent
&lt;span class="nb"&gt;set &lt;/span&gt;&lt;span class="nv"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;utf8
&lt;span class="nb"&gt;let &lt;/span&gt;g:airline_powerline_fonts &lt;span class="o"&gt;=&lt;/span&gt; 1

call plug#begin&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"~/.vim/plugged"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
Plug &lt;span class="s1"&gt;'junegunn/fzf'&lt;/span&gt;, &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;'do'&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt; -&amp;gt; fzf#install&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
Plug &lt;span class="s1"&gt;'junegunn/fzf.vim'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'pangloss/vim-javascript'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'peitalin/vim-jsx-typescript'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'leafgarland/typescript-vim'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'dracula/vim'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'scrooloose/nerdtree'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'ryanoasis/vim-devicons'&lt;/span&gt;
Plug &lt;span class="s1"&gt;'neoclide/coc.nvim'&lt;/span&gt;, &lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;'branch'&lt;/span&gt;:&lt;span class="s1"&gt;'release'&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="nb"&gt;let &lt;/span&gt;g:coc_global_extensions &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'coc-tsserver'&lt;/span&gt;,
&lt;span class="se"&gt;\'&lt;/span&gt;coc-python&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-pydocstring&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-json&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-html-css-support&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-css&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-sql&lt;span class="s1"&gt;',
\ '&lt;/span&gt;coc-yaml&lt;span class="s1"&gt;']
" Plug '&lt;/span&gt;sheerun/vim-polyglot&lt;span class="s1"&gt;',
Plug '&lt;/span&gt;preservim/nerdcommenter&lt;span class="s1"&gt;'
Plug '&lt;/span&gt;jparise/vim-graphql&lt;span class="s1"&gt;'
Plug '&lt;/span&gt;vim-airline/vim-airline&lt;span class="s1"&gt;'
Plug '&lt;/span&gt;vim-airline/vim-airline-themes&lt;span class="s1"&gt;'
" post install (yarn install | npm install) then load plugin only for editing supported files
Plug '&lt;/span&gt;prettier/vim-prettier&lt;span class="s1"&gt;', {
\ '&lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="s1"&gt;': '&lt;/span&gt;yarn &lt;span class="nb"&gt;install&lt;/span&gt;&lt;span class="s1"&gt;',
\ '&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="s1"&gt;': ['&lt;/span&gt;javascript&lt;span class="s1"&gt;', '&lt;/span&gt;typescript&lt;span class="s1"&gt;', '&lt;/span&gt;css&lt;span class="s1"&gt;', '&lt;/span&gt;less&lt;span class="s1"&gt;', '&lt;/span&gt;scss&lt;span class="s1"&gt;', '&lt;/span&gt;json&lt;span class="s1"&gt;', '&lt;/span&gt;graphql&lt;span class="s1"&gt;', '&lt;/span&gt;markdown&lt;span class="s1"&gt;', '&lt;/span&gt;vue&lt;span class="s1"&gt;', '&lt;/span&gt;yaml&lt;span class="s1"&gt;', '&lt;/span&gt;html&lt;span class="s1"&gt;'] }
call plug#end()

if (has("termguicolors"))
set termguicolors
endif
syntax enable
colorscheme dracula

let mapleader = " "
nnoremap &amp;lt;leader&amp;gt;pv :Vex&amp;lt;CR&amp;gt;
nnoremap &amp;lt;leader&amp;gt;pf :Files&amp;lt;CR&amp;gt;
inoremap jk &amp;lt;esc&amp;gt;:w&amp;lt;CR&amp;gt;
nnoremap &amp;lt;C-p&amp;gt; :GFiles&amp;lt;CR&amp;gt;

let g:NERDTreeShowHidden = 1
let g:NERDTreeMinimalUI = 0
let g:NERDTreeIgnore = ['&lt;/span&gt;node_modules&lt;span class="s1"&gt;']
let NERDTreeStatusLine='&lt;/span&gt;NERDTree&lt;span class="s1"&gt;'
" Automaticaly close nvim if NERDTree is only thing left open
autocmd bufenter * if (winnr("$") == 1 &amp;amp;&amp;amp; exists("b:NERDTree") &amp;amp;&amp;amp; b:NERDTree.isTabTree()) | q | endif
" Toggle
nnoremap &amp;lt;silent&amp;gt; &amp;lt;C-a&amp;gt; :NERDTreeToggle&amp;lt;CR&amp;gt;

" open new split panes to right and below
set splitright
set splitbelow
" turn terminal to normal mode with escape
tnoremap &amp;lt;Esc&amp;gt; &amp;lt;C-\&amp;gt;&amp;lt;C-n&amp;gt;
" start terminal in insert mode
au BufEnter * if &amp;amp;buftype == '&lt;/span&gt;terminal&lt;span class="s1"&gt;' | :startinsert | endif
" open terminal on ctrl+n
function! OpenTerminal()
split term://zsh
resize 10
endfunction
nnoremap &amp;lt;c-n&amp;gt; :call OpenTerminal()&amp;lt;CR&amp;gt;
let g:prettier#autoformat_config_present = 1
let g:prettier#config#config_precedence = '&lt;/span&gt;prefer-file&lt;span class="s1"&gt;'
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>vim</category>
      <category>bash</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
