5 power user tips for emacs

  Рет қаралды 8,032

John Cairns

John Cairns

Күн бұрын

Пікірлер: 30
@sahandbahari5074
@sahandbahari5074 Жыл бұрын
That was very informative. In addition to the five tips, I learned about repeat-complex-command (bound to C-x ESC ESC) from this video, which is very useful. Thanks.
@DavidRadkowski
@DavidRadkowski Жыл бұрын
Ditto!
@256k_
@256k_ 9 ай бұрын
this was a great discovery for me as well.
@teddykayy
@teddykayy 5 ай бұрын
Same!
@prism223
@prism223 10 ай бұрын
For an elisp REPL, there is also ielm built-in for a more convenient experience than the interactive-lisp-mode buffer(s), very useful for bottom up coding.
@johnacairns
@johnacairns 10 ай бұрын
Very helpful!
@lawrencedoliveiro9104
@lawrencedoliveiro9104 Жыл бұрын
10:34 Regular expression searching is done with C-M-s. Tip: if you want to search for entire words, try putting “\b” at the start and end. For example, to search for the identifier “i” in a program, you can avoid matching “i” in the middles of other names with “\bi\b”.
@Argletrough
@Argletrough Жыл бұрын
Or isearch-forward-{word,symbol} See M-s C-h
@stevenpe781
@stevenpe781 Жыл бұрын
Nice examples, thank you ! Especially love rgrep & the like... One other would be dabbrev-expand (and bind it to Tab) : ultra useful generalized completion (should be mandatory in Word imho !)
@johnacairns
@johnacairns Жыл бұрын
One of the things I love most about this is learning from everyone here. dabbrev-expand is something I didn't use before and it seems very helpful! By default it is bound to M-/. Thanks for your feedback!
@lawrencedoliveiro9104
@lawrencedoliveiro9104 Жыл бұрын
7:24 “C-h a” and enter “sort” to bring up a summary description of all commands with “sort” in their name, instead of trying to guess just based on their names.
@Argletrough
@Argletrough Жыл бұрын
S-expressions making your head spin? C-x * q can evaluate normal infix maths notation, and inserts its result into the buffer with a universal argument
@johnacairns
@johnacairns Жыл бұрын
yeah its a good tip! Like I said in the video, learning lisp will ultimately let you fly further faster though!
@lawrencedoliveiro9104
@lawrencedoliveiro9104 Жыл бұрын
14:55 If you are testing out Elisp functions in a file, you can directly evaluate them by positioning the cursor just after the closing parenthesis, then typing “C-x C-e”.
@sofiaknyazeva
@sofiaknyazeva Жыл бұрын
Or you can just use M-x eval-buffer
@shawnlevy2437
@shawnlevy2437 Жыл бұрын
@@sofiaknyazeva M-x eval buffer for the whole buffer | C-x C-e for a single lisp expressions.
@gmmigge
@gmmigge Жыл бұрын
Nice video, thanks for the tips! In your list of cities, I saw my small hometown Landskrona in Sweden 😊 made me curious what that data was for!
@johnacairns
@johnacairns Жыл бұрын
That is the source code for an upcoming volume on The Crusades in Europe. That specific file is a list of cities for a regional map in the region of the Baltic Sea. Here is a link for reference: www.pen-and-sword.co.uk/Warfare-in-the-Age-of-Crusades-Hardback/p/24051
@gmmigge
@gmmigge Жыл бұрын
@@johnacairns wow, how cool! 🙌 Thanks for sharing!
@toddkfisher
@toddkfisher Жыл бұрын
C-x ESC ESC Nice! Didn't know about that one.
@almarn
@almarn 10 ай бұрын
The shortest one is mode-line-other-buffer..How to come back immediately to the previous buffer Example ibuffer..select a buffer...do anything you want....mode-line-other-buffer..go back immediately to ibuffer ;; Back to previous buffer (global-set-key (kbd "") 'mode-line-other-buffer) f12 again to go back to the buffer selected first. There is winner mode also for windows history. I am using ag in place of regrep.
@nezubn
@nezubn Жыл бұрын
Nice tips, keep making these videos.
@AllenMcPherson
@AllenMcPherson Жыл бұрын
I noticed a .devcontainer directory in your project. How are you using devcontainers with Emacs? Do you use the devcontainer CLI to start the container and use emacs outside of the container? Is your repo cloned to local disk or in the container? If in the container, how does Emacs get at it? I’m just starting to try and figure this out now. I like the idea of devcontainers, and they work well with VScode, but I’m a grey beard and prefer Emacs?
@johnacairns
@johnacairns Жыл бұрын
The two best ways I have found are to edit the files locally and then provide a build script to build via docker locally (build.sh) or to launch your container in the cloud and then use ssh or tramp to connect to it. Both methods work fairly well and both have some drawbacks as compared to vscode, which is why I typically also run vscode simultaneously with emacs. A third option which requires a little more setup but also works pretty successfully in a modern environment is to launch a container in a remote cloud instance and then start emacs from within the container using an X11 (ssh -X) tunnel. This would let you use the full power of emacs including interactive debugging, compilation and code editing within the remote container instance.
@deleted-test
@deleted-test 11 ай бұрын
where are these boomers at 😭
@Argletrough
@Argletrough Жыл бұрын
graa M-< C-SPC M-> so inefficient mark-whole-buffer C-x h
@johnacairns
@johnacairns Жыл бұрын
Yeah! Personally love this one and use it multiple times per editing session. You might even notice me using it in this video, but viewers of this video might also want to learn basic navigation < - > C-SPC before learning one more hot key. I think the *case against* emacs is hotkey soup. People want an understanding of how to build up control from basic chords.
@sus4793
@sus4793 11 ай бұрын
graa! good to know
@Argletrough
@Argletrough Жыл бұрын
Use external programs to filter the buffer contents inline with C-x h C-u M-| ...or :%! in Vim ;)
@johnacairns
@johnacairns Жыл бұрын
Yes I regretted not mentioning this M-| (meta-pipe) is the hotkey for M-x shell-command-on-region or M-x s-c-o-r. Helpfully, my version of Emacs suggests this keystroke alternation if you actually go to the trouble of typing shell-command-on-region. On the other hand, someone who never encountered this sequence should learn the full command name!
Elisp Idiosyncrasies
16:58
Positron's Emacs Channel
Рет қаралды 4,4 М.
Emacs: control where buffers are displayed (the 'display-buffer-alist')
29:52
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 36 МЛН
How to Fight a Gross Man 😡
00:19
Alan Chikin Chow
Рет қаралды 18 МЛН
Noodles Eating Challenge, So Magical! So Much Fun#Funnyfamily #Partygames #Funny
00:33
The 6 Emacs Settings Every User Should Consider
15:41
System Crafters
Рет қаралды 37 М.
CAS92AF24Lecture14
35:47
Packetlevel
Рет қаралды 19
Why I Prefer Emacs Over VSCode and vim
8:23
Code to the Moon
Рет қаралды 130 М.
How I Wrote my Book in Emacs + Org
8:52
Joshua Blais
Рет қаралды 7 М.
Emacs 29 released!
12:29
Brent Westbrook
Рет қаралды 10 М.
Consistent Technical Documents Using Emacs and Org Mode
22:43
Emacs: advanced Org literate configuration
24:57
Protesilaos Stavrou
Рет қаралды 9 М.
Learn Emacs Lisp in 30 Minutes
30:22
Gavin Freeborn
Рет қаралды 11 М.
Unboxing the Raspberry Pi CM5 Development Kit
11:36
Level 2 Jeff
Рет қаралды 39 М.
What type of pedestrian are you?😄 #tiktok #elsarca
00:28
Elsa Arca
Рет қаралды 36 МЛН