Friday, October 18, 2019

Emacs part 2

Well, it's not really day 2 but close enough.  I have been using emacs mostly for some days now and feel more comfortable with it.  In fact, I am writing this in emacs now.  The day 1 log was written in vim.

I am still making minimal configuration changes to emacs and am not using the vi helper mode.  I want to learn the emacs keystrokes rather than rely on my vim muscle memory.  This has been difficult, but is getting easier.  So what have I learned?

First, I found a one page emacs cheatsheet that I printed out and put on my desk.  It is easier than searching the web each time I want to remember a keystroke.  It does use emacs jargon for some things, which may be frustrating to some, but I am also trying to get used to that. For example, emacs use of the word buffer or kill.

I have successfully gotten used to opening files, saving files, and quitting the program.  Three things I consider essentially to using an editor.  I have also been using the forward and backwards search capabilities.  One thing I have not quite figured out how to do is delete an entire line similar to how vim did it, but there may not be a direct way.

In vim, I can type dd in command mode and it will delete the current line regardless of where the cursor position is on that line.  The line is removed and the entire file shifts up.  I have found Ctrl+k in emacs which has similar but slightly different behavior.  If I am in column 0, it deletes the entire line but leaves the newline in place. If I am in any other column, it deletes the line and brings the next one up to join where the newline was.  I may not be completely
understanding what's happening, but it's not a deal breaker.

I would like to make better use of emacs buffers, but that will come as I continue to use it day to day.  Until the next log entry... Ctrl+x Ctrl+c

No comments: