Provide dos2unix and unix2dos interactive commands.
This commit is contained in:
parent
44dee74247
commit
39967189b9
|
@ -1025,6 +1025,17 @@ the right."
|
||||||
(call-interactively 'evil-write)
|
(call-interactively 'evil-write)
|
||||||
(call-interactively 'write-file)))
|
(call-interactively 'write-file)))
|
||||||
|
|
||||||
|
|
||||||
|
(defun spacemacs/dos2unix ()
|
||||||
|
"Converts the current buffer to UNIX file format."
|
||||||
|
(interactive)
|
||||||
|
(set-buffer-file-coding-system 'undecided-unix nil))
|
||||||
|
|
||||||
|
(defun spacemacs/unix2dos ()
|
||||||
|
"Converts the current buffer to DOS file format."
|
||||||
|
(interactive)
|
||||||
|
(set-buffer-file-coding-system 'undecided-dos nil))
|
||||||
|
|
||||||
(defun spacemacs/copy-file ()
|
(defun spacemacs/copy-file ()
|
||||||
"Write the file under new name."
|
"Write the file under new name."
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
|
@ -119,6 +119,8 @@ Ensure that helm is required before calling FUNC."
|
||||||
"feD" 'spacemacs/ediff-dotfile-and-template
|
"feD" 'spacemacs/ediff-dotfile-and-template
|
||||||
"feR" 'dotspacemacs/sync-configuration-layers
|
"feR" 'dotspacemacs/sync-configuration-layers
|
||||||
"fev" 'spacemacs/display-and-copy-version
|
"fev" 'spacemacs/display-and-copy-version
|
||||||
|
"fCd" 'spacemacs/unix2dos
|
||||||
|
"fCu" 'spacemacs/dos2unix
|
||||||
"fg" 'rgrep
|
"fg" 'rgrep
|
||||||
"fj" 'dired-jump
|
"fj" 'dired-jump
|
||||||
"fl" 'find-file-literally
|
"fl" 'find-file-literally
|
||||||
|
|
Loading…
Reference in a new issue