My Emacs Productivity Tricks/Hacks
mycpu.org
mycpu.org
(defun arrayify (start end quote)
"Turn strings on newlines into a QUOTEd, comma-separated one-liner."
(interactive "r\nMQuote: ")
(let ((insertion
(mapconcat
(lambda (x) (format "%s%s%s" quote x quote))
(split-string (buffer-substring start end)) ", ")))
(delete-region start end)
(insert insertion)))
What it does: Given a list of strings separated by newlines (commonly, something copy-pasted from a table) like: josh
sam
jed
C.J.
toby
You select the text, and run "arrayify". You can optionally provide a quote character and, in about half a second, get to: "josh", "jed", "sam", "C.J.", "toby"
This is incredibly useful for taking lists of IDs, or email addresses, or whatever, and transforming them for pasting into documents, or emails, or "in" clauses in SQL, etc.It is unbelievably useful.
Keyboard macros: https://www.emacswiki.org/emacs/KeyboardMacros
Find/replace all:
^(.*)$\n
with "$1", C-M-% runs the command query-replace-regexp (found in global-map),
which is an interactive compiled Lisp function in ‘replace.el’.
It is bound to C-M-%, <menu-bar> <edit> <replace>
<query-replace-regexp>.
(query-replace-regexp REGEXP TO-STRING &optional DELIMITED START END
BACKWARD REGION-NONCONTIGUOUS-P)
Replace some things after point matching REGEXP with TO-STRING.
As each match is found, the user must type a character saying
what to do with it. For directions, type <help> at that time.You go to the end of "josh", press F3, add a comma and a space and you delete the rest of the line, until "sam" is now the next symbol after your cursor. Then you go to the end of the line (C-e) and press F4. Your macro is now recorded. To call it, press F4 repeatedly until everything is on one line.
As a bonus, you can actually name your macro, assign a keybinding to it, and can also save it as Lisp code.
xclip -o | awk '{ print "\"" $0 "\"," }'
find it simpler than 10 lines of lisp but what do I know :pI note this mainly because it took me quite a long time to grok helm. Keep working with it!
In vim/unix you can run this command (keybinding not included but simple enough):
:'<,'>%!awk 'BEGIN {ORS=" "} {print "\" $1 "\"," }
As for a unified computing environment, it is unified with the OS and not a world unto itself, there is no need to have one way of doing things within the editor and another if you want to script something. Both work just as well with version control, plus it gives you the flexibility to change text editor, like from vim to kak.Speaking of kak, multiple cursors > any of these scripted options.
It's not as good as sublime in my experience, and I haven't used kakoune, but it's very serviceable.
Alias emacs=‘vim’
:)
but that's something any IDE in the world can do ?
It's great for running sort, awk, sed, etc.
s/^/"/
s/\n/“, /
(Change all beginning of line to double pling. Change all new lines to double pling, comma, space)I don’t even store this as a procedure, I just ctr-f and do it from whatever text editor I’m in (I’m not an Emacs user)
The nice thing about search and replacing your way out of problems is that it works on coworkers machines.
I’m not saying it’s better than a stored procedure or a macro but once you’re into it, it’s easy to regex your way out of all sorts of adhoc problems :)
Arrayify breaks down with the slightest change in requirements.
:'<,'>!awk '{printf("\"\%s\", ",$0)}'
or to do the whole file: :%!awk '{printf("\"\%s\", ",$0)}'
What I find nice about this approach is that I can use my knowledge of awk in other non-vim contexts. Similarly I can use my knowledge of other text processing commands to do things in vim, like reformat text into columns (:%!column -t) for example.Of course you could use vim commands to do the same thing:
0<ctrl-v>GI"<esc>$<ctrl-v>GA", <esc>VGJ
Which would have the benefit of making it more customizable at the expense of....well you can see what you have to type.That’s a great point. On the other hand, truly, “What happens in emacs, stays in emacs.”
noremap <Space> @q
These days I do this from evil-mode: (define-key evil-normal-state-map " " "@q")I usually end up doing that in two steps, with the first being a recursive macro to quote each line:
q y s $ " A , <escape> 0 j @ q
Then visually selecting and replacing new lines with spaces: V G :s/CTRL+Q CTRL+J/ /gShowing off macros (in my case evil mode, but I suppose it's the same for emacs) is a nice party trick that has impressed some of my coworkers.
Sadly it does not really do so well at actual parties...
One of the best features I like is undoing regions. That is, if you know the approximate location of the text that you want to undo, you just select a region that contains that location and call undo. It can be used as a quick git alternative. Say you modify the buffer all over the place. If you want to undo some text that you've modified an hour ago but you did other modifications to the buffer in countless other places, you can undo just that region and you don't have to go back throught the whole undo tree.
Another one that I've currently discoverd and I'm very excited about is yasnippet (the modern variant of abbrev). You can define a string that stands for an abbreviation for an expansion. Everytime you type that string, it is replaced by that expansion. The nice thing about yasnippet compared to abbrev is that, among others, you can specify where to leave the cursor after the expansion. One example: "lt" expands to (let ((_))), where _ is the cursor position after the expansion. This also saves typing of all the parantheses. Or "mcar" expands to (mapcar (lambda (_))). You can expand anything to anything, in short. With time, you can type less and faster.
What the fuck, how did I not know this. I am now glad that I read this thread. So much time lost undoing a bunch of changes, killing the piece I want to restore, redoing the changes and then yanking.
It's handy when you're writing a function that uses things declared somewhere else in the same file. Instead of jumping back and forth you just clone the buffer and you can collapse and narrow things independently.
What would really help me with articles like this one is more narrative on _why_ these particular modes are so useful. For example, it took me a long time to learn org-mode because I just didn't know what to do with it! I feel like Helm is similar, I've tried it briefly, but I'm not sure if or how it would fit into my workflow.
I'm currently drafting an essay on what makes org-mode compelling, rather than how to use it. I think I'll do the same for other tools I use.
To be fair, list-packages is a relatively recent addition to Emacs (2012).
I think it helps to think of Emacs as just another platform - and a nice stable one. You may or may not use, or know about, all the "applications" available for it. New stuff comes along that you haven't heard about; you might occasionally want to review things; and it doesn't really matter if you don't.
I've been using it for the usual handful of decades and have gone through phases of using one exciting new thing or another, but I've dropped most of them - I no longer run builds from Emacs (I do recompilation in the background in a separate terminal), nor read mail or use version control software from within it. I don't use evil and my colour scheme is mostly black-on-white. My .emacs has ended up almost back where it was 25 years ago. (In fact it still has references to Epoch and Lucid Emacs in a couple of comments.)
The two additions in the past couple of decades that have made a big difference to me are Tramp (a nice upgrade from ange-ftp) and the ability to set non-integer line spacings.
That's one of the best explanations I've heard. Thanks.
Carsten Dominik's Google Tech Talk is probably still the best intro:
https://orgmode.org/worg/org-tutorials/org-screencasts/org-m...
Prefix-based autocompletion is always good enough for you? I don't use Helm, at least not yet, but thought the Helm demo image in the article was enlightening.
People say org is the killer app, but imo it has nothing on magit. (It's a weird comparison Ill give you that)
I'm thinking of donating again
For instance interactive rebaseing is so much better in Magit.
Magit forces certain workflows because the author and community feel those work best, and stepping outside of that is often an exercise in frustration because you're not doing things "the Magit way". After going through a few issues on their tracker it was clear that there's no place for improvement suggestions unless it aligns perfectly with the maintainers' vision.
It feels very "holier than thou" and the constant hype around it everywhere is a bit off putting. Maybe it's just me, but I prefer using plain Git in a regular shell (Emacs shells are also unusable for me), with shell and Git aliases, and helper tools like scmpuff[1].
And just like in the world of Lisp, after you add a new functionality, it becomes indistinguishable from what you already have. That is, it looks like it has been there all along, from the start. It doesn't look like a 3rd party plugin that you need to take special precautions to install. It just blends in nicely, and naturally.
Or, to put it another way, if you learn (Emacs) Lisp and you start to tweak Emacs to your own liking, you can transform Emacs into your own personal tool, adjusted exactly the way you like it, no questions asked.
"Consistency" is a good word. The result, for me at least, is that I can actually think about what I want to do with the tool and not how to use it. It gets out of the way, it does not try to fight me.
I think maybe that's one interpretation of the saying "Emacs is an operating system".
Emacs is also an interactive IDE for elisp development. It provides all of the features you'd ever want from an IDE and then some. You get a linter, a debugger, semantic completion, ability to execute whole files or parts of them, data inspector/visualizer, finding definitions and references to symbols, a list of functions in a given file and across many files, shortcuts for common editing tasks, refactoring support, and so on. It's a very featureful, modern IDE with special emphasis on interactivity.
The effect of these two characteristics is that in Emacs you can easily find an implementation of any feature (no matter if it comes from Emacs core or some plugin), then edit it and see the results instantly (without the need for as much as saving the file), all the while having access to all of the IDE-like tools. You can customize every part of Emacs to exactly fit your needs - if there's something you'd like to change, but the feature's author didn't create a setting option for it, you can go locate and change the implementation in a few minutes.
When a computer game comes out, sometimes the authors also release a development kit with things like a map editor, theming support, tweaking AI and so on. Using (most) other editors is like simply playing the game: you can get better at it, but you can't change the rules. Using Emacs is like playing the game with the ability to instantly switch to the dev kit: you can simply play the game, but you also can bend, change, or rewrite the rules as you wish. With (most) other editors you're a consumer; with Emacs, you are the owner.
To really make use of all of that you have to know elisp, which is why knowing it is important. Of course, you can happily Emacs without dabbling in its configuration too much, but in that case, Emacs becomes just another editor with lots of awkward key bindings and a huge amount of cruft accreted during the last 40+ years.
The complexity can leave you with weird bugs. For example if you use regular emacs (X forwarding over a network) on X displays with different dpis, your text will look the same (physical) size on both. If you use spacemacs it can be wrong on one because of some hack someone added somewhere in that tower of complexity. There are plenty of other oddities in there.
Also as soon as one advances to wanting slightly more customisation, it can be really hard to do it with spacemacs. Whereas with regular emacs it’s quite easy to go from basically zero to some.
Spacemacs made my transition from Vim much smoother, and introduced me to many great packages and ways of configuring Emacs, so I'll always be grateful for that. It's a wonderful project.
But after a few months I started noticing those issues it introduced because of the additional layers of complexity, and decided to start from a scratch .emacs.d and add packages I strictly needed. It's surprising how much can be accomplished with just use-package and a init.d inspired loading structure.
The best thing about Emacs is its malleability, and relying on others to do this for you can be helpful, but is usually not what works best. I suppose this also applies to every 3rd party package you depend on, but I'm not versed in Elisp enough yet to _really_ build my Emacs experience from scratch. ;)
https://github.com/hlissner/doom-emacs/blob/develop/docs/ind...
All the languages supported are in the init.example.el file seen here: https://github.com/hlissner/doom-emacs/blob/develop/init.exa...
Uncomment them, run doom refresh. Check their module under https://github.com/hlissner/doom-emacs/tree/develop/modules/... for any external requirements that they need or flags that they support.
;;hy ; readability of scheme w/ speed of python
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
It might be a bit out of date now but at least 90% still holds.
People who've been using only Emacs for the last 20 years are in no position to comment on IDEs
More generally and forgivably, I'd say the IDE must know that two variables of the same name may be different variables, and to know which instances are which vars. Funny enough, this benefit of IDEs might rarely be felt with Javascript due to its uber-dynamic nature (at least without classes).
As soon as you add any kind of metaprogramming or macros to the mix, IDEs start to break, because they can't refactor code that doesn't exist yet. That's an issue for IDEs for C, C++, Rust, D and probably few other languages.
If you're talking about ‘extract method’, any regular imperative language in the C style should have that―possibly as ‘extract function’. I mean also Python, JS, Ruby and the like. The hard part here is to figure out which vars go into the method/function and which of them must be accepted as parameters or returned from the function―that's where the understanding of code structure comes in.
Sure, fiddling with metaprogramming will break IDE's understanding of the code, e.g. in Python, but you can do that carefully and isolate the effects so that the rest of code is still ‘clean’. That's also why Java integrates any and all features into the type and OOP system (afaik), so the code can always be described statically. I guess Haskell is an extreme example of that, but not sure how IDE-friendly it is.
Safe Delete
Extract Method
Extract Constant
Extract Field
Extract Parameter
Introduce Variable
Rename
Inline
Change signature
Refactorings are great, because you can do safe code transformations very quickly. If you get to know these features, it's hard to do without them.I'm sure if given enough resources and motivation, it's possible to build superb support for the modern programming languages. For example, you wouldn't claim that Intellij/VSCode/Sublime/Atom has better support for Erlang, for OCaml, for Lisp, for LaTeX, would you?
Emacs evolves slowly. Things take time. And yes, there are always IDEs that do things [slightly] better. At a given moment. Remember, though Emacs outlived many trendy IDEs. Relatively not too long ago IDEs like C++ Builder and Delphi Builder, Eclipse, NetBeans were quite popular. And they did have some remarkable features that Emacs didn't. Do you see any HN posts about those anymore?
Now check, for example, Github Language Stats¹ and find there emacs-lisp. Isn't it surprising to see it somewhere in the middle of the list? Isn't it surprising that it made into that list at all? Remember that it is not a general-purpose language; it is not used in the enterprise; it is not used in the game industry; not suitable for writing mobile apps or web pages. And it also a pretty concise language, it's a Lisp. But there's a lot of it on GitHub alone. Who are these people? Who writes all that code? And how the heck they keep doing it - none of them ever have gotten paid for it, aside from some tiny voluntary contributions and hugely successful Kickstarter campaign for Magit.
If a programming language stays relevant for long enough, people eventually will build emacs packages for it, and they'll keep improving them. But for a proprietary IDE, if it doesn't have a feature you like - you have no other option but to submit a request and wait. Sometimes you have to wait indefinitely.
> People who've been using only Emacs for the last 20 years are in no position to comment on IDEs
I moved to Emacs after almost 20 years of using IDEs. If I am still programming 20 years from now, I'm sure it will be in Emacs.
____
Is there anything free that even begins to approach the quality and accuracy of the JetBrains Rust analysis plugin? If so, I’d love to know about it and start using vim.
Yes, all decent IDEs have file search command. But Emacs got SEARCH:
- You can search for all files that contain given string and then open the search results and modify occurrences using multiple cursors and then save it, and it will propagate changes in multiple files;
- You can recursively search for file names, then (for example) mark those that are bigger than 15Mbs, or files that were edited last time in March, and then tell Emacs to show git-log of changes, but only related to those files;
- You can search for a pattern, but also tell it to display it with a context (for example 4 lines before and after the occurrence);
- You can recursively search for a filename pattern, and then among those that you find, you can rename those that match a regexp;
- You can git-grep for a file that was deleted in the repo;
- You can find all the compilation/linting errors and warnings in the code for a given project;
And guess what? All that works the same way for remote machines. You can use the search on a remote computer and open files, just like it was a local machine. Heck, you can even search and open files inside Docker containers.
You think I'm done here? I haven't even talked about searching for stuff using Org-mode.
Seriously, whenever there's an argument about IDEs vs. Emacs - Emacs just beats the shit out of any. "But it doesn't support re-factoring... bleh-bleh." Like everyone who seriously uses Emacs really doing it because they hate refactoring or something. Emacs has better tools and a myriad of ways to deal with code.
Plus I'm on windows and there was enough friction where things kind of worked but didn't (usually environmental things like it couldn't find ag or awk, process lifetime, window drawing, etc.).
Article seems to confuse MELPA with ELPA. MELPA is something you have to add via your init file. Not terribly hard to do, but just FYI for anyone who is actually using these tips from scratch.
Besides that I really really tried hard to love Emacs as my go-to editor. However I found no alternative for
decent CSV file support (like https://github.com/chrisbra/csv.vim simply great!)
Inspecting large XML files with syntax highlighting and folding. VIM is also not the fastest here but at least 10 times faster (emacs SGML mode is a joke for xml files and forcing xhtml mode of web-mode is also not that great)
Maybe all my emacs doing was just wrong.
One of the reasons I switched from vi to Emacs in the very distant past was for this specific reason. (Vim did exist, but it wasn't installed on the old Unix machines I was working on).
Deleting a Row?
Easily navigating from the nth element in a CSV header to the nth element in data row 1000?
Emacs is a good OS... ;-)
Thinking of it, what I do rather frequently is ssh into a server and sudo -e there (root account is locked). I'm somewhat confident that TRAMP can be configured to do that. Need to investigate when I have time.
That does sound potentially handy, if I have it right.
Also, it's possible to configure it so that there's a delay between the time you type a keystroke and the menu appears, so that if you remember the key-sequence you need to type to perform a certain action and you type it fast enough, then the menu won't pop-up, but if you forget the full sequence then you can type just the first keystroke and then wait a bit and the menu will pop up and remind you of what needs to be typed to execute the action you want.
It's super handy, and is one of my all-time-favorite emacs packages.
(setq
backup-by-copying t
backup-directory-alist
'((".*" . "~/.emacs.d/bu/"))
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) alias ls='ls --hide="lost+found" --hide="#*" --hide="*~" --hide="*.pyc" --hide="*.egg-info" --hide="__pycache__" --color=auto'
But I'll be adding your item into my config for the rotated versioning, I wasn't aware that emacs does that but I assume it'll save me anything from few hours to a few weeks yearly. Thanks!It has been my go-to editor for many years now; I highly recommend it.
edit: actual package is called "org-mode"
https://github.com/akermu/emacs-libvterm/blob/master/README....
It seems extremely experimental, and I've been trying recently to make my emacs more stable so I can choose when I want to spend time editing my config.
Is there a way to get fuzzy searchable history ala bash Ctrl+r?
Also I've noticed that if I use any emacs movement command (say jump to start of line) vterm looses internal sync and my edits edit the wrong text. Is that an issue specific to my config, or do you have it as well?
the emacs movement issue I don't have, so perhaps that's a configuration issue.
(one perhaps useful tip: `vterm-copy-mode`, by default bound to C-c C-t, let's you navigate the buffer with normal emacs movement in order to copy)
Can’t say this for many tools but using org-mode has been life changing for me.
(whenever I git clone my dotfiles on a new machine I usually have to comment out a bunch of stuff in my ~/.emacs because it's referencing packages which aren't installed, and I forgot where I installed them from, what version, etc...)
My (old) config used it heavily. It also defined everything inside a single org file which also serves as a README on github: https://github.com/kwrooijen/.emacs.d
However these days I'm using Spacemacs, currently looking at Doom.
You could also use the Guix package manager[1] or the Nix package manager[2] to achieve a similar effect.
Reproducible software is much more stable!
[0]https://github.com/raxod502/straight.el
I use Cask: https://cask.readthedocs.io/en/latest/guide/installation.htm...
Let's consider Homebrew bundle etc outside of scope and assume you have some workflow that works for you to init a new machine with emacs and some other apps, and you're just worried about the zillions of little emacs packages you are testing or using.
So, I have a file called at ~/.emacs.d/Cask, that is just a list of packages on which I depend. This is the only way I install packages. Update the file and do "cask install".
This also means if you're packages get weird, or you have some sort of transient .elc problem you can just blow away ~/.emacs.d/.cask and do a 'cask install' (basically .cask ~= node_modules)
Additionally, I recommend judicious use of (when (boundp 'some-thing) (some-thing)), and (fboundp ..), and (if (require 'foobar nil :noerror) (foobar-mode 1)). This avoids the cascade of errors on installation troubles (at the cost of not being alerted if you're missing them).
Of course, I edit text in emacs with evil: https://github.com/emacs-evil/evil
It's "editing macros," so yes, it's an editor first and foremost.
> not an IDE
It's integrated; mostly used by developers; it's an environment.
- Run Nethack
- Chat over IRC. Double combo with Bitlbee
- Chat over Slack/$whatever proto is designed in Elisp
- Write Interactive Fiction
- Emulate Interactive fiction with a Z machine in Elisp
- Write and read emails/news with GNUs
- Listen to music with EMMS
- M-x doctor because is too complex and you need to talk to someone
- Comment on HN with eww
- Do literate programming
- Do math, and with Maxima/R, algebra/statistics/whatever
- Use GIT with Magit
- org-mode. With this you could write three ebooks larger than the Java specs.
- org-babel. I forgot it. This is damn magic. Programming as if you were in a word processor, going back and forth, easily, showing up your results inline.
Also you missed that you can run WebKit inside of emacs. Also you embed X apps in emacs and use it as a window manager.
Not in the console mode, you can't.
I see it as an investment, since it will probably outlive me and anything an IDE can do, _technically_, can be done in emacs.
I was previously a vim user and I wanted to extend my editor but I really hate vimscript. I took a look at Emacs's Elisp and I liked it. To my surprise, the ecosystem was updated with my current tech stack (TypeScript, with the Tide plugin). I was really used to vim so I decided to create my own 'distro' and I began recreating some vim editing functionality along with similar keys (Since I'm not using evil mode or anything, I just made a prefix with Ctrl).
At the end I realized I only liked vim because of its ubiquity and keymaps.
As a big emacs guy, I say it's only worth putting in the effort if you really enjoy the process of crafting a tool that fits the shape of your mind and bending your mind to fit the shape a tool. I personally get a lot of pleasure out of improving my text editor, but I don't think most people will/do.
Depending on your choice of IDE and your proficiency with vim I think the efficiency gains you'd get from switching to emacs will be relatively slight.
(defun shift-left (beg end) (interactive "r") (shift-region beg end -1))
(defun shift-right (beg end) (interactive "r") (shift-region beg end 1))
(global-set-key [A-M-right] 'shift-right) ;; >> shift every line of region
(global-set-key [A-M-left] 'shift-left) ;; << (and region remains highlighted)
(global-set-key "\M-+" 'text-scale-increase)
(global-set-key "\M--" 'text-scale-decrease)
(global-set-key "\M-=" (lambda () (interactive) (text-scale-set 0)))neo tree
winner mode
god mode (I use instead of evil mode)
avy (visually jump to any char on the screen)
undo-tree (really neat, though I don't use it as much any more)
;;from https://github.com/m2ym/popwin-el
;; prevents annoying popup buffers/windows
(require 'popwin)
(popwin-mode 1)Embrace the power of "and": EXWM.
The quick diffs can be pretty darn helpful with complex changes.
Also since I'm going on here, I've found the key to editor management is to make sure certain basics work across the board (for IntelliJ/, Xcode/Xvim, (space)emacs and even vim - sometimes I use vim for config changes since it's so fast to open, tmux, etc).
C-o/C-i -> should work for navigation
ctrl-shift-j -> should select the file you're working on
; -> should map to : (retrain yourself)
fd -> escape (retrain yourself)
c-hjkl -> c-w hjkl (faster window/panel navigation)
gd -> should go to definition
vim text motion in general should work flawlessly
e.g., @q - should start to record a macro
I use spacemacs + tmux since I like to customize and it's easiest to customize in elisp I've found than in any other IDE or vim itself. And when things don't work and I can't make it work in the editor itself, I fix it in the terminal app (Kitty) or the OS (BetterTouchTool).Shameless plug for those curious:
https://github.com/p10q/home/blob/master/.spacemacs#L343 https://github.com/p10q/home/blob/master/kitty.conf#L797
I feel I get a bigger bang for buck for Work Email on Outlook Exchange since Email on mu4e makes me less distracted.
I have configured and used mu4e on a GMail account and another account hosted on Microsoft Exchange Server (MSE).
The Linux based email client I had tried before mu4e for MSE account are: * WebMail (Outlook's less capable younger cousin on a browser) * a slew of Linux UI email clients like Thunderbird etc.
I disliked all of them equally. However, using mu4e for emails with Outlook/MSE account makes doing emails less painful and less distracting. However, using mu4e as a mail client for Google accounts may not be preferable if you have bought heavily into the Google ecosystem. I have had trouble with things like Google API authentication on Emacs.
IDEs are usually dismissed by many such people since you can (allegedly) do the same in vim/emacs but to me this seemed crazy as I'd see people spend hours configuring plugins, writing Lisp and whatever to save them on some task they'd get for free with a right click in IntelliJ.
I really do think people completely underestimate how much time they have and will invest in such endeavours. I mean if this makes you happy or you like this tinkering, by all means be my guest, but I'll take a hard pass.
Some people like to work in a nice environment where they are able to remove all the little frustrations that less customizable tools often force upon you. When emacs annoys you at least you can fix it if it is annoying enough for you to want to do so.
In any case neither choice is wrong or right. Do whatever floats your boat.
For some people, it's the other way around. Emacs makes it simple to automate things. And there's no such thing as "excessive automation." Proprietary IDEs are like Steve Yegge once said: "are cookie-cutter solutions." To me, it's not even about productivity; it's about minimizing frustration. Repetitive and mundane tasks (no matter how small they seem to be) can and should be automated.
Practical examples of how using Emacs makes my life easier:
- I conduct Web searches right from my IDE. I can search on Wikipedia, Google, Github, YouTube, WolframAlpha, etc. I can select any piece of text/code and perform a search. One day I even realized that I could also enforce the programming language on Github. It took me about ten minutes to extend the existing functionality of the Emacs package called `engine,` now whenever I'm writing, for example, Clojure code, and I need to search for a selected piece of code on Github it automatically appends `Language=Clojure` to the search parameters.
- We have a convention to have suffixes in our git branches that denote the ticket number associated. So I used to go to Jira, find my ticket, then think about the branch name, then type it, sometimes I would mistype the ticket number. One day I sat down, spend about twenty minutes, wrote a little piece of emacs-lisp. For a given Jira ticket number, it fetches its summary and then, based on that summary, generates a "git-friendly" branch name. It's not like it would take me too long doing it the old way. But now it literally takes less than a second, and it is way less frustrating.
- I use Org-mode, which by itself is a hands-down the best todo-list/organizer/note-taking/journaling app. We also use Slack at work. Very often, I would copy Slack conversation and paste it to my main org-mode file, so the relevant information (associated with a unit of work) is close-by. I used to do it manually. The other day I sat down and wrote a script that retrieves that info from Slack by using its API and automatically generates an Org-mode heading.
I can provide countless examples of seemingly small things like that, but those who are now settled with using their favorite IDE probably won't be impressed or moved.
Don't get me wrong - IntelliJ is a superb product. I myself used WebStorm, PyCharm, RubyMine, and Ultimate for a number of years. About seven years to be more precise. I learned their IDE to the pieces. I have discovered undocumented/poorly documented features. I used to hang big print-out posters with the major keybindings on my walls. I participated in developing plugins. But still moved to Emacs, because there is simply no software product in existence with the extensibility capabilities that can match.
Please, don't underestimate the ingenuity of tinkerers. Best artists, watch-makers, and carpenters are known to create their own tools or pick up designs of someone else's and improve upon them. In their hands, the instrument that they have might be a thousand times more powerful and capable, compared to one that was created by an army of specialists.