After finished a re-rerun, I thought we were lucky that DJ taught us about how the CDS compile work under the hood before we have the Preview as feature in VSCode. The Preview as feature is very cool and handy but it hides some CAP's fundamental that we should learn.
Thanks Wises! You're right, the Preview feature is excellent, but we need to make sure we understand how that works, and to be able to execute what's happening manually too. In other words, cds compile. We did a bit of that in previous episodes, but perhaps we should do some explicitly in the next episode?
Always interesting, is it possible for the next video to change the theme and put a dark one, it hurts eyes to stare at an all white screen during one hour :-)
Thanks! Dark themes on anything but terminals mess with my eyes, but I've just experimented with the "Solarised Light" theme which will be perhaps a little less extreme than pure white. Shall we use that next episode in VS Code?
Hi DJ, this is a fantastic session. I am curious to the next session. It seems that this is my "missing link" to SAP-Business-One Service-Layer functionality, where we have in the Standard no navigation Property to the Order-Items. Actually there is only a Collection. Kind Regards, Matthias Lakämper
Is it possible that the last change to Dockerfile breaks the repo somehow? I normally have always the last version cloned directly to my docker desktop container. I work with the vs code option "clone to container" instead of "reopen in container". Each Saturday when I watch the stream recording I update the cloned repo and sometimes I also update the container-local extensions. This time I updated the SAP CDS language support to 7.8.1 and pulled the lates repo commit which was the one with the commit message "make prompt a bit nicer" (0654e1afbf76f9256e6ff565c94c920189e72136). After reloading the docker container it always exited with some errors referring to the lines from the dockerfile related to the section "vi mode". After I removed the whole "vi mode" block from dockerfile the container was able to start and run without exiting again. Unfortunately I don't know how to clone a previous commit to a docker container, so I cannot work with cloning to docker container directly. Is there maybe something wrong with the vi mode section in the dockerfile or is it just me?
Hey there, thanks so much for pointing this out. Mea culpa! Fixed. And I've added a quick update to explain, at the end of the post here: qmacro.org/blog/posts/2024/04/11/improve-your-cap-dev-container-shell-prompt/ [dja]
Format document with VIM Keybinding: Open User Settings as json (F1: enter "user", select "Preferences: Open User Settings (JSON)") Search or Create "vim.normalModeKeyBindingsNonRecursive": [ ] inside the root object ( {...} ) Add this Object in the array [ ] like: "vim.normalModeKeyBindingsNonRecursive": [ { "before": [ "leader", "f" ], "commands": [ "editor.action.formatDocument" ] } ] alternative use "g", "F" (or "f", but "(g)o (f)ile" was lost!) Then you can format the document with "gF" (or f) in normal mode to format the document.
@@sapdevs Glad I could help. In the Keyboard Shortcuts Settings (⌘K ⌘S) you can find all Visual Studio Code commands that you can bind to with the same method in the VIM extension. e.g. "workbench.action.terminal.new", "workbench.action.terminal.focus" Or also use VIM commands: ":bprevious", ":bnext" for quick tab changes (with shift H or shift L). { "before": [ "" ], "commands": [ ":bprevious" ] }, { "before": [ "" ], "commands": [ ":bnext" ] }, "workbench.action.quickOpen" replaces ⌘P Or my bindings for the visual mode in the VIM extension: "vim.visualModeKeyBindings": [ { "before": [ "leader", "c" ], "commands": [ "editor.action.commentLine" ] }, { "before": [ "" ], "commands": [ "editor.action.indentLines" ] }, { "before": [ "J" ], "commands": [ "editor.action.moveLinesDownAction" ] }, { "before": [ "K" ], "commands": [ "editor.action.moveLinesUpAction" ] } ], Outdent/Indent can be used repeatedly (visual selection is retained). A very powerful configuration option in conjunction with the VIM extension.