Browse Source

Delete trailing whitespace on whole line paste

* Cleaned up some more parentheses
* Converted links in ReadMe
master
Macoy Madson 2 years ago
parent
commit
5abf71b2da
  1. 9
      Emacs/ReadMe.org
  2. 12
      Emacs/clipboard.el
  3. 21
      Emacs/keybinds.el

9
Emacs/ReadMe.org

@ -11,12 +11,9 @@ Note that [[packages.el]] will auto-install several packages which this config r
1. Copy the contents of ~dotEmacs.el~ to =~/.emacs=
2. Set the ~user-init-dir~ in your .emacs to the directory of this ReadMe.org. This will load my config files straight from this repository.
3. Add ~macoyCopy~, ~macoyCut~, and ~macoyPaste~ to ~mc/cmds-to-run-once~ and restart Emacs
4. For ~magit~ on Windows, fix credentials for server folder (may not be necessary, only do if you get errors using ~magit~):
https://stackoverflow.com/questions/885793/emacs-error-when-calling-server-start
5. Setup ~magit~ credentials (unnecessary if you have SSL support):
https://stackoverflow.com/questions/22580873/how-can-i-configure-magit-to-use-my-github-user-name
6. If you want to use codesearch (fancy ultra fast indexed code searching), install it:
https://github.com/google/codesearch
4. For ~magit~ on Windows, [[https://stackoverflow.com/questions/885793/emacs-error-when-calling-server-start][fix credentials for server folder]] (may not be necessary, only do if you get errors using ~magit~):
5. [[https://stackoverflow.com/questions/22580873/how-can-i-configure-magit-to-use-my-github-user-name][Setup ~magit~ credentials]] (unnecessary if you have SSL support):
6. If you want to use codesearch (fancy ultra fast indexed code searching), get the [[https://github.com/junkblocker/codesearch][updated branch]], or use the [[https://github.com/google/codesearch][old Google branch]] (missing index-time filtering features)
...then set ~codesearch-csearch-exe~ and ~codesearch-cindex-exe~ to their respective executable locations
Search for codesearch in this file to adjust indexing settings
7. Look over the *Customization* section for getting everything working properly per-machine.

12
Emacs/clipboard.el

@ -43,10 +43,12 @@
(progn
(back-to-indentation)
(newline)
(call-interactively 'indent-for-tab-command)
(when (not (eq 'org-mode major-mode))(call-interactively 'indent-for-tab-command))
(previous-line)
(call-interactively 'simpleclip-paste)
(call-interactively 'indent-for-tab-command)))
;; For some reason there is sometimes leftover whitespace after
(delete-trailing-whitespace (line-beginning-position) (line-end-position))
(when (not (eq 'org-mode major-mode))(call-interactively 'indent-for-tab-command))))
(call-interactively 'simpleclip-paste)))
(defun macoy-mc-paste ()
@ -63,10 +65,12 @@
(save-excursion
(back-to-indentation)
(newline)
(call-interactively 'indent-for-tab-command)
(when (not (eq 'org-mode major-mode))(call-interactively 'indent-for-tab-command))
(previous-line)
(insert (nth macoy-mc-buffer-index macoy-multiple-cursors-buffers))
(call-interactively 'indent-for-tab-command)))
;; For some reason there is sometimes leftover whitespace after
(delete-trailing-whitespace (line-beginning-position) (line-end-position))
(when (not (eq 'org-mode major-mode))(call-interactively 'indent-for-tab-command))))
(insert (nth macoy-mc-buffer-index macoy-multiple-cursors-buffers)))
;; Set up next cursor buffer index
;; Ensure we don't go out of range of the buffers

21
Emacs/keybinds.el

@ -6,16 +6,14 @@
(newline)
(call-interactively 'indent-for-tab-command)
(previous-line)
(back-to-indentation)
)
(back-to-indentation))
(defun macoy-add-edit-newline-after ()
"Create a new line after the current line and go to it"
(interactive)
(end-of-visual-line)
(newline)
(call-interactively 'indent-for-tab-command)
)
(call-interactively 'indent-for-tab-command))
(global-set-key (kbd "C-<return>") 'macoy-add-edit-newline-after)
(global-set-key (kbd "S-<return>") 'macoy-add-edit-newline-before)
@ -30,8 +28,7 @@
(defun macoy-insert-tab ()
"Make it possible to easily input raw tabs instead of having to do C-q <tab>"
(interactive)
(insert " ")
)
(insert " "))
;; Backtab is the same as S-<tab>
(global-set-key (kbd "<backtab>") 'macoy-insert-tab)
@ -56,8 +53,7 @@
(interactive)
;; From Macoy's navigation.el
(macoy-save-place)
(call-interactively 'mark-whole-buffer)
)
(call-interactively 'mark-whole-buffer))
;; Select All. was move-beginning-of-line
(global-set-key (kbd "C-a") 'macoy-mark-whole-buffer)
@ -111,16 +107,14 @@
(interactive)
(subword-mode 1)
(call-interactively 'kill-word)
(subword-mode 0)
)
(subword-mode 0))
(defun macoy-kill-subword-backward ()
"Temporarily enable subword mode to kill camelCase subword"
(interactive)
(subword-mode 1)
(call-interactively 'backward-kill-word)
(subword-mode 0)
)
(subword-mode 0))
(global-set-key (kbd "C-S-<delete>") 'macoy-kill-subword)
(global-set-key (kbd "C-S-<backspace>") 'macoy-kill-subword-backward)
@ -226,8 +220,7 @@
"The same as `org-insert-heading-respect-content' only do it before current heading"
(interactive)
(call-interactively 'org-previous-visible-heading)
(call-interactively 'org-insert-heading-respect-content)
)
(call-interactively 'org-insert-heading-respect-content))
;; Note that org keybinds are kept in org-customizations.el

Loading…
Cancel
Save