aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2024-04-05vimrc: Add `[b` and `]b` buffer cycling mappingsHEADmasterTeddy Wing
I've had these on `<leader>k` and `<leader>j` since the early days, but those mappings no longer feel logical to me. It seems that `[b` and `]b` are unbound, so I decided to bind these to buffer switching, for the rare times when I need it. Eventually I'll probably remove one or the other set depending on what I end up sticking with.
2024-03-12projects/aodocs.vim: Add email signature mappingTeddy Wing
Mapping to make it easier to insert a pre-defined signature in emails.
2023-12-12prr-ui: Allow `PrrApprove` and `PrrReject` to be called outside of *.prrTeddy Wing
Sometimes I don't have any line comments to make and can go ahead and accept or reject a change immediately. In those cases, I want `PrrApprove` and `PrrReject` to be available in any file type buffer, not just in *.prr buffers. Additionally, those two commands should automatically do `PrrStart` if it hasn't been executed manually before, like we already do with `PrrComment`.
2023-12-09prr-ui: Remove `s:active` variableTeddy Wing
This variable isn't necessary. The same effect can be accomplished with the try-catch.
2023-12-09diff-corrections: Apply diff corrections on BufEnterTeddy Wing
Ensure that diff corrections are applied in a `vimdiff` context, where we haven't run `:diffthis` manually.
2023-12-09colors/twilight256.vim: Increase contrast of diff background coloursTeddy Wing
Change the diff background colours from their defaults to make the text in the foreground easier to read.
2023-12-09prr-ui: Automatically `PrrStart` on `PrrComment`Teddy Wing
If the Prr session hasn't been started yet, do so automatically when running `PrrComment`. This lets me comment directly on a line without having to worry about starting the Prr review beforehand. Now that I see the code and my earlier TODO, I think I could probably have made it work without the `s:active` flag. Will have to try removing it and testing whether that works.
2023-12-07after/plugin/copilot.vim: Add mappings for GitHub CopilotTeddy Wing
Set up custom insert mappings for GitHub Copilot based on what makes sense to me and inspired by the existing i_^x Vim completion mappings.
2023-12-07after/plugin/prr_ui.vim: Add mapping to `PrrComment`Teddy Wing
Add a new mapping to quickly comment on a line.
2023-12-07prr-ui: Comment: Exit early when Prr buffer doesn't existTeddy Wing
If `PrrStart` hasn't been run yet, we should error and stop execution so we don't insert newlines and start insert mode in the current buffer. Eventually, we should set it up so `PrrStart` is called automatically from `PrrComment` if it hasn't been already.
2023-12-07prr-ui: Switch to insert mode immediately on `PrrComment`Teddy Wing
We already said we wanted to write a comment with the command, so we should start in insert mode immediately rather than it being an additional action.
2023-12-06prr-ui: Implement `PrrComment`Teddy Wing
The idea is to open the Prr file at the line corresponding to the current line in the real source file. This makes it easy to comment on a line while looking at the source, rather than the diff.
2023-12-06prr-ui: Idea for a command to comment on a line from the codeTeddy Wing
2023-12-06ftplugin/typescript.vim: Add compile mappingTeddy Wing
2023-12-06after/compiler/typescript.vim: Compile all filesTeddy Wing
The 'typescript.vim' plugin has the 'makeprg' compile only the current file, not all files. Copy its 'makeprg' command and modify it to compile all files in the project instead. This way I get compiler errors in quickfix for the whole project. This way makes more sense to me and works for code reviews.
2023-12-01ftplugin/typescript.vim: Add debugger mappingsTeddy Wing
2023-11-30prr-ui: Ensure file is saved before `PrrSubmit`Teddy Wing
Guard against accidentally submitting a stale unsaved code review.
2023-11-30prr-ui: Pick a random emoji to include in `PrrApprove`Teddy Wing
I collected a list of emoji from https://github.com/ikatyang/emoji-cheat-sheet and trimmed it down. Now, the pull request approval message will chose one of these emoji at random to include.
2023-11-30prr-ui: Educate quotes in prr buffersTeddy Wing
2023-11-30prr-ui: Move to top of file on `PrrApprove` and `PrrReject`Teddy Wing
This puts the cursor in the correct position to quickly add a top-level review comment.
2023-11-27prr-ui: Add `PrrApprove` and `PrrReject` commandsTeddy Wing
Add commands to quickly approve or reject a pull request.
2023-11-27Add 'vim-fugitive' pluginTeddy Wing
Adding the plugin for real. It's been indispensable for code review.
2023-11-27Add 'prr-ui' pluginTeddy Wing
Make a plugin to facilitate Prr code reviews from within Vim.
2023-11-06projects/aodocs.vim: Set 'path' on Smartbar projectTeddy Wing
Enable `gf`.
2023-11-06bundle/prr: Use stock diff highlightingTeddy Wing
Change the diff highlighting to use the groups in: PREFIX/share/vim/vim90/syntax/diff.vim This way, the diff colours look like normal diffs.
2023-11-06ftplugin/typescript.vim: Add 'prettier' formattingTeddy Wing
Set up formatting for the current buffer using 'prettier'.
2023-11-06Add 'prr' plugin @ 9b44c3f2d4b79013a00aae82cb59fe63306967caTeddy Wing
Provides syntax highlighting for Prr code review files. This code was copied from the 'prr' repository (https://github.com/danobi/prr/) at commit 9b44c3f2d4b79013a00aae82cb59fe63306967ca (https://github.com/danobi/prr/commit/9b44c3f2d4b79013a00aae82cb59fe63306967ca). The Vim plugin lives in a subdirectory of the 'prr' repository, which made it tricky to include as a submodule. I added GPLv2 license headers based on the license of the Prr project, however the Vim code seems to indicate it was based on Vim-licensed code, so I'm not clear on what the actual license is supposed to be. I'm assuming it's GPL.
2023-09-25vimrc: Only turn on 'smoothscroll' if it's availableTeddy Wing
Keep supporting older versions of Vim.
2023-09-25vimrc: Turn on 'smoothscroll'Teddy Wing
I learned about this recently. According to https://vi.stackexchange.com/questions/11315/visual-scrolling-visual-c-e-and-c-y-across-wrapped-lines/42278#42278 it was added in Vim 9.0.0640. This allows scrolling within a soft-wrapped line, useful for writing prose, and very useful for reading files consisting of a single line, like a big JSON file or minified HTML.
2023-08-09projects/aodocs.vim: Move 'wchat' plugin here and change file pathTeddy Wing
I only use this command in an AODocs context. Today, I decided to change the path where these temporary files are saved. Since the path now uses a project-specific path variable, it made sense to move the command into the project file.
2023-08-03ftplugin/python.vim: Use consistent debugger mappingsTeddy Wing
I added these mappings before I developed a set of consistent cross-language build, test, etc. mappings. Re-use the mappings I came up with for adding a debugger line in Ruby. These are much easier to type than the current Leader commands.
2023-07-18ftplugin/ocaml.vim: Add `dune promote` bindingTeddy Wing
2023-07-18ftplugin/ocaml.vim: Add test bindingTeddy Wing
2023-07-18ftplugin/ocaml.vim: Add build and run mappingsTeddy Wing
2023-07-18ftplugin/ocaml.vim: Add indentation settingsTeddy Wing
All the OCaml code I've read so far uses two-space indentation.
2023-06-14git-blamer: Restore &wrap setting on closeTeddy Wing
When the blame window is closed, ensure the wrap setting is restored. Not sure where `l:wrap` came from, maybe just an oversight on my part.
2023-04-25ftplugin/java.vim: Set TComment commentstring to '// %s'Teddy Wing
By default it's '/* %s */' which I don't like for line comments.
2023-03-19insert-layout: Don't load in Vim <9Teddy Wing
Since this plugin is written in Vim9script, it won't work in any earlier version. Add a guard to prevent the plugin from loading in earlier Vim versions.
2023-03-19insert-layout: Add comments for documentationTeddy Wing
2023-03-19insert-layout: Move functions to autoloadTeddy Wing
Clean up the plugin file and move the bulk of the work to autoload.
2023-03-19insert-layout: Remove old commented in-progress codeTeddy Wing
2023-03-19insert-layout: Error when 'xkbswitch' command not availableTeddy Wing
If the 'xkbswitch' command isn't available, we shouldn't be adding any autocmds.
2023-03-19insert-layout: Don't remove autocmds in `InsertLayoutOn`Teddy Wing
I assumed that I should be removing existing autocmds before adding new ones. If you ran the `:InsertLayout` command more than once, I didn't want old autocmds to stick around. The line was commented out because it fails on the first call to `:InsertLayout`, since at that point the `insert_layout` augroup doesn't exist. On closer inspection, however, it turns out that the old autocmds are not retained when running `:InsertLayout` subsequent times. Rather, the newly-defined ones are overwriting the old ones. So we don't need to worry about removing the old autocmds before adding new ones.
2023-03-19insert-layout: Add completion to `InsertLayout` commandTeddy Wing
This allows us to complete the command's keyboard layout identifier making it easier to select one.
2023-03-19insert-layout: Add commands to turn insert layout on and offTeddy Wing
Add two new commands, `InsertLayout` and `InsertLayoutOff`, which allow us to activate a different keyboard layout for insert mode and restore the previous layout when leaving insert wode. Works reasonably well, but needs a bit of cleaning up now.
2023-03-19Add 'insert-layout' plugin ideaTeddy Wing
This uses `xkbswitch` to change keyboard layouts on insert enter and leave. For now it's only a proof of concept. The plan is to make an `:InsertLayout` command that takes an argument defining the keyboard layout to use in insert mode. When returning to normal mode, it should switch back to the previous layout. This uses https://github.com/myshov/xkbswitch-macosx/.
2023-03-09Add 'vim-mutt-aliases' pluginTeddy Wing
Easily complete email addresses from the Mutt aliases file when composing an email message.
2022-11-09Add 'wchat' pluginTeddy Wing
Add a new `:WChat` command to quickly save temporary files based on a timestamp. I've been doing this manually to write chat messages but it occurred to me that it would be nice to save a bit of thought and effort for this.
2022-08-24vimrc: Turn off Vim-Go goimports on saveTeddy Wing
The new version of Vim-Go that I upgraded to added a new auto-format on save hook that runs goimports. Turn if off like we did with its automatic gofmt.
2022-08-20vimrc: Add `:Co` command, alias for `:Copy`Teddy Wing
I use this command frequently, and `:Copy` used to tab-complete first with `:Co<Tab>`, but since I installed the Context.vim plugin, the latter takes completion precedence. Add this alias to give `:Copy` the highest precedence.