Kaynağa Gözat

Alias and updates to force emacsclient when muscle memory types vim

Simon Watson 1 yıl önce
ebeveyn
işleme
eca6c1039b
2 değiştirilmiş dosya ile 30 ekleme ve 0 silme
  1. 26 0
      bashrc/bashrc-all
  2. 4 0
      emacs/.emacs-all

+ 26 - 0
bashrc/bashrc-all

@@ -46,12 +46,38 @@ alias tmuxq="echo $TMUX"
 
 alias httpserver="python -m SimpleHTTPServer"
 
+# Include .local/bin
 if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
 then
     PATH="$HOME/.local/bin:$HOME/bin:$PATH"
 fi
 export PATH
 
+# Include roswell
+if ! [[ "$PATH" =~ "$HOME/.roswell/bin" ]];
+then
+	if [[ -d "$HOME/.roswell/bin" ]];
+	then
+		PATH="$HOME/.roswell/bin:$PATH"
+	fi	
+fi
+
+# Stop myself from opening vim when I mean to open emacs on the term
+vim()
+{
+	if command -v emacs;
+	then	
+		if [[ $(ps aux | grep -v grep | grep emacs) ]];
+		then
+		    # using anemic term/color/etc as it's faster in emacs
+		    TERM=tmux emacsclient -nw $1
+		    
+		else
+		    vim $1
+		fi	
+	fi
+}
+
 # HN Helper functions
 
 # Pull up comments for number

+ 4 - 0
emacs/.emacs-all

@@ -426,6 +426,10 @@
   (progn
     (load "~/Repos/dotfiles/emacs/linux-load/customs.el")
     (xterm-mouse-mode t)
+    (menu-bar-mode -1)
+    (setq vc-follow-symlinks t) ;;; Typically in the full GUI I want to know it's a symlink
+    (global-set-key (kbd "<home>") 'beginning-of-line)
+    (global-set-key (kbd "<end>") 'end-of-line)
     (global-set-key (kbd "C-c c c") (lambda ()
 				      (interactive)
 				      (shell-command-on-region (point) (mark) "xclip -selection clipboard")))