set nocompatible set laststatus=2 set encoding=utf-8 set autoindent set magic set ruler set nowrap set colorcolumn=+1 set list listchars=tab:›\ ,extends:→,precedes:← set ignorecase set smartcase set notimeout set incsearch set showmatch set nofoldenable set lazyredraw set wildmenu set spc= let mapleader = "," nnoremap Y y$ nnoremap \ (&hls && v:hlsearch ? ':nohls' : ':set hls')."\n" inoremap :set rl! " for the emacsian in me nnoremap inoremap vnoremap xnoremap snoremap cnoremap onoremap syntax enable " highlight StatusLine cterm=none ctermbg=none ctermfg=darkgrey " highlight StatusLineNC cterm=none ctermbg=none ctermfg=darkgrey highlight ColorColumn ctermbg=black autocmd FileType text,mail,markdown,rst,gitcommit setlocal tw=70 et ts=2 sw=2 function! ConflictsHighlight() abort syntax region conflictStart start=/^<<<<<<< .*$/ end=/^\ze\(=======$\||||||||\)/ syntax region conflictMiddle start=/^||||||| .*$/ end=/^\ze=======$/ syntax 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 " --[ from $VIMRUNTIME/defautls.vim ]-- " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid, when inside an event handler " (happens when dropping a file on gvim), for a commit or rebase message " (likely a different one than last time), and when using xxd(1) to filter " and edit binary files (it transforms input files back and forth, causing " them to have dual nature, so to speak) autocmd BufReadPost * \ let line = line("'\"") \ | if line >= 1 && line <= line("$") && &filetype !~# 'commit' \ && index(['xxd', 'gitrebase'], &filetype) == -1 \ | execute "normal! g`\"" \ | endif