<?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>DEV Community: Max S-T</title>
    <description>The latest articles on DEV Community by Max S-T (@manfromth3m0on).</description>
    <link>https://dev.to/manfromth3m0on</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%2F270113%2F349731ff-7534-4e83-9a07-963ed4ae55ea.jpeg</url>
      <title>DEV Community: Max S-T</title>
      <link>https://dev.to/manfromth3m0on</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/manfromth3m0on"/>
    <language>en</language>
    <item>
      <title>How to make your terminal suck less</title>
      <dc:creator>Max S-T</dc:creator>
      <pubDate>Fri, 06 Dec 2019 22:46:10 +0000</pubDate>
      <link>https://dev.to/manfromth3m0on/how-to-make-your-terminal-suck-less-3oo1</link>
      <guid>https://dev.to/manfromth3m0on/how-to-make-your-terminal-suck-less-3oo1</guid>
      <description>&lt;p&gt;There comes a point in any Linux user’s life where they have to figure out which terminal emulator to use. Chances are if you are using a desktop environment like GNOME (default with ubuntu) or KDE you’ve stuck with the stock terminal and not given it any thought, right? But doing this leaves a lot out when it comes to having a comfortable experience on Linux.&lt;/p&gt;

&lt;p&gt;There are may options for terminal emulators, you could choose the slick-looking &lt;a href="https://hyper.is/"&gt;Hyper.js&lt;/a&gt; or the GPU accelerated &lt;a href="https://github.com/jwilm/alacritty"&gt;alacrity&lt;/a&gt; maybe even the utility-focused terminator. Each of these inherently has its pros and cons but ill have to say, in my mind, there is a terminal to rule them all - st.&lt;/p&gt;

&lt;p&gt;st, also known as &lt;a href="https://st.suckless.org/"&gt;suckless terminal&lt;/a&gt;, is a small, lightweight, and fast terminal emulator from the &lt;a href="https://suckless.org/"&gt;suckless community&lt;/a&gt;. Before we talk more about st, we must talk about the driving force behind suckless. The suckless &lt;a href="https://suckless.org/philosophy/"&gt;philosophy&lt;/a&gt; is to ‘focus on simplicity, clarity, and frugality. To keep things simple, minimal and usable‘ which means a lot for their programs, they are all fast light and efficient but on top of this, they have unrivaled modularity and customizability due to the simple, readable nature of their source code. This means that the members of the community can develop patches and changes independently of the master source code.&lt;/p&gt;

&lt;p&gt;So why does this make st so good?&lt;br&gt;
I’m glad you asked because there are a lotta things.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It can run on anything&lt;/li&gt;
&lt;li&gt;It’s speedy as&lt;/li&gt;
&lt;li&gt;There are no messy config files&lt;/li&gt;
&lt;li&gt;It supports UTF-8 out of the box&lt;/li&gt;
&lt;li&gt;Clipboard support&lt;/li&gt;
&lt;li&gt;True 256 colors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To someone who hasn’t done much research around the topic, this all seems kinda lackluster, but when you find something like even the beloved URXVT has issues with the clipboard every feature you can get is a bonus. What makes this even more impressive is this&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Emulator&lt;/th&gt;
&lt;th&gt;Lines of code&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;xterm&lt;/td&gt;
&lt;td&gt;65K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;urxvt&lt;/td&gt;
&lt;td&gt;32K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;st&lt;/td&gt;
&lt;td&gt;&amp;lt;5K&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;How do I get started&lt;br&gt;
Now, that’s easy, the steps are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone the source repo&lt;/li&gt;
&lt;li&gt;Make any config edits&lt;/li&gt;
&lt;li&gt;Run sudo make install&lt;/li&gt;
&lt;/ol&gt;
&lt;h1&gt;
  
  
  1. Clone source repo
&lt;/h1&gt;

&lt;p&gt;I have a GitHub repo with the patches I use applied e.g.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;follow URLs by pressing alt-l&lt;/li&gt;
&lt;li&gt;copy URLs in the same way with alt-y&lt;/li&gt;
&lt;li&gt;Copy the output of commands with alt-o&lt;/li&gt;
&lt;li&gt;Compatibility with Xresources and pywal for dynamic colors.&lt;/li&gt;
&lt;li&gt;Default gruvbox colors otherwise.&lt;/li&gt;
&lt;li&gt;Transparency/alpha, which is also adjustable from your Xresources.&lt;/li&gt;
&lt;li&gt;zoom/change font size&lt;/li&gt;
&lt;li&gt;copy text with alt-c, paste is alt-v or shift-insert&lt;/li&gt;
&lt;li&gt;and lots more view it &lt;a href="https://github.com/manfromth3m0oN/st"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Download my fork with:
&lt;/h2&gt;


&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/manfromth3m0oN/st.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h1&gt;
  
  
  2. Config edits
&lt;/h1&gt;

&lt;p&gt;Now st does not have ‘traditional’ config files, this is because you don’t just download a binary and run it, you compile st from source. So to edit the config of st enter into the cloned folder with cd st Now open &lt;code&gt;config.h&lt;/code&gt; with your favorite text editor (I recommend &lt;code&gt;nvim&lt;/code&gt;). All of the options are commented so I won’t go over them here. There is nothing essential to change, unless you don’t use sh then you need to change the &lt;code&gt;static char *shell = "/bin/sh";&lt;/code&gt; line to your appropriate shell (e.g. &lt;code&gt;ZSH&lt;/code&gt;or &lt;code&gt;fish&lt;/code&gt; etc)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Compile and install
This step is probably the easiest all you have to do is install with &lt;code&gt;sudo make install&lt;/code&gt; This works provided you have &lt;code&gt;make&lt;/code&gt; and &lt;code&gt;gcc&lt;/code&gt; installed if you don’t just use:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    sudo apt-get install make gcc
    OR
    sudo pacman -S make gcc
    OR
    install make &amp;amp; gcc with whatever package manager you have
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Now you can start using st&lt;br&gt;
Now just start the st binary however your distro or wm/de does so for i3 edit your i3/config file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# start a terminal
bindsym $mod+Return exec st (or whatever *termname is in config.h)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Closing thoughts
&lt;/h1&gt;

&lt;p&gt;st is not a terminal built for someone who is brand new to the Unix ecosystem, but using it from the beginning can teach you a lot about how your system runs. Use st, and all the other suckless utilities for that matter, to help further your understanding of Linux so that you can be the most efficient user you can. After all, that is what the modern Linux philosophy is.&lt;/p&gt;

&lt;p&gt;Thank you all for reading&lt;/p&gt;

&lt;p&gt;~ M&lt;/p&gt;

</description>
      <category>st</category>
      <category>linux</category>
      <category>suckless</category>
    </item>
    <item>
      <title>Auto-Compiling markdown for a live preview</title>
      <dc:creator>Max S-T</dc:creator>
      <pubDate>Fri, 06 Dec 2019 22:38:48 +0000</pubDate>
      <link>https://dev.to/manfromth3m0on/auto-compiling-markdown-for-a-live-preview-15e6</link>
      <guid>https://dev.to/manfromth3m0on/auto-compiling-markdown-for-a-live-preview-15e6</guid>
      <description>&lt;p&gt;Now, I really like markdown, but there can be some annoyances when it comes to viewing you'r finished product. In a lot of cases it is nice to see you'r result as you type, so we want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auto compilation on save&lt;/li&gt;
&lt;li&gt;Refresh our PDF reader&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  How I &lt;em&gt;thought&lt;/em&gt; this would work
&lt;/h1&gt;

&lt;p&gt;Initialy I thought I’d be using the amazing tool entr. entr is great because it monitors a files changes on disk. So the plan was compile with pandoc (as standard for markdown) through a shortcut in [n]vim, be watching for the file change with entr and then send a &lt;code&gt;-HUP&lt;/code&gt; signal to my pdf reader (&lt;code&gt;mupdf&lt;/code&gt; in this case) with &lt;code&gt;pkill&lt;/code&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  How it actually worked
&lt;/h1&gt;

&lt;p&gt;Both fortunately and unfortunately there is no need for entr in this scenario. After a bit of scrolling through :help in nvim I had gathered this info:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bash commands could be ran through the use of !&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;autocmd&lt;/code&gt; runs ‘automatically when reading or writing a file’ (from &lt;code&gt;:h autocmd&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;BufWritePost&lt;/code&gt; executes something 'After writing the whole buffer to a file’ (again from &lt;code&gt;:h autocmd&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;%&lt;/code&gt; are the name of the file&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;*.md&lt;/code&gt; after &lt;code&gt;BufWritePost&lt;/code&gt; specifies file type
From this we can start to piece together what we need to put in out &lt;code&gt;.vimrc&lt;/code&gt; (or &lt;code&gt;init.vim&lt;/code&gt; in my case) This is what I came up with:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;autocmd BufWritePost *.md !pandoc % -o %:r.pdf --pdf-engine=wkhtmltopdf &amp;amp;&amp;amp; pkill -HUP mupdf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h1&gt;
  
  
  Lets decompose that line:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;autocmd BufWritePost&lt;/code&gt; - Run after ! once the entire buffer has been writen to a file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;*.md&lt;/code&gt; - Only do this for markdown files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;!pandoc % -o %:r.pdf --pdf-engine=wkhtmltopdf&lt;/code&gt; - Use pandoc to compile the current file (&lt;code&gt;%&lt;/code&gt;) to current filename without extention (&lt;code&gt;%:r.pdf&lt;/code&gt;) using the &lt;code&gt;wkhtmltopdf&lt;/code&gt; PDF engine&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pkill -HUP mupdf&lt;/code&gt; - Send mupdf a HUP signal (&lt;a href="https://t.umblr.com/redirect?z=https%3A%2F%2Funix.stackexchange.com%2Fquestions%2F425907%2Fhow-to-make-mupdf-automatically-refresh-a-document&amp;amp;t=MTA5MDM0OTFmNzZjMTdmOWQ1NWQyMzI0M2RkMzEzYjQ3NjYxZTg5MyxpMk9JYWJqaQ%3D%3D&amp;amp;b=t%3AeCQNsGnbqK13UGG5X5tNLA&amp;amp;p=https%3A%2F%2Fmanfromth3m0on.tumblr.com%2Fpost%2F189371861374%2Fauto-compiling-markdown-for-a-live-preview-now&amp;amp;m=1"&gt;source&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Well that was easy&lt;/p&gt;

&lt;p&gt;Yes and no, it took me a while to actually come up with that but its actually a very simple and elegant solution. If it isn't working for you make sure you have &lt;code&gt;wkhtmltopdf&lt;/code&gt; (or whatever PDF engine you use) and &lt;code&gt;mupdf&lt;/code&gt; installed. Also make sure you’ve put it in the correct file (&lt;code&gt;.vimrc&lt;/code&gt; for vim, &lt;code&gt;init.vim&lt;/code&gt; for nvim) and reopened any [n]vim instance to make the changes&lt;/p&gt;

&lt;p&gt;Thank you all for reading and happy writing, &lt;br&gt;
~ M&lt;/p&gt;

</description>
      <category>vim</category>
      <category>linux</category>
    </item>
    <item>
      <title>Making vim a *comfy* editor</title>
      <dc:creator>Max S-T</dc:creator>
      <pubDate>Fri, 06 Dec 2019 13:23:40 +0000</pubDate>
      <link>https://dev.to/manfromth3m0on/making-vim-a-comfy-editor-163n</link>
      <guid>https://dev.to/manfromth3m0on/making-vim-a-comfy-editor-163n</guid>
      <description>&lt;p&gt;At first &lt;code&gt;vim&lt;/code&gt; can seem somewhat daunting.&lt;br&gt;
Coming from more traditional editors like notepad[++], VSCode or Sublime, the jump to an editor where you can't even just start typing immediately when you open a file can seem frustrating at first.&lt;br&gt;
I understand and am completely sympathetic to this but once you start using &lt;code&gt;vim&lt;/code&gt; to its full potential its pretty hard to go back.&lt;br&gt;
I think the first thing that daunts new vim users is the lack of immediate guidance, this is not just a &lt;em&gt;'feature'&lt;/em&gt; of &lt;code&gt;vim&lt;/code&gt; but in a large portion of the Linux eco-system overall.&lt;br&gt;
The first big lesson to learn with &lt;code&gt;vim&lt;/code&gt; and a lot of other Linux tools is manpages and help dialogues.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;code&gt;:help&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;:help&lt;/code&gt; command is one of the most useful utilities in &lt;code&gt;vim&lt;/code&gt;, if you are ever unsure of almost anything the &lt;code&gt;:help&lt;/code&gt; command can, in pretty much every case, save you.&lt;br&gt;
At this point you don't even need to open a web browser anymore!&lt;br&gt;
The structure of a help command is very simple type &lt;code&gt;:help&lt;/code&gt; and then whatever it is you are questioning. e.g.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:help g 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Entering this will bring up a list of command that start with &lt;code&gt;:g&lt;/code&gt;.&lt;br&gt;
Now knowing this you're ready to start making &lt;code&gt;vim&lt;/code&gt; a little more &lt;em&gt;comfy&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;code&gt;vim-plug&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Back in the day, adding plgins to &lt;code&gt;vim&lt;/code&gt; was a somewhat arduous process but now, its as simple as adding a line to your &lt;code&gt;vim&lt;/code&gt; config and issuing a command.&lt;/p&gt;
&lt;h3&gt;
  
  
  So lets install &lt;code&gt;vim-plug&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Run this command if you are using &lt;code&gt;vim&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Or this on if you are using &lt;code&gt;neovim&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now enter your &lt;code&gt;vim&lt;/code&gt; config which is either in&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;~/.vimrc&lt;/code&gt; if you use standard &lt;code&gt;vim&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;~/.config/nvim/init.vim&lt;/code&gt; if you use &lt;code&gt;neovim&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then add&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;call plug#begin('~/.vim/plugged')
call plug#end()
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Now we can add plugins in between those two lines and run &lt;code&gt;:PlugInstall&lt;/code&gt; to install them.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Comfy&lt;/em&gt; plugins
&lt;/h2&gt;

&lt;p&gt;Now we need to gather a list of plugins that will will make &lt;code&gt;vim&lt;/code&gt; &lt;em&gt;comfy&lt;/em&gt;.&lt;br&gt;
For that we need to think about some of the things that we have in other editors that make them more &lt;em&gt;comfy&lt;/em&gt; as opposed to stock &lt;code&gt;vim&lt;/code&gt;&lt;br&gt;
So the features we want are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[More and better] Code highlighting&lt;/li&gt;
&lt;li&gt;A file Tree&lt;/li&gt;
&lt;li&gt;Writing focus mode&lt;/li&gt;
&lt;li&gt;A flashy status bar&lt;/li&gt;
&lt;li&gt;Auto-closed brackets&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;wal&lt;/code&gt; based colorscheme&lt;/li&gt;
&lt;li&gt;Intellisense/Auto completions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The good news is there are plugins to do all of these things which are as easy as one line in a config to install. &lt;/p&gt;
&lt;h3&gt;
  
  
  So lets begin:
&lt;/h3&gt;
&lt;h4&gt;
  
  
  File tree
&lt;/h4&gt;

&lt;p&gt;For this we are going to use a fan favorite - &lt;code&gt;NERDTree&lt;/code&gt;.&lt;br&gt;
To install just put&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Plug 'scrooloose/nerdtree'
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;in between the &lt;code&gt;vim-plug&lt;/code&gt; begin and end lines.&lt;br&gt;
Now close and re-open your &lt;code&gt;vim&lt;/code&gt; config and issue the &lt;code&gt;:PlugInstall&lt;/code&gt; command&lt;br&gt;
Once that is done, to open &lt;code&gt;NERDTree&lt;/code&gt; type &lt;code&gt;:NERDTreeToggle&lt;/code&gt; to open the tree&lt;br&gt;
Thats a bit of  mouthful I think you can see so I like to bind the toggle to a hotkey.&lt;br&gt;
Add&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map &amp;lt;C-f&amp;gt; :NERDTreeToggle&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;to your config and now once you reopen &lt;code&gt;vim&lt;/code&gt; you can open the tree with &lt;code&gt;Ctrl+f&lt;/code&gt;&lt;br&gt;
If you want to change the hotkey the anatomy of the binding is &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt; defines a key/key combo, and anytime you see &lt;code&gt;C&lt;/code&gt; it means control then whatever comes after is a key.&lt;br&gt;
So if you wanted &lt;code&gt;Ctrl-e&lt;/code&gt; the binding would be &lt;code&gt;&amp;lt;C-e&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Better Code highlighting
&lt;/h4&gt;

&lt;p&gt;The tool for the task in this case seem to be &lt;code&gt;cim-polyglot&lt;/code&gt;&lt;br&gt;
Which makes some very bold claims&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;It won't affect your startup time, as scripts are loaded only on demand.&lt;/li&gt;
&lt;li&gt;It installs and updates 120+ times faster than the 146 packages it consists of.&lt;/li&gt;
&lt;li&gt;Solid syntax and indentation support (other features skipped). Only the best language packs.&lt;/li&gt;
&lt;li&gt;All unnecessary files are ignored (like enormous documentation from php support).&lt;/li&gt;
&lt;li&gt;No support for esoteric languages, only most popular ones (modern too, like slim).&lt;/li&gt;
&lt;li&gt;Each build is tested by automated vimrunner script on CI. See spec directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;As well as a very impressive list of supported languages (which can be found &lt;a href="https://github.com/sheerun/vim-polyglot"&gt;here&lt;/a&gt;)&lt;br&gt;
And even better, the install is another one line in you config and a &lt;code&gt;:PlugInstall&lt;/code&gt;&lt;br&gt;
Just put&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Plug 'sheerun/vim-polyglot'
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In your &lt;code&gt;Plug&lt;/code&gt; section and you're done&lt;/p&gt;

&lt;h4&gt;
  
  
  Writing focus mode
&lt;/h4&gt;

&lt;p&gt;A great plugin for this is &lt;code&gt;goyo.vim&lt;/code&gt;&lt;br&gt;
And as always the install is super simple&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;vim-plug

&lt;ol&gt;
&lt;li&gt;Add &lt;code&gt;Plug 'junegunn/goyo.vim'&lt;/code&gt; to .vimrc  
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;:PlugInstall&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;Goyo&lt;/code&gt; makes non-coding in &lt;code&gt;vim&lt;/code&gt; great.&lt;br&gt;
It removes all the extraneos stuff from your screen so if you just want to sit and write you can.&lt;br&gt;
Despite all this I think having to type &lt;code&gt;:Goyo&lt;/code&gt; each time you wanted to switch in and out of focus mode would be a pain.&lt;/p&gt;

&lt;p&gt;For this exact reason a wrote a bind to handle it for me:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map &amp;lt;C-g&amp;gt; :Goyo&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;So now whenever I hit &lt;code&gt;Ctrl+g&lt;/code&gt; I enter &lt;em&gt;focus mode&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Auto close brackets
&lt;/h4&gt;

&lt;p&gt;This was one of the first things to get in my way when I started writing code in &lt;code&gt;vim&lt;/code&gt;. I'd miss a close bracket and then spend 15 mins looking for the thing. (&lt;em&gt;yes, I know gcc errors show line numbers. I was tired ok?&lt;/em&gt;) &lt;br&gt;
So to alleviate the pain or going through something similar use a plugin like &lt;code&gt;auto-pairs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Same drill as usual:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;Plug 'jiangmiao/auto-pairs'&lt;/code&gt; 
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:PlugInstall&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And now it just works&lt;/p&gt;
&lt;h4&gt;
  
  
  Status bar
&lt;/h4&gt;

&lt;p&gt;For this task I like &lt;code&gt;vim-airline&lt;/code&gt;. &lt;br&gt;
Note for this bar to work you'll need to be running a powerline patched font. &lt;/p&gt;

&lt;p&gt;As per usual its a simple install:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;Plugin 'vim-airline/vim-airline'&lt;/code&gt; 
&lt;code&gt;Plugin 'vim-airline/vim-airline-themes'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:PlugInstall&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;
  
  
  Wal based colorscheme
&lt;/h4&gt;

&lt;p&gt;For those who don't know wal is a way of generating and managing colorschemes on linux.&lt;br&gt;
And if your syntx-highlighting colors dont match your system colors, lets be real, what kinda human are you.&lt;br&gt;
So we are going to intergrate &lt;code&gt;wal&lt;/code&gt; colors and &lt;code&gt;vim&lt;/code&gt; colors with&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;Plug 'dylanaraps/wal.vim'&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:PlugInstall&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;colorscheme wal&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;
  
  
  Intellisense and Auto completion
&lt;/h4&gt;

&lt;p&gt;This is achivable with the &lt;code&gt;coc&lt;/code&gt; plugin.&lt;br&gt;
To install it put&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Plug 'neoclide/coc.nvim', {'branch': 'release'}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In your &lt;code&gt;vim&lt;/code&gt; config&lt;br&gt;
Then add&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;" For COC
20 set hidden
21 set nobackup
22 set nowritebackup
23 set cmdheight=2
24 set updatetime=300
25 set shortmess+=c
26 set signcolumn=yes
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;as well&lt;/p&gt;

&lt;h4&gt;
  
  
  Bonus round: Easy tab switching
&lt;/h4&gt;

&lt;p&gt;To really make &lt;code&gt;vim&lt;/code&gt; like something like VSCode efficient use of tabs is important. &lt;br&gt;
Usually tabs are controlled with &lt;code&gt;g&lt;/code&gt; commands e.g. &lt;code&gt;gt&lt;/code&gt; for next tab&lt;/p&gt;

&lt;p&gt;So what this next bind does is bind &lt;code&gt;Ctrl+Tab&lt;/code&gt; to next tab&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;map &amp;lt;C-i&amp;gt; gt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I thought this was pretty useful so I'd include it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Bonus round 2: Line Numbers
&lt;/h4&gt;

&lt;p&gt;Line numbers are pretty important to programming (as expressed earlier) so how do you turn them on?&lt;br&gt;
Well you can either use relatiave line number (rnu) or set line numbers. RNU sets line number relative to your cursor which looks pretty cool as you scroll around a document but set are certainly more useful.&lt;br&gt;
To try either out use the &lt;code&gt;:set numbers&lt;/code&gt; or &lt;code&gt;:set rnu&lt;/code&gt; commands.&lt;br&gt;
Once you've found which you like just put that respective command in your vim config&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing remarks
&lt;/h2&gt;

&lt;p&gt;Thank you all for reading and sticking with such a long article.&lt;br&gt;
I'll cya in the next one.&lt;br&gt;
~ M&lt;/p&gt;

</description>
      <category>vim</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
