Explorar o código

Alias and updates to force emacsclient when muscle memory types vim

Simon Watson hai 1 ano
pai
achega
eca6c1039b
Modificáronse 2 ficheiros con 30 adicións e 0 borrados
  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")))