Mercurial > vim-unreal
annotate doc/unreal.txt @ 11:06af9916ba7c default tip
Generate compilation database for clang by default
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 29 Aug 2023 13:07:20 -0700 |
parents | 0afb2c0a6477 |
children |
rev | line source |
---|---|
3 | 1 *unreal.txt* Work with Unreal Engine in Vim |
2 | |
3 | |
4 █ ██ ███▄ █ ██▀███ ▓█████ ▄▄▄ ██▓ | |
5 ██ ▓██▒ ██ ▀█ █ ▓██ ▒ ██▒▓█ ▀▒████▄ ▓██▒ | |
6 ▓██ ▒██░▓██ ▀█ ██▒▓██ ░▄█ ▒▒███ ▒██ ▀█▄ ▒██░ | |
7 ▓▓█ ░██░▓██▒ ▐▌██▒▒██▀▀█▄ ▒▓█ ▄░██▄▄▄▄██ ▒██░ | |
8 ▒▒█████▓ ▒██░ ▓██░░██▓ ▒██▒░▒████▒▓█ ▓██▒░██████▒ | |
9 ░▒▓▒ ▒ ▒ ░ ▒░ ▒ ▒ ░ ▒▓ ░▒▓░░░ ▒░ ░▒▒ ▓▒█░░ ▒░▓ ░ | |
10 ░░▒░ ░ ░ ░ ░░ ░ ▒░ ░▒ ░ ▒░ ░ ░ ░ ▒ ▒▒ ░░ ░ ▒ ░ | |
11 ░░░ ░ ░ ░ ░ ░ ░░ ░ ░ ░ ▒ ░ ░ | |
12 ░ ░ ░ ░ ░ ░ ░ ░ ░ | |
13 | |
14 | |
15 VIM-UNREAL | |
16 | |
17 *unreal* | |
18 | |
19 ============================================================================== | |
20 *unreal-introduction* | |
21 Introduction | |
22 | |
23 Vim-unreal is a plugin that lets you work with game codebases that use Unreal | |
24 Engine. In most cases, you should be able to launch, say, `gvim` from | |
25 somewhere inside your codebase, and it should "just work". You'll be able to | |
26 run commands such as |UnrealGenerateProjectFiles| and |UnrealBuild|. It is | |
27 recommended to install vim-dispatch for running these operations in the | |
28 background. | |
29 | |
5
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
30 If you have vim-crosoft installed, vim-unreal will also automatically set the |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
31 root Visual Studio solution as the active solution. This will bring better |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
32 file-listing support for file-listers supported by vim-crosoft (FZF is |
3 | 33 recommended), clangd language server support (YouCompleteMe is recommended), |
34 and so on. For supporting other infrastructures, refer to the vim-crosoft | |
35 plugin or other appropriate plugin. | |
36 | |
5
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
37 It is recommended that you add |unreal#statusline()| to your 'statusline' |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
38 manager or configuration. For example, if you use vim-lightline, you would do: |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
39 |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
40 :let g:lightline['component_function']['unreal'] = 'unreal#statusline' |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
41 :call add(g:lightline['active']['right'], ['unreal']) |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
42 |
3 | 43 ============================================================================== |
44 *unreal-configuration* | |
45 Configuration | |
46 | |
47 *g:unreal_trace* | |
48 g:unreal_trace | |
49 Enables debugging information. | |
50 Default: `0` | |
51 | |
52 *g:unreal_branch_dir_marker* | |
53 g:unreal_branch_dir_marker | |
54 How vim-unreal detects the root directory of an Unreal | |
55 codebase branch. This should be a glob pattern that matches | |
56 something when a given directory is an Unreal codebase. | |
57 Default: `*.uprojectdirs` | |
58 | |
59 *g:unreal_branch_dir_finder* | |
60 g:unreal_branch_dir_finder | |
61 The name of a function that lets vim-unreal find the list | |
62 of projects in a branch. | |
63 Default: `''` | |
64 | |
65 The default finder looks for a marker defined by the glob | |
66 pattern |g:unreal_branch_dir_marker|. | |
67 | |
68 *g:unreal_auto_find_project* | |
69 g:unreal_auto_find_project | |
70 Whether vim-unreal should try to detect an Unreal branch | |
71 on startup and find an appropriate project to set. | |
72 Vim-unreal saves the last set project of each known branch | |
73 so that after restarting Vim it can restore the same project | |
74 as last time. | |
75 Default: `0` | |
5
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
76 |
3 | 77 *g:unreal_auto_build_modules* |
78 g:unreal_auto_build_modules | |
79 Dictionary of Unreal modules to always automatically build | |
80 along with the current project's main module when running | |
81 the |UnrealBuild| command and associated commands. | |
82 The dictionary should map a module's name with a list of | |
83 build options (if any). | |
84 Default: | |
85 `{"ShaderCompileWorker": ["-Quiet"]}` | |
86 | |
87 *g:unreal_auto_build_options* | |
88 g:unreal_auto_build_options | |
89 A list of default build options to pass to UnrealBuildTool | |
90 when running the |UnrealBuild| command and associated | |
91 commands. | |
92 Default: | |
93 `["-WaitMutex"]` | |
94 | |
95 *g:unreal_auto_generate_compilation_database* | |
96 let g:unreal_auto_generate_compilation_database | |
97 Whether to automatically generate the clang compilation | |
98 database when running |UnrealGenerateProjectFiles|. | |
99 See |UnrealGenerateCompilationDatabase| for more | |
100 information. | |
101 | |
102 *g:unreal_platforms* | |
103 g:unreal_platforms | |
104 Known list of platforms. | |
105 Mainly used for auto-completion. | |
106 Default: | |
107 `["Win32", "Win64", "HoloLens", "Mac", "XboxOne", "PS4",` | |
108 ` "IOS", "Android", "HTML5", "Linux", "AllDesktop",` | |
109 ` "TVOS", "Switch"]` | |
110 | |
111 *g:unreal_config_states* | |
112 g:unreal_config_states | |
113 Known list of configuration states. | |
114 Mainly used for auto-completion. | |
115 Default: | |
116 `["Debug", "DebugGame", "Development", "Shipping",` | |
117 ` "Test"]` | |
118 | |
119 *g:unreal_config_targets* | |
120 g:unreal_config_targets | |
121 Known list of configuration targets. | |
122 Mainly used for auto-completion. | |
123 Default: | |
124 `["", "Editor", "Client", "Server"]` | |
125 | |
126 *g:unreal_build_options* | |
127 g:unreal_build_options | |
128 Known list of UnrealBuildTool options. | |
129 Mainly used for auto-completion. | |
130 Default: | |
131 `["-DisableUnity", "-ForceUnity"]` | |
132 | |
133 ============================================================================== | |
134 *unreal-commands* | |
135 Commands | |
136 | |
137 *:UnrealFindProject* | |
138 :UnrealFindProject | |
139 Uses the current working directory (see |getcwd()|) to | |
140 detect an Unreal codebase branch and a default project to | |
141 set (see |UnrealSetBranchDir| and |UnrealSetProject|). | |
142 | |
143 *:UnrealSetBranchDir* | |
144 :UnrealSetBranchDir {dir} | |
145 Sets the current branch to the given directory. | |
146 | |
147 *:UnrealSetProject* | |
148 :UnrealSetProject {projectname} | |
149 Sets the current project to the one matching the given name. | |
150 | |
151 *:UnrealSetPlatform* | |
152 :UnrealSetPlatform {platform} | |
153 Sets the current platform. | |
154 | |
155 *:UnrealSetConfig* | |
156 :UnrealSetConfig {config} | |
157 Sets the current configuration. | |
158 Vim-unreal will attempt to parse the state and target from | |
159 the given configuration name. | |
160 | |
161 *:UnrealGenerateProjectFiles* | |
162 :UnrealGenerateProjectFiles | |
163 Regenerates the Visual Studio project files. | |
164 | |
165 *:UnrealBuild* | |
166 :UnrealBuild {project} {platform} {config} | |
167 Builds the currently set project using the currently set | |
168 platform and configuration. | |
169 If the project, platform, and/or configuration are provided | |
170 in the command invocation, use those instead of the | |
171 currently set ones. | |
172 If the vim-dispatch plugin is installed, vim-unreal will | |
173 favour using |:Make| instead of |:make|, so that the build | |
174 job is run in the background. | |
175 | |
176 *:UnrealRebuild* | |
177 :UnrealRebuild {project} {platform} {config} | |
178 Like |:UnrealBuild|, but does a full rebuild. | |
179 | |
180 *:UnrealClean* | |
181 :UnrealClean {project} {platform} {config} | |
182 Like |:UnrealBuild|, but cleans the build artifacts instead. | |
183 | |
184 *:UnrealGenerateCompilationDatabase* | |
185 :UnrealGenerateCompilationDatabase | |
186 Generates a clang compilation database for use with language | |
187 server plugins like YouCompleteMe. | |
188 If the vim-dispatch plugin is installed, vim-unreal will | |
189 favour using |:Make| instead of |:make|, so that the build | |
190 job is run in the background. | |
191 | |
192 *:UnrealReloadBranchProjects* | |
193 :UnrealReloadBranchProjects | |
194 Reloads the branch's projects. This is only needed if the | |
195 codebase was updated without restarting Vim and vim-unreal's | |
196 knowledge of the projects was outdated. | |
197 | |
198 ============================================================================== | |
5
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
199 *unreal-functions* |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
200 Functions |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
201 |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
202 *unreal#statusline* |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
203 unreal#statusline |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
204 Returns a string appropriate for showing in your |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
205 'statusline'. The string is empty if vim-unreal hasn't |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
206 detected any Unreal Engine codebase. Otherwise, it shows |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
207 a variety of relevant information such as the branch root |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
208 directory, and the currently set project and configuration. |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
209 |
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
210 ============================================================================== |
3 | 211 *unreal-internals* |
212 Internals | |
213 | |
214 *g:unreal_branch_projects* | |
215 g:unreal_branch_projects | |
216 A dictionary mapping known projects in the current branch | |
217 with their properties loaded from their JSON `uproject` file. | |
218 If these files have changed, you can reload this with the | |
219 |UnrealReloadBranchProjects| command. | |
220 | |
221 *g:unreal_branch_dir* | |
222 g:unreal_branch_dir | |
223 The currently set Unreal codebase root directory. | |
224 It can be set with the |UnrealSetBranchDir| command. | |
225 | |
226 *g:unreal_project* | |
227 g:unreal_project | |
228 The currently set Unreal project's name. | |
229 It can be set with the |UnrealSetProject| command. | |
230 | |
231 *g:unreal_platform* | |
232 g:unreal_platform | |
233 The currently set Unreal platform. | |
234 It can be set with the |UnrealSetPlatform| command. | |
235 | |
236 *g:unreal_config_state* | |
237 g:unreal_config_state | |
238 The currently set Unreal configuration state. | |
239 It can be set with the |UnrealSetConfig| command. | |
240 | |
241 *g:unreal_config_target* | |
242 g:unreal_config_target | |
243 The currently set Unreal configuration target. | |
244 It can be set with the |UnrealSetConfig| command. | |
245 | |
246 | |
5
0afb2c0a6477
Add help info on statuslines.
Ludovic Chabant <ludovic@chabant.com>
parents:
4
diff
changeset
|
247 " vim:tw=78:sw=3:ts=3:et:ft=help:norl: |