Browse Source

packages ok, but slow compilation

redis
parent
commit
88dbc86b47
4 changed files with 333 additions and 0 deletions
  1. +2
    -0
      .gitignore
  2. +36
    -0
      Readme.md
  3. +196
    -0
      config/.emacs
  4. +99
    -0
      config/.zshrc

+ 2
- 0
.gitignore View File

@ -0,0 +1,2 @@
config/.emacs.d
config/texmf

+ 36
- 0
Readme.md View File

@ -0,0 +1,36 @@
# Readme
To get the ip address
'''
open -a xquartz
ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
xhost + $ip
'''
To run the container
'''
docker run --rm -it -v`pwd`/emacs-config:/root \
-e DISPLAY=$ip:0 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
gmarxcc/scientific-emacs:0.1
'''
the 'emacs-config' folder contains the '.emacs' configuration file
To install:
- aspell
- curl
- wget
- git
- zsh
## After first run the container
Upgrade texlive to be able to install new packages by :
'''
apt-get upgrade texlive-base
'''
Then, init the user with 'tlmgr init-usertree'. After that you can install new packages using 'tlmgr install package'.

+ 196
- 0
config/.emacs View File

@ -0,0 +1,196 @@
;;; My basic configuration Gerardo Marx 31/Jul/2020
;;--------
;; Melpa repository:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
;; use-package
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
;; frame size at start
(setq initial-frame-alist '((top . 10)(left . 20)
(width . 80)(height . 40)))
;; which-key:
(use-package which-key
:ensure t
:config (which-key-mode))
;; doom-themes
(use-package doom-themes
:ensure t
:config
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
doom-themes-enable-italic t) ; if nil, italics is universally disabled
(load-theme ;'doom-one
'doom-monokai-pro t) ;'doom-tomorrow-day
;; Enable flashing mode-line on errors
(doom-themes-visual-bell-config)
;; Enable custom neotree theme (all-the-icons must be installed!)
(doom-themes-neotree-config)
;; or for treemacs users
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
(doom-themes-treemacs-config)
;; Corrects (and improves) org-mode's native fontification.
(doom-themes-org-config))
;; modeline
(use-package doom-modeline
:ensure t
:init (doom-modeline-mode 1))
;; icons:
(use-package all-the-icons
:ensure t) ;; --> you need this M-x all-the-icons-install-fonts
;; helm package:
(use-package helm
:ensure t
:demand t
:bind (("M-x" . helm-M-x)
("C-c h x" . helm-register) ; C-x r SPC and C-x r j
("C-c h g" . helm-google-suggest)
("C-c h M-:" . helm-eval-expression-with-eldoc)
("C-x C-f" . helm-find-files))
:config
(require 'helm-config)
(helm-mode t))
;; projectile:
(use-package projectile
:ensure t
:config
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(projectile-mode t))
;; helm-projectile:
(use-package helm-projectile
:after projectile
:ensure t
:init
(require 'tramp)
:config
(helm-projectile-on))
;; temp:
(setq ido-enable-flex-matching t)
;; dash-board:
(use-package dashboard
:ensure t
:init
(progn
(setq dashboard-items '((recents . 5)
(bookmarks . 5)
(projects . 5)
;;(agenda . 5)
))
(setq dashboard-banner-logo-title "Welcome to Scientific-Emacs")
(setq dashboard-set-file-icons t)
(setq dashboard-set-init-info t)
(setq dashboard-startup-banner 'logo)
)
:config
(dashboard-setup-startup-hook))
;; magit
(use-package magit
:ensure t)
;; expand region
(use-package expand-region
:ensure t
:bind
("C-=" . er/expand-region)
("C--" . er/contract-region))
;; latex
(use-package tex
:defer t
:ensure auctex
:init
(progn
(setq-default TeX-master nil) ; Query for master file.
(setq TeX-auto-save t) ; Enable parse on save.
(setq TeX-save-query nil)
;;(setq TeX-command-force "LaTex")
(setq latex-run-command "pdflatex")
(setq TeX-parse-self t) ; Enable parse on load.
(setenv "PATH" (concat (getenv "PATH") ":/Library/TeX/texbin/"))
(setq exec-path (append exec-path '("/Library/TeX/texbin/")))
;; pdf-tools configuration
(setq TeX-PDF-mode t)
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-source-correlate-start-server t)
(setq pdf-info-epdfinfo-program "/usr/local/bin/epdfinfo")
(add-to-list 'auto-mode-alist '("\\.pdf\\'" . pdf-view-mode))
(add-hook 'pdf-view-mode-hook
(lambda () (pdf-tools-enable-minor-modes)))
(setq LaTeX-includegraphics-read-file 'LaTeX-includegraphics-read-file-relative)
)
:config
(add-hook 'LaTeX-mode-hook
(lambda ()
;;(rainbow-delimiters-mode)
;;(company-mode)
;;(smartparens-mode)
(turn-on-reftex)
(setq reftex-plug-into-AUCTeX t)
(reftex-isearch-minor-mode)
(setq TeX-PDF-mode t)
(setq TeX-source-correlate-method 'synctex)
(setq TeX-source-correlate-start-server t)))
)
;; pdf-tools
(use-package pdf-tools
:ensure t
:pin melpa
:magic ("%PDF" . pdf-view-mode)
:config
(custom-set-variables
'(pdf-tools-handle-upgrades nil))
)
;; -+-+-+-+-+-+-+
;; startup config
(setq inhibit-startup-message t) ;;inhibit startup
(show-paren-mode 1) ;; parenthesis match
(tool-bar-mode -1) ;; no tool-bar
(menu-bar-mode -1) ;; menu-bar disable
(global-hl-line-mode +1) ;; highlith current line
(delete-selection-mode +1) ;; deletes selected text and replace it
(scroll-bar-mode -1)
;; Set default font:
(add-to-list 'default-frame-alist
'(font . "DejaVu Sans Mono-16"))
(fset 'yes-or-no-p 'y-or-n-p) ;; Ask y/n instead of yes/no
(add-hook 'prog-mode-hook 'display-line-numbers-mode) ;; display line number when programming
;; rextex
(use-package reftex
:ensure t
:defer t
:config
(setq reftex-cite-prompt-optional-args t)); Prompt for empty optional arguments in cite
;; Company-mode
(use-package company
:ensure t
:init
(add-hook 'after-init-hook 'global-company-mode))
;; ispell
(dolist (hook '(org-mode-hook latex-mode-hook tex-mode-hook git-commit-mode-hook))
(add-hook hook (lambda () (flyspell-mode 1))))
;;(setq ispell-dictionary "en")
(setq ispell-program-name "/usr/local/bin/aspell")
;;-+-+-+-+-+-+-+-
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-safe-themes
(quote
("3c2f28c6ba2ad7373ea4c43f28fcf2eed14818ec9f0659b1c97d4e89c99e091e" "8d7684de9abb5a770fbfd72a14506d6b4add9a7d30942c6285f020d41d76e0fa" "990e24b406787568c592db2b853aa65ecc2dcd08146c0d22293259d400174e37" "bf387180109d222aee6bb089db48ed38403a1e330c9ec69fe1f52460a8936b66" default)))
'(package-selected-packages (quote (use-package)))
'(pdf-tools-handle-upgrades nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

+ 99
- 0
config/.zshrc View File

@ -0,0 +1,99 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/root/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

Loading…
Cancel
Save