Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.45 KB | None | 0 0
  1. ;;; my-multi-term.el --- multi-term configuration -*- lexical-binding: t; -*-
  2. ;;; Commentary:
  3. ;;; this is the multi-term configuration based on
  4. ;;; http://rawsyntax.com/blog/learn-emacs-zsh-and-multi-term/
  5. ;;; and
  6. ;;; https://www.emacswiki.org/emacs/MultiTerm
  7. ;;; Code:
  8.  
  9. (require 'multi-term)
  10.  
  11. (setq multi-term-program "/usr/local/bin/zsh")
  12.  
  13. (add-hook 'term-mode-hook
  14. (lambda ()
  15. (setq term-buffer-maximum-size 10000)))
  16.  
  17. (add-hook 'term-mode-hook
  18. (lambda ()
  19. (setq show-trailing-whitespace nil)))
  20.  
  21. (defcustom term-unbind-key-list
  22. '("C-z" "C-x" "C-c" "C-h" "C-y" "<ESC>")
  23. "The key list that will need to be unbind."
  24. :type 'list
  25. :group 'multi-term)
  26.  
  27. (defcustom term-bind-key-alist
  28. '(
  29. ("C-c C-c" . term-interrupt-subjob)
  30. ("C-p" . previous-line)
  31. ("C-n" . next-line)
  32. ("C-s" . isearch-forward)
  33. ("C-r" . isearch-backward)
  34. ("C-m" . term-send-raw)
  35. ("M-f" . term-send-forward-word)
  36. ("M-b" . term-send-backward-word)
  37. ("M-o" . term-send-backspace)
  38. ("M-p" . term-send-up)
  39. ("M-n" . term-send-down)
  40. ("M-M" . term-send-forward-kill-word)
  41. ("M-N" . term-send-backward-kill-word)
  42. ("M-r" . term-send-reverse-search-history)
  43. ("M-," . term-send-input)
  44. ("M-." . comint-dynamic-complete))
  45. "The key alist that will need to be bind.
  46. If you do not like default setup, modify it, with (KEY . COMMAND) format."
  47. :type 'alist
  48. :group 'multi-term)
  49.  
  50. (add-hook 'term-mode-hook
  51. (lambda ()
  52. (add-to-list 'term-bind-key-alist '("M-[" . multi-term-prev))
  53. (add-to-list 'term-bind-key-alist '("M-]" . multi-term-next))))
  54.  
  55. (add-hook 'term-mode-hook
  56. (lambda ()
  57. (define-key term-raw-map (kbd "C-y") 'term-paste)))
  58.  
  59.  
  60. (provide 'my-multi-term)
  61. ;;; my-multi-term.el ends here
  62.  
  63. # If you come from bash you might have to change your $PATH.
  64. # export PATH=$HOME/bin:/usr/local/bin:$PATH
  65.  
  66. export TERM="xterm-256color"
  67.  
  68. # Path to your oh-my-zsh installation.
  69. export ZSH=/Users/toni/.oh-my-zsh
  70.  
  71. # Set name of the theme to load. Optionally, if you set this to "random"
  72. # it'll load a random theme each time that oh-my-zsh is loaded.
  73. # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
  74. if [ -n "$INSIDE_EMACS" ]; then
  75. export ZSH_THEME="simple"
  76. else
  77. ZSH_THEME="powerlevel9k/powerlevel9k"
  78. POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir rvm custom_lisp vcs)
  79. POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time root_indicator background_jobs history time)
  80. POWERLEVEL9K_PROMPT_ON_NEWLINE=true
  81. POWERLEVEL9K_RPROMPT_ON_NEWLINE=true
  82. POWERLEVEL9K_CUSTOM_LISP="ros config show default.lisp"
  83. fi
  84.  
  85. # Uncomment the following line to use case-sensitive completion.
  86. # CASE_SENSITIVE="true"
  87.  
  88. # Uncomment the following line to use hyphen-insensitive completion. Case
  89. # sensitive completion must be off. _ and - will be interchangeable.
  90. # HYPHEN_INSENSITIVE="true"
  91.  
  92. # Uncomment the following line to disable bi-weekly auto-update checks.
  93. # DISABLE_AUTO_UPDATE="true"
  94.  
  95. # Uncomment the following line to change how often to auto-update (in days).
  96. # export UPDATE_ZSH_DAYS=13
  97.  
  98. # Uncomment the following line to disable colors in ls.
  99. # DISABLE_LS_COLORS="true"
  100.  
  101. # Uncomment the following line to disable auto-setting terminal title.
  102. # DISABLE_AUTO_TITLE="true"
  103.  
  104. # Uncomment the following line to enable command auto-correction.
  105. # ENABLE_CORRECTION="true"
  106.  
  107. # Uncomment the following line to display red dots whilst waiting for completion.
  108. # COMPLETION_WAITING_DOTS="true"
  109.  
  110. # Uncomment the following line if you want to disable marking untracked files
  111. # under VCS as dirty. This makes repository status check for large repositories
  112. # much, much faster.
  113. # DISABLE_UNTRACKED_FILES_DIRTY="true"
  114.  
  115. # Uncomment the following line if you want to change the command execution time
  116. # stamp shown in the history command output.
  117. # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
  118. # HIST_STAMPS="mm/dd/yyyy"
  119.  
  120. # Would you like to use another custom folder than $ZSH/custom?
  121. # ZSH_CUSTOM=/path/to/new-custom-folder
  122.  
  123. # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
  124. # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
  125. # Example format: plugins=(rails git textmate ruby lighthouse)
  126. # Add wisely, as too many plugins slow down shell startup.
  127. if [ -n "$INSIDE_EMACS" ]; then
  128. plugins=(git)
  129. else
  130. plugins=(git
  131. rails
  132. rvm
  133. cask
  134. ssh-agent
  135. mvn
  136. tmuxinator
  137. zsh-editing-workbench
  138. zsh-cmd-architect)
  139. fi
  140.  
  141. source $ZSH/oh-my-zsh.sh
  142.  
  143. # User configuration
  144.  
  145. # export MANPATH="/usr/local/man:$MANPATH"
  146.  
  147. # You may need to manually set your language environment
  148. # export LANG=en_US.UTF-8
  149.  
  150. # Preferred editor for local and remote sessions
  151. if [[ -n $SSH_CONNECTION ]]; then
  152. export EDITOR='vim'
  153. else
  154. export EDITOR='emacsclient --server-file=server -nw'
  155. fi
  156.  
  157. # Compilation flags
  158. # export ARCHFLAGS="-arch x86_64"
  159.  
  160. # ssh
  161. # export SSH_KEY_PATH="~/.ssh/rsa_id"
  162.  
  163. # Set personal aliases, overriding those provided by oh-my-zsh libs,
  164. # plugins, and themes. Aliases can be placed here, though oh-my-zsh
  165. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
  166. # For a full list of active aliases, run `alias`.
  167. #
  168. # Example aliases
  169. # alias zshconfig="mate ~/.zshrc"
  170. # alias ohmyzsh="mate ~/.oh-my-zsh"
  171. alias emc="emacsclient --server-file=server -nw"
  172. alias mux="tmuxinator"
  173. alias tethering="sudo kextload /Library/Extensions/HoRNDIS.kext"
  174.  
  175. ### ZNT's installer added snippet ###
  176. fpath=( "$fpath[@]" "$HOME/.config/znt/zsh-navigation-tools" )
  177. autoload n-aliases n-cd n-env n-functions n-history n-kill n-list n-list-draw n-list-input n-options n-panelize n-help
  178. autoload znt-usetty-wrapper znt-history-widget znt-cd-widget znt-kill-widget
  179. alias naliases=n-aliases ncd=n-cd nenv=n-env nfunctions=n-functions nhistory=n-history
  180. alias nkill=n-kill noptions=n-options npanelize=n-panelize nhelp=n-help
  181. zle -N znt-history-widget
  182. bindkey '^R' znt-history-widget
  183. setopt AUTO_PUSHD HIST_IGNORE_DUPS PUSHD_IGNORE_DUPS
  184. zstyle ':completion::complete:n-kill::bits' matcher 'r:|=** l:|=*'
  185. ### END ###
  186.  
  187. ## For My Proxy Tunnel
  188. alias proxy-on='ssh -fN blog-proxy'
  189. alias proxy-check='ssh -O check blog-proxy'
  190. alias proxy-off='ssh -O exit blog-proxy'
  191.  
  192. ## unencryptpdf
  193. alias unencrypt='gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f'
  194.  
  195. export LANG="es_ES.UTF-8"
  196. export LC_ALL="es_ES.UTF-8"
  197. export PATH=/usr/local/bin:$PATH
  198. export PATH="$HOME/.roswell/bin:$PATH"
  199. export M2_HOME=/Users/toni/bin/apache-maven-3.3.9
  200. export PATH=$PATH:$M2_HOME/bin
  201. if which jenv > /dev/null; then eval "$(jenv init -)"; fi
  202.  
  203. . /Users/toni/.kerl/versions/20.2/activate
  204.  
  205. export NVM_DIR="$HOME/.nvm"
  206. [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
  207. [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion
  208.  
  209. [[ -s "$HOME/.kiex/scripts/kiex" ]] && source "$HOME/.kiex/scripts/kiex"
  210.  
  211. # Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
  212.  
  213. # Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
  214. export PATH="$PATH:$HOME/.rvm/bin"
  215.  
  216. (prefer-coding-system 'utf-8)
  217. (set-face-attribute 'default nil :foreground "turquoise" :font "Source Code Pro for Powerline" :height 150)
  218.  
  219. %
  220. ~ =ls>
  221. Applications Movies VirtualBox VMs exercism pharo-local
  222. Desktop Music bin learn quicklisp
  223. Documents Pictures bug_fix logs rethinkdb_data
  224. Downloads Polyspace_Workspace ci migrate src
  225. Library Public common-lisp node_modules tmp
  226. %
  227. ~ =>
  228. %
  229. ~ =
  230.  
  231. ~ =ls>
  232. Applications Movies VirtualBox VMs exercism pharo-local
  233. Desktop Music bin learn quicklisp
  234. Documents Pictures bug_fix logs rethinkdb_data
  235. Downloads Polyspace_Workspace ci migrate src
  236. Library Public common-lisp node_modules tmp
  237. ~ =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement