Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
I needed to run `:GoInstallBinaries`, but this failed as I'm using Go
1.18, and the version of Vim-Go I was using installed binaries with
`go get` instead of the new `go install`. This was updated and fixed in
359230b942b3aba79d011aa446bfcf70c12bc217.
|
|
Shows code context including the enclosing function, class, namespace,
etc.
|
|
|
|
A new command that appends MacPorts checksums for a given file.
|
|
Make Common Lisp development more fluid.
|
|
|
|
Create a new 'godoc' filetype that highlights the same as 'go' except
without the character group. This makes Go docs produced by the `go doc`
command more readable.
|
|
I had a problem loading the SWANK server so I thought a plugin update
might fix it. Turns out it was an unrelated path override problem
causing an old Slime/Swank version to be loaded.
|
|
Adds new motion bindings.
|
|
Add a command to insert the current date after point. Saves me a bit of
typing, as well as effort remembering the current date.
|
|
I've been using this locally on one machine since I finished writing the
plugin, but apparently forgot to add it to my .vim.
|
|
Provides syntax highlighting for MacPorts Portfiles.
This code was copied from the 'macports-contrib' repository
(https://github.com/macports/macports-contrib) at commit
513c455d5a902fff2b38edf86abc15c36688bf85
(https://github.com/macports/macports-contrib/tree/513c455d5a902fff2b38edf86abc15c36688bf85).
The Vim plugin lives in a subdirectory of the 'macports-contrib'
repository, so I'd have to include a whole mess of files that don't
relate to Vim if I wanted to add the plugin as a submodule. I'd just as
soon not have to copy the files into my repository tree like this, but
it's better than adding a non-Vim submodule.
Assuming it's okay to add these files to my repository, as the port file
for this plugin describes it as being BSD licensed:
https://github.com/macports/macports-ports/blob/12d7b1597bef875058758c9c587b7593f39a5af1/editors/mpvim/Portfile
Unfortunately, there's no BSD license or copyright notice included in
the plugin code. But I'm going to assume I'm allowed to redistribute it.
|
|
Use Vlime instead of Slimv for a Common Lisp environment.
|
|
Haven't been using this plugin. Recently started a Common Lisp project,
but am going to use Vlime instead, which seems to integrate better with
user configuration.
|
|
Don't change the author for moved lines.
|
|
I was having trouble with slow `<C-p>` completion, and figured out it
was due to the fact that I had about 300 buffers open.
Many of these buffers weren't being actively used, and were just loaded
in from Vim sessions past. When I removed the unloaded buffers,
completion sped up like a whistle.
Thanks to 'sidyll' (https://stackoverflow.com/users/557306/sidyll) on
Stack Overflow for explaining how to get "all" buffer numbers (or at
least all possible buffer numbers up to the highest one open), as well
as the filtering logic:
https://stackoverflow.com/questions/17931507/vimscript-number-of-listed-buffers/17933352#17933352
I leveraged the above to get the buffer numbers of all unloaded buffers,
then delete the buffers by number.
It was originally a temporary command-mode line, but I decided it could
be beneficial to save the code just in case I need it again.
|
|
Adds operator-pending and visual mode mappings.
|
|
|
|
The JavaScript plugin I'm using does an okay job syntax highlighting
TypeScript, but some identifiers don't get highlighted.
Now that I'm doing a project in TypeScript, it's nice to have everything
highlighted correctly.
|
|
Makes it easier to reformat plain text tables.
|