Automatically setup table options

Readme mentions settings for Markdown and ReST, but we can apply them
automatically for the current filetype. If a user is editing a no
filetype scratch buffer, they'll still need to configure these options
themselves. But this provides better defaults when editing a buffer of
these filetypes.

Adds get_buffer_or_global_option that could be used for any other
buffer-local (filetype-specific) options.
This commit is contained in:
David Briscoe
2018-12-19 12:50:47 -08:00
parent 130e835ff7
commit 5c3c30a9cc
7 changed files with 34 additions and 9 deletions

View File

@@ -47,3 +47,7 @@ function! tablemode#utils#StrDisplayWidth(string) "{{{2
return rv
endif
endfunction
function! tablemode#utils#get_buffer_or_global_option(table_option)
return get(b:, a:table_option, get(g:, a:table_option))
endf