Quantcast

adding a compiler to Vim;How to set a default directory when I open Vim

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

adding a compiler to Vim;How to set a default directory when I open Vim

Hernan-7
Hello all,

 I'm a new user of Vim I have these questions:
1. How do I add a compiler for Vim to work on(C++
compiler)I have downloaded MinGW and I want to compile
programs from inside Vim using MinGW but do not know
how to do it. I had read the related help file(:help
make,makeef,compiler etc.,) but I just seem to
understand what it says.When I googled,I receive only
a "how to compile Vim using Mingw".
2. I want to open a file but I do not want to add the
full path everytime I use the :e command how should I
do this?

 I have been using Vim for only two weeks and I want
to get a quick start on the above concerns.

OS:WinXP SP2
gVim 6.3

I appreciate very much any help.

Hernan

PS: Nice work on Vim,I'm very impressed.
    VIm = Very Impressive


               
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: adding a compiler to Vim;How to set a default directory when I open Vim

A.J.Mechelynck
Hernan wrote:
> Hello all,

Hi Hernan

[...]
> 2. I want to open a file but I do not want to add the
> full path everytime I use the :e command how should I
> do this?
[...]

See ":help :cd"

Best regards,
Tony.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: adding a compiler to Vim;How to set a default directory when I open Vim

Otavio Cordeiro
In reply to this post by Hernan-7
Hi!

Why don't you try to use Makefiles [1] [2]?

So you just need ":make" to compile your application ;)

You can also browser by gcc errors. Try ":help make" for more.

[1] http://vertigo.hsrl.rutgers.edu/ug/make_help.html
[2] http://www.opussoftware.com/tutorial/TutMakefile.htm

Cya!

On 5/22/05, Hernan <[hidden email]> wrote:

> Hello all,
>
>  I'm a new user of Vim I have these questions:
> 1. How do I add a compiler for Vim to work on(C++
> compiler)I have downloaded MinGW and I want to compile
> programs from inside Vim using MinGW but do not know
> how to do it. I had read the related help file(:help
> make,makeef,compiler etc.,) but I just seem to
> understand what it says.When I googled,I receive only
> a "how to compile Vim using Mingw".
> 2. I want to open a file but I do not want to add the
> full path everytime I use the :e command how should I
> do this?
>
>  I have been using Vim for only two weeks and I want
> to get a quick start on the above concerns.
>
> OS:WinXP SP2
> gVim 6.3
>
> I appreciate very much any help.
>
> Hernan
>
> PS: Nice work on Vim,I'm very impressed.
>     VIm = Very Impressive
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search.
> http://info.mail.yahoo.com/mail_250
>


--
Otávio Corrêa Cordeiro
Bacharel em Física Teórica - FURG/RS
Mestrando em Computacao Aplicada - Unisinos/RS
Centro de Simulação de Humanos Virtuais
GNU/Linux #268791 ICQ #16458106
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: adding a compiler to Vim;How to set a default directory when I open Vim

Eric Arnold
In reply to this post by Hernan-7

--- Hernan <[hidden email]> wrote:
> Hello all,
>
...
> 2. I want to open a file but I do not want to add the
> full path everytime I use the :e command how should I
> do this?


You have various options for editing files:

- This should be obvious
        :cd directory

- Edit a file in $PATH
        :find file

- Use TAB and ^D to autocomplete directory/file names.

- Use the file explorer:
        :help Explore
        :edit directory name

  or
        :edit directoryname

- Use the Quickfix window.  First make a list with full pathnames of
  the files you are interested in (i.e. find /projectdir >myfiles):

        Next, set the error format to recognize a single name on a line
        as a valid hyperlink:

        :set errorformat+=,%f

        Then load the quickfix window:

        :copen
        :cget myfiles

        or all at once:

        :map ,f :exe '!find /projectdir > myfiles' <bar> copen <bar> cgetfile
myfiles<CR>

        now the ",f" macro/mapping will refresh the list and open the window.
        BTW, using "exe" keeps "!find" from eating the pipes/<bar>s.
        The files in the copen window should be highlighted, and should
        open the filename you double click on one (or hit enter).

  (check out   :help grep    for ways to use grep to populate the
  window automatically).


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: adding a compiler to Vim;How to set a default directory when I open Vim

Marian Csontos
In reply to this post by Hernan-7
Hi,

On Sun, 22 May 2005 11:33:34 +0200, Hernan <[hidden email]> wrote:

> Hello all,
>
> 2. I want to open a file but I do not want to add the
> full path everytime I use the :e command how should I
> do this?

If you are using files in different directories often, you can set 'path'  
option in your .vimrc (_vimrc on windows) and use :find and :sfind  
commands to edit/split them.

:he 'path'
:he .vimrc
:he :find
:he :sfind

Regards

-- Marian


________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.
http://www.nod32.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: adding a compiler to Vim;How to set a default directory when I open Vim

Hernan-7
In reply to this post by Hernan-7
Hello!

   --- Otavio Correa Cordeiro <[hidden email]>
wrote:

> Hi!
>
> Why don't you try to use Makefiles [1] [2]?
>
> So you just need ":make" to compile your application
> ;)
>
> You can also browser by gcc errors. Try ":help make"
> for more.
>
> [1]
> http://vertigo.hsrl.rutgers.edu/ug/make_help.html
> [2]
> http://www.opussoftware.com/tutorial/TutMakefile.htm

   I did try the ":make" command(I also try :!gcc for
comparison)but all i got was this message:

  "make is not recognized as an internal or external
command,operable program or batch file"

same as with the :!gcc,which I found unusual since
I've added the \MinGW\bin\ path in my settings I also
tried mingw32-make which is at the MinGW\bin directory
but problem is still the same.
  I am currently googling though to hopefully find a
solution but if anyone could point me to a link to
solve this I would appreciate it.
   For my second question,yeah it works,I had
overlooked it in the manual.
   
   Thank You guys for the responses.

 Hernan
 
 



               
Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: adding a compiler to Vim;How to set a default directory when I open Vim

A.J.Mechelynck
Hernan wrote:

> Hello!
>
>    --- Otavio Correa Cordeiro <[hidden email]>
> wrote:
>
>>Hi!
>>
>>Why don't you try to use Makefiles [1] [2]?
>>
>>So you just need ":make" to compile your application
>>;)
>>
>>You can also browser by gcc errors. Try ":help make"
>>for more.
>>
>>[1]
>>http://vertigo.hsrl.rutgers.edu/ug/make_help.html
>>[2]
>>http://www.opussoftware.com/tutorial/TutMakefile.htm
>
>
>    I did try the ":make" command(I also try :!gcc for
> comparison)but all i got was this message:
>
>   "make is not recognized as an internal or external
> command,operable program or batch file"
>
> same as with the :!gcc,which I found unusual since
> I've added the \MinGW\bin\ path in my settings I also
> tried mingw32-make which is at the MinGW\bin directory
> but problem is still the same.
>   I am currently googling though to hopefully find a
> solution but if anyone could point me to a link to
> solve this I would appreciate it.
>    For my second question,yeah it works,I had
> overlooked it in the manual.
>    
>    Thank You guys for the responses.
>
>  Hernan

What does Vim answer to

        :echo $PATH

? If the MinGW\bin directory is not included, then that's your problem.


Best regards,
Tony.

Loading...