Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 187CE431FC3 for ; Sun, 19 Oct 2014 02:43:27 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HIfZ+lttT4-c for ; Sun, 19 Oct 2014 02:43:19 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 235CA431FC2 for ; Sun, 19 Oct 2014 02:43:19 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 5D0E910008C; Sun, 19 Oct 2014 12:42:59 +0300 (EEST) From: Tomi Ollila To: Ian Main , notmuch@notmuchmail.org Subject: Re: [PATCH] VIM: Make starting in 'insert' mode for compose optional In-Reply-To: <1412183488-12707-1-git-send-email-imain@stemwinder.org> References: <1412183488-12707-1-git-send-email-imain@stemwinder.org> User-Agent: Notmuch/0.18.1+130~ga61922f (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2014 09:43:27 -0000 On Wed, Oct 01 2014, Ian Main wrote: > 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. Looks "Trivial" enough to look Good To Me (and patch apply) > > Ian > --- > vim/notmuch.vim | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/vim/notmuch.vim b/vim/notmuch.vim > index 331e930..252f16b 100644 > --- a/vim/notmuch.vim > +++ b/vim/notmuch.vim > @@ -59,6 +59,7 @@ let s:notmuch_datetime_format_default = '%d.%m.%y %H:%M:%S' > 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) > @@ -132,7 +133,9 @@ function! s:show_reply() > let b:compose_done = 0 > call s:set_map(g:notmuch_compose_maps) > autocmd BufDelete call s:on_compose_delete() > - startinsert! > + if g:notmuch_compose_start_insert > + startinsert! > + end > endfunction > > function! s:compose() > @@ -140,7 +143,9 @@ function! s:compose() > let b:compose_done = 0 > call s:set_map(g:notmuch_compose_maps) > autocmd BufDelete call s:on_compose_delete() > - startinsert! > + if g:notmuch_compose_start_insert > + startinsert! > + end > endfunction > > function! s:show_info() > @@ -428,6 +433,10 @@ function! s:set_defaults() > endif > endif > > + 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 > -- > 1.9.3 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch