aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin/go.vim
AgeCommit message (Collapse)Author
2022-05-22ftplugin/go.vim#s:GoDoc: Start at the top of the documentationTeddy Wing
Previously, the cursor would be at the bottom or the loaded documentation. It's more practical to start at the beginning. Also remove the empty first line.
2022-05-22ftplugin/go.vim#s:GoDoc: Change filetype to 'godoc'Teddy Wing
Get 'godoc' syntax highlighting.
2022-05-22ftplugin/go.vim#s:GoDoc: Remove unnecessary `|` in Ex commandsTeddy Wing
These were a holdover from when the lines were in a map binding. They're unnecessary now that they've been moved to a function.
2022-05-05ftplugin/go.vim: Allow `:GoDoc` to work with `<cword>`Teddy Wing
This re-enables `K` keyworkprg functionality for the `GoDoc` command, this time using my custom version.
2022-05-05ftplugin/go.vim: Add `GoDoc` commandTeddy Wing
Override the `GoDoc` command from 'vim-go'. That one produces docs without the "-all" flag, and there's no option to enable "all". This gives me all the documentation for a package. This isn't as useful yet, as it breaks the `K` keywordprg.
2022-03-07ftplugin/go.vim: Add 'formatoptions' for comment leadersTeddy Wing
2020-09-07ftplugin/go.vim: Run shell tests with verbose flagTeddy Wing
In case I need to add logs for debugging.
2020-08-31ftplugin/go.vim: Create test file on alternate if it doesn't existTeddy Wing
When switching to a file's alternate (its test file), create the test if the file doesn't exist. By default, a warning is issued if the file doesn't exist. I wanted an easier way to create the test file. Previously I'd use: :e %:h<Tab><C-f>bbi_test<CR> This uses the function that the `Plug` mappings call under the hood, and turns on the `-bang` argument to have it create the test file if it doesn't exist.
2020-07-27ftplugin/go.vim: Add mapping to run package tests with terminal outputTeddy Wing
The Vim-Go mappings run the tests in a job and add results to the Quickfix list. Add a new mapping that doesn't use Quickfix, and instead just runs the test command for the package that contains the current file, outputting the results to standard output. Gives me an additional alternative to view test results.
2020-06-15ftplugin/go.vim: Add `Ze` mapping to insert `if err` blockTeddy Wing
Vim-Go has a `:GoIfErr` command, which inserts an `if err != nil` check. Add a mapping for it to make it quicker to access.
2020-06-01ftplugin/go.vim: Turn on `b:argwrap_tail_comma`Teddy Wing
This adds a trailing comma when using ArgWrap. Go requires trailing commas, otherwise it reports compilation errors.
2020-03-12ftplugin/go.vim: Add a mapping to open the alternate file in a splitTeddy Wing
2020-02-26ftplugin/go.vim: Add mapping to show alternate fileTeddy Wing
Use `z<C-^>` to swap between test and implementation files. Gives me a faster way to navigate.
2020-02-26ftplugin/go.vim: Enable the vim-go ftpluginTeddy Wing
Enable extra mappings, text objects, etc. provided by vim-go. Wanted function scoped motions and text objects, and this was the easy way to get them.
2019-09-26ftplugin/go.vim: Change `<leader>cf` mapping to `<leader>cd`Teddy Wing
This mapping conflicted with the `<leader>cf` mapping in my `vimrc` that copies the current filename/relative path to the clipboard.
2019-06-17vimrc: Don't preserve indentation on empty linesTeddy Wing
Over the years and as I've been using Vim, I've gradually stopped liking this style, and now prefer blank lines without whitespace. Rather than continuing to override the default for different filetypes, it feels like it's time to change the default.
2019-05-17ftplugin/go.vim: Add a mapping to run `goimports`Teddy Wing
Sometimes the run-on-save functionality doesn't work. This gives me a quick way to run the formatter when it doesn't happen automatically.
2019-05-17ftplugin/go.vim: Add mapping to `:GoTestCompile`Teddy Wing
Make it faster to compile tests without running them.
2019-05-17ftplugin/go.vim: Make `go run` mapping run root main packageTeddy Wing
The `Plug` mapping wasn't finding my `main` package from a sub-package. Change it to force running for the main package in the `pwd` directory.
2019-05-10ftplugin/go.vim: Add a few mappings to Vim-GoTeddy Wing
Mappings to build projects and run tests.
2016-02-13ftplugin/go.vim: Don't preserve indentation on empty linesTeddy Wing
Go style (and `go fmt`) doesn't put indentation on empty lines, so for the sake of good Go, don't add indentation in this case.
2015-11-23ftplugin/go.vim: Add mapping for `go fmt`Teddy Wing
Provide a quick way to format the current file.
2014-06-14Add ftplugin/go.vimTeddy Wing
Include basic settings plus compiler mappings. Mappings facilitate compiling and running Go programs.