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.
I am mostly an emacs user. I used vim for many years, and my config is here as well. Even though have configs for screen and tmux, I don’t use them. This is the config I use on a daily basis on both Mac OSX and GNU Linux.
├── bash_completion.d ├── bash_profile ├── bashrc ├── bashrc-custom.sample ├── bin │ ├── ec │ ├── es │ ├── et │ ├── ... ├── dotemacs.d ├── dotvim ├── gitconfig ├── screenrc ├── setup.sh └── tmux.conf
The bash_completion.d
directory includes completions scripts. There is a git completion script, but you should really use the completion scripts included with the version of git you have installed.
The bash_profile
simply calls ~/.bashrc.
The bashrc
sources ~/.bashrc-custom early on for the location of ENVIRONMENT VARIABLES that change on different systems. Lots of stuff in here, so read it to make sure it is doing what you want.
Copy bashrc-custom.sample
to ~/.bashrc-custom
and modify for your environemnt.
The bin
directory contains scripts I use for various stuff. More on how I use that for Emacs in the section below.
Emacs is configured in dotemacs.d
and Vim is configured in dotvim
gitconfig and screenrc mostly.
Git is globally configured in gitconfig
.
Some terminal multiplexer configs are in screenrc
, and tmux.conf
. I don’t use these very much
See installation for info on setup.sh
.
As I mentioned, I am mostly an Emacs user. My emacs configuration is also here. It was a seperate repo on github since Sept 2010. Currently, that repo still exists, but just has a note pointing to here. Lots and lots of changes in approach and tweaking there. Kinda a hobby of mine, tweaking .emacs.d.
You can follow one of 3 approaches
-
http://emacsformacosx.com/, probably the easiest but misses a couple of useful patches
-
brew install emacs --cocoa --srgb
-
My current method is https://gist.github.com/mjwall/3fe935a8becb60dd3c4c, although the fullscreen patch doesn’t work anymore. It is important to create a new
/usr/bin/emacs
as described in that gist so Emacs works properly. It is also important to change/usr/bin/emacsclient
to the version compiled with your Emacs. If you are using Cask, you may need toexport EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs
as well.
-
use whatever package manager comes with your system, apt-get, yum etc.
-
Compile it yourself. Here are my notes on doing so https://gist.github.com/mjwall/6826866
To launch Emacs, I use the ec
and et
scripts in the bin directory. These scripts both ensure the Emacs daemon is running. I find this useful because I can close Emacs and reopen with all the same buffers. It is also extremely quick to open a file after the dameon is running.
The ec
script calls emacsclient and used the GUI version of Emacs. It also has some elisp to change focus to Emacs so you can start typing right away. Calling it from a bash terminal does not wait.
The et
script also uses emacsclient, but opens Emacs in the Terminal and waits for it to be closed.
The only issue I have run into is that shutting down on a Mac sometimes hangs, waiting for Emacs. The es
script will stop the Emacs daemon, so you can shutdown. I don’t mind it, but maybe I’ll dig into it more one day.
I wrote a blog article on this at http://mjwall.com/blog/2013/10/04/how-i-use-emacs/
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" "${HOME}/.tmux.conf"
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.