From 388b3bd43daa4d14aba08d85a683f1877eb6ec5c Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 5 Jan 2020 22:42:38 +1300 Subject: General cleanup --- environment | 13 +++++++------ vimrc | 1 + zshrc | 3 +++ 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/environment b/environment index c767584..e10a5c8 100644 --- a/environment +++ b/environment @@ -1,20 +1,21 @@ #!/bin/sh +bin_available() { + where "$1" | grep -vq ccache +} + export GPG_TTY=$(tty) export EDITOR=/usr/bin/vim export ORIG_PATH="$PATH" export PATH="/opt/sbase/bin/:$PATH" -if hash clang 2>/dev/null; then +if bin_available clang; then export CC=clang export CXX=clang++ -elif hash ❤ 2>/dev/null ; then - export CC=❤ - export CXX=g++ -elif hash gcc 2>/dev/null ; then +elif bin_available gcc ; then export CC=gcc export CXX=g++ -elif hash tcc 2>/dev/null ; then +elif bin_available tcc ; then export CC=tcc fi diff --git a/vimrc b/vimrc index b7c7791..43fb8b9 100644 --- a/vimrc +++ b/vimrc @@ -58,6 +58,7 @@ autocmd FileType bitbake setlocal expandtab autocmd FileType python setlocal expandtab autocmd FileType haskell setlocal expandtab autocmd FileType lhaskell setlocal expandtab +autocmd FileType perl setlocal noexpandtab """""""""""""""""""""""""""""" " airline diff --git a/zshrc b/zshrc index c79dad1..472d9b4 100644 --- a/zshrc +++ b/zshrc @@ -23,6 +23,9 @@ key[Insert]="$terminfo[kich1]" key[Backspace]="$terminfo[kbs]" key[Delete]="$terminfo[kdch1]" +# Emacs-like bindings default +bindkey -e + # setup key accordingly [[ -n "$key[Home]" ]] && bindkey -- "$key[Home]" beginning-of-line [[ -n "$key[End]" ]] && bindkey -- "$key[End]" end-of-line -- cgit v1.1 From 1f87b9f86a9634d4a10814a1c7e80f7fcd6e712e Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sun, 5 Jan 2020 22:43:18 +1300 Subject: vim: map jj and jk to ESC --- vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vimrc b/vimrc index 43fb8b9..01479f9 100644 --- a/vimrc +++ b/vimrc @@ -30,6 +30,8 @@ highlight ColorColumn ctermbg=234 match ExtraWhitespace /\s\+$/ inoremap x +inoremap jj +inoremap jk nnoremap o ox nnoremap O Ox -- cgit v1.1