aboutsummaryrefslogtreecommitdiffhomepage
path: root/vim
diff options
context:
space:
mode:
authorGravatar Felipe Contreras <felipe.contreras@gmail.com>2013-11-02 00:52:22 -0600
committerGravatar Felipe Contreras <felipe.contreras@gmail.com>2013-11-20 07:23:29 -0600
commit8d3b4ffb562fb7625304622d4a7421a7b1923135 (patch)
tree0348668f430a7703758acb621350a88b7974c094 /vim
parent2dedd239438ac5baa9356ff70487af564b3590f2 (diff)
vim: move default sets to set_defaults()
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Diffstat (limited to 'vim')
-rw-r--r--vim/notmuch.vim40
1 files changed, 20 insertions, 20 deletions
diff --git a/vim/notmuch.vim b/vim/notmuch.vim
index 2fe9346e..71d4b321 100644
--- a/vim/notmuch.vim
+++ b/vim/notmuch.vim
@@ -60,26 +60,6 @@ let s:notmuch_reader_default = 'mutt -f %s'
let s:notmuch_sendmail_default = 'sendmail'
let s:notmuch_folders_count_threads_default = 0
-if !exists('g:notmuch_date_format')
- let g:notmuch_date_format = s:notmuch_date_format_default
-endif
-
-if !exists('g:notmuch_datetime_format')
- let g:notmuch_datetime_format = s:notmuch_datetime_format_default
-endif
-
-if !exists('g:notmuch_reader')
- let g:notmuch_reader = s:notmuch_reader_default
-endif
-
-if !exists('g:notmuch_sendmail')
- let g:notmuch_sendmail = s:notmuch_sendmail_default
-endif
-
-if !exists('g:notmuch_folders_count_threads')
- let g:notmuch_folders_count_threads = s:notmuch_folders_count_threads_default
-endif
-
function! s:new_file_buffer(type, fname)
exec printf('edit %s', a:fname)
execute printf('set filetype=notmuch-%s', a:type)
@@ -410,6 +390,26 @@ endfunction
"" root
function! s:set_defaults()
+ if !exists('g:notmuch_date_format')
+ let g:notmuch_date_format = s:notmuch_date_format_default
+ endif
+
+ if !exists('g:notmuch_datetime_format')
+ let g:notmuch_datetime_format = s:notmuch_datetime_format_default
+ endif
+
+ if !exists('g:notmuch_reader')
+ let g:notmuch_reader = s:notmuch_reader_default
+ endif
+
+ if !exists('g:notmuch_sendmail')
+ let g:notmuch_sendmail = s:notmuch_sendmail_default
+ endif
+
+ if !exists('g:notmuch_folders_count_threads')
+ let g:notmuch_folders_count_threads = s:notmuch_folders_count_threads_default
+ endif
+
if exists('g:notmuch_custom_search_maps')
call extend(g:notmuch_search_maps, g:notmuch_custom_search_maps)
endif