This adds a variable to make starting in insert mode optional when
composing and replying to emails. I found it unusual to be started in
insert mode so I thought I'd make it optional as others may find this as
well.
Ian
let s:notmuch_reader_default = 'mutt -f %s'
let s:notmuch_sendmail_default = 'sendmail'
let s:notmuch_folders_count_threads_default = 0
let s:notmuch_reader_default = 'mutt -f %s'
let s:notmuch_sendmail_default = 'sendmail'
let s:notmuch_folders_count_threads_default = 0
+let s:notmuch_compose_start_insert_default = 1
function! s:new_file_buffer(type, fname)
exec printf('edit %s', a:fname)
function! s:new_file_buffer(type, fname)
exec printf('edit %s', a:fname)
let b:compose_done = 0
call s:set_map(g:notmuch_compose_maps)
autocmd BufDelete <buffer> call s:on_compose_delete()
let b:compose_done = 0
call s:set_map(g:notmuch_compose_maps)
autocmd BufDelete <buffer> call s:on_compose_delete()
+ if g:notmuch_compose_start_insert
+ startinsert!
+ end
endfunction
function! s:compose()
endfunction
function! s:compose()
let b:compose_done = 0
call s:set_map(g:notmuch_compose_maps)
autocmd BufDelete <buffer> call s:on_compose_delete()
let b:compose_done = 0
call s:set_map(g:notmuch_compose_maps)
autocmd BufDelete <buffer> call s:on_compose_delete()
+ if g:notmuch_compose_start_insert
+ startinsert!
+ end
endfunction
function! s:show_info()
endfunction
function! s:show_info()
+ if !exists('g:notmuch_compose_start_insert')
+ let g:notmuch_compose_start_insert = s:notmuch_compose_start_insert_default
+ endif
+
if !exists('g:notmuch_custom_search_maps') && exists('g:notmuch_rb_custom_search_maps')
let g:notmuch_custom_search_maps = g:notmuch_rb_custom_search_maps
endif
if !exists('g:notmuch_custom_search_maps') && exists('g:notmuch_rb_custom_search_maps')
let g:notmuch_custom_search_maps = g:notmuch_rb_custom_search_maps
endif