Commit 23961880 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

.vim: moved all ftplugin/* -> after/ftplugin/

parent 0215972c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
set fo+=c

let c_glib=1  "Enables GLib Highlighting
let c_pfs=1   "Enables PFS Project Highlighting
+3 −0
Original line number Diff line number Diff line
set fo+=c

let g:tex_flavor = 'latex'

.vim/after/syntax/gitcommit.vim

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
set textwidth=71

.vim/ftplugin/c.vim

deleted100644 → 0
+0 −36
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
Loading