Skip to content

Instantly share code, notes, and snippets.

@MatiasVara
Created June 21, 2023 09:49
Show Gist options
  • Save MatiasVara/12870500680d4cb84cc96984431f308a to your computer and use it in GitHub Desktop.
Save MatiasVara/12870500680d4cb84cc96984431f308a to your computer and use it in GitHub Desktop.
vimrc
syntax on
filetype plugin indent on
command Cleanit %s/\s\+$//e
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
autocmd BufWritePre *.pas %s/\s\+$//e
" On pressing tab, insert 4 spaces
set expandtab
" Return to last edit position when opening files (You want this!)
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment