" Load internal configuration as well, if exists " To see what was loaded, use :script runtime defaults.vim " Enable the FileType plugin filetype plugin indent on " Defaults for unknown files set tabstop=4 " ts: show existing tab with 4 spaces width set softtabstop=4 " sts: Sets the number of columns for a TAB set shiftwidth=4 " sw: when indenting with '>', use 4 spaces width set expandtab " On pressing tab, insert 4 spaces " Use :retab to convert existing tabs to space " EXCEPTIONS " To see list of filetypes available, type ':setfiletype ' and Ctrl-D " yaml, especially for docker-compose autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab " Enable relative line numbers set relativenumber " rnu: add left-margin with line numbers relative to cursor set number " replace cursor line number from 0 to absolute number " Optional: Set vim colorscheme colorscheme codedark " Highlight git merge conflicts " Adapted from: function! ConflictsHighlight() abort syn region conflictStart start=/^<<<<<<< .*$/ end=/^\ze\(=======$\||||||||\)/ syn region conflictMiddle start=/^||||||| .*$/ end=/^\ze=======$/ syn region conflictEnd start=/^\(=======$\||||||| |\)/ end=/^>>>>>>> .*$/ highlight conflictStart ctermbg=red ctermfg=black highlight conflictMiddle ctermbg=blue ctermfg=black highlight conflictEnd ctermbg=green cterm=bold ctermfg=black endfunction augroup MyColors autocmd! autocmd BufEnter * call ConflictsHighlight() augroup END