Skip to content

Commit 2900a16

Browse files
Merge pull request #329 from emmanueltouzery/dbout_foldmethod_ftplugin
dbout: set foldmethod in ftplugin instead of ft autocommand
2 parents 4604323 + 27ba0b1 commit 2900a16

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

ftplugin/dbout.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ nnoremap <silent><buffer> <Plug>(DBUI_YankHeader) :call db_ui#dbout#yank_header(
44
nnoremap <silent><buffer> <Plug>(DBUI_ToggleResultLayout) :call db_ui#dbout#toggle_layout()<CR>
55
omap <silent><buffer> ic :call db_ui#dbout#get_cell_value()<CR>
66
7+
setlocal foldmethod=expr foldexpr=db_ui#dbout#foldexpr(v:lnum) | silent! normal!zo
8+
79
if get(g:, 'db_ui_disable_mappings', 0) || get(g:, 'db_ui_disable_mappings_dbout', 0)
810
finish
911
endif

plugin/db_ui.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ augroup dbui
123123
autocmd!
124124
autocmd BufRead,BufNewFile *.dbout set filetype=dbout
125125
autocmd BufReadPost *.dbout nested call db_ui#save_dbout(expand('<afile>'))
126-
autocmd FileType dbout setlocal foldmethod=expr foldexpr=db_ui#dbout#foldexpr(v:lnum) | silent! normal!zo
127126
autocmd FileType dbout,dbui autocmd BufEnter,WinEnter <buffer> stopinsert
128127
augroup END
129128

0 commit comments

Comments
 (0)