After over a decade of Vim, I’m hooked on Emacs
changelog.complete.org
changelog.complete.org
I dropped my highly customized emacs for Omni Focus (org-mode), Mail.app (mu4e), SublimeText (general emacs, org-mode), Mendeley (org-ref, helm), MS Word (LaTeX-mode). I never stopped using PowerPoint because it’s the standard in science and the couple times I tried Beamer (directly and through org-export) were a nightmare for having multiple figures per slide. I also sometimes use Excel now, though Python is still more often the better tool. I have not found a good personal knowledge base; right now I am using Evernote.
I have several collaborations and projects. Keeping my tasks organized needed to be easier than org. Working with other people in formats that will make them happy to work with me was also critical. Even with things like Overleaf and ShareLaTeX, it is too hard to collaborate with others.
Giving up plain text formats and version control are challenges.
I use org-mode and I make exports for nontechnical people. I use org-mode and Pandoc to make MS Word files which does everything I would ever want to do. Org-mode and ox-reveal (using reveal.js) is great for slides.
I would say just use whatever works for you, but it makes me sad that I can convert my things to your format but you can't convert your things to mine.
#+CAPTION: Constants
#+NAME: tab_constants
| Constant | Value |
|---------------------------+-------|
| A | 1 |
| B | 90 |
| C | 90 |
| D | 12 |
| *Total* | 240. |
#+TBLFM: @6$2=@2 * @5 / ((@3 + @4) / 60 / 60)
We come to the conclusion that with src_emacs-lisp[:var d=tab_constants[2,1]]{d} VR rig constantly busy for src_emacs-lisp[:var d=tab_constants[5,1]]{d} hours.
Resulting in src_emacs-lisp[:var d=tab_constants[6,1]]{d} people going through the experience.
And with this, whenever I change the constants in my table, my whole document updates. I find that insane. No more having to update numbers everywhere in the document everytime I change an input in my tables. Then you can just export to anything (I do org->html->princexml->pdf for easy CSS styling, but you can do org->latex->pdf beem).I've also been giving it a try for brainstorming code and todos on side projects. Here's an example, it started by being pseudo code for some code, then basic python (because it was so close to my pseudo code, then I started implementing elisp in TDD inside my ord-mode doc. So it evolved like that: notes->pseudo code->tdd in the same doc:
* Flow.el TODOs
** DONE projectile-find-type-file
CLOSED: [2018-03-07 Wed 22:12]
...
*** Check buffer file ends with test
#+begin_src emacs-lisp
(defun get-styles-file ()
...)
;;;;;;;;;;;;;
;;; Tests ;;;
;;;;;;;;;;;;;
(get-styles-file) ; /..path../notesStyles.org
#+end_src
#+RESULTS:
: /home/thomas/config/spacemacs/flow/notesStyles.org
What's really cool about orgmode rather than MS word is that it's text, so easily portable and gitable. You get powerful track changes for your documents.Now that I'm back to working on one product (Ruby/Javascript) again I tried VS Code, since that's what my coworkers use, and it's been fine. Having ripgrep as the search backend is awesome and the built in terminal gets the job done. I tried going back to Emacs but I got fed up with the mental overhead of remembering rectangle behavior and emacs regexps.
However, I have found that both with Spacemacs and vanilla Emacs + packages I basically end up with a Rube Goldberg machine where it is hard to see how things work and fit together. Combined with the tendency of packages to break very often, I frequently had the feeling that the ground was crumbling under my feet.
I am mostly back to vim now for editing (+ Things for todos). For presentations and text I use one of {LaTeX, pandoc Markdown, Deckset.app Markdown}.
more like:
jupyter is like having emacs in your browser (but a lot less)
That's why I use emacs Prelude[0], a set of defaults which are, all-in-all, pretty great.
I much prefer having the same environment for everything. The fact that you have three different, presumably incompatible pieces of software replacing parts of Org mode is itself pretty revealing.
However I still use org-mode as an outliner, containing little code blocks and informal TODOs, and I love using emacs and writing modest Elisp modifications and have successfully introduced people to it. I wish more people knew how to try it out in server mode with emacsclient as there is still a widespread misunderstanding that it is slow to start up.
One final comment: the rise of markdown was a huge blow to org-mode. It doesn’t always make sense for me to draft notes in org when they ultimately will become comments on github (or JIRA for that matter, oh god).
(1) org-mode is a format native to emacs. The org parser and HTML formatter are written in elisp.
(2) github is not going to run emacs processes server-side, in order to render user content in org format.
Isn't that exactly the same thing vim pundits are doing these days? Typical vim installations now load megabytes of macros and settings. I've always stuck with plain vi / nvi (until the encoding problems became too much) and never bothered with all the autocomplete scripts etc. ...
The emacs buffer abstraction (and bag of commands) is what makes it so good for me. Having everything in one place is great, and having everything (mostly) just text is also great. I hope more people with your type of workflow needs have the patience and free time to write good emacs packages.
There's a great reddit posting today about tweaking your emacs config.
https://www.reddit.com/r/emacs/comments/83baf5/i_find_tweaki...
It's great because I can fairly comfortably move between most editors because most editors have a vim mode.
The downside is that most editors don't have a complete vim mode, so it's never 100%.
I do appreciate that I'm very much in the minority here though.
Why not just use vim? Why bother with other editors? I have changed jobs but carry my dot files with me.
Because I use C# a lot and I really like all the support I get from Visual Studio.
Later, I tried picking it up again, but this time chose spacemacs. Hoooly crap, what a difference.
1. Discoverability. The helm UI is better than any docs, since it's there when and where I need it to find the thing. It also provides the ability to search for arbitrary commands, which is great when you're learning a new mode or layer.
2. Modal editing. I wasn't a vim user before, but spacemacs has converted me over to the modal editing camp. It makes a ton of sense now and is a joy to use alongside Emacs' power.
3. The layer system is way easier to use than ELPA directly and takes most of the pain of configuring packages away.
For someone who wanted the power of Emacs without having to touch the insides, spacemacs is wonderful and has fully converted me over to using it everyday!
I just ask because with vim, I can easily describe why I like it - it has about a billion cool and useful text-editing features arranged in a way that makes them easy to use. I understand Spacemacs replicates basically all of these features - but what's emacs adding to this? I've tried spacemacs several times, and each time I've been stopped by not really being able to find anything, aside from org-mode, there's nothing there that justifies the (relatively) slow loading times and generally heavier overhead of emacs.
1. Text editing (obviously). spacemacs provides nearly any nifty trick that vim would give you for text editing (and like I said, I'm a believer in the way of modal editing).
2. HTTP client. Emacs has a package called "restclient" that allows you to write what amount to cURL commands - in plain text, with documentation - and execute them in-line within my editor. Other teams I've been on use Postman, which is great, but I like the fact that I can save the file and commit it alongside our services/tests/etc.
3. Note taking & task lists. Org-mode is Emacs killer app. Honestly, I'm still pretty fresh to this whole "being organized" thing. But already I'm finding myself writing more and more notes, TODOs, etc. and it's really helping me on a new project that is complete chaos right now.
4. Clojure IDE. Cursive for IntelliJ comes close, but nothing beats the experience of doing Clojure development in Emacs. Since my team adopted it as our daily workhorse language, I've never had a moment where I wanted to leave Emacs. It's integration with the REPL and LISP in general makes it the most powerful programming environment I've used to date (YMMV).
There might be more... the point is that Emacs is more like an application platform than a text editor, and it has some really powerful applications that have been developed for years. I now have this strange urge to do more and more inside of Emacs, if only because it gives me a common interface into my workflow.
EDIT: Forgot, magit for doing git operations. Great interface and I only (very very rarely) need to drop down to terminal to do things now.
It's why the vim vs. Emacs "war" isn't really a fight over text editing, but an ideological battle of "one tool that does one thing well" vs. "one tool that has everything I ever need."
Personally, I find integration a huge selling point, and the Unix pipe interface leaves a lot to be desired. Writing some elisp code, or (preferably) installing a well-documented layer/package, is preferable to me. The specific tools I need also happen to be well supported in the Emacs ecosystem.
It doesn't. But thinking of Emacs as a text editor is like thinking of Firefox as a document displayer.
>Like, why do you want an HTTP client in your text editor when you already have wget, curl, nc, etc available in your shell?
There's a reason to prefer using these in Emacs over the shell. It is because Emacs is a better embodiment of the UNIX philosophy than the UNIX shell itself is:
>Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features".
A lot of standard UNIX tools are laden with features. But well, that could be said of Emacs as well.
>Expect the output of every program to become the input to another, as yet unknown, program.
Emacs does this much better than the UNIX shell, in my experience. The level of consistency you see in the Emacs ecosystem just doesn't exist in UNIX. With UNIX, you really are feeling like you are gluing stuff together. With Emacs, it feels much more natural.
The loading times aren't slow if you run it in daemon mode (as I do now) or strip down your .emacs file to its core (so you only load what you need for the files you're editing).
Org mode is great and can do an absolute ton.
Magit is the best git interface I have ever used and I have used a ton of them.
Evil mode is an almost complete vim and I consider myself to be a pretty power vim user and have used it for many years.
Helm is amazing at searching through lists of things and enables other things like swoop(also amazing) which takes your file and puts each line into a temp buffer and let's you search for lines in that file. Say you wanted lines matching foo and bar all you do is type 'foo bar' and it updates the list of matches in real time. If you move your cursor over any of the matched lines it jumps to the context in the file. If you hit escape it goes back to where you initiated the search, if you hit enter it jumps to that line in the file and dismisses the dialog.(actually a temp buffer that you can edit later if you wanted.)
irc, terminal, email, a slew of other things that are treated as normal buffers that you can use all your normal editing commands in. The entire editor is introspective and customizable as everything is a function that you can bind contextually and most are written in Elisp.
That's the power and I am really only scratching the surface. Hop onto the spacemacs gitter chat and ask any other questions you have.
Edit another invaluable one is 'which key' that tells you what the next available key strokes are once you press something that is the start of a multi key chord. In spacemacs this is used to great effect with the space bar starting most of the non vim leader keys actions. These are also easily remembered because they usually start with the same letter as the idea. 'Spc b' is the menu for all the buffer actions. Spc p is projects, Spc f is files, Spc a is applications, Spc s is extra searching functions.
Every command, even pressing a letter, has a corresponding function. Utilizing ELisp you can essentially make the editor do anything you want (and because of that and how long it has been around...everyone has already made it do anything you could want).
It will become different things for different people, to the point where it may be barely recognizable as Emacs. That is the power of Emacs. It can be whatever you want it to be.
If you've used the Ipython notebook (i.e. Jupyter), realize that Org Mode had much of that capability before the notebook existed - and it works for many languages, as well as across languages (you can send the results of a python code block to a C++ code block). When I wanted to learn Haskell, keeping notes in Org Mode was great. I would put in a code block, and add notes on what the code would do. Any time later while reading my notes, I could interact with those code blocks and fiddle around with it to check that my understanding is correct. I then exported the file to HTML, and I now have very nicely formatted notes for Haskell (or C++, or whatever language you like).
I really should try Spacemacs. I'm quite curious to see how the two mentally compare. For me a huge thing about Kakoune is seeing the selections ahead of time - Vim always had me guessing at what a delete (or w/e) action is going to do. Kakoune makes that so nice.
Effective vim does not start with a lot of plugins IMO. If you expect more than an editor from vim, you have come to the wrong place.
That's the first time I've ever heard anyone say that. It has instantly changed the way I think about vim and now I understand the "emacs is an OS" thing fully.
Having said that I do happily use both Unix and emacs and think they both have their place.
It possibly goes all the way back to me using Wordstar on CP/M as a child, which had a similar buffer-focused UX with control keys to temporarily do some non-text entry. I also nearly always use emacs in X windows mode with multiple "frames" (separate X windows) opened into the same set of buffers and rely on the mouse-driven menus to find less frequent options and commands that I don't keep in my muscle memory.
I can get by in non-X mode over SSH but feel crippled, much like I do when vim is the only option on a system. Then, I'll just get in and out quickly to make small changes, preferring to navigate around via the shell/grep/less etc. while I plan my attack on a file.
1. Learn basic movements and insert/normal mode
2. Learn advanced movements. When you want to insert some text learn the fastest way to move your cursor to that location in normal mode. Learn the different way move from normal mode to insert mode.
3. Learn find & replace commands.
4. Learn macros for repetitive tasks.
5. Learn when to use visual mode.
6. Improve .vimrc file. Remap keys to reduce keystrokes based on your personal workflow.
7. Learn about buffers.
With ctags and GNU id-utils (mkid, lid), you get great code browsing: instantly find where things are defined using tags, and where they are referenced with ID utils.
I map the K command (normally used for man page lookup for the word under the cursor) to do a lid lookup and turn the results into a quicklist. The :grep command is also mapped to lid lookups via grepprg. lid uses a binary database file named ID which is generated using mkid. It instantaneously finds all occurrences of any identifier in a fairly large tree, like the Linux kernel.
There is a code completion plugin for Vim so when you type foo.bar->, you see a popup with a list of structure members and such.
Of course, there is the great syntax highlighting and auto-indentation which catch coding typos as you make them: IDE-like feature.
Vim's :make turns compiler errors into a quickfix list so you can move between them and fix. I map :W so that it saves the buffer and runs :make.
Use ":set hidden"
(Don't rely on ":help hidden" to actually explain it, though.)
Here is why you want to use it:
You edit "file-a" and make some changes. Then you flip to "file-b" using ":e fileb". Vim says you cannot; you have unsaved changes. Okay, so you ":w" and then flip. But then you return to "filea" and want to undo the earlier changes. Oops: lapsing into a dumb Vi from Unix, Vim says there aren't any changes to be undone.
Vim throws away buffers by default when you switch out of them, unless "set :hidden" is turned on. Then it behaves like any other normal application with multiple buffers. The "filea" buffer will stick around and keep its undo history, marks and other state.
I can not for the life of me understand the appeal of org-mode. It's probably just me, because most other organizers don't work for me, but if you're going to do a file-based organizer, it seems like you want a way to easily pull stuff out of old files so your working set isn't spread out all over the place.
Hmm. What do you mean exactly? I have all sorts of stuff in my org mode files, and what keeps track of them for me is the agenda view (i.e. it finds TODOs, deadlines, events, etc).
I used emacs for nearly two decades, and I agree.
I tried - so hard - to get into org-mode, but just couldn't do it. I'd use it religiously for a week or two, and then the inertia was just too high. Or maybe I really didn't need all the features. Who knows.
Saying you "don't get" org-mode is blasphemy in the church of emacs, so I just assumed something was wrong with me and kept my mouth shut, and used it as a very simple todo list.
I would, however, use org-mode if I were say, working on a PhD or doing long-term public research where keeping everything in an open format was essential.
http://www.howardism.org/Technical/Emacs/literate-devops.htm...
The tables functionality is also great, and the structural editing aspects (move subtrees, bullet lists, etc) is very handy when editing as well.
Genuinely curious: What did you find problematic with Org mode? I could not understand your example.
It would be bad advertising to say Org Mode is for everyone. Most people I know use OneNote, and frankly, One Note really is better in many ways. I would not try to convince them to switch to org mode. And although Org Mode is very powerful, there isn't a reason a given person should need all that power.
For me, when I encountered it while living in Linux land, I simply did not have any alternatives. I don't remember the name, but I was using a tool provided by KDE, and Org Mode was far better by comparison. So even for simple notes, Org mode was the superior choice. All the extra bells and whistles were icing on the cake. My email was all text as well (mutt). And it was really nice to switch to Emacs for email (notmuch) and have Org mode create TODOs with links to emails.
For me it's the seamless transition (no transition?) between deciding to do something, creating an outline, creating todo's, scheduling them/creating deadlines, writing code directly under the todo's using org-babel.
I wanted to make fun of him, but his code was generally better than me, despite me using Vim, so I had to keep it to myself.
It's not night and day really; tmux is updated a bit more frequently, and I find it easier to configure (I have a custom theme that I think is substantially sexier than the ugly green bar on the bottom). While it's almost certainly cheating, I do think that the mouse integration for tmux is quite good, and I use that semi-often.
I don't know how much you care about licenses, but tmux uses the more permissive ISC license.
Also, and this really makes no difference to anything, I like the logo for tmux :)
So, I dunno, it's mostly a matter of opinion, but I just have grown to prefer tmux.
http://leoeditor.com/ pip install leo
I really, really want Leo to become more popular - but until there are better tutorials and documentation, I don't think it will go anywhere. And I'm at the stage in life where I can't afford to spend too much time figuring Leo out - there are too many other high value things to learn.
It can also color syntax. If only have a way to code-completion...
I also have a coworker who uses nano for js development atm and he appears to love it. I guess in the end the plugins, the tools, the etc. don't mean as much as the person typing/thinking.
I read the posts so far from this article, and was hoping to see the mobile angle addressed.
I wonder what's the go-to setup for C++ development in vim.
They use linux command line tools as the development environment
Personally, i find working without intellisense or intelligent auto-completion very hard, but it seems many developers don't find this as important as i do
Now I mostly just use NeoVim, and with its async support and a lot of the plugins for it becoming excellent, I really have no desire to go back to Emacs...except that I keep hearing about org-mode.
One of these days I might go and try out one of the several plugins for Vim that try to tack-on org-mode, but as it stands I've gotten my NeoVim configuration so customized it would take quite awhile to actually replicate in Emacs.
It's still great tho, no criticism intended.
So, if you ever feel the need to try it, CLion (which I would assume is on par with ReSharper C++) in vim mode may be a good option.
That said, I think that a well-set up version of vim is probably the most fun anybody can have while editing text. I actually enjoy doing finnicky and tricky textual tasks. You feel like a wizard literally every day. That's worth something for me.
I actually picked it up because I wanted a new natural-language text editor, and I figured vim would probably still exist in 20 years, and I don't like learning new things. It's been an unmitigated blessing in this role - and it's also pretty nice for programming, if a little bit more annoying to set up.
For me it's the opposite. I can't switch to IDEs and sometimes accidentally close browser tabs because my brain has mapped `cut` to Ctrl-W.
M-w, to do a copy. Or some other hobgoblin that I need to remember, when all I need is just a browse-able menu. I just need the shortcuts, for when I repetitively do an action, multiple times in a row, where it's quicker to just hit the keys, instead of using a menu.
Maybe it was cutting edge in the 1990s, but then computers got much faster, with more memory. And the graphical IDEs like Visual Studio, and Eclipse, blew it out of the water.
Today, when I'm coding in Python, then I just use an editor like Notepad++. I get enough syntax highlighting hints from that to avoid obvious coding errors.
Most of the time, I'm on Windows. I secure shell into the Linux server, and open the file from there. Then it saves back to the server. Then I run my code on a shell. This setup works pretty well.
If I need to review the code while on the shell, then I just open it in Vi. Or just open it in Windows.
You can do what you need using Emacs. Instead of context menus, you search for a less used command using M-x. It helps if you have ido-mode or helm. The latter, in my opinion, makes it a beautiful experience.
I tried moving over to JetBrains IDEs. It was too painful. I can see its value in a language where it can write most of the code for you. Otherwise, Emacs all the way.
That sort of crafty edit-a-roo is mighty frowned upon in most circles. And to be so rude! Now that, sir, is crossing the line.
I guess if I'm really dense, I can't purposefully be dense, can I?
The way you wrote that suggested there wasn't a browseable menu and that emacs forced you to memorize "hobgoblin" commands (two-characters is "hobgoblin"?).
Also, for others, there's CUA mode which makes the standard Windows' C-x, C-c, C-v cut/copy/paste commands available.
- hjkl movement keys (which depends on multi modes)
- . (dot) to repeat the last command
But honestly, there are so many fantastically useful features of vi that it's hard to give up.
I learned Emacs because of Clojure, and I got reasonably proficient with it. Thanks to Emacs, I now am much more efficient in editor boxes and terminals because of ctrl-p and other movement keys, as well as jump to begin/end of line, etc.
But vi is preinstalled in more places (even if it's a weak minimal installation), so it will get used rather than me installing emacs on some system I only need to be on for five minutes.
Vi also seems more performant. I haven't attempted to measure, but it sure feels like it has lower latency than Emacs.
That's neat. How do I do this? My setup is almost a decade old.
Having started with emacs to use with LISP/Clojure I ended up with Vim because it's just felt lighter and the key layout more logical. And much of the plugins were comparable or superior, with the exception of LISP languages.
And later...
So I found myself switching from Thunderbird and mairix+mutt (for the mail archives) to mu4e, and from xchat+slack to ERC.
If being able to use Slack from Emacs was the main point of this, he is going to be very sad in a few weeks.
Although emacs is my main editor I still use vim and try to keep the memory of keybindings alive.
* edit-- not that it looks all that hard, just the sheer amount of things to learn makes it daunting.
After many years of using Emacs every day, I decided at one point to throw away my .emacs file and start from scratch. You know, it's a little bit like the old saying about how you should code every program you write twice: once to learn how to do it, and then a second time to get it right.
I had been using Emacs for a while but especially when I first started out, I was maybe as overwhelmed as what you describe. And so I probably did too much, tried out too many things. But hey, that's how you learn, right? After many years, I had acquired much more proficiency, found out by experience which things are essential and which packages that I had installed I actually didn't really need.
And so I made a completely new, empty .emacs file and manually added only a minimal number of configuration options (carefully avoiding copying anything over from my previous .emacs file -- the temptation would be too great to put more than I needed).
Of course since then I have added more and more stuff over time, but I still strive for keeping my .emacs file small. It's not so much an irrational ideal as it is an attempt at keeping it manageable. And so sometimes when I open my .emacs file for some new option or whatever, I use the opportunity to also go over the file and reconsider its current state. More often than not, I end up throwing a whole bunch of stuff away again and make the file smaller and simpler.
A lot of features that Emacs offers through various packages are convenience features. They're great. But they're not essential. Essential is stuff like `(blink-cursor-mode 0)` (I would go nuts otherwise) or `(global-set-key (kbd "C-w") 'backward-kill-word-or-region)` which has become muscle memory to me. Themes and other visual goodies are less important.
I've been at it for over 16 years, and I'm still learning new stuff surprisingly often
... I'm 24 years into using Vim and counting!
Apparently you shouldn't take any side in an HN flame war.
Please don't comment about the voting on comments. It never does any good, and it makes boring reading.
Seriously, aren't your day jobs stressful enough? Do you have to be that uptight? I don't remember HN being like this a year or two ago.
This only works if you have a real keyboard, not one of the imitations that come with laptops and Macs.
Using thumbs to activate those works really well!
https://www.trulyergonomic.com/store/truly-ergonomic-mechani...
I have an Ergodox Ez that I've created a custom key-map targeted towards my vim and i3-wm: left of "a" is a key that if I tap it does ESC and if I hold it does the Windows key. Right of ";" is quote/Win. "z" and "/" if I hold them become control. Among other things.
It took me around 2 weeks of un-learning some bad habits I had, to become really proficient at the Ergodox. Some of it was that I used to hit the "b" with my right hand but Ergodox only has it on the left. A large part was that I was borrowing a friend's keyboard with blank keycaps and though I was a touch typist, I would regularly look at the keyboard to "get my bearings". Plus, I always looked to do numeric entry. Plus, moving keys around for enter/space/backspace/tab took some getting used to.
If you think "my ideal keyboard would", Qmk firmware plus one of the dozens of supported keyboards may just get you there.
Nvim is pretty awesome, but the tools in the vim ecosystem just don't compare.