Sunday, March 6, 2011

Re: Using VIM with Clang

Thanks for the swift reply Ben, to answer your questions and comment
on some of the points you raised

> Are you using vim from the comandline/in the terminal, or are you using
> gvim? If you're using gvim

This is with vim in the commandline, but the same happens with gvim.

> URLs with '...' in them are incredibly unhelpful if anybody wants to
> look up what you've referenced!

Apologies...copy-paste gone wrong:

1) the vimrc I used:
https://llvm.org/svn/llvm-project/llvm/trunk/utils/vim/vimrc
2) post to the llvm-mailing list:
http://markmail.org/message/mq73uxpc7cwpji2k#query:llvm%20vim%20gohman+page:1+mid:ttziiaqgt2oabua6+state:results

> It will be easier to know what's going on and pinpoint the problem and
> direct you in the right direction if you could fix the links to the
> stuff you are using (or if it's short, include it in the body of your
> email), and tell us exactly what commands you are running in Vim, and
> how you are starting Vim.

The fixed links are above, and the commands I used (with a hello world
bit of code):
vim hello.cpp
:set makeprg=clang
:make hello.cpp

for gcc opening the file and typing :make hello works (but not for clang)

>
> Note also, perhaps it would be smarter to use a makefile, that can
> invoke the compiler you want, but not require any change of 'makeprg' in
> Vim, only possibly :compiler to correctly interpret the messages.

I have not yet tried this with a makefile, as I followed the approach
outlined under quickfix here:
http://www.justlinux.com/nhf/Programming/Introduction_to_C_Programming.html
Anyway I would hope that for such as simple compile this could work
with clang without having to figure out makefiles.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment