changeset 5:0afb2c0a6477

Add help info on statuslines.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 22 Jan 2021 16:52:30 -0800
parents 86156dffebe8
children 613f13dc42f7
files doc/unreal.txt
diffstat 1 files changed, 23 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/doc/unreal.txt	Fri Jan 22 16:42:10 2021 -0800
+++ b/doc/unreal.txt	Fri Jan 22 16:52:30 2021 -0800
@@ -27,13 +27,19 @@
 recommended to install vim-dispatch for running these operations in the
 background.
 
-If you install the vim-crosoft plugin, vim-unreal will also automatically set
-the root Visual Studio solution as the active solution. This will bring
-better file-listing support for file-listers supported by vim-crosoft (FZF is
+If you have vim-crosoft installed, vim-unreal will also automatically set the
+root Visual Studio solution as the active solution. This will bring better
+file-listing support for file-listers supported by vim-crosoft (FZF is
 recommended), clangd language server support (YouCompleteMe is recommended),
 and so on. For supporting other infrastructures, refer to the vim-crosoft
 plugin or other appropriate plugin.
 
+It is recommended that you add |unreal#statusline()| to your 'statusline'
+manager or configuration. For example, if you use vim-lightline, you would do:
+
+      :let g:lightline['component_function']['unreal'] = 'unreal#statusline'
+      :call add(g:lightline['active']['right'], ['unreal'])
+
 ==============================================================================
                                                         *unreal-configuration*
 Configuration
@@ -67,7 +73,7 @@
                   so that after restarting Vim it can restore the same project
                   as last time.
                   Default: `0`
-                  
+
                                                  *g:unreal_auto_build_modules*
 g:unreal_auto_build_modules
                   Dictionary of Unreal modules to always automatically build 
@@ -190,6 +196,18 @@
                   knowledge of the projects was outdated.
 
 ==============================================================================
+                                                            *unreal-functions*
+Functions
+
+                                                           *unreal#statusline*
+unreal#statusline
+                  Returns a string appropriate for showing in your
+                  'statusline'. The string is empty if vim-unreal hasn't
+                  detected any Unreal Engine codebase. Otherwise, it shows
+                  a variety of relevant information such as the branch root
+                  directory, and the currently set project and configuration.
+
+==============================================================================
                                                             *unreal-internals*
 Internals
 
@@ -226,4 +244,4 @@
                   It can be set with the |UnrealSetConfig| command.
 
 
-" vim:tw=78:et:ft=help:norl:
+" vim:tw=78:sw=3:ts=3:et:ft=help:norl: