Wed, 03 Aug 2016 21:36:35 -0400
add POD highlighting for shell
349
976c8bf0499b
set reflow_wrap = wrap
Meredith Howard <mhoward@roomag.org>
parents:
348
diff
changeset
|
1 | |
361 | 2 | function! JumpAndInsert() |
348
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
3 | if line('$') > 1 |
361 | 4 | :0 |
348
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
5 | :/^$/ |
351
47b0510974fe
fix up for reply/compose cursor pos
Meredith Howard <mhoward@roomag.org>
parents:
349
diff
changeset
|
6 | :normal 2] |
348
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
7 | :+1 |
351
47b0510974fe
fix up for reply/compose cursor pos
Meredith Howard <mhoward@roomag.org>
parents:
349
diff
changeset
|
8 | :exe 'startinsert' |
348
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
9 | endif |
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
10 | endfunction |
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
11 | |
361 | 12 | function! AutoFmtToggle() |
13 | if &formatoptions =~ 'a' | |
14 | set fo-=a | |
15 | echo '-a' | |
16 | else | |
17 | set fo+=a | |
18 | echo '+a' | |
19 | endif | |
20 | endfunction | |
21 | ||
348
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
22 | augroup mail_filetype |
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
23 | autocmd! |
361 | 24 | autocmd BufReadPost mutt-* :call JumpAndInsert() |
348
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
25 | augroup END |
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
26 | |
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
27 | setl textwidth=72 |
352
a19225f9b247
Numbered-list wrap doesn't work for flowed emails
Meredith Howard <mhoward@roomag.org>
parents:
351
diff
changeset
|
28 | setl formatoptions=aw |
348
d72bc8c8d6f0
use text_flowed, move mail settings to ftplugin
Meredith Howard <mhoward@roomag.org>
parents:
diff
changeset
|
29 | setl spell |
361 | 30 | |
31 | map <silent> <leader>a :call AutoFmtToggle()<CR> | |
32 | imap <silent> <leader>a :call AutoFmtToggle()<CR> |