- How to install emacs on windows?
- Windows is… \*ahem* overzealous about garbage collection
- Open a windows explorer window from emacs at the path of the current buffer
- Desktop manager
- Visual studio integration
- Remap capslock to control
- Powershell
- Cygwin
https://sachachua.com/blog/2012/06/making-gnu-emacs-play-well-on-microsoft-windows-7/
Make sure that that’s not the case
; Debugging
(setq garbage-collection-messages t)
(setq gc-cons-threshold (* 511 1024 1024))
(setq gc-cons-percentage 0.5)
(run-with-idle-timer 10 t #'garbage-collect)
See also: http://bling.github.io/blog/2016/01/18/why-are-you-changing-gc-cons-threshold/
(defun my-minibuffer-setup-hook ()
(setq gc-cons-threshold most-positive-fixnum))
(defun my-minibuffer-exit-hook ()
(setq gc-cons-threshold 800000))
(add-hook 'minibuffer-setup-hook #'my-minibuffer-setup-hook)
(add-hook 'minibuffer-exit-hook #'my-minibuffer-exit-hook)
Source: https://zhangda.wordpress.com/2010/02/03/open-the-path-of-the-current-buffer-within-emacs/
;; Neither version works atm :(
;;(defun browse-current-folder ()
;; “open the current buffer’s folder”
;; (interactive)
;; (browse-url (concat “file://” (file-name-directory (buffer-file-name)))))
;; (defun open-buffer-path ()
;; ;“Run explorer on the directory of the current buffer.”
;; (interactive)
;; (shell-command (concat “explorer ” (replace-regexp-in-string “/” “\\\\” (file-name-directory (buffer-file-name)) t t))))
;; Binding: M-W
;; (global-set-key (kbd "M-W") 'open-buffer-path)
;; (global-set-key (kbd "M-W") 'browse-current-folder)
This is not strictly emacs-related, but it’s worth noting that I use Dexpot for tile management on windows
- num
- 1,2,3,4,<left>,<right>
- asdf
- A,S,D,F,<left>,<right>
- Switch desktops
- Ctrl + series:num
- Move window & switch
- Ctrl+Alt + series:num
- Minimize window
- Ctrl+Win+ H
- Close window
- Ctrl+Win+ W
- From
- Special: Caps Lock (00_3A)
- To
- Special: Right Ctrl (E0_1D)
(use-package powershell)
;; Add file extensions which should automatically launch powershell-mode
(add-to-list 'auto-mode-alist '("\\.ps1\\'" . powershell-mode))
- Note: here’s how to get out of cygwin’s root.
- I recommend following the advice to symlink /cygdrive/c to /c