Editor streamlining

Oh-My-Posh prompt will not show up inside emacs shell.
`editor` is the alias I should get used to use instead of vi, adjusted
aliases so that editor will be used.
Enabled relevant layers in the spacemacs/init.el file
This commit is contained in:
Gal Szkolnik 2022-06-07 12:34:50 -04:00
parent 4197e32e72
commit 9b5c2c497c
3 changed files with 42 additions and 18 deletions

View File

@ -3,23 +3,25 @@ if [[ -r "$HOME/.config/_my.emacs/spacemacs/emacs.d/init.el" \
&& -n "$(type -fP emacs)" \
&& -n "$(type -fP edit-with-spacemacs)" \
]]; then
alias vi_editor='edit-with-spacemacs'
alias my_editor='edit-with-spacemacs'
else
PREFERED_VI=$(type -fP nvim vim | head -1)
if [[ -z "$PREFERED_VI" ]]; then
PREFERED_VI=$(type -fP vi | head -1)
if [[ -z "$PREFERED_VI" ]]; then
alias vi_editor='eval $EDITOR '
alias my_editor='eval $EDITOR '
else
alias vi_editor="$PREFERED_VI"
alias my_editor="$PREFERED_VI"
fi
else
alias vi_editor="$PREFERED_VI -p"
alias my_editor="$PREFERED_VI -p"
fi
fi
alias nvim="vi_editor"
alias vim="vi_editor"
alias vi="vi_editor"
alias nvim="my_editor"
alias vim="my_editor"
alias vi="my_editor"
alias ed="vi_editor"
alias ed="my_editor"
alias edit="my_editor"
alias editor="my_editor"

View File

@ -1,4 +1,4 @@
if [[ -n "$(type -fP oh-my-posh)" ]]; then
if [[ -n "$(type -fP oh-my-posh)" && -z "$INSIDE_EMACS" ]]; then
OHMYPOSH_CONFIG=''
[[ -r ~/.poshtheme.omp.json ]] && OHMYPOSH_CONFIG="~/.poshtheme.omp.json"
eval "$(oh-my-posh init bash --config $OHMYPOSH_CONFIG)"

View File

@ -38,20 +38,21 @@ This function should only modify configuration layer settings."
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
;; `M-m f e R' (Emacs style) to install them.
;; ----------------------------------------------------------------
;; auto-completion
;; better-defaults
auto-completion
better-defaults
terraform
emacs-lisp
;; git
git
helm
;; lsp
;; markdown
markdown
multiple-cursors
;; org
org
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
;; spell-checking
;; syntax-checking
spell-checking
syntax-checking
;; version-control
treemacs)
@ -256,8 +257,8 @@ It should only modify the values of Spacemacs settings."
;; Default font or prioritized list of fonts. The `:size' can be specified as
;; a non-negative integer (pixel size), or a floating-point (point size).
;; Point size is recommended, because it's device independent. (default 10.0)
dotspacemacs-default-font '("Source Code Pro"
:size 10.0
dotspacemacs-default-font '("CodeNewRoman Nerd Font Mono"
:size 12.0
:weight normal
:width normal)
@ -566,3 +567,24 @@ before packages are loaded."
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(defun dotspacemacs/emacs-custom-settings ()
"Emacs custom settings.
This is an auto-generated function, do not modify its content directly, use
Emacs customize menu instead.
This function is called at the very end of Spacemacs initialization."
(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.
'(evil-want-Y-yank-to-eol nil)
'(ispell-dictionary nil)
'(package-selected-packages
'(yasnippet-snippets unfill mwim helm-company helm-c-yasnippet fuzzy company-terraform terraform-mode hcl-mode company auto-yasnippet yasnippet ac-ispell auto-complete treemacs-magit smeargle orgit-forge orgit org-rich-yank org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download org-contrib org-cliplink org mmm-mode markdown-toc htmlize helm-org-rifle helm-ls-git helm-git-grep gnuplot gitignore-templates git-timemachine git-modes git-messenger git-link gh-md forge yaml markdown-mode magit ghub closql emacsql-sqlite emacsql treepy magit-section git-commit with-editor transient flyspell-correct-helm flyspell-correct flycheck-pos-tip pos-tip evil-org auto-dictionary ws-butler writeroom-mode winum which-key volatile-highlights vim-powerline vi-tilde-fringe uuidgen use-package undo-tree treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil toc-org symon symbol-overlay string-inflection string-edit spacemacs-whitespace-cleanup spacemacs-purpose-popwin spaceline-all-the-icons space-doc restart-emacs request rainbow-delimiters quickrun popwin pcre2el password-generator paradox overseer org-superstar open-junk-file nameless multi-line macrostep lorem-ipsum link-hint inspector info+ indent-guide hybrid-mode hungry-delete holy-mode hl-todo highlight-parentheses highlight-numbers highlight-indentation hide-comnt help-fns+ helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-org helm-mode-manager helm-make helm-flx helm-descbinds helm-ag google-translate golden-ratio font-lock+ flycheck-package flycheck-elsa flx-ido fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-terminal-cursor-changer evil-surround evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-evilified-state evil-escape evil-ediff evil-easymotion evil-collection evil-cleverparens evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav elisp-def editorconfig dumb-jump drag-stuff dotenv-mode dired-quick-sort diminish devdocs define-word column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-compile aggressive-indent ace-link ace-jump-helm-line)))
(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.
'(highlight-parentheses-highlight ((nil (:weight ultra-bold))) t))
)