Vim Follow-up Post - 11/18/2008
Posted a comment over at Jamis's blog, didn't format correctly, so here it is.
NERDTree is wonderful, I prefer it to project. tComment is great also. I use the following commands to check syntax and run scripts from within vim.
:autocmd FileType php noremap <C-M> :w!<CR>:!/usr/bin/php %<CR>
:autocmd FileType php noremap <C-L> :!/usr/bin/php -l %<CR>
:autocmd FileType ruby noremap <C-M> :!/usr/bin/ruby -w %<CR>
:autocmd FileType ruby noremap <C-L> :!/usr/bin/ruby -cw %<CR>
:autocmd FileType perl noremap <C-M> :!/usr/bin/perl -w %<CR>
:autocmd FileType perl noremap <C-L> :!/usr/bin/perl -cw %<CR>
Also I find the following status line useful:
set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
Thanks for the idea of setting the leader to a comma! I used to use vimmate, but the file limits were getting in the way. NERDTree is the best solution so far for me.
Post a Comment