Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Alt-x does the very same in Emacs. Every available command with tab completion and with the keyboard shortcut listed. I think showing the shortcut is new.

If you are not familiar what a particular command does you can use C-h f <function-name> to open the help page.

I think Emacs is really easy to learn after you get a handle of the navigation keys. Which you might already be familiar with from shell.



sort by: page size:

In mc, Alt-Tab or Esc+Tab two times does autocomplete for command name, but it's much easier just to press Ctrl-O and use shell in full screen, with native autocompletion by Tab, then switch back to mc by Ctrl-C + Ctrl-O. (Without Ctrl-C, mc may not be able to synchronize directories between shell and panel, which often leads to confusion).

> especially in something like Vim. give me some help to learn the shortcuts as i work, FFS. on a GUI you look at the keyboard shortcuts beside the menu items, and get to know them naturally.

This. I hate both vi and emacs for not having a usable menu system that lets me browse through and learn the commands as I go.

I also think bash-completion, while a huge step forward in usability, really should have focused on integrating command option help from the beginning. So, in addition to a man page, each command line utility would need to bundle a machine readable key-value list of (option, help string). Then when I type <command> -<TAB>, it would show me that help.


Every command has a name, and you can do M-x and type in that name, with tab completion, if you forget the keyboard shortcut. Even better, you can enable ido-mode and install ido-vertical-mode, and see a list of possible command completions without pressing tab.

I also highly recommend remapping your caps lock key to control.


Yes, I love tab completion.

When I enabled tab completion for git and google cloud CLI, my life became much better.

However, I still think there needs to be a "right click menu" for command line programs. Someone needs to determine the 3 most common uses and make it so that --help lets me choose one of them by pressing 1, 2, or 3.

Right now, --help usually gives me something that is difficult for me to understand, especially if I have never used that command before.

Tab completion works great if I have used the command before and want to save time.


I used to hook up auto completion to my tab key in vim, worked fine in c/c++ at the time. It would pop up a window of the options, but I stopped using that feature at some point.

That's nice — I usually start my commands with `# ` but then there's no tab completion. I'll try `ls`

bash-completion does that for you by just pressing TAB. All I miss from it is some kind of annotation.

My favorite shell keystroke saver now is tab-completion. Its wonderful that it works for things besides files. eg `systemctl iso<tab>` gives 'systemctl isolate`

Its great but it could be even better. For example if there is ambiguity the possible choices are shown but not as a menu.


tab completion also works for help: it cycles through all help keywords that contain the present text (not just suffixes, as in normal tab-completion). eg. try

    :he lvis
and press tab.

I like the inline arithmetic:

    CTRL-R=5*5
Note the "=" comes first. I just discovered that "CTRL-R5" inserts that line from your cut-and-paste history (or something).

On OSX, press / or ~ to get a path text box with tab completion.

> After pressing Alt-X, show a list of recently used commands.

I would recommend people install/enable some of the nicer completion packages. Helm does this, for example. Personally, I wouldn't recommend helm, but I suspect all the "major" completion modes do this. Even ido/smex, I believe, does this, and it comes with Emacs (you still need to enable it, though).

Also, I suspect if you use Doom or Spacemacs this will be the default.

> When opening/saving a file and typing the path, automatically show the directory contents and hi-light entries that match the path. Show recently opened files and directories in bold. Scroll the listing with PGUP/PGDN/mouse-wheel. I often use emacs to open log files which contain long unique prefixes which are error-prone to type. Allow using the mouse & arrows keys to select the file.

I think all of this is configurable, but I'm also sure 95% of users don't want to spend too much time configuring. The default interface sucks - the problem is that there's no "improvement" that the majority likes, so the default remains a bit barebone. For example, I don't like some of your suggestions (although they are "objectively" OK). Likewise you wouldn't want it the way I have it.

> Auto-save and auto-format.

You could put a setting in your config file to enable this. Most people don't want it, though. Even in other editors.

> Allow using ENTER to add newlines to a search-replace command.

I believe this is configurable - I did something similar for a different input. But ... how do you propose someone then achieve the current effect of ENTER?

> Allow writing Emacs commands in popular languages like Python 3 or JavaScript. Include a tutorial for each supported language. The lisp bigots will be angry about this.

I would like this, but it's very challenging. I even switched to Leo Editor which was inspired by Emacs and is the closest thing you'll get to Emacs: An extremely configurable editor that you can script in Python - you can dynamically change the UI, etc. It's the equivalent of Emacs but for Python users. You may want to look into it. Unfortunately, despite being "mature", its documentation isn't the best, and it's hard to compete with all the Emacs packages out there. I gave up and decided to learn elisp - much easier than porting every Emacs feature I liked to Leo.

But Leo really has its strong points. The literate programming capabilities it is based on still haven't been replicated in Emacs - I've not found anything as good in that regard as Leo. I still occasionally fire up Leo when I find Emacs lacking.

> Create a public issue tracker for emacs

It occurred to me that anyone could create a Github project just for Emacs issues. It would be useful even if Emacs developers don't look at it. Currently people do it with StackExchange.


One of my most common uses for shell scripts is writing completion functions for my aliases and custom commands. Hitting tab for a list of all options for a command is a huge timesaver.

You can use tab instead of the down arrow - pretty much identical to tab completion in the linux command line.

Using a modern shell like zsh allows for tab completion of those options.

I tried `curl` and `wget` before finding the `help` command. Kinda bummed out that tab completion doesn't work. And neither does `ls -la`. Also make it so I can click anywhere to get my cursor back on the right line for typing.

tab completion also works in Finder. You can open it with command-G

The "Go to Folder" input box does support command completion (e.g., type Command-Shift-G, enter "~/Doc", and type Tab), but it's super lame compared to what you get on the command line: Finder only gives you the first possible completion. So if you want to open up "~/Library/Application Support", you have to type all the way up to the "u" before hitting tab, because "~/Library/Application Scripts" is the first match.

With the right zsh plugin, either of them will tab complete properly. (I think "osx" from oh-my-zsh is the one that does it on mine)

Edit: looks like this is actually built into zsh. Slightly surprised, but just goes to show I know almost nothing about the shell I use every day.


You can navigate to files in Emacs using `find-file` (C-x C-f with standard key bindings).

That should prompt you to enter a path, which, without any customization, should perform very similar to a shell prompt in terms of using tab for file completions.

A huge improvement to this in my opinion is the use of a completion framework package. I use ivy[0] but helm is also popular and there are others.

The main draw in this case is instead of having to tab through completion candidates, they appear as a vertical list which is updated as you type. It also allows more advanced filtering, for example by regex which I find a lot easier to use than shell completion which only supports prefix.

For example say I want to navigate to a directory called `the-project` but I always forget whether it's named `the-project` or `a-project`, it doesn't matter because I just type `project` and would see `the-project` as an option so I'd navigate to that and select it (using `C-n` and `C-p` to navigate the list).

If that isn't what you're looking for then another option is `emacsclient` [1] which let's you open files in an already existing Emacs process.

[0] https://github.com/abo-abo/swiper

[1] https://www.emacswiki.org/emacs/EmacsClient

next

Legal | privacy