Last active
July 31, 2023 08:21
-
-
Save beli-sk/60d06a1a03e02178079d to your computer and use it in GitHub Desktop.
My personal vim config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colorscheme evening | |
set columns=120 lines=35 | |
"set guifont=Inconsolata\ 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" /etc/vim/vimrc.local | |
set nohls nobackup sw=4 ts=4 ic relativenumber | |
set listchars=tab:>-,trail:~,extends:>,precedes:< | |
" enable visible whitespace on demand with :set list | |
set noml " for security, not usability | |
if has("autocmd") | |
filetype plugin indent on | |
autocmd Filetype python setlocal sts=4 et | |
autocmd Filetype html setlocal ts=2 sw=2 sts=2 et | |
autocmd Filetype htmldjango setlocal ts=2 sw=2 sts=2 et | |
autocmd Filetype rst setlocal ts=3 sw=3 sts=3 et | |
autocmd Filetype yaml setlocal ts=2 sw=2 sts=2 et syntax= | |
autocmd Filetype tf setlocal ts=2 sw=2 sts=2 et | |
endif | |
if &diff | |
" optional: highlighted syntax clashes with vimdiff highlighting | |
"syntax off | |
else | |
"syntax on | |
" run interactive shell (for aliases, etc.) | |
set shellcmdflag=-ic | |
endif | |
" *** CleanQuote - clean up old quotes in mail replies | |
command CleanQuote :call CleanQuote() | |
command CQ :call CleanQuote() | |
function CleanQuote() | |
" remote nested quote header | |
/^> *>/-1 g/> *On.*wrote: *$/d | |
" remove nested quotes | |
%g/^> *>/d | |
" remove quoted signature | |
/^> *-- *$/,$ g/^>/d | |
" reduce multiple blank lines in quotes | |
g/^> *\n> *$/d | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment