Even though this repo looks like it was created on 16 Jun 2012, it is the result of many years of tweaking and changing. I have at least 17 Yak sweaters currently.
Here lies my most recent development environment. After trying to use ansi-term inside Emacs for over a year, I finally broke down and learned screen. Actually, I started with tmux based on a recommendation from a coworker, but tmux is not installed everywhere I do work. Gnu screen however is, so I started using it. The first time I was ssh’d to a box doing work and the network died, I was sold. Of course, screen reconnected right where I was. And the combination of screen and emacs running a terminal means I can use shell script like usual.
I am often forced to do development from a windows box, but putty ssh’d back to a linux box running screen with this setup works great. On my macbook, I use iterm2, which can easily be configured to mimic putty’s behavior of copy selected text and paste it with a right click. This helps keep my workflow more similar regardless of where I am working. Iterm2 also has nice colors. I don’t use any of the other capabilities of Iterm2, which seem to do much of what I have screen and emacs doing.
Included in the repo you will see some config files: bashrc, gitconfig and screenrc mostly. Bashrc starts up a screen or attaches to a running one automatically. There are a few script in the bin directory which are added to path. I’ll explain several here.
bin/em is used to startup emacs in a terminal from the screenrc. It sets the TERM variable, because I had trouble getting 256 colors without it.
bin/ew writes a file the current screen window so we can go back to it easily. It then changes to screen window 1, which is where I have emacs running from my screenrc. The script then uses emacsclient to open the file in emacs, since I have an emacs server start when emacs loads. This scripts opens the file and waits for it to be closed, at which point is uses the temp file and a server-done-hook in dotemacs.d/init-defaults.el to change back the original window. This is mainly useful for git commits, so GIT_EDITOR is set to ew. Also useful if you want to open a file and return quickly to the last screen window. I have magit installed, but I don’t trust it. Probably because I don’t understand it, but I’ll stick with using the git command for now.
bin/ec calls the ew script, but passes a -n option. This means the terminal where you ran ec is released. Normal workflow for me is 'ec' a file and work on it.
This workflow came mainly from an article by Bill Clementson at http://bc.tech.coop/blog/071001.html, with some minor tweaks.
My emacs configuration is also here. It was a seperate repo on github since Sept 2010. Currently, that repo still exists, but may go away at some point. Lots and lots of changes in approach and tweaking there. Kinda a hobby of mine, tweaking .emacs.d. I wish it was more fun. For more info emacs, see the README in dotemacs.d at https://github.com/mjwall/dotfiles/tree/master/dotemacs.d
Also in this repo is my vim configuration. I still use vim, but mostly for quick edits on remote servers. I used vim for many years as my primary editor and can’t let go of it. Using screen allows me this flexibility. Using ansi-term inside emacs did not.
There are also some other bin scripts that may be of interest to you. Or maybe not. Ctail is nice if you spend a lot of time tailing logs generated by log4j, as the script adds some color to errors and warnings.
Clone this repo with
git clone git://github.com/mjwall/dotfiles.git
then setup the symlinks by running the following
./setup.sh
The installation will not overwrite anything that currently exists (I hope). See the next section on removal.
The removal process is very destructive if you currently have anything in any of the locations. Therefore, it is a manual process. You must run the following.
# rm "${HOME}/.bashrc" "${HOME}/.bash_profile" "${HOME}/.gitconfig" "${HOME}/.screenrc" "${HOME}/.vim" "${HOME}/.emacs.d" "${HOME}/bin" "${HOME}/.bash_completion.d" "${HOME}/.vimrc"
Be sure you know what you are removing and that you don’t want any of this stuff. There is no check to ensure it is a symlink or anything like that. Back up your configs first if you want to keep them.