remove all evil and treemacs related.
This commit is contained in:
parent
6598b63079
commit
9125667700
@ -7,7 +7,6 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(setq evil-want-keybinding nil)
|
||||
;; use-package - No necesita presentación
|
||||
(use-package use-package
|
||||
:config
|
||||
@ -92,247 +91,20 @@
|
||||
|
||||
;; Esa línea bonita de abajo del editor que dice cosas xD
|
||||
(use-package telephone-line
|
||||
:defer t
|
||||
:custom
|
||||
(telephone-line-primary-left-separator 'telephone-line-cubed-left)
|
||||
(telephone-line-secondary-left-separator 'telephone-line-cubed-hollow-left)
|
||||
(telephone-line-primary-right-separator 'telephone-line-cubed-right)
|
||||
(telephone-line-secondary-right-separator 'telephone-line-cubed-hollow-right)
|
||||
(telephone-line-evil-use-short-tag t)
|
||||
|
||||
(setq telephone-line-lhs
|
||||
'((evil . (telephone-line-evil-tag-segment))
|
||||
(accent . (telephone-line-vc-segment
|
||||
'((accent . (telephone-line-vc-segment
|
||||
telephone-line-erc-modified-channels-segment
|
||||
telephone-line-process-segment))
|
||||
(nil . (;telephone-line-minor-mode-segment
|
||||
telephone-line-buffer-segment))))
|
||||
(nil . (telephone-line-buffer-segment))))
|
||||
|
||||
(setq telephone-line-rhs
|
||||
'((nil . (telephone-line-misc-info-segment))
|
||||
(accent . (telephone-line-major-mode-segment))
|
||||
(evil . (telephone-line-airline-position-segment))))
|
||||
(nil . (telephone-line-airline-position-segment))))
|
||||
(telephone-line-mode t)
|
||||
)
|
||||
|
||||
;; Hacer uso de Emacs con las ventajas de vim.
|
||||
(use-package evil
|
||||
:defer t
|
||||
:init
|
||||
(evil-mode 1)
|
||||
(setq evil-want-keybinding nil)
|
||||
:config
|
||||
(setq evil-want-integration t)
|
||||
(setq evil-want-keybinding nil)
|
||||
(setq evil-want-C-u-scroll t)
|
||||
(setq evil-want-C-i-jump nil)
|
||||
(setq evil-want-fine-undo t)
|
||||
(setq evil-respect-visual-line-mode t)
|
||||
(setq evil-toggle-key "C-'") ; Cambiar toggle-key cambiar entre evil states y emacs.
|
||||
;; (setq evil-default-state 'emacs) ; Modo por defecto en emacs mode
|
||||
(define-key evil-normal-state-map (kbd "g b") 'evil-jump-backward)
|
||||
|
||||
;; Seleccionar todo con C-a en insert mode
|
||||
(evil-global-set-key 'insert (kbd "C-a") 'mark-whole-buffer)
|
||||
|
||||
;; **
|
||||
;; Atajos personalizados con leader key
|
||||
;; **
|
||||
|
||||
;; Definiendo la leader key
|
||||
(evil-set-leader 'normal (kbd "SPC"))
|
||||
(evil-set-leader 'visual (kbd "SPC"))
|
||||
|
||||
;; Atajos para counsel-projectile y switch buffer con leader key
|
||||
(evil-define-key 'normal 'global (kbd "<leader>b") 'ivy-switch-buffer)
|
||||
(evil-define-key 'visual 'global (kbd "<leader>b") 'ivy-switch-buffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>v") 'counsel-projectile)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>cp") 'projectile-switch-project)
|
||||
(evil-define-key 'visual 'global (kbd "<leader>v") 'counsel-projectile)
|
||||
(evil-define-key 'visual 'global (kbd "<leader>cp") 'projectile-switch-project)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>ff") 'counsel-find-file)
|
||||
(evil-define-key 'visual 'global (kbd "<leader>ff") 'counsel-find-file)
|
||||
|
||||
;; Atajos windmove con leader key
|
||||
(evil-define-key 'normal 'global (kbd "<leader>wh") 'windmove-left)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>wj") 'windmove-down)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>wk") 'windmove-up)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>wl") 'windmove-right)
|
||||
|
||||
;; Atajos con leader key para frames
|
||||
(evil-define-key 'normal 'global (kbd "<leader>0") 'delete-window)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>1") 'delete-other-windows)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>2") 'split-window-below)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>3") 'split-window-right)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>kb") 'kill-buffer)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>wb") 'winner-undo)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>wr") 'winner-redo)
|
||||
|
||||
;; Atajos para cambiar entre major modes
|
||||
(evil-define-key 'normal 'global (kbd "<leader>mh") 'html-mode)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>mj") 'js-mode)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>mp") 'php-mode)
|
||||
|
||||
;; Atajo para abrir vterm
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tt") 'multi-vterm-dedicated-toggle)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tf") 'multi-vterm)
|
||||
(evil-define-key 'normal 'global (kbd "<leader>tp") 'multi-vterm-project)
|
||||
|
||||
;; Cambiar el cursor según el estado
|
||||
(setq evil-emacs-state-cursor 'bar)
|
||||
(setq evil-motion-state-cursor 'bar)
|
||||
(setq evil-normal-state-cursor 'box)
|
||||
(setq evil-visual-state-cursor 'box)
|
||||
(setq evil-insert-state-cursor 'bar)
|
||||
(setq evil-replace-state-cursor 'hollow)
|
||||
(setq evil-operator-state-cursor 'hollow)
|
||||
|
||||
;; Establecer modos por defecto en algunos modos
|
||||
(evil-set-initial-state 'shell-mode 'insert)
|
||||
(evil-set-initial-state 'vterm-mode 'emacs)
|
||||
(evil-set-initial-state 'term-mode 'emacs)
|
||||
(evil-set-initial-state 'help-mode 'emacs)
|
||||
(evil-set-initial-state 'helm-grep-mode 'emacs)
|
||||
(evil-set-initial-state 'grep-mode 'emacs)
|
||||
(evil-set-initial-state 'dired-mode 'emacs)
|
||||
(evil-set-initial-state 'Buffer-menu-mode 'emacs)
|
||||
(evil-set-initial-state 'wdired-mode 'normal)
|
||||
;; Por defecto usar emcas mode.
|
||||
;;(setq evil-default-state 'emacs)
|
||||
)
|
||||
|
||||
;; Edición múltiple con evil (Atajos por defecto: C-d y C-D)
|
||||
(use-package evil-multiedit
|
||||
:defer t
|
||||
:config
|
||||
(evil-multiedit-default-keybinds)
|
||||
)
|
||||
|
||||
;; evil keybinding
|
||||
(use-package evil-collection
|
||||
:custom (evil-collection-setup-minibuffer t)
|
||||
:init (evil-collection-init))
|
||||
|
||||
;; Barra lateral de archivos
|
||||
(use-package treemacs
|
||||
:defer t
|
||||
:ensure t
|
||||
:hook (treemacs-mode . (lambda() (display-line-numbers-mode -1)))
|
||||
:bind ([mouse-1] . treemacs-single-click-expand-action)
|
||||
:config
|
||||
(progn
|
||||
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
|
||||
treemacs-deferred-git-apply-delay 0.5
|
||||
treemacs-directory-name-transformer #'identity
|
||||
treemacs-display-in-side-window t
|
||||
treemacs-eldoc-display 'simple
|
||||
treemacs-file-event-delay 5000
|
||||
treemacs-file-extension-regex treemacs-last-period-regex-value
|
||||
treemacs-file-follow-delay 0.2
|
||||
treemacs-file-name-transformer #'identity
|
||||
treemacs-follow-after-init t
|
||||
treemacs-expand-after-init t
|
||||
treemacs-find-workspace-method 'find-for-file-or-pick-first
|
||||
treemacs-git-command-pipe ""
|
||||
treemacs-goto-tag-strategy 'refetch-index
|
||||
treemacs-indentation 2
|
||||
treemacs-indentation-string " "
|
||||
treemacs-is-never-other-window nil
|
||||
treemacs-max-git-entries 5000
|
||||
treemacs-missing-project-action 'ask
|
||||
treemacs-move-forward-on-expand nil
|
||||
treemacs-no-png-images nil
|
||||
treemacs-no-delete-other-windows t
|
||||
treemacs-project-follow-cleanup nil
|
||||
treemacs-persist-file (expand-file-name "cache/treemacs-persist" private-dir)
|
||||
treemacs-position 'left
|
||||
treemacs-read-string-input 'from-child-frame
|
||||
treemacs-recenter-distance 0.1
|
||||
treemacs-recenter-after-file-follow nil
|
||||
treemacs-recenter-after-tag-follow nil
|
||||
treemacs-recenter-after-project-jump 'always
|
||||
treemacs-recenter-after-project-expand 'on-distance
|
||||
treemacs-litter-directories '("/node_modules" "/.venv" "/.cask")
|
||||
treemacs-show-cursor nil
|
||||
treemacs-show-hidden-files t
|
||||
treemacs-silent-filewatch nil
|
||||
treemacs-silent-refresh nil
|
||||
treemacs-sorting 'alphabetic-asc
|
||||
treemacs-select-when-already-in-treemacs 'move-back
|
||||
treemacs-space-between-root-nodes t
|
||||
treemacs-tag-follow-cleanup t
|
||||
treemacs-tag-follow-delay 1.5
|
||||
treemacs-text-scale nil
|
||||
treemacs-user-mode-line-format nil
|
||||
treemacs-user-header-line-format nil
|
||||
treemacs-wide-toggle-width 70
|
||||
treemacs-width 35
|
||||
treemacs-width-increment 1
|
||||
treemacs-width-is-initially-locked t
|
||||
treemacs-workspace-switch-cleanup nil)
|
||||
|
||||
;; The default width and height of the icons is 22 pixels. If you are
|
||||
;; using a Hi-DPI display, uncomment this to double the icon size.
|
||||
;;(treemacs-resize-icons 44)
|
||||
|
||||
(treemacs-follow-mode t)
|
||||
(treemacs-filewatch-mode t)
|
||||
(treemacs-fringe-indicator-mode 'always)
|
||||
|
||||
(pcase (cons (not (null (executable-find "git")))
|
||||
(not (null treemacs-python-executable)))
|
||||
(`(t . t)
|
||||
(treemacs-git-mode 'deferred))
|
||||
(`(t . _)
|
||||
(treemacs-git-mode 'simple)))
|
||||
|
||||
(treemacs-hide-gitignored-files-mode nil))
|
||||
:bind
|
||||
(:map global-map
|
||||
("M-0" . treemacs-select-window)
|
||||
("C-x t 1" . treemacs-delete-other-windows)
|
||||
("<f9>" . treemacs)
|
||||
("<f8>" . treemacs-display-current-project-exclusively)
|
||||
("<f7>" . treemacs-add-and-display-current-project)
|
||||
("C-x t d" . treemacs-select-directory)
|
||||
("C-x t B" . treemacs-bookmark)
|
||||
("C-x t C-t" . treemacs-find-file)
|
||||
("C-x t M-t" . treemacs-find-tag)))
|
||||
|
||||
(use-package treemacs-evil
|
||||
:defer t
|
||||
:after (treemacs evil)
|
||||
:ensure t
|
||||
:config
|
||||
;; Atajos de tecla con leader key de evil-mode.
|
||||
(evil-set-leader 'treemacs (kbd "SPC"))
|
||||
(evil-define-key 'treemacs 'global (kbd "<leader>b") 'ivy-switch-buffer)
|
||||
(evil-define-key 'treemacs 'global (kbd "<leader>v") 'counsel-projectile)
|
||||
(evil-define-key 'treemacs 'global (kbd "<leader>p") 'counsel-projectile)
|
||||
(evil-define-key 'treemacs 'global (kbd "<leader>cp") 'treemacs-projectile)
|
||||
(evil-define-key 'treemacs 'global (kbd "<leader>d") 'treemacs-remove-project-from-workspace))
|
||||
|
||||
(use-package treemacs-projectile
|
||||
:defer t
|
||||
:after (treemacs projectile)
|
||||
:ensure t)
|
||||
|
||||
(use-package treemacs-icons-dired
|
||||
:defer t
|
||||
:hook (dired-mode . treemacs-icons-dired-enable-once)
|
||||
:ensure t)
|
||||
|
||||
(use-package treemacs-persp ;;treemacs-perspective if you use perspective.el vs. persp-mode
|
||||
:defer t
|
||||
:after (treemacs persp-mode) ;;or perspective vs. persp-mode
|
||||
:ensure t
|
||||
:config (treemacs-set-scope-type 'Perspectives))
|
||||
|
||||
(use-package treemacs-tab-bar ;;treemacs-tab-bar if you use tab-bar-mode
|
||||
:defer t
|
||||
:after (treemacs)
|
||||
:ensure t
|
||||
:config (treemacs-set-scope-type 'Tabs))
|
||||
|
||||
;; Code Folding
|
||||
(use-package origami
|
||||
:defer t
|
||||
@ -434,7 +206,6 @@
|
||||
|
||||
;; Autocompletado para el minibuffer (counsel e ivy)
|
||||
(use-package counsel
|
||||
:defer t
|
||||
:bind
|
||||
("M-x" . counsel-M-x)
|
||||
("C-x C-m" . counsel-M-x)
|
||||
@ -442,7 +213,6 @@
|
||||
("C-x c k" . counsel-yank-pop))
|
||||
|
||||
(use-package projectile
|
||||
:defer t
|
||||
:diminish projectile-mode
|
||||
:config
|
||||
(projectile-mode)
|
||||
@ -485,9 +255,8 @@
|
||||
|
||||
;; Autocompletado de proyectos en counsel (projectile)
|
||||
(use-package counsel-projectile
|
||||
:defer t
|
||||
:config
|
||||
(global-set-key (kbd "C-x v") 'counsel-projectile)
|
||||
(global-set-key (kbd "C-x p") 'counsel-projectile)
|
||||
(counsel-projectile-mode))
|
||||
|
||||
;; Mostrar info del panel inferior de otra manera
|
||||
|
@ -11,12 +11,13 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(define-key minibuffer-local-map (kbd "<escape>")
|
||||
'keyboard-escape-quit) ; Cancelar el minibuffer con un solo ESC.
|
||||
(global-set-key (kbd "C-x C-z") nil) ; Unbind C-x C-z (don't minimize)
|
||||
(global-set-key (kbd "C-a") 'mark-whole-buffer) ; Seleccionar todo con CTRL+A.
|
||||
(global-set-key (kbd "C-z") 'undo) ; Unbind C-z y hacerlo funcionar para deshacer cambios
|
||||
(global-set-key (kbd "C-S-z") 'undo-redo) ; Rehacer cambios con C-S-z
|
||||
(global-set-key (kbd "C-S-a") 'mark-whole-buffer) ; Seleccionar todo con CTRL+SHIFT+a.
|
||||
|
||||
(global-set-key (kbd "M-c") 'comment-or-uncomment-region) ; Comentar/descomentar en lote
|
||||
(global-set-key (kbd "C-x c c")
|
||||
'comment-or-uncomment-region) ; Comentar/descomentar en lote
|
||||
|
||||
(global-set-key (kbd "C-<f6>") 'create-tags) ; Generar o Regeneral el archivo TAGS
|
||||
|
||||
@ -25,5 +26,22 @@
|
||||
(global-set-key (kbd "C-c a") 'org-agenda) ; Abrir la agenda.
|
||||
(global-set-key (kbd "C-c c") 'org-capture) ; Abrir la crear una entrada.
|
||||
|
||||
;; Cambios rápidos de major modes
|
||||
(global-set-key (kbd "C-x m") nil) ; Unbind mail on C-x m
|
||||
(global-set-key (kbd "C-x mh") 'html-mode)
|
||||
(global-set-key (kbd "C-x mj") 'js-mode)
|
||||
(global-set-key (kbd "C-x mp") 'php-mode)
|
||||
|
||||
;; Vterm
|
||||
(global-set-key (kbd "C-x tt") 'multi-vterm-dedicated-toggle)
|
||||
(global-set-key (kbd "C-x tf") 'multi-vterm)
|
||||
(global-set-key (kbd "C-x tp") 'multi-vterm-project)
|
||||
|
||||
;; Atajos de windmove
|
||||
(global-set-key (kbd "C-x C-<left>") 'windmove-left)
|
||||
(global-set-key (kbd "C-x C-<right>") 'windmove-right)
|
||||
(global-set-key (kbd "C-x C-<up>") 'windmove-up)
|
||||
(global-set-key (kbd "C-x C-<down>") 'windmove-down)
|
||||
|
||||
(provide 'base-keys)
|
||||
;;; base-keys.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user