Age | Commit message (Collapse) | Author |
|
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.
|
|
Faster than using `cargo build` for a feedback cycle.
|
|
Take advantage of the Rust Vim plugin's additional language-specific
features, like `///` and `//!` comment handling.
|
|
|
|
Rust style seems to prefer trailing commas.
|
|
Enable `gf` and related commands to work by setting the proper 'path',
and ensuring the `.js` suffix is used on files.
|
|
Append a trailing comma when unwrapping arguments.
|
|
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.
|
|
|
|
These are by default highlighted as `Ignore`, which makes them the same
colour as finished and deleted to-dos. Set them to a light grey colour
to make them more readable.
|
|
|
|
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.
|
|
Add bindings to insert `debugger` statements in JavaScript.
|
|
Now that I effectively removed the `checktime` augroup in
cc86bdf4af5212a3b2a7960e65c402eac71091c1, this is no longer necessary.
Also, it errors because `checktime` no longer exists.
|
|
This mapping conflicted with the `<leader>cf` mapping in my `vimrc` that
copies the current filename/relative path to the clipboard.
|
|
This seemed to cause files I opened with Netrw to have `set nowrap`,
overriding the `set wrap` I have in my vimrc.
|
|
Disable 'better autoread' for PULLREQ_EDITMSG files. GitHub's `hub` CLI
may be doing some polling on the file or something because I keep
getting prompts to "Load file" after a while when writing pull request
descriptions.
|
|
* Set 'commentstring'
* Fix comment wrapping by adding `--` to 'comments'. Otherwise no
leading comment markers would be inserted when text wrapped to the
next line.
|
|
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.
|
|
Since I'm not writing Ruby regularly right now, move these mappings to
the Ruby ftplugin so I don't accidentally try to run a spec in another
language where it makes no sense.
|
|
This formats numbered lists so that they wrap to the beginning of the
text, instead of being flush with the number.
Before:
1. A list that goes beyond the text width and
wraps to the number.
After:
1. A list that goes beyond the text width and
wraps to the text.
Thanks to this blog post from Edward Yang for prompting me to read the
|fo-table| help again more closely:
http://blog.ezyang.com/2010/03/vim-textwidth/
|
|
Don't preserve indentation on empty lines in JavaScript files.
|
|
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.
|
|
Use FSwitch to swap .h and .m files in the current window when `<C-^>`
is pressed.
|
|
Previously, the custom highlighting I had added for TODO files would
infect the highlighting of all other files in the same Vim session.
Only change the highlighting of the `todoUndone` group so that it
doesn't affect anything else.
|
|
Use the plugin's ftplugin. This gives us the proper comment string.
|
|
Set the correct comment string for make.
|
|
Filetype plugins for Objective-C. Turns out editing ObjC in Vim is
somewhat surprisingly whoppingly better than Xcode. This gets
indentation set to 4-space tabs and sets the comment correct prefix
(Tcomment forces /* ... */).
Include `objcpp` also because ObjC header files get recognised by Vim as
ObjC++.
|
|
I was using a different machine and composing an email, but there I
wasn't getting a `textwidth` setting of 72. Instead it was unset. Ensure
the default mail ftplugin gets sourced so we get the proper `textwidth`,
plus some other niceties.
|
|
Occasionally I need to drop and reload the Rails test database. Recently
I've been working on something that requires a "truncation"-cleaned
test, and have had to reset my database regularly while writing the test
to eliminate inconsistent state. This command gives me the ability to
reset with a single key press. I've been testing it out for a few days
in a Vim session and have found it very helpful.
|
|
I've had to use a similar pattern a couple of times in the past to
convert files or sections of files from the old Ruby hash syntax
(`:key => 'value'`) to the new syntax (`key: 'value'`).
Give the pattern and substitution a command to make it readily available
the next time I need to use it.
|
|
Ugh, I hate Slim. But I increasingly have to deal with it in projects.
Fix what's within our power to fix, and give ourselves Ruby indentation
in Slim files.
|
|
I love Spring, it makes it so much nicer to run tests in Rails apps.
That's why I set 'vim-rspec' to use it. However, sometimes it gets
confused and doesn't load the latest code, and a load error occurs.
Recently I started a new project and those errors occur every few times
I run the tests. It's absolutely unbearable. To make life a tiny bit
easier, make a command that allows us to stop Spring from Vim, to avoid
having to <C-z> and type the command by hand.
You can tell I was frustrated when I decided to make this command.
|
|
Add syntax formatting settings for Haskell. Want 4-space tabs and a
maximum of 80 characters per line.
Using this style guide:
https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
|
|
Unlet `b:did_ftplugin` to allow 'vim-gitcha' to work. By default we
override `b:did_ftplugin` to disable filetype plugins, but here we want
the ftplugin to work.
|
|
Make it easier to insert `byebug` debug statements. Currently working in
Rails so assuming `byebug` is already required. Might want to add new
maps or modify these later if I end up needing to do a `require
'byebug'` beforehand.
These keys didn't seem to be used for anything, so I figured they would
be a nice quick combination for this. Didn't really feel like adding a
long leader command to do it.
|
|
When writing bulleted lists, don't start wrapped lines with '*'. Just
wrote a mail message an noticed this was a problem. Copied my
gitcommit.vim config to resolve this.
|
|
Blech, CoffeeScript! Having to read & write some recently, so add
support for it.
|
|
My tastes have changed over time. These days I normally prefer to remove
indentation on empty lines, and this is my general default working on
codebases with other people. Change our Ruby config to remove
indentation on empty lines so I don't have to keep doing it myself
manually.
|
|
I want the HTML matchit command to be available in *.html.erb files.
Normally, these files get loaded as `filetype=eruby`.
The trouble with that is that not all eruby is HTML, so I can't load the
matcher in the 'eruby' filetype because it might not make sense.
Create a new special filetype for *.html.erb files that uses the normal
eruby syntax, but includes the HTML matchit command.
|