Age | Commit message (Collapse) | Author |
|
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.
|
|
Mapping to make it easier to insert a pre-defined signature in emails.
|
|
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`.
|
|
This variable isn't necessary. The same effect can be accomplished with
the try-catch.
|
|
Ensure that diff corrections are applied in a `vimdiff` context, where
we haven't run `:diffthis` manually.
|
|
Change the diff background colours from their defaults to make the text
in the foreground easier to read.
|
|
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.
|
|
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.
|
|
Add a new mapping to quickly comment on a line.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
Guard against accidentally submitting a stale unsaved code review.
|
|
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.
|
|
|
|
This puts the cursor in the correct position to quickly add a top-level
review comment.
|
|
Add commands to quickly approve or reject a pull request.
|
|
Adding the plugin for real. It's been indispensable for code review.
|
|
Make a plugin to facilitate Prr code reviews from within Vim.
|
|
Enable `gf`.
|
|
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.
|
|
Set up formatting for the current buffer using 'prettier'.
|
|
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.
|
|
Keep supporting older versions of Vim.
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
All the OCaml code I've read so far uses two-space indentation.
|
|
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.
|
|
By default it's '/* %s */' which I don't like for line comments.
|
|
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.
|
|
|
|
Clean up the plugin file and move the bulk of the work to autoload.
|
|
|
|
If the 'xkbswitch' command isn't available, we shouldn't be adding any
autocmds.
|
|
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.
|
|
This allows us to complete the command's keyboard layout identifier
making it easier to select one.
|
|
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.
|
|
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/.
|
|
Easily complete email addresses from the Mutt aliases file when
composing an email message.
|
|
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.
|
|
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.
|
|
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.
|