Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Emacs commands I got by with for years (macadie.info)
120 points by todsacerdoti on Jan 4, 2024 | hide | past | favorite | 83 comments


I'm a college student and I use Doom Emacs for about 4 years (before that I was learning to program and used Python IDLE, Kate etc.)

On top of Doom Emacs, I have enabled CUA Mode and my own configuration is less than 10 lines, and it is copy-paste from Internet to enable word-wrap, delete to trash etc.

The only shortcuts I use are:

C-x C-f - open file

C-c C-s - save file

C-c, C-x, C-v - copy, cut, paste

C-z - undo

C-s - search

C-x 1, C-x 2, C-x 3, C-x k - split and killing of buffers

For the remaining I use F10 to bring up the menu and do via it or use M-x and try to find the matching function by "guess n type".

I tried learning a few commands but forgot them after a while.

With these commands and help of Doom Emacs, Emacs has been pleasant to me. I have LSP setup for C, Python, Rust, JS which provides me IDE like features. I have no complaints with Emacs. There has been no learning curve for me because I never tried learning it. The above mentioned commands too I learned by periodic usage.

Thanks to every Emacs user for sharing their knowledge on Internet, had it not been you people, Emacs would have been unreachable to beginners like me. :)


You don't use bookmarks?

C-x r b runs the command bookmark-jump

C-x r m runs the command bookmark-set

> I tried learning a few commands but forgot them after a while.

C-h k runs the command describe-key. You do this and after that any command, and it will give you the explanation.

I've been using emacs only a year. I played a lot with it the first months and it was heavy, but if you take it like a game the benefits are immense.

Also defining your own keys tied to elisp functions or even running python scripts or bash scripts called from eslip and tied to keys is awesome.

For example things that i did: - Open, close bluetooth to conect/disconect headphones. - Open desktop gui folder of current buffer. - Insert custom org templates and such.

I encourage you to take some time every week to play with emacs. Be cautious not to fall down the rabbit hole, but you can gain a lot by learning just the basics.

pd: when learning a new command take it REALLY slow, and push the keys deliberately, this will make you learn faster, like playing the piano.


> You don't use bookmarks?

Hearing them for the first time :)

> C-h k runs the command describe-key. You do this and after that any command, and it will give you the explanation.

I think I'm forgetting them because I don't use them often but will keep this in mind thank you!

> Also defining your own keys tied to elisp functions or even running python scripts or bash scripts called from eslip and tied to keys is awesome.

It is definitely in my todo list to learn. I have changed many of my workflow to Emacs like using Org for todo, reminders, to even publishing a book with it [1], Ledger to manage money etc. So investment in elisp is worthy every penny!

Thanks for your comment :)

1 - https://arunmani.in/articles/publishing-book-emacs/


> C-h k runs the command describe-key. You do this and after that any command, and it will give you the explanation.

But what about the opposite direction ? Is there anything like an "apropos" command ?



Also bound to C-h a

There is also C-h d (apropos-documentation)


Check out marginalia[1]. Whenever you press M-x, it will pop up a buffer showing all the commands (with most recent ones on top) along with their keybindings and a brief description of what they do.

Embark[2] is also cool. It will show all the possible commands relevant to where the cursor is at that moment. I bind it to C-c a.

[1] https://github.com/minad/marginalia [2] https://github.com/oantolin/embark


I usually use:

C-h f runs the command describe-function (found in global-map)

If the command is bound it has "It is bound to..."


I'll usually do C-h f (describe-function), then hit tab to make it build a list of all (interactive) functions, and then switch to that buffer and search for whatever I'm interested in.


Just curious: are the copy, cut, paste and undo commands remapped by Doom Emacs? Those don't seem to be the defaults. TY


Those keybinds are what Emacs calls CUA bindings: https://www.gnu.org/software/emacs/manual/html_node/emacs/CU...


Doom Emacs defaults to Evil mode. But if you turn it off, it gives you vanilla keybindings. So I don't think it remaps them. :)


Also a returning Emacs user this last 3 years after almost an entire working lifetime of (n)vi and vim, post 1984/5.

I agree with the sentiment here mostly: very few commands go an awfully long way, with org mode about the only Melpa add on I know I use.

I do wish I could remember some chording to avoid a few long winded M-x command strings being typed. And the cut/yank thing is .. annoyingly inverse to most people's language as is window and frame.

That said, I am more fluent in vi. Modes are a pattern just as valid as modeless. We're all meta all the time. Sometimes being immersed in the whole (-emacs) is what I want and sometimes I want a :1,$s/earch/and replace/g experience and being mode-full is fine.


If you're not aware, check out evil-mode. https://github.com/emacs-evil/evil


And the alternative for people like me, who just want to avoid too much Ctrl pressing sometimes, without fully comitting to the "mode" experience, is god-mode[1].

While you enable it (usually by pressing Esc), Ctrl is "assumed" to be always pressed, so saving a file becomes "x s" (though when I am on Mac, I always map Cmd+S to save - and many other Cmd key based shortcuts that I used in every other app - thanks to emacs built-in shortcuts almost never using the Cmd key as it was designed for Unix).

It made using emacs much more enjoyable for me.

[1] https://github.com/emacsorphanage/god-mode


Also see Meow[1], [2], which adopts some ideas from god-mode.

[1]: https://github.com/meow-edit/meow

[2]: https://esrh.me/posts/2021-12-18-switching-to-meow.html


See also Modalka (<https://github.com/mrkkrp/modalka>), whose author discusses alternatives in the README.


I have tried these, they don't appeal. I want to run an engine based on Keith Bostics take on Bill Joy's editor


Out of curiosity, what behavioral differences stand out to you between nvi and vim? NetBSD ships with nvi and it felt quite alien to me after vim and evil.


I used to believe there was one significant command difference but I am no longer sure it matters and frankly cant recall what it was even. There is a difference in how they handle the undo/redo stack, there are some differences in :.= and ^g handling. The flip to alternate brace pair behaviour is different but can be configured in vim. I think expandtabs processing is different. Nvi is far smaller but that obsessional view is less important in these days.

Nvi has no syntax highlighting and is far less scriptable. Again, it's minimalist religion.

A lot of this is muscle memory.


I don't know what packages enable it but Doom Emacs is set up so that in the M-x minibuffer it shows the primary key binding for a command next to the name, if it exists.

I've found that this helps me to memorize ones I reference, even if it's only memorized for a couple hours.


I believe doom uses the packages vertico and marginalia for that, available on github.


I don’t use doom but this sounds like whichkey.


Check out vis, it uses structural regexen from plan9's sam.

For tmux users, this will avoid any lag. Place it at ~/.tmux.conf:

       set -sg escape-time 10


I used Emacs as a simple editor knowing only these basic commands for years, but I always felt it was hard to remember more advanced commands. Once I tried vscode, it was so simple to configure that I did not think I would ever use Emacs again.

Strangely enough I decided to learn vim keybindings once I heard that it can be learned as a language. After a while I learned about LSP and got curious if I could adjust my setup to run remotely over ssh. I ended up trying Lunarvim and then Doom.

I finally feel like I can use all the power of Emacs as an editor with the vim keybindings, and Doom LSP support is amazing. So yeah, learning vim is what got me back into Emacs.


Any tips or resources on running remotely over ssh? I'd like to set up a dev environment that I can access remotely and/or from various devices.

Also what do you mean by, "learned as a language" wrt to vim keybindings?


> Any tips or resources on running remotely over ssh? I'd like to set up a dev environment that I can access remotely and/or from various devices.

I first started by getting a free VPS from Oracle and setting up my computer to use autossh to always maintain a connection to the VPS so that I could access it through reverse tunnel over any kind of NAT. I use a key pair for authentication to make it secure. I also use mosh to make it easier to reconnect when moving around.

Then anything that can be done locally over a terminal can also be done remotely over ssh. I try to avoid anything graphical. You can use tmux or screen to do terminal multiplexing, or if stay inside Emacs, you can do the terminal multiplexing without separate tools by using multiple windows with terminal buffers.

So basically you can slowly convert your workflow to run on a terminal when working locally, and if you make your machine accessible remotely, then you will naturally start to use it also when working remotely.

> Also what do you mean by, "learned as a language" wrt to vim keybindings?

I think the original idea of "learned as a language" came from reading this stackoverflow entry [1], but when learning I looked also to other references. [1] https://stackoverflow.com/a/1220118


> "Also what do you mean by, "learned as a language" wrt to vim keybindings?"

Vim isn't a hodgepodge of ad-hoc keyboard shortcuts like, say, typical Windows programs ("where shall we put search and replace? Ctrl+H is free, done"). It can be seen more as a small domain-specific language for text manipulation. "d2w" is delete twice word (delete two words). "yy4p" is copy line 4x paste (copy this line four times below).

It's built of verbs (or operators, like delete, yank, make-uppercase), counts, movements (motions, like up,down,to end of line, to end of word, to start of next word, to search match) and objects (like characters, words, lines, paragraphs, blocks inside braces, text inside quotes, 'the selection') and you compose them together to say what editing you want to do on the text.

":help gU" will tell you that gU makes {motion} uppercase, that means you can do gUe to uppercase to the end of the current word, gU2e to uppercase to the end of the next word, gUfx to uppercase until the next x character, gU/thing to uppercase until the regex search for 'thing' matches...

and Vim being around a long time, it has a lot of different verbs, motions, objects to allow you to slice and dice your text just so for the edits you want to make.

Try

    :help motion
    :help word-motions
    :help operator
    :help objects


ah yes, I am decent Vim user but hadn't thought about it in that context. Thanks for the context!


Sometimes ssh -C helps on slow connections. Also mosh is great for those cases, but optional and has different setup requirements (see below). As others have said start a -daemon on remote and use emacsclient -nw when you connect. Spend some time finding a local terminal client that works well and invest in tuning its quirks to make it support all of the Emacs keys and full 32bit colors. I had good luck with iTerm2 from a Mac and with kitten or basic xterm on Linux, but any solution required at least a handful of nontrivial modifications for full support of the terminal powers. Once you have the local machine become a thin client a lot of development is easy and much faster than any other mode of operation; plus if you change the local machine nothing changes except a one time setup of a terminal.


In the Emacs world, this is done using TRAMP[0]. This allows you to treat remote systems over various protocols (usually ssh) as an extension to the local system. So you wouldn't use Emacs over ssh, but rather ssh over Emacs.

[0] https://www.gnu.org/software/tramp/tramp-emacs.html


You can do both. I often ended up running emacs on a remote server using ssh/tmux as it was easier to keep my state on said server (processes etc) and just reconnect.


Single biggest bugbear for me using emacs over SSH (non-TRAMP, remote-ssh and run emacs --daemon and then emacsclient -t locally on that machine) is on a laptop, I find that the session drops frequently and I need to reconnect (sometimes after hitting return-tilde-dot to unfreeze the dead terminal session). I've never really figured out how to fully stabilize my SSH (and I certainly don't have anything as convenient as "Actually auto-restores the session if it breaks," which is something vscode seems capable of doing for the shells it opens).

Second bugbear is running in terminal so all my GUI conveniences are missing, but it's emacs so that's a distant second to the first.


I just use tmux on the remote, so just run in terminal on that machine.

Agreed with the GUI stuff, needing to write graphs to a specific file and have a web server was super, super annoying.


Sure, but not being able to access your local system with your text editor is a bit strange to me. If you know that you won't need to then there is no problem with that though.


I generally had a local emacs for all that stuff.

At the place(s) I did this, pretty much all dev took place on remote servers so it was pretty normal for a lot of people.


on my current setup, from a thin-client I remote desktop to a windows machine where I vnc to a xvnc linux server, from which I ssh -X to a large shared dev machine. From there I run gui emacs, often using TRAMP to access remote files.

The amazing thing is that this contraption is actually usable.


I've used emacs for decades and didn't know about sessions/the desktop

https://www.gnu.org/software/emacs/manual/html_node/emacs/Sa...

one thing I've customized in emacs that has helped over the years:

  (global-set-key "\C-z" 'bury-buffer)
I use control-z to cycle through my buffers.


The previous-buffer and next-buffer commands are also very convenient to navigate the buffers. I use them all the time. (Bound to M-A-left/M-A-right.)


i bound those to (buggy/crappy) personal functions that shift lines left and right, and comment/uncomment lines. I use them all the time.


Wow- 23 year emacs veteran here and you just taught me about desktop-save-mode. Thanks!


> I thought the whole concepts of modes was stupid.

> people want to play the game of “who can spin the most plates in their head”. It is a stupid game to play, and only stupid people like playing it.

Modes are exactly the first part of the solution - you remember 1-key prefix for a bunch of other 1-key prefixes

> If you are learning Emacs, there is nothing wrong with writing down commands, either on paper, or even in another editor, or using an online cheat sheet.

There is, it's a much bigger effort vs. the editor conveniently(!) showing you that cheat sheet (that's the second part of the solution). Not sure about emacs, but e.g., Helix does this almost correctly - when you press the first 1-key prefix it would show a panel that lists all the other keys/commands within that mode so you don't need to remember all 50 commands in your "goto" mode

You don't need any papers/online cheatsheets (context switches/wasting time searching, which is especially awful with physical paper), instead you get help right when you need it right where you need it!



Yes, that's the one, and with a delay this fixes one of the "almost correct" issues


There is also Transient, the library behind magit ui.


Emacs organizes command invocation via a tree, so there's also a prefix-discoverability need. Emacs has a nice feature that helps here: if you type a prefix, you can follow it with C-h to see a full list of everything accessible via this prefix. For example, experienced users know that C-x 5 is a prefix for operating on other emacs frames, but what can you do with C-x 5? The only thing I remember right now after many years using emacs is I can destroy frames with C-x 5 0, and I can show a buffer in another frame with C-x 5 C-o. But when I type C-x 5 C-h, Emacs gives me this:

    Global Bindings Starting With C-x 5:
    key             binding
    ---             -------
    
    C-x 5 C-f       find-file-other-frame
    C-x 5 C-o       display-buffer-other-frame
    C-x 5 .         xref-find-definitions-other-frame
    C-x 5 0         delete-frame
    C-x 5 1         delete-other-frames
    C-x 5 2         make-frame-command
    C-x 5 5         other-frame-prefix
    C-x 5 b         switch-to-buffer-other-frame
    C-x 5 c         clone-frame
    C-x 5 d         dired-other-frame
    C-x 5 f         find-file-other-frame
    C-x 5 m         compose-mail-other-frame
    C-x 5 o         other-frame
    C-x 5 p         project-other-frame-command
    C-x 5 r         find-file-read-only-other-frame
Each function name in the output is a link to function documentation, which itself links to the source for that function, all entirely within Emacs. Emacs is really well thought out due to its age, but the real trick in using it (I've found) is understanding the full scope of its capabilities. My solution to this was inelegant, but worked really well: I bought a copy of the Emacs Manual in print and left it in my bathroom for about 7 years. Problem solved. =)


One reason to learn emacs basic key shortcuts is that these shortcuts are used by default everywhere in MacOS and everywhere in Linux i.e. bash, nano - they all have the same set of basic shortcuts.


Agreed. I use them constantly across sublime, textareas in the browser, discord, random app dialogs, etc.


It's better to remap those MacOS defaults rather than suffer with the wrong basics everywhere



"I know a lot of vi people use vi “because it is always there”, but is that really a good reason?"

Well.. it is always there. If I were on my own machine all the time.. but there are many machines. As an Emacs user (for decades) I still use 'vi' for config files etc. I never bothered to learn more about vi commands than necessary for that (insert, delete, append from end of line, and esc-:wq etc).


I also use vi for config files or for quick edits when I ssh to a server or even on my machine, when I pass by a directory and I know I'll just add a line or two to a README. No need to run emacsclient for that, even with my alias ec.

Furthermore it's easy to sudo vi file, no idea how to do it with emacs. And even if I knew, I think it's a good idea to contain an edit to a protected file into a short lived process.


You can do it with TRAMP in emacs.

/sudo::/path/to/file


Learning this finally killed off my intermittent vim usage.


Once I adopted doom emacs, I found that I started using vi much more situationally; I dropped (my beloved) YouCompleteMe and the other heavier plugins from my configuration, using it as a much more bare-bones and general-purpose editor, like a bicycle for little alleys where the doom tank won't fit or if it is broken. Also, of course, while SSHed (or kubectl exect -it {pod} bash) into remote servers, because I don't know how to set up tramp.


It used to be frustrating when I forgot the basic keybindings, which I occasionally still do after 10 years of use. In particular, I find it quite suboptimal that moving around windows is hidden as `C-x o`.

For this reason, I remapped my arrow keys to move around them. I also have `Command + Left/Right` for cycling between buffers and `ESC` to kill a window. Recently, I also started to use function keys for managing bookmarks and buffers. Though for the latter, `C-x b` has also been quite often used since I remapped my CapsLock key.

I guess with all this, I wanted to say that there is much untapped potential for eMacs just by remapping some basic keybindings to fully appreciate `C-f` and `C-b` editing nuances.


C-x o is a horrible default keybinding, given how often one needs it. From my first days of using Emacs, I remapped it to F-6, which was the keybinding in the DOS days, and still works in most Windows applications.

> For this reason, I remapped my arrow keys to move around them.

I don't have access right now, but on my work laptop I use a package that lets you use Shift + Arrow Key to jump between windows. Of course, if your minor mode uses those keybindings for something else (e.g. org mode), then it won't work.

> I also have `Command + Left/Right` for cycling between buffers

This is a good idea. I use C-M-[ and C-M-].

At some point I learned how to use the Hydra package and often use that for major modes I'm not too familiar with. No longer need to memorize (or make my own custom) keybindings.


Yes exactly, this is the magic of Emacs, you customize it to your needs and liking.

Also witting your own elisp functions to manage buffers and have it mapped to some keys and commands opens a infinite dimension. For me it's like the holy grail of software, at least text based.


> Someone (probably a sysadmin) showed me vi. I thought the whole concepts of modes was stupid. I found someone who used Emacs. I asked them: What happens when I open a file in Emacs and hit the “A” key? They told me it would just insert the letter “A” in the file. I decided I wanted to learn Emacs instead of vi.

This is how I started. You could go with nano/pico, but then you're stuck there... if you start with emacs, you can use it just like you would use nano, but when you need something more, it's always there, just one google search and one key combination needed (and hopfeully you remember that, so you don't need to google it again).


> It keeps a history for that session, but so far I have not found a way to maintain history between sessions.

I use prescient.el [0] with prescient-persist-mode for this, though a quick look seems that SMEX also has something similar [1] but I have not used that so I can't say anything about how it works.

[0]: https://github.com/radian-software/prescient.el

[1]: https://github.com/nonsequitur/smex#persistence


See also `recentf`, `savehist`, `saveplace`, `undo-fu-session`.


> Someone (probably a sysadmin) showed me vi. I thought the whole concepts of modes was stupid.

I couldn't agree more. I've never understood vim, I just want to edit text, why turn it into a complicated task in which I must remember a thousand shortcut, and the same shortcut does a different thing in each mode.


It's not a thousand shortcuts, but more of a language for text edition, it's merely expressing what you thought when doing the tasks itself. Like:

"Search for the function name foobar; swap the parameters by cutting the first one up to the comma; delete the latter, and the space which comes after; type a comma after the other parameter, and paste."

The Vim commands are: / foobar <Enter> f ( l v t , " a d d f <Space> e a , <Space> <Esc> " a p

With VS Code, it would be like: <Cmd>+f foobar <Enter> "Carefully select the first parameter" <Cmd>+x "Place the cursor at beginning of the second parameter" <Delete> <Delete> <Option>+<Left Arrow> , <Space> <Cmd>+v

The nicest thing with vim is that I never have to touch the mouse for a lot of tasks. And I don't really think about how to edit, just what to edit as the language is very intuitive once you got it down.


>The Vim commands are: ...

You forgot the time you spend learning a counterintuitive way to edit text. The microscopic time you gain while editing text is nothing in comparison to that.

>just what to edit as the language is very intuitive once you got it down.

Everything can become intuitive when you spend hours and hours learning it. The question is whether it's worth it.


I've been writing code for more than a decade almost every day. The pros for learning vim is not about writing code fast, it's about streamlining it. I do not want what I'm doing interrupted by moving the cursor with arrows keys or using the mouse. That's why people put hours into configuring their emacs setups. Not for speed, but to resolve annoyances.


> I do not want what I'm doing interrupted by moving the cursor with arrows keys

Why exactly? That's just pressing a button, like any vim command.


Just try it. Your favorite editor almost certainly has a vim motions plugin, try it for a week and see if you go back.


I did try it. It seems to me that I would have to invest too much time for not much benefit, I would rather learn a new programming language, listen to a talk or read a book than spend hours learning a new method to edit text while I can do that just fine, with decent speed.


`vimtutor` from the CLI (on a computer with vim installed) is the best way I know of to pick up vim.


Haha. With a piece titled “…commands I got by with for years”, I have to laugh about this comment on modes. I’ve been using VIM for years for admin and some scripting and I don’t _know_ what a mode is. If I think about it, I guess I know edit is a ‘mode’, but if you start with cat and less, then VIMs edit mode is intuitive.


I've been trying to use org-mode as it looks very powerful once you master it, but I'm too good with vim already, so the bar is really high. I know that long-term, having a good custom configuration with Emacs and learning the Emacs keyboard shortcuts would be better than what I do now, but it's hard to assess how much effort that would actually require, and in which direction. There are so many plugins and settings that to me feel basic (and thus required), but each one of them add complexity to the learning experience.

For example I already know the Emacs keyboard shortcuts in this article. But that gets me nowhere near the proficiency I have in vim. I tried various vim compatibility layers, but then it's harder to get help about org-mode specifically (since you're using different shortcuts).


> There are so many plugins and settings that to me feel basic (and thus required), but each one of them add complexity to the learning experience.

Yes, and you should be conservative with what you install.

There is so much stuff already built into Emacs that can be amazingly helpful if taken seriously. „vc-mode“ e.g. is a great front-end for version control. It works with many systems and only comes with a couple of keyboard short cuts. So you don’t need to learn magit. Or „compile-mode“ which you just have to feed shell scripts to adapt it to any programming language or publishing system you like. Together with „.dir-locals.el“ you make Emacs even switch to the correct build command depending on the source file‘s location. Or take Emacs‘ „xref“ system. It‘s there by default by pressing „M-.“ on a function name. All you need to do is run „etags“ to generate a search index. This way you don’t even need LSP in many contexts. There is also „dired“ which is a great file manager serving many of your dev needs without resorting to extensions like „treemacs“. Emacs also comes with „customize“ to configure the various modes w/o needing to learn Lisp. It’s good enough for many things.

Then when you decide you need an extension differentiating the good from the bad extensions is the biggest hurdle for newbies I guess. It does not help that many Emacs influencers play around with cutting edge extensions that look cool on the surface but seldomly are production ready.

However, here is the workflow I am following when incorporating new extensions:

Most Emacs extensions live on GitHub these days. Usually, before I start installing anything I really need to have an urgent problem to solve. Then I google around ending up in a GitHub repo. Then I check whether the extension is actively maintained and whether it is also provided as a Melpa package. Then I evaluate the quality of the documentation. If it seems simple enough to configure I‘ll try it out in a git branch of my Emacs config. Once I tried it out a couple of hours or even days I merge the changes into „main“.

BTW: If you want to learn org-mode try writing your Emacs configuration using it.


> So you don’t need to learn magit

if you are only installing a single package on top of vanilla emacs and you use git, it should definitely be magit.


Whenever I write a comment stating you don’t need „magit“ I receive such a comment like yours. ;)

I am personally using „magit“ but I just wanted to stress that newbies might want to postpone installing it until they are more comfortable with vanilla Emacs.


So I'm a very experienced emacs user and I gave using vc-mode a real try, but quickly ran into some case where I would have to write some elisp for an important part of my workflow that magit already does.

So at least for me, it wasn't an option. Maybe I'll try again someday :)


What do people like to use for other-window?

I bound other-window and `(lambda nil (interactive) (other-window -1))` to C-n and C-p ages ago, because I'm never on a machine without arrow keys so the default behavior of those is worthless to me and (in contrast) I'm navigating between windows continuously; having that behind `C-x o` always seemed too far away.


I use "C-<tab>", it's kinda like screen's "C-a <tab>", so it's easy to remember.


Somewhat on topic: What is a good way of displaying a specific layout of Emacs windows when I open a Terraform file in a git repo? I already have the language server working ok. There's some interaction between VSCode and terraform-ls that uses all CPU cores at 100% so I'd like to move to Emacs for Terraform stuff.



If you want it to happen automatically, I think you want display-buffer-alist. Here is a good video on it:

https://www.youtube.com/watch?v=-H2nU0rsUMY


Some commands I learned along the way (on top of those already said)

C-x g - magit-status

C-c c - org-capture

C-x h - mark-whole-buffer

M-: - eval-expression

C-x C-u - upcase-region

C-x C-o - ace-window

(use-package ace-window :bind ("C-x C-o" . ace-window))

Allows you to number your buffers and choose the one you want by pressing the number associated with it

In dired, C-0 w gives you the full path to the file under the cursor


if anyone's interested in "independent" vim keybindings, made to work same in both insert and view modes (and a few different terminals), this is what i use for over.. 25years (?) Basically, few keys like old DOS PE2.exe or (later) e3.exe, and the like, then adding more with years. Like F2 for save, F3 for abandon, Ctrl-F/A for find forward/backward etc. Plus some other stuff that turns vim into kind-a IDE (grepping etc).

https://github.com/svilendobrev/svd_bin/blob/master/qini/_vi...

have fun


    Error establishing a database connection




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: