aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-01-04 10:20:13 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-01-04 10:20:13 +1300
commit674c202ffc989ca3930b215bf2751bd0ff2ca43c (patch)
tree68da1ae8ce1fbc88326c09116371a491e69df7cb
parent499de58a83f5a0492373728124248103a63600e0 (diff)
parent3511cff5b30de0dc2b1709654cbbe1c164cfafdd (diff)
downloaddotfiles-4.6.0.tar.gz
Merge branch 'release/v4.6.0'v4.6.0
* release/v4.6.0: Bump VERSION Further attempts at sane Emacs VISUAL setting Use :lhelpgrep for help search shortcut Remove a daft comment Add Lisp to filetypes.vim Remove some possibly-unwanted .emacs config Adjust some comments in .emacs Block stderr from emacs daemon startup Remove an error-prone line from .emacs
-rw-r--r--.gitignore1
-rw-r--r--Makefile5
-rw-r--r--VERSION4
-rw-r--r--emacs/bin/emacsm.sh3
-rw-r--r--emacs/emacs6
-rw-r--r--emacs/profile.d/emacs.sh2
-rw-r--r--sh/profile.d/visual.sh26
-rw-r--r--vim/filetype.vim7
-rw-r--r--vim/vimrc6
9 files changed, 29 insertions, 31 deletions
diff --git a/.gitignore b/.gitignore
index 8b407166..309644a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -152,6 +152,7 @@
/bin/xrq
/dillo/dillorc
/dillo/dillorc.m4
+/emacs/bin/emacsm
/games/aaf
/games/acq
/games/aesth
diff --git a/Makefile b/Makefile
index 31018936..6c7b9ee0 100644
--- a/Makefile
+++ b/Makefile
@@ -393,8 +393,11 @@ install-dunst: install-x
mkdir -p -- $(HOME)/.config/dunst
cp -p -- dunst/dunstrc $(HOME)/.config/dunst
-install-emacs:
+install-emacs: emacs/bin/emacsm install-sh
+ mkdir -p -- $(HOME)/.local/bin
cp -p -- emacs/emacs $(HOME)/.emacs
+ cp -p -- emacs/bin/emacsm $(HOME)/.local/bin
+ cp -p -- emacs/profile.d/emacs.sh $(HOME)/.profile.d
install-ex:
cp -p -- ex/exrc $(HOME)/.exrc
diff --git a/VERSION b/VERSION
index 3a5682ba..f8ee9b81 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v4.5.1
-Wed Jan 2 10:33:20 UTC 2019
+tejr dotfiles v4.6.0
+Thu Jan 3 21:20:13 UTC 2019
diff --git a/emacs/bin/emacsm.sh b/emacs/bin/emacsm.sh
new file mode 100644
index 00000000..58571c5c
--- /dev/null
+++ b/emacs/bin/emacsm.sh
@@ -0,0 +1,3 @@
+# Try to manage GNU emacs daemons on the terminal
+# Emphasis on "try". Man, I have no idea what I'm doing.
+emacsclient --create-frame --alternate-editor=''
diff --git a/emacs/emacs b/emacs/emacs
index 637f8053..ea13faa9 100644
--- a/emacs/emacs
+++ b/emacs/emacs
@@ -26,9 +26,9 @@
backup-directory-alist `(("." . ,(concat user-emacs-directory "backups")))
)
-;; A few more options I've found around the web
+;; Show a scratch buffer rather than the startup hints
(customize-set-variable 'inhibit-startup-screen t)
+
+;; Show line and column number in status bar
(column-number-mode 1)
(line-number-mode 1)
-(menu-bar-mode -1)
-(tool-bar-mode -1)
diff --git a/emacs/profile.d/emacs.sh b/emacs/profile.d/emacs.sh
new file mode 100644
index 00000000..34f6d476
--- /dev/null
+++ b/emacs/profile.d/emacs.sh
@@ -0,0 +1,2 @@
+# Start an Emacs server if we can't detect one already running
+pgrep -fx -u "$USER" 'emacs --daemon' >/dev/null || emacs --daemon
diff --git a/sh/profile.d/visual.sh b/sh/profile.d/visual.sh
index 899437af..d5280abd 100644
--- a/sh/profile.d/visual.sh
+++ b/sh/profile.d/visual.sh
@@ -1,24 +1,8 @@
-# If an Emacs is installed, and ~/.emacs exists, use emacs as the visual
-# editor; otherwise, use the system's vi
-if command -v emacs >/dev/null 2>&1 &&
- [ -f "$HOME"/.emacs ] ; then
-
- # Use or start a GNU Emacs client, if possible
- if command -v pgrep >/dev/null 2>&1 &&
- pgrep -fxu "$USER" 'emacs --daemon' >/dev/null ||
- emacs --daemon >/dev/null ; then
- VISUAL=emacsclient
-
- # If no GNU Emacs daemon is available, just create a new instance every
- # time
- else
- VISUAL=emacs
- fi
-
-# If an Emacs isn't installed, just use good old vi
+# If my Emacs wrapper is installed, use emacs as the visual editor; otherwise,
+# use the system's vi
+if command -v emacsm >/dev/null 2>&1 ; then
+ VISUAL='emacsm'
else
- VISUAL=vi
+ VISUAL='vi'
fi
-
-# Export final editor decision
export VISUAL
diff --git a/vim/filetype.vim b/vim/filetype.vim
index 2a5725dc..19094374 100644
--- a/vim/filetype.vim
+++ b/vim/filetype.vim
@@ -172,6 +172,13 @@ augroup filetypedetect
\ ?*.l
\,?*.lex
\ setfiletype lex
+ " Lisp
+ autocmd BufNewFile,BufRead
+ \ ?*.lisp
+ \,?*.el
+ \,.emacs
+ \,emacs
+ \ setfiletype lisp
" Lua files
autocmd BufNewFile,BufRead
\ ?*.lua
diff --git a/vim/vimrc b/vim/vimrc
index f290b144..724a32e7 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -260,8 +260,6 @@ nnoremap ]l :lnext<CR>
nmap [<Space> <Plug>(PutBlankLinesAbove)
nmap ]<Space> <Plug>(PutBlankLinesBelow)
-" Normal leader maps; use <Leader> not <Leader> for vim-tiny
-
" \a toggles 'formatoptions' 'a' flag using a plugin
nnoremap <Leader>a :<C-U>ToggleFlagLocal formatoptions a<CR>
@@ -402,8 +400,8 @@ xmap <Leader>} <Plug>(VerticalRegionDown)
" \/ types :vimgrep for me ready to enter a search pattern
nnoremap <Leader>/ :<C-U>vimgrep /\c/j **<S-Left><S-Left><Right>
-" \? types :helpgrep for me ready to enter a search pattern
-nnoremap <Leader>? :<C-U>helpgrep \c<S-Left>
+" \? types :lhelpgrep for me ready to enter a search pattern
+nnoremap <Leader>? :<C-U>lhelpgrep \c<S-Left>
" \\ escapes regex metacharacters
nmap <Leader>\ <Plug>(RegexEscape)