I use that too: ivy / counsel etc. Then to quickly select among the candidates and to not go "arrow down / arrow down / arrow down / arrow down / {tab,enter,whatever}" I use ivy-avy.
ivy-avy works like vim's EasyMotion or the older Emacs "ace-jump" mode (inspired by EasyMotion): you keep your eyes on the thing you want to select (or the place on the screen where you want your cursor to go to) and then invoke avy (by using a shortcut very conveniently placed as I use it all the time). Then a letter appears and you hit that letter (requires to be a touch typist as you cannot both keep your eyes on the candidate and look at your keyboard) and boom, you just selected the candidate / moved the cursor.
There's no faster way to select / move anywhere on the screen.
I'm using that since years (I used to use ace-jump before ivy/avy was a thing).
Imagine this list of candidates after I asked to open a file containing the regexp "green" (well it's just a word, but it could be a regexp):
Now I invoke "ivy-avy" and the list of candidates becomes this:
f/home/jack/work/green.pdf
g/home/jack/private/greendayschedule.org
n
b (omit 10 lines here)
c
e/mnt/greenvelvet.txt
d/mnt/backup/green.cfg
And these individual letters appear in another color, so they stand out.
To select, say, "mnt/greenvelvet.txt", you just hit the letter 'e'. Done.
It's really sweet and it works with nearly everything: selecting a candidate in a list (like a file, a completion, ...), moving the cursor anywhere on the screen, selecting a buffer, etc.
Is this the equivalent to calling ~avy-goto-char-timer~ (from a keybinding)
whenever inside Helm completion windows?
> To select, say, "mnt/greenvelvet.txt", you just hit the letter 'e'. Done.
With helm+avy, I need to explicitly press Ctrl+Space to select. But, pressing 'e' does move the caret to the proper line containing '/mnt/greenvelvet.txt'
I coudnt find a helm counterpart to 'ivy-avy' package though.
Edit:-
avy-ivy, on pressing 'e' confirms greenvelvet.txt as the selection.
It is the helm equivalent of C-n...C-n until reaching '/mnt/greenvelvet.txt' and pressing Return.
I was looking for someway to 'helm mark' the line containing '/mnt/greenvelvet.txt' using avy.
> Is this the equivalent to calling ~avy-goto-char-timer~ (from a keybinding) whenever inside Helm completion windows?
Yes it's exactly the same: I'm actually reusing the same shortcut for both. In a regular buffer I'm using precisely avy-goto-char-timer and in, say, "counsel-find-file" (which I use instead of "find-file"), that same shortcut calls the ivy-avy function.
Now I use ivy/counsel/swiper/avy but don't use helm so cannot help there.
P.S: and I confirm I just hit the letter and, say, the file immediately opens (I don't need to hit enter for example)
That does sound great, but to be fair most of the time, the helm equivalent is to type one or a few more characters of the one file name you want and press enter. Avy is a great tool, but in my experience using C-s actually requires fewers strokes than Avy over 90% of the time. Being limited to whatever is on screen tends to get very annoying, as is the mental load of pressing random characters instead of completing a word you already know. For me Avy shines for things like avy-copy-line that can prevent you from moving back and forth.
The author might want to check out the orderless completion style which goes even further and matches the groups in any order, so in the example the string "emacs articles" would also match (as well as "em art" etc.)
I used Emacs full time for more than a decade without fully understanding completion and that meant I wasn't able to tweak it to my liking. Things would break and I didn't understand why. Although I think company is probably the most polished and best in-buffer completion UI there is, using modular components like eglot, orderless and corfu has helped me to understand the various aspects of completion and get it all working how I want it.
You're not missing out feature-wise, no. Helm is the original kitchen sink power tool on this front. The Vertico-stack is interesting for different reasons, like simplicity of implementation.
I have tried various things for completion, etc over the years, and found Helm just too 'deep' of a topic to dig into... but vertico is the first time any of these things just 'clicked' and it's improved my experience of emacs 10-fold.
You just unlocked a memory of when I found Helm intimidating just because some of its behavior surprised me on my initial tryouts. After reading the manual, it was actually much simpler than it had seemed.
IIRC helm doesn't provide complete-at-point so Corfu would be in a different category. Otherwise no, helm is really featureful and works pretty nice out-of-the-box, those packages are far more lean and probably easier to hack on.
I think the most difficult thing was in understanding the roles the various components have. "Completion" means something in Emacs that might not mean what you expect it to mean (but you probably expect that from Emacs anyway). Many tools/packages cover more than one part of the overall solution. Maybe I should write something up to demystify it for others wanting to go down the same path. In the end it took me an evening or two to get it all working.
Martin (and the other contributors to his blog) continue to write insightfully about things that matter. I'm impressed with his continued devotion to topics like Continuous Integration, testing and refactoring.
There is some wisdom in there, but like everything there is a lot of skill in the application of that wisdom. Not all refactorings (to name something for which Martin Fowler is well known) are the same.
I also feel sometimes there is a tendency to overcomplicate by taking very simple concepts and ideas and assigning a name or almost "field of research" to them.
The main example I can think of is "Dependency Injection". The idea to pass an object to another object (for different purposes, e.g. testing) is pretty simple and understandable. But over time the term " dependency injection" has probably confused a whole lot of people but for some reason a term just had to be coined.
I do understand that it's probably not on purpose because the author(s) are deeply studying or thinking about what they are describing (probably more so than the readers) and maybe coming up with new terminology does help them to keep making sense of it all.
Dependency injection is 'just' passing an argument to a function or method.
Whether that happens via the constructor, some method, or a plain ol' function, its very simple.
But naming it dependency injection and ascribing terms like setter injection, or constructor injection or discussing dependency injection frameworks with complicated set up instructions, can make this very simple concept seem significantly more complex and difficult for junior and mid level engineers.
I wish code completion in Emacs worked out of the box like modern IDEs. Now it depends on 3rd party LSP servers(that is for intellisense like project and context aware completions) that are not bundled with Emacs.
I feel completion is an essential feature for an editor presently and not having it baked in is not a good approach.
There are plenty of emacs "bundles" that configure things up with a whole pile of preset things like this. It doesn't belong in the base emacs setup. The reality is that these kinds of things end up being just a starting place, and rarely satisfy everyone, and they'd bloat startup time etc. etc.
It's gotten quite simple in recent years. use-package lsp, use-package company, and hook to enable those for the things you want
LSP servers are such an important part of my workflow that it just makes more sense to manage their installation myself, makes it simpler to track their configurations and version. LSP-mode does ship an ad-hoc package manager if you want that.
It may work for you, but base Emacs itself is buildable and usable on many older platforms. But external dependencies like LSPs, not so much.
And don't you think the convenience of like installing intellij, and it works fully is very convenient, whereas with Emacs a major component of the workflow, the LSP could be major hassle to get installed.
You can always use ctags or EIEIO if you must. I've used many LSP servers and haven't come across one that isn't on nixpkgs, I'm curious what ancient system you're running intellij on.
A comment that will certainly get me downvoted into oblivion, but I'm always amazed at the amount of time people are willing to waste customizing outdated tools to match 10% of the out-of-the-box capabilities of modern IDEs.
And it's not even like he ignores the advantages since he uses IntelliJ for Java!
a) You know you're going to be downvoted and yet b) You still pitch what you're saying in way that is an insult to both the tool and its users.
I don't know what to say. Ignorance and antagonism mixed together, consciously...
... Maybe emacs users know something you don't?
(FWIW I have been using JetBrains tools' & emacs as well for over a couple decades now [since IntelliJ 3-something back in 2003 if I recall], usually complimentary to each other, not competing. As of last week, I am not renewing my CLion subscription, and work fully in emacs and it's fine.)
A few features that I think is really hard to explain to folks on why it feels good:
* Buffer and frame management. Getting used to splits and quickly bouncing between buffers is something that is a muscle memory, at this point.
* Pretty much complete introspection of the editor. All of the help functions, as well as the *Messages* buffer are things that are often very hidden in other editors.
* The "all is fair" community. There are some grumpy style folks that use it, of course. I've found that most are far more friendly and open to you doing things however you want than in most other communities. The pedantic nature of a lot of developers falls over into a lot of our entire industry, it is refreshing to find a community that is pragmatic over pedantic to this level.
I'm not downvoting you if you show me a modern IDE that out-of-the-box(!) can do filename completion in the way Martin describes ("type 'articles emacs' to get a list of any file paths that contain 'articles' and 'emacs' in their file path").
I believe the JetBrains tools can actually do this (ctrl-shift-N if I recall) and can do it for symbols, filenames, and classes, etc. Keyword match with some fuzzy logic.
Though actually I'm not sure if they'll do it on directory name components or just the filename itself.
They will, however, have 5x the memory and battery consumption and not be nearly as snappy in response time, nor nearly as customizable.
You're right, I think it also can do this with directory components. I think if you'd type some like 'artic/emacs' it would actually work, but I cannot test at the moment. So no downvote from me.
He's not wrong, though. I've been an Emacs user for decades, I'm still using it and I don't regret the time I have invested in it. It motivated me to learn LISP and a ton of other stuff, I love orgmode, calc, Gnus, and I wouldn't want to miss all that. But you have to see what it is good at and where it is severely lacking when it comes to modern software development. When younger developers see me using Emacs and ask me whether they should pick it up, I always say: if you'd like to be enlightened and get a glimpse of how the old LISP machines worked, if you like tinkering with complex systems just for the fun of it, go for it. There's a good chance it'll make you a better software developer eventually. However, if you simply want something that gets the job done, just use VSCode.
a) he's wrong to call it outdated... because that's not the case, it's a very vibrant community and with boatloads of dev happening
b) he's wrong to say it only does 10% of blah blah blah -- capability wise my config does pretty much everything I had with CLion/RustRover in terms of my C++/Rust workflow... but also a whole lot more on other fronts
c) he's wrong to formulate a comment like that because it's inflammatory and not nice
Honestly, futzing with VSCode is pretty much as 'brittle' and 'batteries not included' situation as emacs, though obviously more popular. Every time I went from CLion over to VSCode I just threw my hands up in annoyance.
My emacs + lsp + company + rust-analyzer + projectile + treemacs setup works better for me, though obviously that's somewhat because I have 30 years of mild-muscle-memory for emacs keybindings. (Though there is cua-mode, y'know)
Would I recommend it for brand new devs, or for my 13-year old son starting out or something? Probably not. But it's really none of my business what tools other people use.
You think they are outdated because you did not find the cross on the UI to close them once you noticed you actually had to LEARN them to use their power?
I used emacs exclusively for 2 years. It was a slower development process for every single use-case I have ever had, so I stopped using it.
Most modern IDEs even come with key mappings for emacs so you can switch instantly and leverage their superior feature set without having to relearn anything.
ivy-avy works like vim's EasyMotion or the older Emacs "ace-jump" mode (inspired by EasyMotion): you keep your eyes on the thing you want to select (or the place on the screen where you want your cursor to go to) and then invoke avy (by using a shortcut very conveniently placed as I use it all the time). Then a letter appears and you hit that letter (requires to be a touch typist as you cannot both keep your eyes on the candidate and look at your keyboard) and boom, you just selected the candidate / moved the cursor.
There's no faster way to select / move anywhere on the screen.
I'm using that since years (I used to use ace-jump before ivy/avy was a thing).
Imagine this list of candidates after I asked to open a file containing the regexp "green" (well it's just a word, but it could be a regexp):
Now I invoke "ivy-avy" and the list of candidates becomes this: And these individual letters appear in another color, so they stand out.To select, say, "mnt/greenvelvet.txt", you just hit the letter 'e'. Done.
It's really sweet and it works with nearly everything: selecting a candidate in a list (like a file, a completion, ...), moving the cursor anywhere on the screen, selecting a buffer, etc.