debian: sane vimrc
Add a default vimrc to all stx docker containers. The default vimrc that comes with Debian is inconvenient, set the following options: * Disable tabs * Set indent to 4 * Disable TTY mouse events. This allows us to copy & paste between vim and the terminal's window manager * Restore text cursor position after loading a file to where it was when we last closed it * Enable syntax and search highlight TESTS =================== - Rebuild all containers - Start up vim and make sure the new options are in effect NOTE: the lat container doesn't install vim by default Story: 2008846 Task: 45123 Signed-off-by: Davlet Panech <davlet.panech@windriver.com> Change-Id: I0b144b131c2eccbaf97d2dc435475b169a0678e3
This commit is contained in:
parent
f40fa9f3d5
commit
e6200f0ce5
|
@ -70,6 +70,11 @@ COPY stx/toCOPY/aptly/privkey.rsa /root
|
||||||
RUN gpg --import --pinentry-mode loopback --batch --passphrase starlingx /root/privkey.rsa && \
|
RUN gpg --import --pinentry-mode loopback --batch --passphrase starlingx /root/privkey.rsa && \
|
||||||
rm -f /root/privkey.rsa
|
rm -f /root/privkey.rsa
|
||||||
|
|
||||||
|
# Add vimrc
|
||||||
|
RUN mkdir -p /etc/vim
|
||||||
|
COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
|
||||||
|
RUN chmod 0644 /etc/vim/vimrc.local
|
||||||
|
|
||||||
# Configure startup
|
# Configure startup
|
||||||
COPY stx/toCOPY/aptly/entrypoint.sh /bin/entrypoint.sh
|
COPY stx/toCOPY/aptly/entrypoint.sh /bin/entrypoint.sh
|
||||||
ENTRYPOINT [ "/bin/entrypoint.sh" ]
|
ENTRYPOINT [ "/bin/entrypoint.sh" ]
|
||||||
|
|
|
@ -82,3 +82,8 @@ COPY stx/toCOPY/builder/buildrc /root/
|
||||||
|
|
||||||
COPY stx/toCOPY/builder/pubkey.rsa /root
|
COPY stx/toCOPY/builder/pubkey.rsa /root
|
||||||
RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa
|
RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa
|
||||||
|
|
||||||
|
# Add vimrc
|
||||||
|
RUN mkdir -p /etc/vim
|
||||||
|
COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
|
||||||
|
RUN chmod 0644 /etc/vim/vimrc.local
|
||||||
|
|
|
@ -51,5 +51,10 @@ RUN sed -i 's/linux-image-amd64/linux-image-5.10.0-6-amd64-unsigned/g' /opt/LAT/
|
||||||
|
|
||||||
RUN sed -i 's/Wind River Linux Graphics development .* ostree/StarlingX ostree/g' /opt/LAT/SDK/sysroots/corei7-64-wrs-linux/boot/efi/EFI/BOOT/grub.cfg
|
RUN sed -i 's/Wind River Linux Graphics development .* ostree/StarlingX ostree/g' /opt/LAT/SDK/sysroots/corei7-64-wrs-linux/boot/efi/EFI/BOOT/grub.cfg
|
||||||
|
|
||||||
|
# Add vimrc
|
||||||
|
RUN mkdir /etc/vim
|
||||||
|
COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
|
||||||
|
RUN chmod 0644 /etc/vim/vimrc.local
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||||
CMD ["/opt/LAT/lat/latd"]
|
CMD ["/opt/LAT/lat/latd"]
|
||||||
|
|
|
@ -59,6 +59,11 @@ COPY stx/toCOPY/pkgbuilder/debbuilder.conf /etc/sbuild/sbuild.conf
|
||||||
COPY stx/toCOPY/pkgbuilder/pubkey.rsa /root
|
COPY stx/toCOPY/pkgbuilder/pubkey.rsa /root
|
||||||
RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa
|
RUN apt-key add /root/pubkey.rsa && rm -f /root/pubkey.rsa
|
||||||
|
|
||||||
|
# Add vimrc
|
||||||
|
RUN mkdir -p /etc/vim
|
||||||
|
COPY stx/toCOPY/common/vimrc.local /etc/vim/vimrc.local
|
||||||
|
RUN chmod 0644 /etc/vim/vimrc.local
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
CMD ["python3", "app.py"]
|
CMD ["python3", "app.py"]
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
" Indent + disable tabs
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set expandtab
|
||||||
|
|
||||||
|
" Ignore TTY mouse events
|
||||||
|
set ttymouse=
|
||||||
|
|
||||||
|
" Enable search & syntax highlight
|
||||||
|
set hlsearch
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
" Restore cursor position
|
||||||
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
||||||
|
|
Loading…
Reference in New Issue