Skip to content

Commit

Permalink
Improve Docker layer 'dockerfile-mode' major mode keybindings (syl20b…
Browse files Browse the repository at this point in the history
…nr#15414)

* [completion] Fix readme markup.

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

* [docker] Remove duplicate bindings.
  • Loading branch information
pataquets committed Jul 31, 2022
1 parent d5126be commit 84d0bb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.develop
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
10 changes: 7 additions & 3 deletions layers/+tools/docker/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit 84d0bb3

Please sign in to comment.