From 41b72de58a5e78276e02fb4aaca58fd7360de968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sven=20M=C3=A4der?= <maeder@phys.ethz.ch> Date: Fri, 20 Sep 2024 11:40:26 +0200 Subject: [PATCH] Update .vimrc: for bookworm, fix clipboard, fix markdown slow --- profile/rda/.vimrc | 50 ++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/profile/rda/.vimrc b/profile/rda/.vimrc index 0fff22a..f892c58 100644 --- a/profile/rda/.vimrc +++ b/profile/rda/.vimrc @@ -168,6 +168,8 @@ autocmd BufWinLeave * call clearmatches() " --- airline statusbar ---{{{ set laststatus=2 let g:airline_theme='simple' +" https://github.com/vim-airline/vim-airline/wiki/FAQ#the-powerline-font-symbols-are-not-showing-up +let g:airline_powerline_fonts = 1 " --- airline powerline fonts (disabled) ---{{{ "" enable eye candy @@ -241,42 +243,42 @@ silent! packadd gnupg "au filetype markdown set conceallevel=2 "conceal markdown commands (broke in jammy) au filetype markdown set wrap "wrap lines -au filetype markdown syntax match Comment /%%.*/ -au filetype markdown syntax match RedTodo /TODO/ - let g:markdown_folding = 1 au filetype markdown setlocal foldlevel=1 let g:markdown_fenced_languages = ['ruby', 'perl', 'bash=sh', 'sh', 'vim', 'html', 'javascript', 'css', 'python', 'yaml'] let g:markdown_minlines = 100 "synchronize syntax highlighting with more lines (default:50) +"au filetype markdown syntax match Comment /%%.*/ +"au filetype markdown syntax match RedTodo /TODO/ + ""Enable concealing of links (https://github.com/tpope/vim-markdown/pull/9/commits/44dec444c959fa57c2fc835980ad15dbbbf11d1c) "au filetype markdown syn region markdownLinkText matchgroup=markdownLinkTextDelimiter start="!\=\[\%(\_[^]]*]\%( \=[[(]\)\)\@=" end="\]\%( \=[[(]\)\@=" keepend nextgroup=markdownLink,markdownId skipwhite contains=@markdownInline,markdownLineStart concealends "au filetype markdown syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" contains=markdownUrl keepend contained conceal "au filetype markdown syn region markdownId matchgroup=markdownIdDelimiter start="\s*\[" end="\]" keepend contained conceal "au filetype markdown syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline concealends -"Custom markdown folding -au filetype markdown setlocal foldexpr=MyMarkdownFold() -au filetype markdown setlocal foldmethod=expr -au filetype markdown setlocal foldlevel=1 -function! MyMarkdownFold() - let line = getline(v:lnum) - " regular headers - let depth = match(line, '\(^##\+\)\@<=\( .*$\)\@=') - if depth > 0 - return ">" . depth - endif - " setext headers - let nextline = getline(v:lnum + 1) - if (line =~ '^.\+$') && (nextline =~ '^=\+$') - return ">1" - endif - if (line =~ '^.\+$') && (nextline =~ '^-\+$') - return ">2" - endif - return "=" -endfunction +"Custom markdown folding (disabled because insanely slows down typing) +"au filetype markdown setlocal foldexpr=MyMarkdownFold() +"au filetype markdown setlocal foldmethod=expr +"au filetype markdown setlocal foldlevel=1 +"function! MyMarkdownFold() +" let line = getline(v:lnum) +" " regular headers +" let depth = match(line, '\(^##\+\)\@<=\( .*$\)\@=') +" if depth > 0 +" return ">" . depth +" endif +" " setext headers +" let nextline = getline(v:lnum + 1) +" if (line =~ '^.\+$') && (nextline =~ '^=\+$') +" return ">1" +" endif +" if (line =~ '^.\+$') && (nextline =~ '^-\+$') +" return ">2" +" endif +" return "=" +"endfunction "}}} " --- ansible ---{{{ -- GitLab