Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugin/ucmake.vim
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ if !exists("g:ucmake_cache_entries")
let g:ucmake_cache_entries = {}
endif

let g:ucmake_disabled = get(g:, 'ucmake_disabled', 0)

function! s:shellslash(path) abort
if &shell =~? 'cmd' || exists('+shellslash') && !&shellslash
return tr(a:path, '\', '/')
Expand All @@ -71,6 +73,9 @@ function! s:apply_buffer_macro(string) abort
endfunction

function! s:setup(path) abort
if g:ucmake_disabled
return
endif
let path = s:shellslash(a:path)
if isdirectory(path)
let path = fnamemodify(path, ':p:s?/$??')
Expand Down Expand Up @@ -142,3 +147,5 @@ augroup ucmake
" autocmd CmdWinEnter * call s:setup(expand('#:p'))
augroup END

command! UCmakeToggleDisabled :let g:ucmake_disabled=!g:ucmake_disabled