Tag: emacs
I originally planned on do some videos on C++ development but I'm just not feeling it. Probably because I'm excited to be working with my new class and we're working in Python. We're not going to be using C+++ for a few months so I'll get to those videos a little later.
Today, I want to cover what I consider a leatherman or multi-tool for Emacs. Something that isn't perfect for any particular job but can get almost any job done: Macros.
# COMMENTSSorry for the incosistancy of the posts. I hope to get to that one video a week soon but I've still got a hectic couple of weeks ahead.
No new material this week, or at least very little. This week, I talk about some thoughts on the "Using Emacs" series.
In the video I talk about Sacha Chua and her work as a leader in the Emacs community. Check out her stuff here: http://sachachua.
# COMMENTSIt turns out that Elpy, a popular emacs package for python development is much easier to set up than I remember. It turns out all you need is:
(use-package elpy :ensure t :config (elpy-enable)) The video shows how to install and a bit of use. I don't think it's a package I'm going to use much since I use other tools to do similar things but it's worth checking out.
# COMMENTSThis week, we're going to look at my setup for Python programming.
I'm an educator, not a professional developer so I'm not working in huge code bases with dozens or more files at a time. I do periodically work in medium size code bases and will talk about cross file navigation and project management later on. There are also more powerful emacs Python packages. One being elpy. Elpy looks pretty cool but for me, it's overkill.
# COMMENTSHappy to be back after a couple of weeks.
My wife and son spent some time in San Francisco, Mountain View, and Seattle. The main reason was to see our daughter who's interning out there for the summer but it was also a great opportunity to catch up with over 100 former students. If you're interested in seeing more, I wrote a bit about it here.
I was originally going to start talking about Python development but then saw this post on reddit about reveal.
# COMMENTSI'll be traveling for the next couple of weeks so I probably won't have time for another video until mid to late July. I'll probably write a post about this series and do some regular blogging over that time but probably no new videos for a couple of weeks.
Also, a couple of notes about the series:
Instead of making a separate git branch for each episode, I'm just adding on to the master branch on GitHub.
# COMMENTSNow that we have a nice basic configuration, let's make Emacs look a little nicer.
Like most editors, Emacs can be extensively themed.
As shown in the video, you can quickly see the built in themes using the customize-themes command.
You can load one of these themes by using the load-theme command interactively or, more likely by putting:
(load-theme 'leuven t) in your init.el. The above code loads the built in leuven theme.
# COMMENTSOut of the box, Emacs supports various types of completion.
Tab completion for filenames and commands basically work right out of the box and Emacs has built in modes like Abbrev, Hippie Expand, and Dabbrev provide a manner of completion for in buffer text.
I briefly show Dabbrev (Dynamic Abbrevs) in the video and if you're interested in the others, follow the links.
We saw ow the built in Ido mode and third party packages like Ivy, which I prefer, and Helm make for better completions on functions, filenames, and the like and Emacs also has third party packages for in buffer completion.
# COMMENTSHere's a really cool navigation method that I've been meaning to use more. Avy is a replacement for ace-jump mode which is an implementation of easymotion, a vim plugin.
It's pretty cool and lets you quickly navigate to any spot on the screen.
After triggering avy, or more specifically the avy-goto-char function, emacs prompts you for a single character. When you type it, all instances of the character that start out words change to a highlighted letter.
# COMMENTSThe other day my friend and fellow CS Ed Blogger Alfred Thompson wrote about Better Comments, an extension for visual studio that displays comments that are marked up with special characters in order to highlight them. Here's a screenshot:
https://raw.githubusercontent.com/omsharp/BetterComments/master/screenshots/ClassificationC.png
So, the first thing I though was "I bet emacs could do that pretty easily" and down the rabbit hole I went.
I had to figure out something about how emacs themes and font-locking (emacs for syntax highlighting) works and of course spent far too much time learning about Emacs, my favored tool, rather than getting actual work done, but I came up with this:
# COMMENTS