lib/vmail.vim in vmail-0.8.3 vs lib/vmail.vim in vmail-0.8.4

- old
+ new

@@ -695,10 +695,20 @@ call system(command) echom 'opened '.href endif endfunc +" linenum < 5, turn off line wrapping +func! s:toggle_textwidth() + if line('.') > 4 && &textwidth == 0 + setlocal textwidth=72 + elseif line('.') <= 4 && &textwidth != 0 + setlocal textwidth=0 + endif + "echo &textwidth +endfunc + " -------------------------------------------------------------------------------- " HELP func! s:show_help() let command = s:browser_command . ' ' . shellescape('http://danielchoi.com/software/vmail.html') call system(command) @@ -779,10 +789,11 @@ func! s:compose_window_mappings() noremap <silent> <buffer> <leader>q :call <SID>cancel_compose()<cr> nmap <silent> <buffer> q <leader>q setlocal ai - setlocal textwidth=72 + " setlocal textwidth=72 + autocmd CursorMoved <buffer> call <SID>toggle_textwidth() endfunc func! s:global_mappings() " NOTE send_message is a global mapping, so user can load a saved " message from a file and send it