diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2019-01-24 17:04:00 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2019-01-24 17:04:00 +0100 |
| commit | b030deb9bc34f52abead32da970af75ebdce8f78 (patch) | |
| tree | fce383010fb0da90a8386536bbdef96d245b6a48 | |
| parent | 5af5137777e42fa418175f10c262d50421b36dd8 (diff) | |
| download | dotfiles-b030deb9bc34f52abead32da970af75ebdce8f78.tar.gz dotfiles-b030deb9bc34f52abead32da970af75ebdce8f78.zip | |
Use emacsclient as the default editor
I've created a special emacsclient-a-nw executable script which should suffice
for places like the gitconfig or bashrc. The good thing about having emacsclient
as the default editor, is that then you gain Magit, for example, when writing
`git commit`.
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
| -rw-r--r-- | bashrc | 4 | ||||
| -rw-r--r-- | bin/emacsclient-a-nw | 18 | ||||
| -rw-r--r-- | gitconfig | 2 | ||||
| -rwxr-xr-x | install.sh | 1 |
4 files changed, 22 insertions, 3 deletions
@@ -30,8 +30,8 @@ source_maybe() { # Editors & terminals. # Set vim as the default editor. -export EDITOR=vim -export VISUAL=vim +export EDITOR=emacsclient-a-nw +export VISUAL=emacsclient-a-nw alias vi=vim # Shortcut for GNU Emacs. diff --git a/bin/emacsclient-a-nw b/bin/emacsclient-a-nw new file mode 100644 index 0000000..e0f2292 --- /dev/null +++ b/bin/emacsclient-a-nw @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright (C) 2019 Miquel Sabaté Solà <mikisabate@gmail.com> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +emacsclient -a "" -nw "$@" -c @@ -4,7 +4,7 @@ signingkey = 0x96BE8C6FD89D6565 [core] - editor = vim + editor = emacsclient-a-nw excludesfile = ~/.gitignore whitespace = trailing-space,space-before-tab abbrev = 12 @@ -34,6 +34,7 @@ chmod +x $HOME/.rake_completion # Some random scripts cp -r bin $HOME/bin rm -rf $HOME/bin/test +chmod +x $HOME/bin/* # i3 and X stuff. An incomplete list of openSUSE packages that I need in order # to have a good i3 environment is: i3 xlockmore dunst i3status nitrogen scrot |
