Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
matteospanio committed Mar 8, 2024
1 parent 3977729 commit d6a1679
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ set expandtab
set noshiftround
set nobackup
set noswapfile
set undodir=~/.vim/undodir
set undofile
set smartindent
" Show line numbers
set number relativenumber
Expand Down Expand Up @@ -57,6 +55,27 @@ set incsearch
set ignorecase
set smartcase

" # Close brackets automatically, with return
inoremap {<cr> {<cr>}<C-O><S-O>
inoremap (<cr> (<cr>)<c-o><s-o>
inoremap [<cr> [<cr>]<c-o><s-o>
" # Close brackets without return
inoremap ( ()<left>
inoremap { {}<left>
inoremap [ []<left>
" # Two cases below are covered by inoremap <exp>
" inoremap " ""<left>
" inoremap ' ''<left>
" # If you close a bracket that is already closed, it overwrites
inoremap <expr> ) strpart(getline('.'), col('.')-1, 1) == ")" ? "\<Right>" : ")"
inoremap <expr> } strpart(getline('.'), col('.')-1, 1) == "}" ? "\<Right>" : "}"
inoremap <expr> ] strpart(getline('.'), col('.')-1, 1) == "]" ? "\<Right>" : "]"
inoremap <expr> ' strpart(getline('.'), col('.')-1, 1) == "'" ? "\<Right>" : "''<left>"
inoremap <expr> " strpart(getline('.'), col('.')-1, 1) == "\"" ? "\<Right>" : "\"\"<left>"
" # enclose a word in normal mode with "'({[
nnoremap ' mmbi'<esc>ea'<esc>`m<right>
nnoremap " mmbi"<esc>ea"<esc>`m<right>
" if hidden is not set, TextEdit might fail.
set hidden
" Some servers have issues with backup files, see #649 set nobackup set nowritebackup
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
FROM ubuntu:latest

LABEL org.opencontainers.image.source=https://github.com/matteospanio/cdev-docker

LABEL org.opencontainers.image.description="Docker image for a C development environment at the University of Padua."

LABEL org.opencontainers.image.licenses=MIT

RUN yes | unminimize

RUN apt-get update && apt-get install -y sudo python3 python3-pip \
Expand Down

0 comments on commit d6a1679

Please sign in to comment.