GNU Emacs configuration
Saying that GNU Emacs is just a text editor is like calling iPhone just a phone. (Luke - Terminally Incoherent)
While any text editor can save your files, only GNU Emacs can save your soul. (Per Abrahamsen)
Show me your ~/.emacs and I will tell you who you are. (Bogdan Maryniuk)
The reasonable man adapts himself to GNU Emacs. The unreasonable one persists in trying to adapt GNU Emacs to himself. Therefore all progress depends on the unreasonable man. (G. B. Shaw)
GNU Emacs is my favorite text editor for R, LaTeX, Markdown, Shell, and related files due its high flexibility and customizability. Customize means to change the way something looks or works so that it is exactly what you want or need. With this in mind, GNU Emacs allows you to customize him to get all of this power and became more efficient and productive.
Good editors allow the user choose color schemes, font attributes, has code highlight, proper code indentation and offer sophisticated ways to do find and replace strings (regex), for example. In addition to this key features, with GNU Emacs it is also possible set key bindings for pre defined functions or even create new functions. You can use the Linux terminal inside GNU Emacs and even play tetris, without mention the psychoanalyst embedded.
GNU Emacs customizations are defined in the
.emacs file or in the
~/.emacs.d/init.el. On Linux systems, this file is found, by default,
in the user home folder. To me, the path is
/home/walmes/.emacs.d/init.el. I prefer put in the
than in the hidden
To have proper code highlight in R sessions you need to have installed
ESS. To work with LaTeX it is recommended
install AUCTeX. GNU Emacs also
have resources to edit MarkDown (
.md) and even R+MarkDown (
Look the packages
polymode. To work with Python,
Most of the content in my
init.el file was inspired or copied from the
web. My first reference was Fernando
Mayer's GNU Emacs init
file, also available in GitHub. But today Fernando uses Spacemacs.
The purpose of this repository is to keep safe and share my GNU Emacs
configurations files. The
init.el file does the configuration. The
funcs.el contains function and key bindings definitions. It is loaded
setup.sh is a bash file that do almost all the setup I need:
install GNU Emacs and his friends, clone repositories, download and move
files to the right directories and so on.
# Download of setup.sh. cd ~/Downloads/ wget https://raw.githubusercontent.com/walmes/emacs/master/setup.sh # Give executable permission. chmod +x setup.sh # Execute it. ./setup.sh
install-packages.el should be executed in the emacs batch
mode to install the packages packages. The
setup.sh already file has
an entry to do this.
# Executes GNU Emacs in the batch mode. emacs --script install-packages.el
All the above instructions are for Ubuntu GNU/Linux. They were made tested in Ubuntu 16.04, 18.04 and Linux Mint 17 Quiana. For Windows and Mac OS users, I recommend the GNU Emacs available from Vicent Goulet that already has ESS and AUCTeX. More information for Windows users available in John Cook's blog.