Allow overriding buffer namespace

This commit is contained in:
Tim Pope 2014-01-01 17:15:35 -05:00
parent 973014a626
commit 9aa2071b17
1 changed files with 4 additions and 1 deletions

View File

@ -1039,10 +1039,13 @@ function! s:buffer_path(...) abort
endfunction endfunction
function! fireplace#user_ns() abort function! fireplace#user_ns() abort
return 'user' return get(b:, 'fireplace_user_ns', 'user')
endfunction endfunction
function! fireplace#ns() abort function! fireplace#ns() abort
if exists('b:fireplace_ns')
return b:fireplace_ns
endif
let lnum = 1 let lnum = 1
while lnum < line('$') && getline(lnum) =~# '^\s*\%(;.*\)\=$' while lnum < line('$') && getline(lnum) =~# '^\s*\%(;.*\)\=$'
let lnum += 1 let lnum += 1