website

My personal website
git clone git://git.ckyln.com/website
Log | Files | Refs

20200413-editor-wizardry.txt (3712B)


      1 Editor Wizardry
      2 ================================================================================
      3 
      4 To this day, I have tried lots of IDEs and text editors. Visual Studio, PyCharm,
      5 Sublime, Notepad++, Vim, Emacs, Pico, Atom, etc. The list goes on. I have even
      6 unironically used ed, and ironically used cat for a while.
      7 
      8 I have settled down after years and years of "editor-hopping". I now have 3
      9 main editors that I use on a daily basis! Yeah, you have read it correct. I use
     10 3 editors on a daily basis. Those are,
     11 
     12 - sed
     13 - vi (not vim)
     14 - emacs
     15 
     16 
     17 Emacs
     18 --------------------------------------------------------------------------------
     19 
     20 Emacs is a beast. Defining Emacs as a text-editor is wrong. It is a lisp
     21 interpreter, with text manipulation abilities.
     22 
     23 Now, I do like the concept of Integrated Development Environments. It's a shame
     24 that all of them suck. With Emacs I can fine-tune everything according to my
     25 taste, install the packages I need, configure them the way I like. With IDEs you
     26 get some nice plugins, and a tiny bit of customization, but that's it. You get
     27 an environment limited by the vision of someone else. Not to mention that most
     28 IDEs are proprietary software.
     29 
     30 I have stopped using Vim, because it is only meant to be a text editor. You can
     31 extend its features with plugins, but you can really see the impact with just a
     32 few of them. Vimscript is also really primitive, that's why people write plugins
     33 with Python, JS, and such. This further affects the speed of Vim. Most Emacs
     34 packages I have encountered are written in pure lisp. I have over 70 packages,
     35 yet my load time and overall speed is better than when I had Vim with 8 plugins.
     36 
     37 
     38 ### Cons
     39 
     40 - **It comes with too many unnecessary features** Emacs comes with multiple IRC
     41   clients, a mail reader, rss reader etc. I don't think they are badly
     42   implemented or anything, I would just prefer building up as I want to instead.
     43 - **The defaults are not intuitive** Now, I haven't actually tried any of them,
     44   but there is a reason "Emacs distributions", such as "Spacemacs", "DOOM
     45   Emacs", "Centaur" exist. The base of Emacs, even with its unnecessary
     46   features, is unintuitive and complicated.
     47 
     48 Also, let's not forget that Emacs uses an ancient Lisp dialect.
     49 
     50 
     51 Vi
     52 --------------------------------------------------------------------------------
     53 
     54 I mostly use Emacs when I am dealing with projects. If my aim is to just make
     55 simple changes when I am on the terminal, I just pop up vi provided by busybox.
     56 I just like that it is fast and featureless. It barely gets the job done, and
     57 that's why I like it.
     58 
     59 
     60 ### Cons
     61 
     62 - **No syntax highlighting** Syntax highlighting is an important feature for me
     63   but I have learned to live without it. Since I don't edit large files with it,
     64   this is not the biggest con.
     65 - **Hard to configure** Busybox vi only has a limited featureset, which makes
     66   it hard to configure. It doesn't read an `rc` file, it uses the `$EXINIT`
     67   variable instead. Available options are limited. For example, you cannot
     68   convert the "tab" action to use space instead of tabs.
     69 - **No visual selection support** Sadly, `v/V` isn't implemented in busybox vi.
     70 
     71 
     72 Sed
     73 -------------------------------------------------------------------------------
     74 
     75 I use sed for when I am making small changes to small files, because it is
     76 faster than opening a file, making a change, saving, and exiting. Using regular
     77 expressions are much faster and efficient at such things.
     78 
     79 ### Cons
     80 
     81 - **Risky unless you know what you are doing** Since sed is operated on regex,
     82   you need to be extra careful. You are running that regex on the entire file
     83   without an option to 'undo' (unless you have a sed that has a backup
     84   implementation).