diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-03-15 09:44:35 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-03-15 09:44:35 +0100 |
commit | 5fd58b34e6903ee522f248cbe6b77fbde7d357ad (patch) | |
tree | 50bc107aefb68bc9b993d3e5279639b37d5ed1b9 | |
parent | a7ca4d443fad33a18aa4cfe26ed370dfe2fc620d (diff) |
-rw-r--r-- | ftplugin/mail.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ftplugin/mail.vim b/ftplugin/mail.vim new file mode 100644 index 0000000..af35487 --- /dev/null +++ b/ftplugin/mail.vim @@ -0,0 +1,11 @@ +function s:update_wrapping() + if coc#source#khard#should_complete({ 'line': getline('.') }) + " temporarily disable line wrapping + setlocal formatoptions-=tc + else + " re-enable line wrapping + setlocal formatoptions+=tc + endif +endfunction + +autocmd CursorMoved,CursorMovedI <buffer> call s:update_wrapping() |