Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function! BuildOutput(output)
- let winnum = bufwinnr('BUILD')
- if winnum != -1
- if winnr() != winnum
- exec winnum . "wincmd w"
- endif
- else
- belowright split BUILD
- setlocal buftype=nofile
- resize 15
- endif
- normal! ggdG
- call append(0, split(a:output, '\v\n'))
- endfunction
- function! CSC(file)
- let command = "csc " . a:file
- let results = system(command)
- call BuildOutput(command . "\r\n" . results)
- endfunction
- nnoremap <leader>bc :w!<CR>:call CSC(expand("%"))<CR>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement