mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-03-26 08:10:39 -07:00
refactor(lib): remove doom/dumb-{de,in}dent commands
These two commands aren't used anywhere and the specifics of how people *want* these sort of commands to work are so specialized and niche that ours are unlikely to suit most people's needs. As an alternative, Evil users already have `evil-shift-right` and `evil-shift-left`, and vanilla users can `(setq tab-always-indent nil)`, among *many* other possible choices.
This commit is contained in:
parent
3a2c12073f
commit
165032cfec
1 changed files with 0 additions and 26 deletions
|
|
@ -292,32 +292,6 @@ line to beginning of line. Same as `evil-delete-back-to-indentation'."
|
|||
(let ((kill-ring nil) (kill-ring-yank-pointer nil))
|
||||
(ignore-errors (backward-kill-word arg))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/dumb-indent ()
|
||||
"Inserts a tab character (or spaces x tab-width)."
|
||||
(interactive)
|
||||
(if indent-tabs-mode
|
||||
(insert "\t")
|
||||
(let* ((movement (% (current-column) tab-width))
|
||||
(spaces (if (= 0 movement) tab-width (- tab-width movement))))
|
||||
(insert (make-string spaces ? )))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/dumb-dedent ()
|
||||
"Dedents the current line."
|
||||
(interactive)
|
||||
(if indent-tabs-mode
|
||||
(call-interactively #'backward-delete-char)
|
||||
(unless (bolp)
|
||||
(save-excursion
|
||||
(when (> (current-column) (current-indentation))
|
||||
(back-to-indentation))
|
||||
(let ((movement (% (current-column) tab-width)))
|
||||
(delete-char
|
||||
(- (if (= 0 movement)
|
||||
tab-width
|
||||
(- tab-width movement)))))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/retab (arg &optional beg end)
|
||||
"Converts tabs-to-spaces or spaces-to-tabs within BEG and END (defaults to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue