aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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.
2018-02-10vimrc: Add <leader>w mapping to search with RipgrepTeddy Wing
Searches the `<cword>` with Ripgrep for more streamlined project searching.
2018-02-06Create 'vim-latearliest' pluginTeddy Wing
Adds two new commands that allow you to move to the beginning and end of undo history.
2018-02-05vimrc: Make <leader>sp mapping use `setlocal`Teddy Wing
Toggling spell checking should not happen for the entire Vim session, only for the current buffer. We don't want to be editing regular text and then switch into a code file and find spell checking turned on.
2018-01-20vimrc: Add <leader>sp mapping to toggle spell checkingTeddy Wing
One frustration that happens every so often is having to manually type `:set spe<Tab><CR>` or `:set nosp<Tab><CR>` to turn spell checking on and off. It's not often that I need to toggle spell checking, but when I do, I notice it as being bothersome. I think it's finally time to add a mapping for this.
2017-12-20Update 'vim-grappele' to v0.0.5Teddy Wing
Fixes a bug where pressing `gG` without first having used `[count]G` to store a location caused an error.
2017-12-13projects/af83.vim: Add abbreviations for OuibusTeddy Wing
I'm not supposed to write this word, so change it to the code word automatically if I happen to write it accidentally in a commit message. Interestingly, the bars (`|`) need to go either right next to the backslashes (`\`) or right after the right-hand side, as in: inoreabbrev <buffer> Ouibus the socle commun| Otherwise, if a space is before the `|`, that space becomes part of the abbreviation's right-hand side.
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-28vimrc: Log statistics of RSpec command usageTeddy Wing
When any of my RSpec commands are used, log a message to a file that says which one was just used. These statistics will be used for an experiment, gathering frequency data over time. That data will then be used to determine how often the lowercase variants are used, and how often the uppercase variants are used. If uppercase occurs more often than lowercase, the commands should be swapped, because lowercase takes less time to type.
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-26vimrc: Add mapping to run nearest RSpec with unicode "flag in hole"Teddy Wing
Like our unicode "hole" mapping to run the whole spec file, use "flag in hole" (U+26F3) to run the nearest spec test. This corresponds to Shift-extra ISO key on my keyboard.
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-09-19vimrc: Add mapping to run RSpec file with unicode "hole" characterTeddy Wing
I'm now doing some work on a machine with an ISO keyboard layout, which gives me one extra key compared to my normal ANSI layout (really cool!). To take full advantage of this, I created a custom software keyboard layout that changes the extra key next to the left "Shift" key to a unicode U+1F573 "hole" character. Since I'm not actually going to be typing that character, it gives me an easy hook for remapping. This new mapping allows me to run a spec file with a single key press.
2017-09-19vimrc: Add <leader>mk mapping to save Vim sessionTeddy Wing
I had previously defined this command as 'af83'-project-specific. Now I've become used to it and want to use it everywhere, so promote it to a global mapping.
2017-09-19vimrc: Set 'backspace=indent,eol,start'Teddy Wing
I installed my Vim config on another machine recently and noticed that it didn't automatically set 'bs=2', like in my normal environment. Put this in our vimrc because it should just work everywhere.
2017-08-11vimrc: Add window number to statuslineTeddy Wing
Thanks to "aegray" for asking how to jump to a specific window using automatic numbers instead of using `<C-w>hjklw` on Freenode#vim. This prompted me to look up `:h winnr()`, which I remember from a long time ago, and learn that you can use the window numbers with `<C-w>w`, as in `3<C-w>w`. This will make it much easier to move around between my sometimes many windows. In order to be able to tell which window has which number, add the `winnr()` to the statusline.
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-07-31projects/af83.vim: Move `g:rspec_command` setting from stif.vim hereTeddy Wing
Instead of using Spring for RSpec only on the STIF project, use it for all af83 projects.
2017-07-09Update 'vim-grappele' to v0.0.4Teddy Wing
Doesn't clobber saved location when using `G` without a count.
2017-07-04vimrc: Add ZA mapping to update all buffers and quitTeddy Wing
Tested this out for a while without committing it and it turns out I actually started using this mapping frequently enough, so I'm saving it. The real impetus for this is that I recently (in the last couple months) set: $ git config commit.verbose 1 to get a diff of changes to be committed in my Vim commit buffer. This is really handy. Often I end up opening Vim windows to see the rest of the diff while still having my commit message open and visible. Thus my normal workflow of writing a commit message and committing with ZZ no longer works in these cases where there are multiple windows open. To more quickly save the commit message and quit all windows, this command comes in really handy.
2017-05-31Add projects/stif.vimTeddy Wing
A project-specific config for the STIF app. Set a custom RSpec command for rspec.vim that runs the Spring preloader instead of calling RSpec directly. This allows us to eliminate the slow-as-molasses Rails startup time when iterating on code with tests.
2017-05-10Update 'vim-gitcha' to v0.0.2Teddy Wing
Show the completion menu even when there's only one result so we can still read the commit message subject. This allows for easy validation that we've autocompleted the right commit SHA.
2017-05-04vimrc: Add <leader>sm mapping to split chained method callsTeddy Wing
A mapping to invoke our new 'whitespace-method-chain' plugin.
2017-05-04whitespace-method-chain: Silence commandsTeddy Wing
If the commands result in errors, they should fail silently, because we may have exected them on things that don't match, like a line that has no '.'s or a single-line buffer.
2017-05-04whitespace-method-chain: Move function to autoloadTeddy Wing
Don't force the function to load on startup.
2017-05-04Rename 'whitespace-chain' to 'whitespace-method-chain'Teddy Wing
Give the plugin a clearer name.
2017-05-04Add 'whitespace-chain' pluginTeddy Wing
A new plugin to split method chains onto multiple lines. For example: scope.line.result(distinct: true).paginate becomes: scope .line .result(distinct: true) .paginate
2017-05-04projects/af83.vim: Set a custom .agignore for PickTeddy Wing
When opening files with Pick and pick.vim, use a project-level .agignore file to ignore files and directories that shouldn't be searched when fuzzy-finding. This allows us to eliminate vendor directories like `node_modules` from the search path.
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-04-29Add 'vim-gitcha' pluginTeddy Wing
Provides completion of Git SHAs in commit messages. Super handy for referencing other commits without having to copy-paste and use the mouse. Was getting tired of that routine.
2017-04-29Add ftdetect/slim.vimTeddy Wing
Working on a Rails project that uses Slim templates. Looks like we have HAML syntax highlighting built-in, so just use that to highlight Slim files.
2017-04-24vimrc: Make <C-w><C-q> a no-opTeddy Wing
Get rid of this freaking good-for-nothing command that keeps g'all dang messing me the frak up and closing my windows!
2017-04-07vimrc: Make <C-w>q command a no-opTeddy Wing
When hitting <C-w> to initiate a window command, I kept accidentally hitting <C-w>q and quitting the window I was in. This was extremely aggravating, because (1) it would be surprising and confusing for a couple seconds, and (2) I'd have to stop what I was doing and get my workspace back to what it was before. I was accidentally hitting it because the 'w' and 'q' keys are so close together. The only difference I can see between <C-w>q and <C-w>c is that the 'q' version will quit Vim if the current window is the last one. I don't see myself needing that functionality with 'ZQ' readily available. Since closing a window is a destructive operation, I prefer it being farther away on the keyboard (even though 'c' is right next to 'v' and that confusion has messed me up sometimes). All that said, get rid of this command that has a more useful equivalent, that I don't see myself using, and that has messed me up at least three times already.
2017-03-31Add 'vim-argwrap' pluginTeddy Wing
Was getting annoyed at having to manually split function arguments from a single line to multiple lines. Planned on writing a little custom plugin to do this, but this one seems more well thought out and featureful than what I was thinking of. It also seems lighter and not as presumptive as another alternative I found: https://github.com/AndrewRadev/splitjoin.vim
2017-03-22Add 'vim-repeat' pluginTeddy Wing
Finally getting annoyed enough about not being able to '.'-repeat surround.vim commands. It's really nice to have repeating just work now.
2017-03-13vimrc: Add `<leader>Z` mapping to run a single RSpec testTeddy Wing
Using `<leader>z` works well, but now I want to be able to run a single test so I can iterate while writing it.
2017-03-13Add projects/af83.vimTeddy Wing
Create a new project-specific config for AF83. Add a project-specific mapping to save the current Vim session to a file called 'vimsession'.
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-28Add ftdetect/jbuilder.vimTeddy Wing
Load *.jbuilder files as Ruby so that they can be edited like Ruby files and have Ruby syntax colours.
2017-02-23Create 'insert-formatted-cal' pluginTeddy Wing
A plugin that will insert a given month from the `cal` program and format it such that I can insert `*`s next to days to flag them. I've been doing this manually for years and it finally seemed time to automate the process.
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-21vimrc: Change <leader>tf mapping to <leader>zTeddy Wing
Typing <leader>tf was too many keys. I wanted to shorten the command a bit to make running tests really quick.
2017-02-17vimrc: Add <leader>tf mapping to run current RSpec fileTeddy Wing
Leverage 'vim-rspec' to make it easy for us to run the current spec file.
2017-02-17Add 'vim-rspec' pluginTeddy Wing
Make it more efficient to run RSpec tests right in Vim. It's been nearly 4 weeks since I started writing Rails code full time and I'd like to see if I can have a nicer system for running only the tests I'm interested in or working on at the moment.
2017-02-08Update 'vim-surround' to latest (v2.1/e49d6c245)Teddy Wing
It's been a few years and it turns out there's some cool new stuff in Surround, like support for arbitrary characters and other goodies.
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.