Revert "[spacemacs-defaults] Move new function to correct file"
This reverts commit 1169eb3709
.
This commit is contained in:
parent
0ffe16066f
commit
f213b8cf20
|
@ -2521,7 +2521,6 @@ File manipulation commands (start with ~f~):
|
|||
| Key binding | Description |
|
||||
|-------------+--------------------------------------------------------------------------------------------------------|
|
||||
| ~SPC f A~ | open a file and replace the current buffer with the new file |
|
||||
| ~SPC f a~ | open a file and open it in a new buffer leaving the old buffer untouched |
|
||||
| ~SPC f b~ | go to file bookmarks |
|
||||
| ~SPC f c~ | copy current file to a different location |
|
||||
| ~SPC f C d~ | convert file from unix to dos encoding |
|
||||
|
|
|
@ -510,24 +510,6 @@ initialized with the current directory instead of filename."
|
|||
(spacemacs/rename-buffer-visiting-a-file arg)
|
||||
(spacemacs/rename-buffer-or-save-new-file))))
|
||||
|
||||
(defun spacemacs/save-file-as-and-open (filename)
|
||||
"Save current buffer into file FILENAME and open it in a new buffer."
|
||||
(interactive
|
||||
(list (if buffer-file-name
|
||||
(read-file-name "Save file as and open: " buffer-file-name)
|
||||
(read-file-name "Save file as and open: " default-directory))))
|
||||
(or (null filename) (string-equal filename "")
|
||||
(progn
|
||||
(let ((dir (file-name-directory filename)))
|
||||
(when (and (not (file-exists-p dir))
|
||||
(yes-or-no-p (format "Create directory '%s'?" dir)))
|
||||
(make-directory dir t)))
|
||||
(and (file-exists-p filename)
|
||||
(or (y-or-n-p (format "File `%s' exists; overwrite? " filename))
|
||||
(error "Canceled")))
|
||||
(write-region (point-min) (point-max) filename)
|
||||
(find-file filename))))
|
||||
|
||||
(defun spacemacs/show-hide-helm-or-ivy-prompt-msg (msg sec)
|
||||
"Show a MSG at the helm or ivy prompt for SEC.
|
||||
With Helm, remember the path, then restore it after SEC.
|
||||
|
|
|
@ -361,7 +361,7 @@
|
|||
:global
|
||||
(("f" "Files"
|
||||
("A" spacemacs/find-file-and-replace-buffer "Set another file for buffer...")
|
||||
("a" spacemacs/save-file-as-and-open "Copy file to new: file and buffer...")
|
||||
("a" spacemacs/save-file-as-and-open "Save current buffer and open in new buffer...")
|
||||
("c" spacemacs/copy-file "Copy file to new file...")
|
||||
("D" spacemacs/delete-current-buffer-file "Delete...")
|
||||
("i" spacemacs/insert-file "Insert file content...")
|
||||
|
@ -389,8 +389,8 @@
|
|||
("v" "Variables"
|
||||
("d" add-dir-local-variable "Add directory-local variable...")
|
||||
("f" add-file-local-variable "Add bottom file variable...")
|
||||
("p" add-file-local-variable-prop-line "Add top file property..."))
|
||||
|
||||
("p" add-file-local-variable-prop-line "Add top file property...")
|
||||
)
|
||||
("y" "Yank/Copy"
|
||||
("c" spacemacs/copy-file-path-with-line-column "File path with line and column")
|
||||
("d" spacemacs/copy-directory-path "Directory path")
|
||||
|
|
Loading…
Reference in New Issue