Wednesday, July 20, 2011

How to get the directory name of the current file

Hi, I am using vim as the simple IDE, and use qmake and make tool to configure my project. If a directory named "Foo", and inside the directory, there exists some headers and source files, I use the command "qmake -project", and it will generate a file called "Foo.pro", After I type "qmake", it will automatically generate the Makefile that I want, and by default, the target of the Makefile is the name of the directory, that is, "Foo". Now I want to do some mapping, say map <C-F5> to execute the executable file, "Foo". So I need to get the name of the directory. How can i achieve that?

--
Rice
Tel: (+86)13450219269
Email: heconghui@gmail.com

--
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