Author Topic: Struggling: emacs over vim  (Read 6376 times)

0 Members and 1 Guest are viewing this topic.

Offline iLLucionist

  • * Elevated Elder
  • Thread Starter
  • Posts: 2734
  • Location: Netherlands
  • Topre is Love.
Struggling: emacs over vim
« on: Wed, 07 March 2018, 16:22:43 »
So you've reached that suicidal point in your life... you have exploited vim to the max. You have written your fair share of vimscript. The plugins do what you want... 80% of the time. You accept, you compromise. And then you read about emacs, elisp, and evil-mode.. You open the emacs manual and you see 680 pages full of built-in features. All of which are essentially commands that may or may not be bound to keys. Mmmm... are you drooling already?

So what annoys me about vim? Well... the plugins get it right... sort of. And that annoys me. It distracts my focus, it destroys my zen. For instance, when I use CtrlP, I want completion suggestions for everything in the same window where I am currently editing so that I do not have to covertly shift my attention away. It's nitpicking, but 100 small tweaks here and there that are not possible without patching upstream vim plugins would make my life so much easier.

Enter emacs. There is a switch, a variable, a toggle, a command for virtually anything. Emacs essentially is a "text editing API", and you can invoke functions in the API using the keyboard.

One example is that I like org mode. But org mode puts headings next to each other without a newline. Vim plugins typically are not so well thought out (IMHO) that you can tweak these subtle behaviors. Well, enter emacs. There is just a variable for that:

Code: [Select]
(setq org-cycle-separator-lines 1)
Whenever you fold headings, there is a newline between the headings.

In addition to this, creating a new heading can also leave a newline above and below, like this:

Code: [Select]
(setq org-blank-before-new-entry '((heading . 1) (plain-list-item . nil)))
This tells emacs to add 1 newline before a heading, but not before a list item (like a bulleted or numbered list).

It is insane what kind of bizarre configuration options you can set. It's great for people with  severe "compulsive editor OCD".

Another thing that emacs allows you to do, is to combine major and minor modes. A major mode is what eclipse would call a "perspective" or "environment": it has certain ui features, certain commands and settings activated for particular purposes and may alter the editing behavior.

For instance, python has the "elpy" package, which activates "elpy-mode" when you open .py files. And then there is "org-mode" for org files. Etc. Minor modes are alterations or variants on major modes. For instance, there is this awesome "auto fill mode" which you can enable everywhere that automatically basically wraps lines.

But get this. In vim you have EITHER python OR javascript mode. In emacs you can combine major modes. For instance, my primary language is python so I do documentation in ReStructuredText (REST) but I love org-mode. Guess what? You can have REST highlighting and functionality within org-mode by activating both major modes simultaneously!

But the struggle is... reading through the manual (682 pages) and then elisp intro (300) and then elisp reference (1200) and then org-mode manual (200)... pfff...

And then the custom config starts...
MJT2 Browns o-rings - HHKB White - ES-87 Smoke White Clears - 87UB 55g

Offline menuhin

  • Posts: 1225
  • Location: Germany
Re: Struggling: emacs over vim
« Reply #1 on: Wed, 07 March 2018, 17:34:19 »
I survive using vi or vim once in a while.
But I love Emacs.

Emacs gives me confidence to match on with passable computer / laptop gear, with Internet connection to computer clusters for faster and more intense calculations.
And Emacs makes me love my HHKB and my other keyboards with HHKB layouts even more.

Getting into Emacs' manuals also sometimes brings me back to computer science history, as Lisp and ELisp and Emacs' invention is a piece of classic history of modern computer too.
Wishlist: 1) nice thick Alps caps; 2) Cherry profile POM;
More
Wishful-list: 1) We order from keyboard-layout-editor.com; 2) usable Trackpoint module for all keyboards
IBM M13 black
NeXT non-ADB keyboard (AAE)
HHKB Pro 2 HasuBT
[~90WPM, in love with Emacs, and Lisp]

Offline Blaise170

  • * Esteemed Elder
  • Posts: 1332
  • Location: Boston, MA
  • ALPS キーボード
    • XYZ
Re: Struggling: emacs over vim
« Reply #2 on: Mon, 12 March 2018, 11:27:30 »
Emacs isn't available on all systems, but in I never could get used to the weird key bindings in VIM. Therefore I use Emacs when possible (probably 99% of the time) and for the other 1% I just use ped or something.
I proxy anything including keyboards (キーボード / 鍵盤), from both Japan (日本) and China (中國). For more information, you may visit my dedicated webpage here: https://www.keyboards.es/proxying.html

View my current and past keyboards here: https://deskthority.net/wiki/User:Blaise170

Offline iri

  • Posts: 997
  • Location: England
Re: Struggling: emacs over vim
« Reply #3 on: Tue, 13 March 2018, 16:55:53 »
When you find a suitable Vim emulation mode for Emacs, that doesn't **** up text objects (like Evil) or bring a whole lot of complexity (like Spacemacs), please let me know.
(...)Whereas back then I wrote about the tyranny of the majority, today I'd combine that with the tyranny of the minorities. These days, you have to be careful of both. They both want to control you. The first group, by making you do the same thing over and over again. The second group is indicated by the letters I get from the Vassar girls who want me to put more women's lib in The Martian Chronicles, or from blacks who want more black people in Dandelion Wine.
I say to both bunches, Whether you're a majority or minority, bug off! To hell with anybody who wants to tell me what to write. Their society breaks down into subsections of minorities who then, in effect, burn books by banning them. All this political correctness that's rampant on campuses is b.s.

-Ray Bradbury

Offline xtrafrood

  • formerly csmertx
  • * Elevated Elder
  • Posts: 2715
  • Location: Gainesville, FL
  • wildling
Re: Struggling: emacs over vim
« Reply #4 on: Thu, 15 March 2018, 17:23:40 »
I use VIM in about the same way that I would use notepad; aside from powerline and latex plugins my .vimrc is pretty minimalistic. Turns out I'm ok with minimalism.

Offline rowdy

  • HHKB Hapster
  • * Erudite Elder
  • Posts: 21175
  • Location: melbourne.vic.au
  • Missed another sale.
Re: Struggling: emacs over vim
« Reply #5 on: Sat, 17 March 2018, 17:46:14 »
"Because keyboards are accessories to PC makers, they focus on minimizing the manufacturing costs. But that’s incorrect. It’s in HHKB’s slogan, but when America’s cowboys were in the middle of a trip and their horse died, they would leave the horse there. But even if they were in the middle of a desert, they would take their saddle with them. The horse was a consumable good, but the saddle was an interface that their bodies had gotten used to. In the same vein, PCs are consumable goods, while keyboards are important interfaces." - Eiiti Wada

NEC APC-H4100E | Ducky DK9008 Shine MX blue LED red | Ducky DK9008 Shine MX blue LED green | Link 900243-08 | CM QFR MX black | KeyCool 87 white MX reds | HHKB 2 Pro | Model M 02-Mar-1993 | Model M 29-Nov-1995 | CM Trigger (broken) | CM QFS MX green | Ducky DK9087 Shine 3 TKL Yellow Edition MX black | Lexmark SSK 21-Apr-1994 | IBM SSK 13-Oct-1987 | CODE TKL MX clear | Model M 122 01-Jun-1988

Ị̸͚̯̲́ͤ̃͑̇̑ͯ̊̂͟ͅs̞͚̩͉̝̪̲͗͊ͪ̽̚̚ ̭̦͖͕̑́͌ͬͩ͟t̷̻͔̙̑͟h̹̠̼͋ͤ͋i̤̜̣̦̱̫͈͔̞ͭ͑ͥ̌̔s̬͔͎̍̈ͥͫ̐̾ͣ̔̇͘ͅ ̩̘̼͆̐̕e̞̰͓̲̺̎͐̏ͬ̓̅̾͠͝ͅv̶̰͕̱̞̥̍ͣ̄̕e͕͙͖̬̜͓͎̤̊ͭ͐͝ṇ̰͎̱̤̟̭ͫ͌̌͢͠ͅ ̳̥̦ͮ̐ͤ̎̊ͣ͡͡n̤̜̙̺̪̒͜e̶̻̦̿ͮ̂̀c̝̘̝͖̠̖͐ͨͪ̈̐͌ͩ̀e̷̥͇̋ͦs̢̡̤ͤͤͯ͜s͈̠̉̑͘a̱͕̗͖̳̥̺ͬͦͧ͆̌̑͡r̶̟̖̈͘ỷ̮̦̩͙͔ͫ̾ͬ̔ͬͮ̌?̵̘͇͔͙ͥͪ͞ͅ

Offline iLLucionist

  • * Elevated Elder
  • Thread Starter
  • Posts: 2734
  • Location: Netherlands
  • Topre is Love.
Re: Struggling: emacs over vim
« Reply #6 on: Sun, 18 March 2018, 08:29:22 »
When you find a suitable Vim emulation mode for Emacs, that doesn't **** up text objects (like Evil) or bring a whole lot of complexity (like Spacemacs), please let me know.

How does evil-mode mess with text objects? Well.. I suppose evil-mode emulates them as vi-style motions and objects are not present in emacs.

Spacemacs... tried it didn't like it. So far I have no issues with evil in emacs, except for evil-integration, which supposedly brings vim-like keybindings across multiple plugins, but here and there it conflicts with those plugins.
MJT2 Browns o-rings - HHKB White - ES-87 Smoke White Clears - 87UB 55g

Offline iLLucionist

  • * Elevated Elder
  • Thread Starter
  • Posts: 2734
  • Location: Netherlands
  • Topre is Love.
Re: Struggling: emacs over vim
« Reply #7 on: Sun, 18 March 2018, 08:31:50 »
Or give up and stay vim ... http://www.linuxjournal.com/content/best-editor-0

I've read that, yes. I think that there is a large confound, and that is newcomers to coding who want to move beyond sublime/textmate/eclipse/intellij/pycharms etc. Vim is the cool kid on the block "check out mode editing". Yes, factually, that still makes vim more popular. But if you break it down to subgroups, I think that the only group that significantly uses emacs more, is a new group, the "hipsters" (if I may say so).

No to flame though... I like vim very much. I want to switch to emacs because of the lisp power. And being able to do EVERYTING inside emacs (e-mail, calendar, etc.). is very appealing to me. And org-mode. Yes... vim has it's own implementation but I do not like it as much as emacs' one.
MJT2 Browns o-rings - HHKB White - ES-87 Smoke White Clears - 87UB 55g

Offline xtrafrood

  • formerly csmertx
  • * Elevated Elder
  • Posts: 2715
  • Location: Gainesville, FL
  • wildling
Re: Struggling: emacs over vim
« Reply #8 on: Sun, 18 March 2018, 15:49:33 »
Ah, you want an Emacs desktop environment. I see

Offline rowdy

  • HHKB Hapster
  • * Erudite Elder
  • Posts: 21175
  • Location: melbourne.vic.au
  • Missed another sale.
Re: Struggling: emacs over vim
« Reply #9 on: Sun, 18 March 2018, 20:39:23 »
Or give up and stay vim ... http://www.linuxjournal.com/content/best-editor-0

I've read that, yes. I think that there is a large confound, and that is newcomers to coding who want to move beyond sublime/textmate/eclipse/intellij/pycharms etc. Vim is the cool kid on the block "check out mode editing". Yes, factually, that still makes vim more popular. But if you break it down to subgroups, I think that the only group that significantly uses emacs more, is a new group, the "hipsters" (if I may say so).

No to flame though... I like vim very much. I want to switch to emacs because of the lisp power. And being able to do EVERYTING inside emacs (e-mail, calendar, etc.). is very appealing to me. And org-mode. Yes... vim has it's own implementation but I do not like it as much as emacs' one.

Seems to be, and this is not meant to be disparaging in any way, that emacs is a greybeard editor.  All the cool kids today want the latest JavaScript GUI editor with auto-complete, drag/drop, preview, that weird search thing they have these days, compiler integration with a single click, syntax highlighting, spell-checking and so on that just works out of the box.

Doesn't seem like a lot of people these days want to spend the time configuring, and even programming, an editor to do what they want.
"Because keyboards are accessories to PC makers, they focus on minimizing the manufacturing costs. But that’s incorrect. It’s in HHKB’s slogan, but when America’s cowboys were in the middle of a trip and their horse died, they would leave the horse there. But even if they were in the middle of a desert, they would take their saddle with them. The horse was a consumable good, but the saddle was an interface that their bodies had gotten used to. In the same vein, PCs are consumable goods, while keyboards are important interfaces." - Eiiti Wada

NEC APC-H4100E | Ducky DK9008 Shine MX blue LED red | Ducky DK9008 Shine MX blue LED green | Link 900243-08 | CM QFR MX black | KeyCool 87 white MX reds | HHKB 2 Pro | Model M 02-Mar-1993 | Model M 29-Nov-1995 | CM Trigger (broken) | CM QFS MX green | Ducky DK9087 Shine 3 TKL Yellow Edition MX black | Lexmark SSK 21-Apr-1994 | IBM SSK 13-Oct-1987 | CODE TKL MX clear | Model M 122 01-Jun-1988

Ị̸͚̯̲́ͤ̃͑̇̑ͯ̊̂͟ͅs̞͚̩͉̝̪̲͗͊ͪ̽̚̚ ̭̦͖͕̑́͌ͬͩ͟t̷̻͔̙̑͟h̹̠̼͋ͤ͋i̤̜̣̦̱̫͈͔̞ͭ͑ͥ̌̔s̬͔͎̍̈ͥͫ̐̾ͣ̔̇͘ͅ ̩̘̼͆̐̕e̞̰͓̲̺̎͐̏ͬ̓̅̾͠͝ͅv̶̰͕̱̞̥̍ͣ̄̕e͕͙͖̬̜͓͎̤̊ͭ͐͝ṇ̰͎̱̤̟̭ͫ͌̌͢͠ͅ ̳̥̦ͮ̐ͤ̎̊ͣ͡͡n̤̜̙̺̪̒͜e̶̻̦̿ͮ̂̀c̝̘̝͖̠̖͐ͨͪ̈̐͌ͩ̀e̷̥͇̋ͦs̢̡̤ͤͤͯ͜s͈̠̉̑͘a̱͕̗͖̳̥̺ͬͦͧ͆̌̑͡r̶̟̖̈͘ỷ̮̦̩͙͔ͫ̾ͬ̔ͬͮ̌?̵̘͇͔͙ͥͪ͞ͅ

Offline xtrafrood

  • formerly csmertx
  • * Elevated Elder
  • Posts: 2715
  • Location: Gainesville, FL
  • wildling
Re: Struggling: emacs over vim
« Reply #10 on: Sun, 18 March 2018, 22:59:43 »
Just configuring rxvt-unicode so that I could copy/paste with a perl plugin (clipboard) took a bit of maneuvering. I guess I can see the appeal of EmacsOS. With my limited experience I'd rather keep my eggs in multiple baskets so to speak.

Offline menuhin

  • Posts: 1225
  • Location: Germany
Re: Struggling: emacs over vim
« Reply #11 on: Mon, 19 March 2018, 06:47:43 »
If you are interested in "Emacs OS", the closest real deal was LispMachine's OS Genera, where people see the Space Cadet Keyboards attached to.

Perhaps keep an eye on this project - ChrysaLisp:
https://github.com/vygr/ChrysaLisp

It doesn't mean it will necessarily do all the jobs better, as we see Un*x are built upon C and many Un*x systems are robust and reliable.
Lisp dialects, and anything that natively support tail call optimization is interesting, i.e. the stack will not overflow. But a few modern languages, especially function languages, find ways to implement TCO, usually involving an alternative implementation of the Y combinator in the language and than switched on or off with an argument during compilation.

Wishlist: 1) nice thick Alps caps; 2) Cherry profile POM;
More
Wishful-list: 1) We order from keyboard-layout-editor.com; 2) usable Trackpoint module for all keyboards
IBM M13 black
NeXT non-ADB keyboard (AAE)
HHKB Pro 2 HasuBT
[~90WPM, in love with Emacs, and Lisp]

Offline TacticalCoder

  • Posts: 526
Re: Struggling: emacs over vim
« Reply #12 on: Mon, 19 March 2018, 09:48:49 »
In Emacs everything is configurable down to every single keystroke: even typing a regular letter in the editor is a function that can be hooked and modified.

I sometimes enter OCD with my part of Emacs config but not too often anymore: just writing quick and dirty function(s) that do the job when needed (and not existing yet or not aware of any implementation) and then later on I clean the crap out of my config.

But my "keybindings" setup: I went ballistic many years ago. Keyboard with CTRL/META/SHIFT/HYPER/SUPER modifier. One modifier dedicated only to the (tiling) window manager (so not interfering with anything else) and one modifier dedicated only to fast cursor movement and command execution under Emacs.

Also ijkl to move the cursor (and of course acejump/avy-mode) because ijkl is just amazing. hjkl is close but no cigar.

Also I've got an entire Emacs config that hardly requires any pinky usage. Take ctrl-x, I've got ctl-x-map set to "modifier + ," where modifier is a key on which my left thumb is always located (japanese keyboard, tiny spacebar, easier movements for the thumb).

I basically set all that up in full OCD mode once, taking days to configure it all and then I just carry my config over at each new Debian major release (I re-install everything from scratch) and each new big Emacs release.

It's very sweet.
EDIT: I also love IntelliJ. Well, more like: I love how well it deals with that piece of **** that Java is (and that's as a someone using Java since version 1.2) and makes Java development bearable... But the IntelliJ "text editor" part of the IDE is just a piece of garbage compared to Emacs. It sucks big times. A cool setup would be Emacs right where the text editor part of IntelliJ is. A bit like emacs-eclim+eclispe, but for IntelliJ.
« Last Edit: Mon, 19 March 2018, 09:51:54 by TacticalCoder »
HHKB Pro JP (daily driver) -- HHKB Pro 2 -- Industrial IBM Model M 1395240-- NIB Cherry MX 5000 - IBM Model M 1391412 (Swiss QWERTZ) -- IBM Model M 1391403 (German QWERTZ) * 2 -- IBM Model M Ambra -- Black IBM Model M M13 -- IBM Model M 1391401 -- IBM Model M 139? ? ? *2 -- Dell AT102W -- Ergo (split) SmartBoard (white ALPS apparently)

Offline menuhin

  • Posts: 1225
  • Location: Germany
Re: Struggling: emacs over vim
« Reply #13 on: Mon, 19 March 2018, 11:26:51 »
@TacticalCoder

I re-read your post just to make sure OCD mode is not an Emacs mode that I can download...  :p
My navi in Emacs is still quite primitive and vanilla, the best thing I have done is moving the Left_Ctrl up to the Caps Lock key (e.g. by having a HHKB or similar keymapping in my other keyboards via AutoHotKey or Xmodmap); otherwise, I am still sticking to c-b c-f c-n c-p, just in case if I have to use Emacs -q I won't totally freak out.
My shortcuts are dedicated to frame management and screen (Elscreen package) management for those time I have to run many things (or kill some) at once; I've learn many Emacs users took their liberty to remap key bindings totally according to their taste.
Wishlist: 1) nice thick Alps caps; 2) Cherry profile POM;
More
Wishful-list: 1) We order from keyboard-layout-editor.com; 2) usable Trackpoint module for all keyboards
IBM M13 black
NeXT non-ADB keyboard (AAE)
HHKB Pro 2 HasuBT
[~90WPM, in love with Emacs, and Lisp]

Offline xtrafrood

  • formerly csmertx
  • * Elevated Elder
  • Posts: 2715
  • Location: Gainesville, FL
  • wildling
Re: Struggling: emacs over vim
« Reply #14 on: Mon, 19 March 2018, 13:45:59 »
If you are interested in "Emacs OS", the closest real deal was LispMachine's OS Genera, where people see the Space Cadet Keyboards attached to.

Perhaps keep an eye on this project - ChrysaLisp:
https://github.com/vygr/ChrysaLisp

It doesn't mean it will necessarily do all the jobs better, as we see Un*x are built upon C and many Un*x systems are robust and reliable.
Lisp dialects, and anything that natively support tail call optimization is interesting, i.e. the stack will not overflow. But a few modern languages, especially function languages, find ways to implement TCO, usually involving an alternative implementation of the Y combinator in the language and than switched on or off with an argument during compilation.

Ah, I see now. When I hear or read about Emacs, images of Richard Stallman, and Trisquel appear in my head for some reason.

Offline noisyturtle

  • * Exalted Elder
  • Posts: 6423
  • comfortably numb
Re: Struggling: emacs over vim
« Reply #15 on: Mon, 19 March 2018, 15:16:50 »
VIM is just Notepad++ but makes you seem smarter. Like when a hipster wears thick glasses with no prescription.

Offline iri

  • Posts: 997
  • Location: England
Re: Struggling: emacs over vim
« Reply #16 on: Mon, 19 March 2018, 17:01:36 »
VIM is just Notepad++ but makes you seem smarter.
That's literally why I use VIM not
(...)Whereas back then I wrote about the tyranny of the majority, today I'd combine that with the tyranny of the minorities. These days, you have to be careful of both. They both want to control you. The first group, by making you do the same thing over and over again. The second group is indicated by the letters I get from the Vassar girls who want me to put more women's lib in The Martian Chronicles, or from blacks who want more black people in Dandelion Wine.
I say to both bunches, Whether you're a majority or minority, bug off! To hell with anybody who wants to tell me what to write. Their society breaks down into subsections of minorities who then, in effect, burn books by banning them. All this political correctness that's rampant on campuses is b.s.

-Ray Bradbury

Offline seva1385

  • Posts: 35
Re: Struggling: emacs over vim
« Reply #17 on: Mon, 26 March 2018, 20:10:56 »
VIM is just Notepad++ but makes you seem smarter. Like when a hipster wears thick glasses with no prescription.

Nope, Notepad++ is just a basic editor, vim is that and much more.
How about regular expression with support arithmetic operation on arguments?
Diff mode? Custom folding?

I myself tried to love emacs once but it seems the editor is meant to be lived in; and I needed something which is more of a practical tool.
Kinesis Advantage2

Offline pr0ximity

  • Posts: 2705
  • Location: Maine
Re: Struggling: emacs over vim
« Reply #18 on: Tue, 27 March 2018, 05:38:44 »
Maybe someday I'll get around to exploring emacs, but I just don't think I have the desire for the benefits it has. I've never run into the warts of vim's plugin system. I'm fine with vim+tmux and a small number of plugins managed via vundle. Easy to setup, and I already have the requisite muscle memory to be more productive with vim than any other editor.
| Flickr | KMAC 1.2 | Koala | GSKT-00-Z | GSKT-00-AEK | GON NerD60 | Jane V2 CE | Whale | J80S | Ibis | Pro2 | Pro1 | 356mini | 356CL DGE | G80-5000 HAMDE | IBM 1390120 | IBM F AT | IBM F122 | IBM 3101 | Zenith Z-150