sponsor Vim development Vim logo Vim Book Ad

project.vim : Fast  to open  C project

 script karma  Rating 6/14, Downloaded by 2278  Comments, bugs, improvements  Vim wiki

created by
Jingguang Pang
 
script type
utility
 
description
This script trys to help you open a C project quickly and automatically initialize the working environment, such as creating cscope, ctags files, files_list, etc.

More work is needed. Now the script contains the following functionalitiy:

1. Initialize the project, which contains recording the work directory, mapping useful keys, etc.
2. Create cscope.out files,  [ cscope.in.out, cscope.po.out are also included]
3. Create ctags files, which is useful for omni completion, make sure you have install the omnicompletion script
4. Update the project. <F8>u
5. Save the working status(just use "mksession" command). <F8>s
6. Safely close the project. <F8>q
7. Count source lines. (only take the advantage of  "wc" command)  _wc
8. Clear the project, nothing extra files left. (no cscopes, no files.list, no session.vim...)  <F8>c
9. Recover from the last working status.

Support a menu named "Project". Read more from the script file.  More details about usage will be added soon.
 
install details
This script cannot be installed in your vimfiles directory.

You need to put it in another directory. And use command "gvim -S /path/to/project.vim" in your project direcory.
The best way to do this is write a shell script(you can name it "open_project"),  including these words:

[LINUX Version]
#!/bin/bash
gvim -S /path/to/project.vim

[WINDOWS Version]              --------------------    (start.bat)
start gvim -S /path/to/project.vim


Put the shell script in your project's directory, double-click to use it.

Tips:
On linux, put these words to a nautilus script (saved to ~/.gnome2/nautilus-scripts/):

#!/bin/bash
gvim -S /path/to/project.vim

Attention: all scripts need  "chmod +x scirpt_file".
Usage: just right click the project directory and select the script command.

Note:
Windows user has to install cscope, ctags, sort, wc, etc executables to use this script.  But cscope works slowly under windows,  the best way to use this script is under linux.

Try gvim, but not vim! gvim is so graphical!
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
project.vim 1.3 2011-12-01 7.3 Jingguang Pang Add documentation to the script file header.
project.vim 1.2 2011-12-01 7.3 Jingguang Pang 1. Depart the "save project" from "save and close" functionality.
2. Add Project menu, simple work!
project.vim 1.1 2011-11-28 7.3 Jingguang Pang Add clear, quit and save project functionality, etc.
Add lines count functionality
ip used for rating: 3.17.162.247

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github