aboutsummaryrefslogtreecommitdiffstats
path: root/ftplugin
AgeCommit message (Collapse)Author
2020-07-19ftplugin/rust.vim: Add a command to run `cargo check`Teddy Wing
Faster than using `cargo build` for a feedback cycle.
2020-07-19ftplugin/rust.vim: Activate Rust plugin's ftpluginTeddy Wing
Take advantage of the Rust Vim plugin's additional language-specific features, like `///` and `//!` comment handling.
2020-07-17ftplugin/rust.vim: Add mappings to build and runTeddy Wing
2020-07-17ftplugin/rust.vim: Turn on `b:argwrap_tail_comma`Teddy Wing
Rust style seems to prefer trailing commas.
2020-07-04projects/aodocs.vim: Set 'path' for UFO extension projectTeddy Wing
Enable `gf` and related commands to work by setting the proper 'path', and ensuring the `.js` suffix is used on files.
2020-06-15ftplugin/python.vim: Turn on `b:argwrap_tail_comma`Teddy Wing
Append a trailing comma when unwrapping arguments.
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-05-08ftplugin/typescript.vim: Set 'commentstring'Teddy Wing
2020-03-25ftplugin/todo.vim: Highlight `todoUnimportant` as a light greyTeddy Wing
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.
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-11-04Add ftplugin/javascript.vimTeddy Wing
Add bindings to insert `debugger` statements in JavaScript.
2019-10-21Remove ftplugin/gitcommit_pullreq_editmsg.vimTeddy Wing
Now that I effectively removed the `checktime` augroup in cc86bdf4af5212a3b2a7960e65c402eac71091c1, this is no longer necessary. Also, it errors because `checktime` no longer exists.
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-08-01ftplugin/netrw.vim: Remove `nowrap` from `g:netrw_bufsettings`Teddy Wing
This seemed to cause files I opened with Netrw to have `set nowrap`, overriding the `set wrap` I have in my vimrc.
2019-07-21Add ftplugin/gitcommit_pullreq_editmsg.vimTeddy Wing
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.
2019-06-20Add ftplugin/lua.vimTeddy Wing
* Set 'commentstring' * Fix comment wrapping by adding `--` to 'comments'. Otherwise no leading comment markers would be inserted when text wrapped to the next line.
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-06-08vimrc: Move RSpec mappings to ftplugin/ruby.vimTeddy Wing
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.
2019-06-05ftplugin/gitcommit.vim: Turn on 'formatoptions' `n`Teddy Wing
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/
2019-06-01Add ftplugin/javascript.vimTeddy Wing
Don't preserve indentation on empty lines in JavaScript files.
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/gitcommit.vim: Turn on spell checking in Git commitsTeddy Wing
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.
2018-12-13ftplugin/objc.vim: Switch alternates on <C-^>Teddy Wing
Use FSwitch to swap .h and .m files in the current window when `<C-^>` is pressed.
2018-11-24ftplugin/todo.vim: Don't change highlighting of non-todo filesTeddy Wing
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.
2018-11-24Add ftplugin/dome_key.vimTeddy Wing
Use the plugin's ftplugin. This gives us the proper comment string.
2018-11-24Add ftplugin/make.vimTeddy Wing
Set the correct comment string for make.
2018-11-24Add ftplugin/objc{,pp}.vimTeddy Wing
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++.
2018-02-13ftplugin/mail.vim: Activate Vim's mail ftpluginTeddy Wing
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.
2017-12-05ftplugin/ruby.vim: Add mapping to reset the Rails test databaseTeddy Wing
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.
2017-12-05ftplugin/ruby.vim: Add `RubyNewHashSyntax` commandTeddy Wing
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.
2017-11-14Add ftplugin/slim.vimTeddy Wing
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.
2017-09-22ftplugin/ruby.vim: Add command to stop SpringTeddy Wing
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.
2017-08-10Add ftplugin/haskell.vimTeddy Wing
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
2017-04-29Add ftplugin/gitcommit_gitcha.vimTeddy Wing
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.
2017-03-09ftplugin/ruby.vim: Add maps to insert debug breakpointsTeddy Wing
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.
2017-03-05ftplugin/mail.vim: Don't start wrapped lines with '*'Teddy Wing
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.
2017-02-28Add CoffeeScript ftdetect & ftplugin filesTeddy Wing
Blech, CoffeeScript! Having to read & write some recently, so add support for it.
2017-02-22ftplugin/ruby.vim: Don't preserve indentation on empty linesTeddy Wing
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.
2017-02-07Create new filetype plugin 'htmlerb'Teddy Wing
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.
2016-12-09ftplugin/todo.vim: Set `nocursorline`Teddy Wing
Don't use a cursorline in TODO files because in my colour scheme it makes the text of normal priority to-dos unreadable as it overrides the line background so you end up with dark text on a dark background.
2016-11-28Add ftplugin/netrw.vimTeddy Wing
Override the `g:netrw_bufsettings` variable to make Netrw always open with line numbers. This should make it easier to navigate to a specific file in the tree. Copied the settings from the original value and changed `nonu` to `nu`. Following this Stack Overflow answer from Benoit to get this working: http://stackoverflow.com/questions/8730702/how-do-i-configure-vimrc-so-that-line-numbers-display-in-netrw-in-vim/8731175#8731175
2016-10-26Add ftplugin/todo.vimTeddy Wing
Special overrides for *.todo files. Here we unlet `b:did_ftplugin` to allow the plugin's ftplugin to execute. Normally, we override `b:did_ftplugin` to disable filetype functionality. In this case, though, we do want the ftplugin code that comes with vim-twodo to be loaded and useable. We also set a custom colour for regular todos that fits with our default twilight256 colour scheme.
2016-05-08ftplugin/mail.vim: Add a mapping to remove the last two linesTeddy Wing
I have two empty lines below my signature to add some space between my top-posted message and the quoted message of a reply below. When I start a new mail message, though, nothing is below my message, resulting in two empty lines at the bottom of my emails. Add a mapping to quickly remove these lines to save me from having to do it manually. Should save some time.
2016-04-27Add ftplugin/muttrc.vimTeddy Wing
Set the correct comment prefix for the Muttrc config language (`#`).