diff --git a/spacemacs/funcs.el b/spacemacs/funcs.el index 95c690dc5..227d2c976 100644 --- a/spacemacs/funcs.el +++ b/spacemacs/funcs.el @@ -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) diff --git a/spacemacs/keybindings.el b/spacemacs/keybindings.el index 9c931c727..77e34baa3 100644 --- a/spacemacs/keybindings.el +++ b/spacemacs/keybindings.el @@ -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