Perang editor

artikel daftar Wikimedia
Revisi sejak 15 Mei 2006 11.41 oleh 149.226.255.200 (bicara)
(beda) ← Revisi sebelumnya | Revisi terkini (beda) | Revisi selanjutnya → (beda)

Dalam budaya hacker, perang editor adalah debat dalam komunitas pemrogram komputer tentang editor teks mana yang paling baik untuk kegunaan umum. Kedua pihak yang bersaing ketat adalah pendukung Emacs dan pendukung vi.

Komunitas ini memiliki tradisi untuk memperlakukan editor kesukaan mereka dengan fanatisme yang hampir-hampir religius. Banyak flame wars telah dikobarkan antar kedua kelompok, masing-masing membela editornya sendiri, dan menghina editor yang lain. Kebanyakan peserta dalam debat ini mengerti bahwa hal ini hanyalah humor saja. Selain itu juga ada perang mengenai sistem operasi dan bahasa pemrograman sampai indent style source code.

Perang editor biasanya melibatkan pendukung Emacs dan vi, kedua editor paling terkenal dalam sistem operasi Unix dan turunannya. Kebanyakan pemrogram Unix menggunakan salah satu editor ini. Banyak yang dapat menggunakan keduanya, setidaknya untuk kegunaan minimal, dan karena itu merasa layak untuk mengeluarkan pendapat mengenai editor mana yang lebih baik.

Segi positif Emacs

  • Emacs memiliki lebih banyak perintah daripada vi dan editor-editor turunannya, walaupun VIM punya hampir sama banyak.
  • Emacs adalah scriptable dengan satu variant dari Lisp yang disebut Emacs Lisp, dan memiliki banyak plug-ins seperti gnus newsreader dan banyak software development tools.
  • Emacs adalah mirip Swiss Army knife-nya editor, dan menganut motto "big is beautiful". Alasannya adalah karena Emacs berasal dari TECO editor dalam sistem operasi ITS dan TOPS-10, yang lebih tua dari Unix.
  • Emacs mengandung vi, dalam viper-mode (ingat bahwa vi bukan vim; Emacs tidak mengandung vim proper).
  • Emacs tidak perlu beralih dari "command" mode dan "input" mode.
  • GNU Emacs dapat menghitung dalam sistem kalender seperti Mayan atau Discordian, yang tidak dapat dilakukan <ti>vi atau editor-editor yang mirip.
  • Mode edit khusus untuk 25 bahasa pemrograman termasuk Java, Perl, C, C++, Objective C, Fortran, Lisp, Scheme, dan Pascal (VIM punya semua mode ini juga).
  • Mode khusus bahasa scripting untuk Bash, shell lainnya, dan menciptakan Makefiles untuk GNU/Linux, Unix, Microsoft Windows/DOS dan OpenVMS systems.
  • Mendukung pengetikan dan tampilan dalam 21 bahasa non-Inggris, termasuk bahasa Tionghoa, Ceko, Hindi, Ibrani, Rusia, Vietnam dan semua bahasa Eropa barat.
  • Menciptakan PostScript output dari plain text files dan memiliki mode edit khusus untuk document presentation formats seperti LaTeX, TeX, dan Wikipedia.
  • Debug dari dalam Emacs
  • Memiliki program ChangeLogs
  • Fungsi gabung file dan diff
  • Navigasi directory: dapat menggunakan dired untuk menandai, memindahkan dan menghapus file dan sub-directory secara rekursif.
  • Menggunakan Emacs sebagai shell sendiri
  • Version control management untuk release dan beta versions, dengan CVS dan RCS integration.
  • Pengguna Emacs berpendapat bahwa editor ini adalah contoh filosofi Unix yang lebih baik karena pengguna dapat menambahkan sebuah mode (atau program) kepada Emacs dengan Emacs Lisp interpreter, sedangkan pengguna vi harus menulis versi vi baru, menghasilkan messy monolithic crufty program; dalam pandangan ini (misalnya oleh Eric S. Raymond dll), Emacs bukan hanya sebuah program tapi juga adalah sebuah portable framework di mana modul-modul dapat ditambahkan bila perlu. VIM juga memiliki bahasa scripting yang berfungsi sama.

Benefits of vi-like editors

  • vi is smaller and faster than Emacs and requires less overhead. See feature creep.
  • vi is present in all Unix based operating systems as guaranteed by the POSIX standard.
  • vi users argue that it conforms with Unix design and philosophy ("do one thing, and do it well"). Unix does not advocate building "Swiss Army knives", rather, the right tool for the right job.
  • vi commands are entered largely without the use of modifier keys such as Ctrl or Alt. Some users find this reduces wrist strain (see repetitive strain injury).
  • vi is intentionally "what you see is what you get (pretty much everywhere)". vi users generally do not customize their editor much, as opposed to advanced Emacs users who would not feel comfortable if their heavily customized profile were not available to them.
  • Compile and debug code from within vim using :m[a]ke, :cl, and similar commands. (This functionality is not available within vi proper.) Note that debugging code from within the text editor is also a perceived benefit of Emacs over vi. This illustrates the subjective nature of the conflict.
  • vi is modal. It separates "browsing", "editing", "command" and "visual selection" (not in vi, only in vi-clones) editing modes which is very useful if one gets used to it.

Humor

Frequently, at some point in the discussion, someone will point out that ed is the standard text editor.

The Church of Emacs, formed by Richard Stallman, is a joke, and while it refers to vi vi vi (which is 666 in Roman numerals) as the "editor of the beast", it does not oppose the use of vi; rather, it calls proprietary software an anathema. ("Using a free software version of vi is not a sin; it is a penance.") It has its own newsgroup, alt.religion.emacs. Stallman has jokingly declared himself to be St IGNU­cius, a saint in the Church of Emacs.[1]

vi supporters have created an opposing Cult of vi, argued by the more hardline Emacs users to be an attempt to "ape their betters".

Regarding vi's modal nature, some Emacs users joke that vi has two modes - "beep repeatedly" and "break everything", and of course vi users enjoy joking about the supposed carpal tunnel Emacs' key-sequences induce.

Confusing the issue

In ages past, lots of small emacsen, or at least small editors modelled after Emacs, flourished. This was due to the importance of conserving memory with the comparatively miniscule amount available in those days. These days, with a plentitude of memory, many vi-alikes, especially vim, are growing to previously unthinkable proportions.

The old lite Emacsen, as well as the elephantine vis of today, tend to have many of the perceived benefits and drawbacks of the opposing side.