<commit_before>*vim-go.txt* Go development plugin
*vim-go*

===============================================================================
#                                                                             #
#             ##     ## #### ##     ##          ######    #######             #
#             ##     ##  ##  ###   ###         ##    ##  ##     ##            #
#             ##     ##  ##  #### ####         ##        ##     ##            #
#             ##     ##  ##  ## ### ## ####### ##   #### ##     ##            #
#              ##   ##   ##  ##     ##         ##    ##  ##     ##            #
#               ## ##    ##  ##     ##         ##    ##  ##     ##            #
#                ###    #### ##     ##          ######    #######             #
#                                                                             #
===============================================================================
CONTENTS                                                          *go-contents*

	1. Intro........................................|go-intro|
	2. Install......................................|go-install|
	3. Commands.....................................|go-commands|
	4. Settings.....................................|go-settings|
	5. Mappings.....................................|go-mappings|
	6. Credits......................................|go-credits|

===============================================================================
INTRO                                                                *go-intro*

Full featured Go development environment support for Vim. vim-go installs
automatically all necessary binaries if they are not found. It comes with
pre-defined sensible settings (like auto gofmt on save), has autocomplete,
snippet support, go toolchain commands, etc... Do not use it with other Go
plugins.

  * Improved Syntax highlighting, such as Functions, Operators, Methods..
  * Auto completion support via `gocode`
  * Better `gofmt` on save, keeps cursor position and doesn't break your undo
    history
  * Go to symbol/declaration with `godef`
  * Automatically import packages via `goimports`
  * Compile and `go build` your package, install it with `go install`
  * `go run` quickly your current file/files
  * Run `go test` and see any errors in quickfix window
  * Lint your code with `golint`
  * Run your code trough `go vet` to catch static errors.
  * Advanced source analysis tool with `oracle`
  * List all source files and dependencies
  * Checking with `errcheck` for unchecked errors.
  * Integrated and improved snippets. Supports `ultisnips` or `neosnippet`
  * Share your current code to play.golang.org

===============================================================================
INSTALL                                                           *go-install*

If you use pathogen, just clone it into your bundle directory: >

	$ cd ~/.vim/bundle
	$ git clone https://github.com/fatih/vim-go.git
<
For the first Vim start it will try to download and install all necessary go
binaries. To disable this behaviour please check out |go-settings|.

Autocompletion is enabled by default via `<C-x><C-o>`, to get real-time
completion (completion by type) install YCM: >

	$ cd ~/.vim/bundle
	$ git clone https://github.com/Valloric/YouCompleteMe.git
	$ cd YouCompleteMe
	$ ./install.sh


===============================================================================
COMMANDS                                                          *go-commands*

                                                                  *:GoImport*
:GoImport [path]

    Import ensures that the provided package {path} is imported in the current
    Go buffer, using proper style and ordering.  If {path} is already being
    imported, an error will be displayed and the buffer will be untouched.

                                                                *:GoImportAs*
:GoImportAs [localname] [path]

    Same as Import, but uses a custom local name for the package.

                                                                    *:GoDrop*
:GoDrop [path]

    Remove the import line for the provided package {path}, if present in the
    current Go buffer.  If {path} is not being imported, an error will be
    displayed and the buffer will be untouched.

                                                        *:GoDisableGoimports*
:GoDisableGoimports

    Disable goimports and use "fmt" for |:GoFmt| command

                                                         *:GoEnableGoimports*
:GoEnableGoimports

    Enable goimports and use "goimports" for |:GoFmt| command

                                                                    *:GoLint*
:GoLint

    Run golint for the current Go file.

                                                                     *:GoDoc*
:GoDoc [word]

    Open the relevant GoDoc for either the word[s] passed to the command or
    the, by default, the word under the cursor.

                                                                     *:GoFmt*
:GoFmt

    Filter the current Go buffer through gofmt.  It tries to preserve cursor
    position and avoids replacing the buffer with stderr output.

                                                                     *:GoPlay*
:[range]GoPlay

    Share snippet to play.golang.org. If no [range] is given it shares
    the whole file, otherwise the selected lines are shared. Snippet URL
    is copied to system clipboard if Vim is compiled with |+clipboard| or
    |+xterm_clipboard| otherwise it's get yanked into the `""` register.

                                                                     *:GoVet*
:GoVet

    Run `go vet` for the directory under your current file. Vet examines Go
    source code and reports suspicious constructs, such as Printf calls whose
    arguments do not align with the format string. Vet uses heuristics that do not
    guarantee all reports are genuine problems, but it can find errors not caught
    by the compilers.

                                                                     *:GoDef*
:GoDef [identifier]

    Goto declaration/definition for the given [identifier]. If no argument is
    given, it will jump to the declaration under the cursor.

                                                                     *:GoRun*
:GoRun [expand]

    Build and run your current main package. By default all main files for the
    current file is used. An argument that is passed to |expand| can be used as
    file selector. For example use `:Gorun %` to select the current file only.

                                                                   *:GoBuild*
:GoBuild

    Build your package with `go build`. It automatically builds only the files
    that depends on the current file


:GoInstall                                                        *:GoInstall*

  Install your package with `go install`.

                                                                    *:GoTest*
:GoTest

    Test your _test.go files via in your current directory. Errors are
    populated in quickfix window.

                                                                *:GoErrCheck*
:GoErrCheck

    Check for unchecked errors in you current package. Errors are populated in
    quickfix window.

                                                                   *:GoFiles*
:GoFiles

    Show source files that depends for the current package

                                                                    *:GoDeps*
:GoDeps

    Show dependencies for the current package

                                                          *:GoUpdateBinaries*
:GoUpdateBinaries

    Update all Go binaries under `g:go_bin_path`

                                                          *:GoOracleDescribe*
:GoOracleDescribe

    Describe the expression at the current point.

                                                           *:GoOracleCallees*
:GoOracleCallees

    Show possible callees of the function call at the current point.

                                                           *:GoOracleCallers*
:GoOracleCallers

    Show the set of callers of the function containing the current point.

                                                         *:GoOracleCallgraph*
:GoOracleCallgraph

    Show the callgraph of the current program.

                                                        *:GoOracleImplements*
:GoOracleImplements

    Describe the 'implements' relation for types in the package containing the
    current point.

                                                      *:GoOracleChannelPeers*
:GoOracleChannelPeers

    Enumerate the set of possible corresponding sends/receives for this
    channel receive/send operation.

===============================================================================
MAPPINGS                                                        *go-mappings*

vim-go has several <Plug> keys which can be used to create custom mappings
For example, to create a mapping that `go run` the current file create a
mapping for the `(go-run)`: >

  au FileType go nmap <leader>r <Plug>(go-run)

As always one is free to create more advanced mappings or functions based
with |go-commands|. Available <Plug> keys are:

                                                                  *(go-run)*

Calls `go run` for the current file


                                                                *(go-build)*

Calls `go build` for the current package


                                                                *(go-install)*

Calls `go install` for the current package


                                                                 *(go-test)*

Calls `go test` for the current package


                                                                  *(go-vet)*

Calls `go vet` for the current package


                                                                *(go-files)*

Show source files that depends for the current package


                                                                 *(go-deps)*

Show dependencies for the current package

                                                                  *(go-doc)*

Show the relevant GoDoc for the word under the cursor.

                                                                  *(go-def)*

Goto declaration/definition. Results are shown in the current buffer.


                                                            *(go-def-split)*

Goto declaration/definition. Results are shown in a split window.


                                                         *(go-def-vertical)*

Goto declaration/definition. Results are shown in a vertical split window.


                                                              *(go-def-tab)*

Goto declaration/definition. Results are shown in a tab window.



===============================================================================
SETTINGS                                                        *go-settings*

                                                *'g:go_play_browser_command'*

Use this option to change the browser that is used to open the snippet url
posted to play.golang.org with |:GoPlay|. By default it tries to find it
automatically for the current OS. >

  let g:play_browser_command = ''
<
                                                   *'g:go_play_open_browser'*

Use this option to open browser after posting the snippet to play.golang.org
with |:GoPlay|. By default it's enabled. >

  let g:go_play_open_browser = 1
<
                                                        *'g:go_fmt_autosave'*

Use this option to auto |:GoFmt| on save. By default it's enabled >

  let g:go_fmt_autosave = 1
<
                                                         *'g:go_fmt_command'*

Use this option to define which tool is used to gofmt. By default `goimports`
is used >

  let g:go_fmt_command = "goimports"
<
                                                         *'g:go_fmt_options'*

Use this option to add additional options to the |g:go_fmt_command|. Default
is empty. >

  let g:go_fmt_options = ''
<
                                                   *'g:go_fmt_fail_silently'*

Use this option to disable showing a quickfix window when |g:go_fmt_command|
fails. By default it's disabled. >

  let g:go_fmt_fail_silently = 0
<

                                                      *'g:go_snippet_engine'*

Use this option to define the default snippet engine.  By default "ultisnips"
is enabled. Use "neosnippet" for neosnippet.vim: >

  let g:go_snippet_engine = "ultisnips"
<
                                                 *'g:go_disable_autoinstall'*

By default vim-go automatically install all necessary tools which are used
for |:go-commands|. Disable it if you don't wish to be updated. This also disables
the |:GoUpdateBinaries| command. >

  let g:go_disable_autoinstall = 0
<
                                                            *'g:go_bin_path'*

Use this option to change default path for vim-go tools. By default it's set
to `$HOME/.vim-go/`. To change it: >

  let g:go_bin_path = expand("$HOME/.vim-go/")

===============================================================================
CREDITS                                                         *go-credits*


vim:ft=help:et:ts=2:sw=2:sts=2:norl
<commit_msg>Small fixes in doc<commit_after>*vim-go.txt* Go development plugin
*vim-go*

===============================================================================
#                                                                             #
#             ##     ## #### ##     ##          ######    #######             #
#             ##     ##  ##  ###   ###         ##    ##  ##     ##            #
#             ##     ##  ##  #### ####         ##        ##     ##            #
#             ##     ##  ##  ## ### ## ####### ##   #### ##     ##            #
#              ##   ##   ##  ##     ##         ##    ##  ##     ##            #
#               ## ##    ##  ##     ##         ##    ##  ##     ##            #
#                ###    #### ##     ##          ######    #######             #
#                                                                             #
===============================================================================
CONTENTS                                                          *go-contents*

	1. Intro........................................|go-intro|
	2. Install......................................|go-install|
	3. Commands.....................................|go-commands|
	4. Settings.....................................|go-settings|
	5. Mappings.....................................|go-mappings|
	6. Credits......................................|go-credits|

===============================================================================
INTRO                                                                *go-intro*

Full featured Go development environment support for Vim. vim-go installs
automatically all necessary binaries if they are not found. It comes with
pre-defined sensible settings (like auto gofmt on save), has autocomplete,
snippet support, go toolchain commands, etc... Do not use it with other Go
plugins.

  * Improved Syntax highlighting, such as Functions, Operators, Methods..
  * Auto completion support via `gocode`
  * Better `gofmt` on save, keeps cursor position and doesn't break your undo
    history
  * Go to symbol/declaration with `godef`
  * Automatically import packages via `goimports`
  * Compile and `go build` your package, install it with `go install`
  * `go run` quickly your current file/files
  * Run `go test` and see any errors in quickfix window
  * Lint your code with `golint`
  * Run your code trough `go vet` to catch static errors.
  * Advanced source analysis tool with `oracle`
  * List all source files and dependencies
  * Checking with `errcheck` for unchecked errors.
  * Integrated and improved snippets. Supports `ultisnips` or `neosnippet`
  * Share your current code to play.golang.org

===============================================================================
INSTALL                                                           *go-install*

If you use pathogen, just clone it into your bundle directory: >

	$ cd ~/.vim/bundle
	$ git clone https://github.com/fatih/vim-go.git
<
For the first Vim start it will try to download and install all necessary go
binaries. To disable this behaviour please check out |go-settings|.

Autocompletion is enabled by default via `<C-x><C-o>`, to get real-time
completion (completion by type) install YCM: >

	$ cd ~/.vim/bundle
	$ git clone https://github.com/Valloric/YouCompleteMe.git
	$ cd YouCompleteMe
	$ ./install.sh


===============================================================================
COMMANDS                                                          *go-commands*

                                                                  *:GoImport*
:GoImport [path]

    Import ensures that the provided package {path} is imported in the current
    Go buffer, using proper style and ordering.  If {path} is already being
    imported, an error will be displayed and the buffer will be untouched.

                                                                *:GoImportAs*
:GoImportAs [localname] [path]

    Same as Import, but uses a custom local name for the package.

                                                                    *:GoDrop*
:GoDrop [path]

    Remove the import line for the provided package {path}, if present in the
    current Go buffer.  If {path} is not being imported, an error will be
    displayed and the buffer will be untouched.

                                                        *:GoDisableGoimports*
:GoDisableGoimports

    Disable goimports and use "fmt" for |:GoFmt| command

                                                         *:GoEnableGoimports*
:GoEnableGoimports

    Enable goimports and use "goimports" for |:GoFmt| command

                                                                    *:GoLint*
:GoLint

    Run golint for the current Go file.

                                                                     *:GoDoc*
:GoDoc [word]

    Open the relevant GoDoc for either the word[s] passed to the command or
    the, by default, the word under the cursor.

                                                                     *:GoFmt*
:GoFmt

    Filter the current Go buffer through gofmt.  It tries to preserve cursor
    position and avoids replacing the buffer with stderr output.

                                                                     *:GoPlay*
:[range]GoPlay

    Share snippet to play.golang.org. If no [range] is given it shares
    the whole file, otherwise the selected lines are shared. Snippet URL
    is copied to system clipboard if Vim is compiled with 'clipboard' or
     'xterm-clipboard' otherwise it's get yanked into the `""` register.

                                                                     *:GoVet*
:GoVet

    Run `go vet` for the directory under your current file. Vet examines Go
    source code and reports suspicious constructs, such as Printf calls whose
    arguments do not align with the format string. Vet uses heuristics that do not
    guarantee all reports are genuine problems, but it can find errors not caught
    by the compilers.

                                                                     *:GoDef*
:GoDef [identifier]

    Goto declaration/definition for the given [identifier]. If no argument is
    given, it will jump to the declaration under the cursor.

                                                                     *:GoRun*
:GoRun [expand]

    Build and run your current main package. By default all main files for the
    current file is used. An argument that is passed to |expand| can be used as
    file selector. For example use `:Gorun %` to select the current file only.

                                                                   *:GoBuild*
:GoBuild

    Build your package with `go build`. It automatically builds only the files
    that depends on the current file


:GoInstall                                                        *:GoInstall*

  Install your package with `go install`.

                                                                    *:GoTest*
:GoTest

    Test your _test.go files via in your current directory. Errors are
    populated in quickfix window.

                                                                *:GoErrCheck*
:GoErrCheck

    Check for unchecked errors in you current package. Errors are populated in
    quickfix window.

                                                                   *:GoFiles*
:GoFiles

    Show source files that depends for the current package

                                                                    *:GoDeps*
:GoDeps

    Show dependencies for the current package

                                                          *:GoUpdateBinaries*
:GoUpdateBinaries

    Update all Go binaries under `g:go_bin_path`

                                                          *:GoOracleDescribe*
:GoOracleDescribe

    Describe the expression at the current point.

                                                           *:GoOracleCallees*
:GoOracleCallees

    Show possible callees of the function call at the current point.

                                                           *:GoOracleCallers*
:GoOracleCallers

    Show the set of callers of the function containing the current point.

                                                         *:GoOracleCallgraph*
:GoOracleCallgraph

    Show the callgraph of the current program.

                                                        *:GoOracleImplements*
:GoOracleImplements

    Describe the 'implements' relation for types in the package containing the
    current point.

                                                      *:GoOracleChannelPeers*
:GoOracleChannelPeers

    Enumerate the set of possible corresponding sends/receives for this
    channel receive/send operation.

===============================================================================
MAPPINGS                                                        *go-mappings*

vim-go has several <Plug> keys which can be used to create custom mappings
For example, to create a mapping that `go run` the current file create a
mapping for the `(go-run)`: >

  au FileType go nmap <leader>r <Plug>(go-run)

As always one is free to create more advanced mappings or functions based
with |go-commands|. Available <Plug> keys are:

                                                                  *(go-run)*

Calls `go run` for the current file


                                                                *(go-build)*

Calls `go build` for the current package


                                                                *(go-install)*

Calls `go install` for the current package


                                                                 *(go-test)*

Calls `go test` for the current package


                                                                  *(go-vet)*

Calls `go vet` for the current package


                                                                *(go-files)*

Show source files that depends for the current package


                                                                 *(go-deps)*

Show dependencies for the current package

                                                                  *(go-doc)*

Show the relevant GoDoc for the word under the cursor.

                                                                  *(go-def)*

Goto declaration/definition. Results are shown in the current buffer.


                                                            *(go-def-split)*

Goto declaration/definition. Results are shown in a split window.


                                                         *(go-def-vertical)*

Goto declaration/definition. Results are shown in a vertical split window.


                                                              *(go-def-tab)*

Goto declaration/definition. Results are shown in a tab window.



===============================================================================
SETTINGS                                                        *go-settings*

                                                *'g:go_play_browser_command'*

Use this option to change the browser that is used to open the snippet url
posted to play.golang.org with |:GoPlay|. By default it tries to find it
automatically for the current OS. >

  let g:play_browser_command = ''
<
                                                   *'g:go_play_open_browser'*

Use this option to open browser after posting the snippet to play.golang.org
with |:GoPlay|. By default it's enabled. >

  let g:go_play_open_browser = 1
<
                                                        *'g:go_fmt_autosave'*

Use this option to auto |:GoFmt| on save. By default it's enabled >

  let g:go_fmt_autosave = 1
<
                                                         *'g:go_fmt_command'*

Use this option to define which tool is used to gofmt. By default `goimports`
is used >

  let g:go_fmt_command = "goimports"
<
                                                         *'g:go_fmt_options'*

Use this option to add additional options to the |g:go_fmt_command|. Default
is empty. >

  let g:go_fmt_options = ''
<
                                                   *'g:go_fmt_fail_silently'*

Use this option to disable showing a quickfix window when |g:go_fmt_command|
fails. By default it's disabled. >

  let g:go_fmt_fail_silently = 0
<

                                                      *'g:go_snippet_engine'*

Use this option to define the default snippet engine.  By default "ultisnips"
is enabled. Use "neosnippet" for neosnippet.vim: >

  let g:go_snippet_engine = "ultisnips"
<
                                                 *'g:go_disable_autoinstall'*

By default vim-go automatically install all necessary tools which are used
for |:go-commands|. Disable it if you don't wish to be updated. This also disables
the |:GoUpdateBinaries| command. >

  let g:go_disable_autoinstall = 0
<
                                                            *'g:go_bin_path'*

Use this option to change default path for vim-go tools. By default it's set
to `$HOME/.vim-go/`. To change it: >

  let g:go_bin_path = expand("$HOME/.vim-go/")

===============================================================================
CREDITS                                                         *go-credits*


vim:ft=help:et:ts=2:sw=2:sts=2:norl

{'fraction_non_alphanumeric': 0.12813339301700985, 'fraction_numerical': 0.000969859743360191, 'mean_word_length': 1.3348719735237764, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 39, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 248, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3984765', 'n_tokens_mistral': 5937, 'n_tokens_neox': 5567, 'n_words': 2241}