Skip to content

Instantly share code, notes, and snippets.

@sergiors
Last active December 11, 2023 12:49
Show Gist options
  • Save sergiors/66faab3f317b490340d7957a8747668e to your computer and use it in GitHub Desktop.
Save sergiors/66faab3f317b490340d7957a8747668e to your computer and use it in GitHub Desktop.
filetype plugin on
filetype indent on
syntax on
set encoding=utf8
set relativenumber
set number
set mouse=a
set smarttab
set cursorline
" Converting tabs to spaces
set tabstop=4 shiftwidth=4 expandtab
set ai
set si
" Displaying status line always
set laststatus=2
hi CursorLine ctermbg=236 cterm=none
hi CursorLineNr ctermbg=236 cterm=none
hi LineNr ctermfg=250 ctermbg=234
function! Whitespace()
if !exists('b:ws')
highlight Conceal ctermbg=none ctermfg=240 cterm=none guifg=#585858 gui=none
highlight link Whitespace Conceal
let b:ws = 1
endif
syntax clear Whitespace
syntax match Whitespace / / containedin=ALL conceal cchar=·
setlocal conceallevel=2 concealcursor=c
endfunction
augroup Whitespace
autocmd!
autocmd BufEnter,WinEnter * call Whitespace()
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment