diff --git a/autoload/goto_header.vim b/autoload/goto_header.vim index 220b6db..495075f 100644 --- a/autoload/goto_header.vim +++ b/autoload/goto_header.vim @@ -35,6 +35,7 @@ function! s:CheckConfigVals() let g:goto_header_open_in_new_tab = get(g:, 'goto_header_open_in_new_tab') let g:goto_header_use_shorter_path = get(g:, 'goto_header_use_shorter_path') let g:goto_header_associate_cpp_h = get(g:, 'goto_header_associate_cpp_h') + let g:goto_header_associate_h_cpp = get(g:, 'goto_header_associate_h_cpp') endfunction function! s:OpenFile(fp) @@ -165,7 +166,7 @@ function! goto_header#Switch() \ ".*.cpp$" : (g:goto_header_associate_cpp_h) ? ".h" : ".hpp", \ ".*.hpp$" : ".cpp", \ ".*.c$" : ".h", - \ ".*.h$" : ".c", + \ ".*.h$" : (g:goto_header_associate_h_cpp)? "cpp" : ".c", \} for key in keys(extensions_dict)