aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-03-15 09:44:35 +0100
committerlonkaars <loek@pipeframe.xyz>2024-03-15 09:44:35 +0100
commit5fd58b34e6903ee522f248cbe6b77fbde7d357ad (patch)
tree50bc107aefb68bc9b993d3e5279639b37d5ed1b9
parenta7ca4d443fad33a18aa4cfe26ed370dfe2fc620d (diff)
temporarily disable line wrapping on address linesHEADmaster
-rw-r--r--ftplugin/mail.vim11
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()