Using VIM to compile the project
Environment configuration
1.MAKEPRG variable, which can be used to set the compiled command, simple command assignment to it both, with SET syntax
2. Execute: The make command executes the compile command.
3. The better choice is to use Makefile, as long as you write the makefile, without the configuration of vim can be through: Make command to find makefile and execute.
Use Errorformat to filter compilation error generation Quickfix
Set Efm+=%f (%l\\,%c): \ error\%m
Note The syntax details, commas need two backslashes to escape, spaces need to escape backslash, EFM syntax similar to the C language of scanf,
For fixed-format single-line error messages is simple.
This contains some of the libraries needed to compile, create links, or copy them, or compile the error is missing the relevant library program.
sudo ln-s/applications/unity/monodevelop.app/contents/frameworks/mono.framework/library/frameworks/ Mono.framework
This includes all Mdtool tools, which are added to the path to execute command-line compilation to find the relevant execution program, such as the Mono.exe itself
Export path= "/applications/unity/monodevelop.app/contents/frameworks/mono.framework/commands: $PATH"
Makefile
SLn
/applications/unity/monodevelop.app/contents/macos/mdtool \
-V Build "--CONFIGURATION:DEBUG|OSX" \
$ $CLIENT _path/product/build/hex3d-april-client.sln
Note: The reference to the shell variable in makefile needs to be $$ instead of the original $, so why, my understanding is that this is the design flaw
Cause to have to use this crappy way to remedy
Makefile can be understood as shell scripts that support the definition of additional dependencies, and the execution of the compile action is to support shell built-in and external commands, such as
I'll use | grep error filters out redundant information, reduces compiled log output, and helps Quickfix filter part of the content.
Makefile actually also very good understanding, is called the MonoDevelop build mechanism, Mdtool is a script, to compile the configuration and execute the compilation, the option meaning is also very straightforward, debug mode compiled OSX platform target, followed by the project solution file location, The use of $client_path is because the project is included in SVN version management, everyone's warehouse location is different, so after the respective definition of environment variables, all configuration scripts can be maintained uniform can be executed.
build after compilation is complete Quick Fix , you can use : CW to open the error list.
: CN jump to the next,: CP Jump to the previous, do not need to view the panel, in turn, traverse the error, you can realize the compilation errors of the traversal resolution.
: CP jumps to previous error (: HELP:CP)
: CN jumps to the next error (: HELP:CN)
: CL Lists all errors (: HELP:CL)
Vim can remember the latest 10 error lists at the same time, and you can also view the error list and the previous error List with the following commands to compare errors
: CL Lists all errors (: HELP:CL)
: CW If there is a list of errors, open the Quickfix window (: HELP:CW)
: Col to previous old Error List (: Help:col)
: Cnew to the next newer Error List (: help:cnew)
Custom Scripts
The compilation target DLL copy script for the current project cannot be run under VIM,
Todo:
Try to get makefile to finish copying the results of the compilation,
or establish a mechanism to invoke replication scripts manually
or recompile in mono because the code will be debugged after a successful compilation, and recompiling in Mono is a short, two-time check.
Vim of the pwd Change Issues
Whenever buffer is toggled, Vim's pwd becomes the directory where the buffer file resides.
Configure VIM as the Unity3d development environment