<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ruslan&#39;s Tech Blog</title>
    <link>https://blog.bekenev.net/tags/productivity-linux-vmware-wsl.html</link>
    <description>Software development related stuff</description>
    <language>en-us</language>
    <lastBuildDate>Mon, 23 Nov 2020 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.bekenev.net/tags/productivity-linux-vmware-wsl/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>My Windows development environment setup</title>
      <link>https://blog.bekenev.net/2020/11/23/my-dev-workflow.html</link>
      <pubDate>Mon, 23 Nov 2020 00:00:00 +0000</pubDate>
      <guid>https://blog.bekenev.net/2020/11/23/my-dev-workflow.html</guid>
      <description>&lt;p&gt;The title is a little bit misleading though. I have almost nothing dev related on my Windows machine and use Linux VM instead.&lt;/p&gt;&#xA;&lt;p&gt;Here is the components my dev environment consists of:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;VMware Workstation (VirtualBox would work too)&lt;/li&gt;&#xA;&lt;li&gt;Windows Terminal&lt;/li&gt;&#xA;&lt;li&gt;Vim (NeoVim to be precise)&lt;/li&gt;&#xA;&lt;li&gt;Tmux and Tmuxinator&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;vmware-workstation&#34;&gt;VMware Workstation&lt;/h2&gt;&#xA;&lt;p&gt;The actual product doesn&amp;rsquo;t matter here. As I mentioned earlier VirtualBox would work as well.&#xA;I use VMware because I used to it and I blindly believe in rumors that it is faster than VirtualBox.&lt;/p&gt;&#xA;&lt;p&gt;Along with some virtual machines I installed out of curiosity there is my main virtual machine configured.&#xA;I call it &lt;strong&gt;Workstation&lt;/strong&gt; and I store there everything work/personal projects/this blog related.&lt;/p&gt;&#xA;&lt;p&gt;The workstation is driven by &lt;strong&gt;Ubuntu Server&lt;/strong&gt; with no Xorg installed. Whenever I need to run graphical Linux app I use VcXsrv.&lt;/p&gt;&#xA;&lt;p&gt;One more thing worth to mention is that network in the workstation is configured with NAT&#xA;so I always know IP address of the VM regardless the network my laptop is connected to.&#xA;Even if my laptop has no internet connection I still can connect to my VM with no issues and can keep working.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a target=&#34;_blank&#34; href=&#34;https://blog.bekenev.net/assets/img/vm.png&#34;&gt;&lt;img alt=&#34;vm screenshot&#34; src=&#34;https://blog.bekenev.net/assets/img/vm.png&#34; width=&#34;600px&#34;/&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The VM is always in such state because I connect to it with SSH&#xA;so I keep it in a separate virtual screen and if I need to suspend or wake it up I just do&#xA;a &amp;ldquo;four finger swipe&amp;rdquo; to switch to the screen with only VMware running.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Why not WSL1/2&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;I love WSL. I also like how WSL team switched to VM approach for their WSL2.&#xA;WSL just doesn&amp;rsquo;t fit my workflow. I like to fire up the VM, work and suspend it so I can wake it up again when needed in a second&#xA;and continue from exactly that state I stopped in.&lt;/p&gt;&#xA;&lt;p&gt;To stop WSL I literally need to stop all the main process like Nginx, Postgres, Tmux. Tmux main purpose is to be never stopped.&lt;/p&gt;&#xA;&lt;p&gt;I don&amp;rsquo;t want to keep WSL&amp;rsquo;s VM running all the time.&lt;/p&gt;&#xA;&lt;p&gt;So, even though I like the idea of WSL I can&amp;rsquo;t use it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;windows-terminal&#34;&gt;Windows Terminal&lt;/h2&gt;&#xA;&lt;p&gt;The reason I use it is I haven&amp;rsquo;t found anything better. It&amp;rsquo;s pretty lightweight, quick and configurable.&lt;/p&gt;&#xA;&lt;p&gt;It has some issues with default configuration (CTRL+C copies text instead of process termination), Alt+Backspace doesn&amp;rsquo;t remove a word (at least by default)&#xA;and some other small issues that can be fixed.&lt;/p&gt;&#xA;&lt;p&gt;UI is super configurable too. I was able to remove tabs and scrollbar to make UI clean.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a target=&#34;_blank&#34; href=&#34;https://blog.bekenev.net/assets/img/windows-terminal.png&#34;&gt;&lt;img alt=&#34;windows terminal screenshot&#34; src=&#34;https://blog.bekenev.net/assets/img/windows-terminal.png&#34; width=&#34;600px&#34;/&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;vimneovim&#34;&gt;Vim/NeoVim&lt;/h2&gt;&#xA;&lt;p&gt;I tried lots of editors and I constantly switch from one to another but Vim is definitely the one I spent most of the time in directly or implicitly&#xA;(evil-mode in Emacs, VsCodeVim, Vintage in Sublime, IdeaVim in IDEs from JetBrains).&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m very much used to it and to its keybindings.&lt;/p&gt;&#xA;&lt;p&gt;You can find my vimrc &lt;a target=&#34;_blank&#34; href=&#34;https://gist.github.com/KryDos/24484288f4b80a4d60c4135b62f2ee84&#34;&gt;HERE&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It also plays nicely with Tmux.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a target=&#34;_blank&#34; href=&#34;https://blog.bekenev.net/assets/img/vim.png&#34;&gt;&lt;img alt=&#34;vim screenshot&#34; src=&#34;https://blog.bekenev.net/assets/img/vim.png&#34; width=&#34;600px&#34;/&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;tmux&#34;&gt;Tmux&lt;/h2&gt;&#xA;&lt;p&gt;A window manager for my terminal.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I run one session per project&lt;/li&gt;&#xA;&lt;li&gt;Most of my sessions have 3 windows&#xA;&lt;ul&gt;&#xA;&lt;li&gt;bg - first window is for background jobs like npm watch, artisan serve, rails server&lt;/li&gt;&#xA;&lt;li&gt;vim - I code here&lt;/li&gt;&#xA;&lt;li&gt;cmd - a window I use to run some git commands or read logs or install missing libraries.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;I use panes occasionally when I need to start two background jobs for example.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I use Tmuxinator for every project I have.&#xA;In case I had to restart my VM I can execute &lt;code&gt;tmuxinator project-name&lt;/code&gt; and I automatically get&#xA;a new session with 3 windows created and Vim window focused with all background jobs required by the project running.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;So why do I need Windows at all if all my coding stuff are in Linux.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Shortly - I like how Windows work.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I like how any device connected to my laptop is recognized and don&amp;rsquo;t require additional attention and configuration.&lt;/li&gt;&#xA;&lt;li&gt;I got much more Kernel Panics and frozen X servers in Linux than I got BSODs in Windows.&lt;/li&gt;&#xA;&lt;li&gt;I need Excel sometimes (LibreOffice is far behind).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
  </channel>
</rss>
