From: "Anders Engström" Date: 2004-05-07T06:54:02+09:00 Subject: Re: OT Re: vim and make * Michael W Thelen : > --8vCeF2GUdMpe9ZbK > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > * Carl Youngblood [2004-05-06 10:46]: >> >I'm curious how many people use the make utility to run their Test::Unit >> >tests. More generally, how do vim users currently run unit tests? >> > >> Your post sparked some interest. I have been using vim for a while but= >=20 >> my level of understanding is pretty much limited to basic text file=20 >> editing. I have been wanting to raise the bar and become a more serious= >=20 >> vim guru. Are you saying that vim has a mechanism for compiling within= >=20 >> vim and running automated tests/debugging etc.? I know that you can=20 >> execute arbitrary shell commands, but are you saying that there is a=20 >> more custom-tailored plugin for doing things like this? And finally,=20 >> what would be a good book and/or web site that you could recommend to me= >=20 >> for learning how to use these features? > > Yep, do a ":help make" or ":help makeprg". As far as recommending books > or web sites, I'd simply recommend the Vim online help system (:help). > You can read it right inside Vim itself, and I've found that it's very > thorough and useful. I've learned most of what I know about Vim from > reading the help pages. > To get you started, the following might be nice to have in your ~/.vimrc: "--------------------------------------- "Current dir == File dir "Set vims working directory to the directory of the currently open file. function! CHANGE_CURR_DIR() let _dir = expand("%:p:h") exec "cd " . _dir unlet _dir endfunction autocmd BufEnter * call CHANGE_CURR_DIR() "Ruby stuff autocmd BufEnter *.rb set makeprg=ruby\ -w\ $*\ % autocmd BufEnter *.rb set efm=\%+E%f:%l:\ parse\ error,\%W%f:%l:\ warning:\ %m,\%E%f:%l:in\ %*[^:]:\ %m,\%E%f:%l:\ %m,\%-C%\tfrom\ %f:%l:in\ %.%#,\%-Z%\tfrom\ %f:%l,\%-Z%p^,\%-G%.%# "---------------------------------------- Anyone else have any vim+ruby related stuff to share? //Anders -- /** * Anders Engstr�m, aengstrom@gnejs.net * ------------------------------------- * Your mind is like an umbrella. * It doesn't work unless you open it. * /Frank Zappa */