vim and make

D

Doug Kearns

We're having a bit of a discussion over on vim-ruby-devel about the
appropriate default 'makeprg' setting for the rubyunit compiler plugin.

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?

Thanks,
Doug
 
M

Michael W Thelen

--8vCeF2GUdMpe9ZbK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Carl Youngblood said:
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.

-- Mike

--=20
Michael W. Thelen
Perfection is achieved, not when there is nothing left to add, but when the=
re
is nothing left to take away.
-- Antoine de St. Exupery, "Wind, Sand, and Stars", 1939

--8vCeF2GUdMpe9ZbK
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAmpDvi2mnNBpOvV0RAgqIAJ9M6iK/25jCZ8EYI26oSYC1c02bKgCfePQ6
TzZycIjVuckpkOMTzNkOe1E=
=Olqi
-----END PGP SIGNATURE-----

--8vCeF2GUdMpe9ZbK--
 
A

Anders Engström

* Michael W Thelen said:
--8vCeF2GUdMpe9ZbK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable



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, (e-mail address removed)
* -------------------------------------
* Your mind is like an umbrella.
* It doesn't work unless you open it.
* /Frank Zappa
*/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top