Age | Commit message (Collapse) | Author |
|
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.
|
|
Get 'godoc' syntax highlighting.
|
|
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.
|
|
This re-enables `K` keyworkprg functionality for the `GoDoc` command,
this time using my custom version.
|
|
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.
|
|
|
|
In case I need to add logs for debugging.
|
|
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.
|
|
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.
|
|
Vim-Go has a `:GoIfErr` command, which inserts an `if err != nil` check.
Add a mapping for it to make it quicker to access.
|
|
This adds a trailing comma when using ArgWrap. Go requires trailing
commas, otherwise it reports compilation errors.
|
|
|
|
Use `z<C-^>` to swap between test and implementation files. Gives me a
faster way to navigate.
|
|
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.
|
|
This mapping conflicted with the `<leader>cf` mapping in my `vimrc` that
copies the current filename/relative path to the clipboard.
|
|
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.
|
|
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.
|
|
Make it faster to compile tests without running them.
|
|
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.
|
|
Mappings to build projects and run tests.
|
|
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.
|
|
Provide a quick way to format the current file.
|
|
Include basic settings plus compiler mappings. Mappings facilitate
compiling and running Go programs.
|