Commit 87dd037b authored by Dom Sekotill's avatar Dom Sekotill
Browse files

added vim configs

parent 8c3dadb0
Loading
Loading
Loading
Loading

.vim/.netrwhist

0 → 100644
+3 −0
Original line number Diff line number Diff line
let g:netrw_dirhistmax  =10
let g:netrw_dirhist_cnt =1
let g:netrw_dirhist_1='/home/dom/Projects/agent-dev/tests/util'
+1 −0
Original line number Diff line number Diff line
set tabstop=4 noexpandtab
+1 −0
Original line number Diff line number Diff line
set textwidth=71

.vim/ftplugin/c.vim

0 → 100644
+36 −0
Original line number Diff line number Diff line
set fo+=c

" Map F5 to the compile function
map <F5> :call s:gcc_compile()<CR>
map <F6> :call s:gcc_compile_debug()<CR>
map <F8> :call s:gcc_compile_run()<CR>

func! s:gcc_compile_run()
	exec 'w'
	if filereadable('build')
		exec '!./build --run'
	else
		"exec '!gcc -g `find %:h -iname "*.c"` && ./a.out'
		exec '!make && `find -maxdepth 1 -type f -and -executable -print -quit`'
	endif
endfunc

func! s:gcc_compile_debug()
	exec 'w'
	if filereadable('build')
		exec '!./build --debug'
	else
		exec '!gcc -g `find %:h -iname "*.c"` && gdb --args ./a.out'
	endif
	exec 'i'
endfunc

func! s:gcc_compile()
	exec 'w'
	if filereadable('build')
		exec '!./build'
	else
		exec '!gcc -g `find %:h -iname "*.c"`'
	endif
	exec 'i'
endfunc
+1 −0
Original line number Diff line number Diff line
set spell nocindent tw=71
Loading