Improve Docker layer 'dockerfile-mode' major mode keybindings (#15414)

* [completion] Fix readme markup.

* [docker] Improve keybindings: save keystrokes and add convenience shortcuts.

* [docker] Remove duplicate bindings.
This commit is contained in:
Alfonso Montero 2022-07-31 17:25:45 +02:00 committed by GitHub
parent d5126be700
commit 84d0bb3c4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -1916,6 +1916,9 @@ Other:
- Fixed: broken package declaration for dockerfile-mode
(thanks to Maximilian Wolff)
- Added LSP support
- Dockerfile mode keybindings (thanks to Alfonso Montero):
- Flatten ~cb~ and ~cB~ build commands into ~b~ and ~B~ to save keystrokes.
- Add keybindings to some =docker= package commands for convenience.
**** Dotnet
- Key bindings:
- Added key bindings for =dotnet= (thanks to Jordan Kaye):

View file

@ -50,10 +50,14 @@
:defer t
:init (add-hook 'dockerfile-mode-local-vars-hook #'spacemacs//docker-dockerfile-setup-backend)
:config
(spacemacs/declare-prefix-for-mode 'dockerfile-mode "mc" "compile")
(spacemacs/set-leader-keys-for-major-mode 'dockerfile-mode
"cb" 'dockerfile-build-buffer
"cB" 'dockerfile-build-no-cache-buffer)))
"b" 'dockerfile-build-buffer
"B" 'dockerfile-build-buffer-no-cache-buffer
(with-eval-after-load 'docker
(spacemacs/set-leader-keys-for-major-mode 'dockerfile-mode
"d" 'docker
"i" 'docker-images
"p" 'docker-containers))))
(defun docker/post-init-flycheck ()
(spacemacs/enable-flycheck 'dockerfile-mode))