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 '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 ()
|
||||
"Write the file under new name."
|
||||
(interactive)
|
||||
|
|
|
@ -119,6 +119,8 @@ Ensure that helm is required before calling FUNC."
|
|||
"feD" 'spacemacs/ediff-dotfile-and-template
|
||||
"feR" 'dotspacemacs/sync-configuration-layers
|
||||
"fev" 'spacemacs/display-and-copy-version
|
||||
"fCd" 'spacemacs/unix2dos
|
||||
"fCu" 'spacemacs/dos2unix
|
||||
"fg" 'rgrep
|
||||
"fj" 'dired-jump
|
||||
"fl" 'find-file-literally
|
||||
|
|
Loading…
Reference in New Issue