<?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: Mark Cabanes</title>
    <description>The latest articles on DEV Community by Mark Cabanes (@cabanesdev).</description>
    <link>https://dev.to/cabanesdev</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%2F677767%2Ff747867a-e3c1-4706-907b-19b7570e27e8.jpeg</url>
      <title>DEV Community: Mark Cabanes</title>
      <link>https://dev.to/cabanesdev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cabanesdev"/>
    <language>en</language>
    <item>
      <title>Vim: The good parts</title>
      <dc:creator>Mark Cabanes</dc:creator>
      <pubDate>Mon, 04 Oct 2021 20:55:02 +0000</pubDate>
      <link>https://dev.to/cabanesdev/vim-the-good-parts-527j</link>
      <guid>https://dev.to/cabanesdev/vim-the-good-parts-527j</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Vim is the dark side of the programming, you can rule everyone with vim. &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%2Fhr273cs1tb5aedp0hi5t.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%2Fhr273cs1tb5aedp0hi5t.png" alt="the power to rule everyone"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Modes
&lt;/h2&gt;

&lt;p&gt;Vim has several modes with different functions but these are the  most commonly used.&lt;br&gt;
The easiest way to know what mode you are in is by looking at the status bar at the bottom of the editor.&lt;/p&gt;

&lt;h3&gt;
  
  
  Normal mode
&lt;/h3&gt;

&lt;p&gt;Normal mode is Vim's default mode. When you are in normal mode you can navigate, perform operations, and destroy your keyboard.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to move
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;h&lt;/strong&gt; -&amp;gt; move to left&lt;br&gt;
&lt;strong&gt;j&lt;/strong&gt; -&amp;gt; move to down&lt;br&gt;
&lt;strong&gt;k&lt;/strong&gt; -&amp;gt; move to up&lt;br&gt;
&lt;strong&gt;l&lt;/strong&gt; -&amp;gt; move to right&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0&lt;/strong&gt; -&amp;gt; move to the beginning of the line&lt;br&gt;
&lt;strong&gt;$&lt;/strong&gt; -&amp;gt; move to the end of the line&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;w&lt;/strong&gt; -&amp;gt; move to the next word&lt;br&gt;
&lt;strong&gt;b&lt;/strong&gt; -&amp;gt; move to the back word&lt;br&gt;
&lt;strong&gt;e&lt;/strong&gt; -&amp;gt; move to the end of current word&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;gg&lt;/strong&gt; -&amp;gt; move to the beginning of current buffer&lt;br&gt;
&lt;strong&gt;G&lt;/strong&gt; -&amp;gt; move to the end of current word&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;:q&lt;/strong&gt; -&amp;gt; exit from the editor&lt;br&gt;
&lt;strong&gt;:w&lt;/strong&gt; -&amp;gt; save the editor&lt;/p&gt;

&lt;h3&gt;
  
  
  Insert mode
&lt;/h3&gt;

&lt;p&gt;In this mode you can enter text, delete and edit the document.&lt;/p&gt;

&lt;h4&gt;
  
  
  Commands
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;i&lt;/strong&gt; -&amp;gt; enter insert mode to the left of the cursor.&lt;br&gt;
&lt;strong&gt;a&lt;/strong&gt; -&amp;gt; enter insert mode to the right of the cursor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I&lt;/strong&gt; -&amp;gt; enter insert mode to the beginning of the line.&lt;br&gt;
&lt;strong&gt;A&lt;/strong&gt; -&amp;gt; enter insert mode to the end of the line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;o&lt;/strong&gt; -&amp;gt; enter insert mode one line down.&lt;br&gt;
&lt;strong&gt;O&lt;/strong&gt; -&amp;gt; enter insert mode one line up.&lt;/p&gt;

&lt;h3&gt;
  
  
  Visual mode
&lt;/h3&gt;

&lt;p&gt;In this mode you can select parts of the document, copy them, cut them, delete them and paste them.&lt;/p&gt;

&lt;h4&gt;
  
  
  Commands
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;y&lt;/strong&gt; -&amp;gt; yunk the selected characters.&lt;br&gt;
&lt;strong&gt;d&lt;/strong&gt; -&amp;gt; cut or deleted the selected characters.&lt;br&gt;
&lt;strong&gt;p&lt;/strong&gt; -&amp;gt; paste.&lt;/p&gt;

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

&lt;p&gt;If you learnt something from this article, please let me know in the comments.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;br&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%2Fbr0b0hp8js1k0x8sxapv.jpg" 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%2Fbr0b0hp8js1k0x8sxapv.jpg" alt="100% of the brain"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vim</category>
      <category>linux</category>
      <category>programming</category>
    </item>
    <item>
      <title>Move to the dark side of Vim</title>
      <dc:creator>Mark Cabanes</dc:creator>
      <pubDate>Sun, 01 Aug 2021 17:56:48 +0000</pubDate>
      <link>https://dev.to/cabanesdev/move-to-the-dark-side-of-vim-776</link>
      <guid>https://dev.to/cabanesdev/move-to-the-dark-side-of-vim-776</guid>
      <description>&lt;h1&gt;
  
  
  My Experience
&lt;/h1&gt;

&lt;p&gt;When I started programming my code editor was Vscode, although I already knew of the existence of Vim I did not know its advantages. One night I decided to remove Vscode from my computer and install vim, more specifically Neovim. In this post I am going to show you the advantages of this code editor and how to install it on your computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages
&lt;/h2&gt;

&lt;p&gt;At first Vim becomes complex to learn as you have many commands and keyboard shortcuts. But once you learn all these little things that make it difficult for this code editor and you become one with Vim you won't be able to come back from the dark side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Neovim in Linux
&lt;/h2&gt;

&lt;p&gt;If you have another operating system you can see how to install Neovim on its official &lt;a href="https://neovim.io/" rel="noopener noreferrer"&gt;website&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Ubuntu/Debian
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install neovim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Arch-linux
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo pacman -Sy neovim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Fedora
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo dnf install neovim
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To open neovim in terminal use the command &lt;code&gt;nvim&lt;/code&gt;&lt;/p&gt;

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

&lt;p&gt;To configure neovim you have to create the folder &lt;code&gt;nvim&lt;/code&gt; in the path &lt;code&gt;~/.config/&lt;/code&gt; &lt;br&gt;
Inside the nvim folder you have to create the &lt;code&gt;init.vim&lt;/code&gt; file and in that file will go all your settings&lt;/p&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Step 1
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/junegunn/vim-plug" rel="noopener noreferrer"&gt;Vim-Plug&lt;/a&gt;  is a module manager, which is used to install plugins.&lt;br&gt;
To install it you have to run the following command in the terminal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-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;h3&gt;
  
  
  Step 2
&lt;/h3&gt;

&lt;p&gt;To install the plugins you must create the &lt;code&gt;plugins&lt;/code&gt; folder in the directory &lt;code&gt;~/.config/nvim&lt;/code&gt;&lt;br&gt;
To add plugins to neovim you must write to the init.vim&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;call plug#begin('~/.config/nvim/plugins')

" here will go the plugins 

call plug#end()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fgyazo.com%2Fa218061b24f355c10a359ff18d8b0319.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%2Fgyazo.com%2Fa218061b24f355c10a359ff18d8b0319.png" alt="screenshot"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3
&lt;/h3&gt;

&lt;p&gt;Once the plugins are added restart neovim and in command mode you have to type&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;



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