My personal website
git clone git://
Log | Files | Refs

20200413-editor-wizardry.html (5279B)

      1 <!DOCTYPE HTML>
      2 <html lan=en>
      3   <head>
      4     <title>Editor Wizardry | Cem's Website</title>
      5     <meta charset="utf-8">
      6     <meta name="Description" content="Cem Keylan's Website">
      7     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
      8     <style>
      9       html {font-family:monospace;font-size:16px;color:#282a36;}
     10       body {
     11 	  width: 90%;
     12 	  max-width: 1050px;
     13 	  margin-left: auto;
     14 	  margin-right: auto;
     15 	  margin-top: 20px;
     16 	  overflow: none;
     17           overflow-y: scroll;
     18 	  padding-right: 10px;
     19 	  padding-left: 10px;
     20       }
     21       a{text-decoration:none;font-weight:bold;color:#282a36;}
     22       a:hover{text-decoration:underline;}
     23       @media (prefers-color-scheme: dark) {
     24           html {color: white;background:#282a36;}
     25           a{color:white;}
     26       }
     27     </style>
     28     <link rel="stylesheet" href="/static/syntax.css">
     29     <script src="/static/highlight.pack.js"></script>
     30     <script>hljs.initHighlightingOnLoad();</script>
     31   </head>
     32   <body>
     33     <div class="header">
     34       <nav>
     35         <a href='/'>index</a> |
     36         <a href="/software.html">software</a> |
     37         <a href="/blog.html">blog</a> |
     38         <a href="/contact.html">contact</a> |
     39         <a href="/sysmgr">sysmgr</a> |
     40       </nav>
     41     </div>
     42     <hr>
     43     <p>
     44 <h1>Editor Wizardry</h1>
     46 <p>To this day, I have tried lots of IDEs and text editors. Visual Studio, PyCharm,
     47 Sublime, Notepad++, Vim, Emacs, Pico, Atom, etc. The list goes on. I have even
     48 unironically used ed, and ironically used cat for a while.</p>
     50 <p>I have settled down after years and years of &ldquo;editor-hopping&rdquo;. I now have 3
     51 main editors that I use on a daily basis! Yeah, you have read it correct. I use
     52 3 editors on a daily basis. Those are,</p>
     54 <ul>
     55 <li>sed</li>
     56 <li>vi (not vim)</li>
     57 <li>emacs</li>
     58 </ul>
     61 <h2>Emacs</h2>
     63 <p>Emacs is a beast. Defining Emacs as a text-editor is wrong. It is a lisp
     64 interpreter, with text manipulation abilities.</p>
     66 <p>Now, I do like the concept of Integrated Development Environments. It&rsquo;s a shame
     67 that all of them suck. With Emacs I can fine-tune everything according to my
     68 taste, install the packages I need, configure them the way I like. With IDEs you
     69 get some nice plugins, and a tiny bit of customization, but that&rsquo;s it. You get
     70 an environment limited by the vision of someone else. Not to mention that most
     71 IDEs are proprietary software.</p>
     73 <p>I have stopped using Vim, because it is only meant to be a text editor. You can
     74 extend its features with plugins, but you can really see the impact with just a
     75 few of them. Vimscript is also really primitive, that&rsquo;s why people write plugins
     76 with Python, JS, and such. This further affects the speed of Vim. Most Emacs
     77 packages I have encountered are written in pure lisp. I have over 70 packages,
     78 yet my load time and overall speed is better than when I had Vim with 8 plugins.</p>
     80 <h3>Cons</h3>
     82 <ul>
     83 <li><strong>It comes with too many unnecessary features</strong> Emacs comes with multiple IRC
     84 clients, a mail reader, rss reader etc. I don&rsquo;t think they are badly
     85 implemented or anything, I would just prefer building up as I want to instead.</li>
     86 <li><strong>The defaults are not intuitive</strong> Now, I haven&rsquo;t actually tried any of them,
     87 but there is a reason &ldquo;Emacs distributions&rdquo;, such as &ldquo;Spacemacs&rdquo;, &ldquo;DOOM
     88 Emacs&rdquo;, &ldquo;Centaur&rdquo; exist. The base of Emacs, even with its unnecessary
     89 features, is unintuitive and complicated.</li>
     90 </ul>
     93 <p>Also, let&rsquo;s not forget that Emacs uses an ancient Lisp dialect.</p>
     95 <h2>Vi</h2>
     97 <p>I mostly use Emacs when I am dealing with projects. If my aim is to just make
     98 simple changes when I am on the terminal, I just pop up vi provided by busybox.
     99 I just like that it is fast and featureless. It barely gets the job done, and
    100 that&rsquo;s why I like it.</p>
    102 <h3>Cons</h3>
    104 <ul>
    105 <li><strong>No syntax highlighting</strong> Syntax highlighting is an important feature for me
    106 but I have learned to live without it. Since I don&rsquo;t edit large files with it,
    107 this is not the biggest con.</li>
    108 <li><strong>Hard to configure</strong> Busybox vi only has a limited featureset, which makes
    109 it hard to configure. It doesn&rsquo;t read an <code>rc</code> file, it uses the <code>$EXINIT</code>
    110 variable instead. Available options are limited. For example, you cannot
    111 convert the &ldquo;tab&rdquo; action to use space instead of tabs.</li>
    112 <li><strong>No visual selection support</strong> Sadly, <code>v/V</code> isn&rsquo;t implemented in busybox vi.</li>
    113 </ul>
    116 <h2>Sed</h2>
    118 <p>I use sed for when I am making small changes to small files, because it is
    119 faster than opening a file, making a change, saving, and exiting. Using regular
    120 expressions are much faster and efficient at such things.</p>
    122 <h3>Cons</h3>
    124 <ul>
    125 <li><strong>Risky unless you know what you are doing</strong> Since sed is operated on regex,
    126 you need to be extra careful. You are running that regex on the entire file
    127 without an option to &lsquo;undo&rsquo; (unless you have a sed that has a backup
    128 implementation).</li>
    129 </ul>
    131     </p>
    132     <a href="/blog/20200413-editor-wizardry.txt">This page in plain-text</a>
    133     <hr>
    134     <p class=footer>Copyright &copy; 2019-2021 Cem Keylan</p>
    135   </body>
    136 </html>