Skip to content

Commit

Permalink
Update demo video text editor
Browse files Browse the repository at this point in the history
When applying Git commits, Vi was previously used. Changing to Vim
allowed for the use of a plugin supporting Git commits which provided
many benefits including adding colour.

The plugin did not hard wrap commit messages to 72 characters and this
option was necessary to add to the custom settings. The previous method
for setting options did not handle multiple options. Using a
configuration file was necessary.
  • Loading branch information
mikelorant committed Jan 4, 2024
1 parent 0c5c9fe commit 3282fb7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/video/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ RUN apk add --no-cache \

RUN ln -s /usr/share/git-core/git-prompt.sh /etc/profile.d/

ENV EDITOR vim
ENV GIT_PS1_SHOWDIRTYSTATE 1
ENV GIT_PS1_SHOWSTASHSTATE 1
ENV GIT_PS1_SHOWUNTRACKEDFILES 1
ENV GIT_PS1_SHOWUPSTREAM auto
ENV GIT_PS1_SHOWCOLORHINTS 1
ENV PROMPT_COMMAND '__git_ps1 "\w" " \\\$ "'
ENV VIMINIT "set nofixendofline"

COPY <<EOF /etc/vim/vimrc.local
set nofixendofline
set textwidth=72
EOF

RUN git config --global user.name "John Doe"
RUN git config --global user.email [email protected]
Expand Down

0 comments on commit 3282fb7

Please sign in to comment.