@@ -125,7 +125,7 @@ Supported Go plugins~ *vim-go-plugins*
125125The following plugins are supported for use with vim-go:
126126
127127* Real-time completion (Vim):
128- https://github.com/Shougo/neocomplete.vim
128+ https://github.com/Shougo/neocomplete.vim
129129
130130* Real-time completion (Neovim):
131131 https://github.com/Shougo/deoplete.nvim and
@@ -566,13 +566,13 @@ CTRL-t
566566 *:GoFreevars*
567567:GoFreevars
568568
569- Enumerates the free variables of the selection. “ Free variables” is a
569+ Enumerates the free variables of the selection. " Free variables" is a
570570 technical term meaning the set of variables that are referenced but not
571571 defined within the selection, or loosely speaking, its inputs.
572572
573- This information is useful if you’re considering whether to refactor the
573+ This information is useful when considering whether to refactor the
574574 selection into a function of its own, as the free variables would be the
575- necessary parameters of that function. It’ s also useful when you want to
575+ necessary parameters of that function. It' s also useful when you want to
576576 understand what the inputs are to a complex block of code even if you
577577 don’t plan to change it.
578578
@@ -1181,11 +1181,11 @@ used >
11811181Use this option to add additional options to the | 'g:go_fmt_command' | . It's
11821182value type can be either a string or a dictionary. This is due backwards
11831183compatibility. The string version will be removed in the future so please use
1184- the dictionary version. Default is empty.
1184+ the dictionary version. Default is empty.
11851185>
11861186 let g:go_fmt_options = ''
11871187
1188- or
1188+ or
11891189
11901190 let g:go_fmt_options = {}
11911191<
@@ -1394,7 +1394,7 @@ Specifies the type of list to use for command outputs (such as errors from
13941394builds, results from static analysis commands, etc...). The list type for
13951395specific commands can be overridden with | 'g:go_list_type_commands' | . The
13961396default value (empty) will use the appropriate kind of list for the command
1397- that was called. Supported values are "", "quickfix", and "locationlist".
1397+ that was called. Supported values are "", "quickfix", and "locationlist".
13981398>
13991399 let g:go_list_type = ""
14001400<
@@ -1422,7 +1422,7 @@ As an example, the following settings will change all list types to
14221422
14231423Specifies whether the quickfix/location list should be closed automatically
14241424in the absence of errors. The default value is 1.
1425- If you prefer to keep a long running error window open, you can disable
1425+ If you prefer to keep a long running error window open, you can disable
14261426this by setting the value to 0.
14271427>
14281428 let g:go_list_autoclose = 1
@@ -1815,7 +1815,7 @@ manually, usually from an |autocommand|:
18151815If you have a lot of packages with the same prefix (`github.com /user ` ) you can
18161816use a single autocommand:
18171817>
1818- autocmd BufRead /home/martin/go/src/*.go
1818+ autocmd BufRead /home/martin/go/src/*.go
18191819 \ let s:tmp = matchlist(expand('%:p'),
18201820 \ '/home/martin/go/src/\(github.com/user/[^/]\+\)')
18211821 \| if len(s:tmp) > 1 | exe 'silent :GoGuruScope ' . s:tmp[1] | endif
@@ -1916,23 +1916,32 @@ By default new terminals are opened in a vertical split. To change it
19161916==============================================================================
19171917DEVELOPMENT *go-development*
19181918
1919- vim-go supports test files written in VimL. Please check `autoload` folder for
1920- examples. If you add a new feature be sure you also include the `_test.vim `
1921- file next to the script. Test functions should be starting with `Test_` ,
1922- example:
1919+ vim-go supports test files written in VimScript; the way they're run is
1920+ roughly similar to Go tests:
1921+
1922+ - A `* .vim ` file has a corresponding `* _test.vim ` .
1923+ - All functions starting with `Test_` are run as test.
1924+ - A test is considered to be "failed" if | v:errors | has any entries. You can
1925+ use one of the | test-functions | to set this, or append to it directly.
1926+
1927+ A simple example:
19231928>
19241929 function Test_run_fmt()
19251930 call assert_equal(expected, actual)
19261931 ...
19271932 endfunction
19281933<
1929- You can locally test it by running:
1930- >
1931- make
1932- <
1933- This will run all tests and print either `PASS` or `FAIL` to indicate the
1934- final status of all tests. Additionally, each new pull request will trigger a
1935- new Travis-ci job.
1934+ To run tests vim-go comes with three small helper scripts:
1935+
1936+ `scripts/install- vim ` Install a pristine Vim to `/tmp/ vim - go - test/` .
1937+ `scripts/run- vim ` Run a Vim version from `/tmp/ vim - go - test/` .
1938+ `scripts/test` Run all tests with a Vim from `/tmp/ vim - go - test/` .
1939+
1940+ All scripts accept a Vim version as the first argument, which can be
1941+ `vim - 7.4 ` , `vim - 8.0 ` , or `nvim` . You will need to install a Vim version with
1942+ `install- vim ` before you can use `run- vim ` or `test` .
1943+
1944+ You can install and test all Vim versions by running `make ` .
19361945
19371946
19381947==============================================================================
@@ -1960,4 +1969,4 @@ CREDITS *go-credits*
19601969* vim-go contributors: https://github.com/fatih/vim-go/graphs/contributors .
19611970
19621971
1963- vim:ft=help:et: ts=2: sw=2: sts=2: norl
1972+ vim: ft=help tw=78 et ts=2 sw=2 sts=2 norl
0 commit comments