<?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: Nico Hevia</title>
    <description>The latest articles on DEV Community by Nico Hevia (@nicoh).</description>
    <link>https://dev.to/nicoh</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%2F273196%2Fa9b3862c-1bc0-4350-85ee-25f4875d223d.png</url>
      <title>DEV Community: Nico Hevia</title>
      <link>https://dev.to/nicoh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nicoh"/>
    <language>en</language>
    <item>
      <title>sdoc - A simple documentation tool</title>
      <dc:creator>Nico Hevia</dc:creator>
      <pubDate>Thu, 31 Dec 2020 12:00:24 +0000</pubDate>
      <link>https://dev.to/nicoh/sdoc-a-simple-documentation-tool-a64</link>
      <guid>https://dev.to/nicoh/sdoc-a-simple-documentation-tool-a64</guid>
      <description>&lt;p&gt;I'm building a simple doc tool for inline commentaries, with markdown support. The project started as a need to have a simple documentation tool for documenting reusable components.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Installation&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;npm install @nhevia/simple-docs&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or install as a development dependency:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install --save-dev @nhevia/simple-docs&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Usage&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Add &lt;strong&gt;sdoc&lt;/strong&gt; as a package.json script:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"scripts": {
  "docs": "sdoc"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Use a comment block at the start of any file with &lt;code&gt;sdoc&lt;/code&gt; preffix:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*sdoc
This is the main component
*/&lt;/span&gt;

&lt;span class="c1"&gt;// your code&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;npm run docs&lt;/code&gt;. It will indentify documentation blocks in your project and generates an output file (&lt;code&gt;sdoc.md&lt;/code&gt; by default, on root folder):&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since the generated file is markdown, it is supported inside documentation blocks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="cm"&gt;/*sdoc
  This is the **main** component
*/&lt;/span&gt;
&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%2Fuser-images.githubusercontent.com%2F50466554%2F91442173-b727aa80-e871-11ea-9a97-b54b94d9d72a.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%2Fuser-images.githubusercontent.com%2F50466554%2F91442173-b727aa80-e871-11ea-9a97-b54b94d9d72a.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is more info (examples, options, etc) in the &lt;a href="https://github.com/nhevia/simple-docs#readme" rel="noopener noreferrer"&gt;repository's readme&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is my first public package and I got some help from a couple awesome people, but the project is totally open for PRs, enhancement, fixes, documentation, you call it.&lt;/p&gt;

&lt;p&gt;I'm posting this hoping someone might find it useful or want to improve it a little bit. I don't intend this to be super serious because there are awesome documentation tools with lot of support, but it surely is a fun way to spend some time.&lt;/p&gt;

&lt;p&gt;Any question just let me know, thanks for reading!&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>javascript</category>
      <category>documentation</category>
    </item>
    <item>
      <title>Installing and customizing oh-my-zsh on Ubuntu</title>
      <dc:creator>Nico Hevia</dc:creator>
      <pubDate>Sat, 30 Nov 2019 18:33:42 +0000</pubDate>
      <link>https://dev.to/nicoh/installing-oh-my-zsh-on-ubuntu-362f</link>
      <guid>https://dev.to/nicoh/installing-oh-my-zsh-on-ubuntu-362f</guid>
      <description>&lt;p&gt;ZSH (or Z Shell), is an extended version of the default shell. It includes new features, themes and plugins.&lt;/p&gt;

&lt;p&gt;We can install it from the default shell using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ apt install zsh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://ohmyz.sh/"&gt;Oh-my-zsh&lt;/a&gt; is a framework that runs on top of ZSH. If you want to understand it from a web example, it would be something like this: ZSH is Javascript and oh-my-zsh is React/Angular/Vue/etc.&lt;/p&gt;

&lt;p&gt;From their site: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things (...)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We can simply install it with a one-liner. Via cURL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or via Wget:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We accept changing our default shell to zsh, enter our password and that's it:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--74jkY3I_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/EombiMZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--74jkY3I_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/EombiMZ.png" alt="installation_completed" width="736" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: As you can see, the ~ symbol indicates that zsh is being used. But if we close the terminal and open it again, the default shell will be used.&lt;/p&gt;

&lt;p&gt;We can now run '$ zsh' to enable it, or simply logout/login and the default shell will be zsh.&lt;/p&gt;

&lt;p&gt;If the change didn't work and we still have the default shell running, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sudo chsh -s $(which zsh) $(whoami)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Customization
&lt;/h2&gt;

&lt;p&gt;ohmyzsh comes with a lot of plugins and themes preinstalled. I'll be showing you how to customize it using my current preset.&lt;/p&gt;

&lt;p&gt;First, we install powerline font to have support for icons in our terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install fonts-powerline
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, we change the default theme 'robbyrussell' to &lt;a href="https://github.com/agnoster/agnoster-zsh-theme"&gt;agnoster&lt;/a&gt;. This one is pretty common because it's optimized for git repository usage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And change ZSH_THEME variable to ZSH_THEME="agnoster".&lt;/p&gt;

&lt;p&gt;To remove the username and host from the prompt, modify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano ~/.oh-my-zsh/themes/agnoster.zsh-theme
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And comment 'prompt_context' like below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gZgm-QfI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XUA6YSX.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gZgm-QfI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/XUA6YSX.png" alt="comment_prompt_context" width="383" height="301"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you followed the previous steps, you'd have something like this (using Solarized Dark theme for the terminal): &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5aEg5_uj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/gtYtZuJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5aEg5_uj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/gtYtZuJ.png" alt="final" width="813" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>zsh</category>
      <category>ubuntu</category>
      <category>linux</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
