aboutsummaryrefslogtreecommitdiffstats
path: root/bundle
AgeCommit message (Collapse)Author
2019-10-27git-shortcuts: Add commit movement omapsTeddy Wing
Omaps for `[[` and `]]` commit motion commands.
2019-10-27Add 'git-shortcuts' pluginTeddy Wing
An ftplugin that provides `[[` and `]]` mappings to move between commits in `git log` output.
2019-09-11github-url: Fix URL generation when `:pwd` is below repository rootTeddy Wing
If the `:pwd` was a subdirectory of the repository root, the path in the constructed GitHub URL would not include any subdirectories up to and including the current working directory. This created an incorrect path in the URL, resulting in a 404.
2019-06-08diff_corrections: Use better autocmdsTeddy Wing
Thanks to Christian Brabandt (https://vi.stackexchange.com/users/71/christian-brabandt) for describing better autocmds for detecting diff mode: https://vi.stackexchange.com/questions/12847/automatically-disable-cursorline-when-in-diff-mode/12852#12852 And for making the patch (https://github.com/vim/vim/commit/04f62f881c5743d2fdaf7324f6a715381f0d5fcf) that allows diff mode to be detected with the OptionSet event.
2019-06-05Add 'jira-text-formatting-notation-help' pluginTeddy Wing
Plugin that opens a window containing the text formatting guide for Jira. The guide is taken from: $ w3m -dump 'https://jira.atlassian.com/secure/WikiRendererHelpAction.jspa?section=all' Since I'm using the go-jira CLI, I need the reference for any special formatting I want to use. I figured it would help to have that information right next to my Vim buffer instead of having to switch to a browser and open the web page.
2019-06-03diff_corrections: Set 'wrap'Teddy Wing
Soft wrap in diffs. Recently encountered diffs with super long lines and thought it would be nice to be able to see everything on one page without having to scroll horizontally.
2019-06-03diff_corrections: Add `cx` mapping to close tabTeddy Wing
Add a mapping to quickly close a tab. Makes it easier to close files that I've finished reviewing. Thanks to user9433424 (https://vi.stackexchange.com/users/6960/user9433424) on the Vi Stack Exchange for the very detailed explanation of how to restore a mapping: https://vi.stackexchange.com/questions/7734/how-to-save-and-restore-a-mapping/7735#7735 Using user9433424's mapping restore code, and ignoring the case where a mapping is defined both globally and local to a buffer.
2019-06-03Add 'undotree' pluginTeddy Wing
2019-05-17diff-corrections: Don't load if the lambda feature isn't availableTeddy Wing
I wrote the `s:SaveCommentColor()` function using a lambda for `filter()`ing. However, not all Vims have `lambda` support. And it doesn't exist before Vim 7.4 I think. Use this guard to avoid causing errors on startup for those Vims without lambdas.
2019-05-17diff-corrections/plugin: Add load guardTeddy Wing
2019-05-17diff-corrections: Restore old 'cursorline' and Comment highlightTeddy Wing
When diff mode is deactivated, the old values for 'cursorline' and the Comment highlight colour should be restored. Thanks to Tony Mechelynck (http://vim.1045645.n5.nabble.com/template/NamlServlet.jtp?macro=user_nodes&user=28373) for the tip on how to save and restore highlight colours: > The following is untested. It requires Vim version 7. > > function SaveCursorColor() > redir => highlight > silent hi Cursor > redir END > if highlight =~ 'links to ' > let s:hl-link = matchstr(highlight, 'links to \zs\S*') > elseif highlight =~ '\<cleared\>' > let s:hl-link = 'NONE' > else > let s:hl-link = '' > for substr in ['term', 'cterm', 'ctermfg', 'ctermbg', > \ 'gui', 'guifg', 'guibg', 'guisp'] > if highlight =~ substr . '=' > let s:hl-{substr} = matchstr(highlight, > \ substr . '=\S*') > else > let s:hl-{substr} = '' > endif > endfor > endif > endfunction > function RestoreCursorColor() > if !exists('s:hl-link') > echoerr 'Cursor not saved, cannot restore' > return > endif > hi clear Cursor > if s:hl-link == '' > exe 'hi Cursor' s:hl-term s:hl-cterm s:hl-ctermfg > \ s:hl-ctermbg s:hl-gui s:hl-guifg s:hl-guibg > \ s:hl-guisp > elseif hl-link != 'NONE' > exe 'hi link Cursor' s:hl-link > endif > endfunction > > > Best regards, > Tony. http://vim.1045645.n5.nabble.com/How-to-save-restore-the-hightlight-for-cursor-td1182624.html
2019-05-17plugin/diff_corrections.vim: Increase 'tabpagemax' to 200Teddy Wing
The default is 10. Set it to a ridiculously large number so that we can open one tab per file during a code review.
2019-05-11diff-corrections: Move corrections to `autoload`Teddy Wing
Makes the code a little nicer and more extensible without the line continuations. Only change the highlight colour for the 'twilight256' colour scheme.
2019-05-10Add 'diff-corrections' to adjust settings during diff modeTeddy Wing
* Changes `Comment` colour for better readability on red backgrounds. * Turns of 'cursorline' so that diff background highlighting doesn't get shadowed.
2019-05-08Add 'vim-go' pluginTeddy Wing
Now that I'm going to be doing more Go development, switch to the full featured Vim Go plugin.
2019-05-08Disable 'vim-golang' pluginTeddy Wing
Switching to 'vim-go'.
2019-05-08Add 'vim-maildrop' pluginTeddy Wing
For Courier Maildrop `.mailfilter` syntax highlighting. Makes it a bit more pleasant to edit my new work email filters.
2018-12-13Update 'vim-grappele' to v0.1.0Teddy Wing
Includes visual and operator-pending mode mappings.
2018-12-13Add 'vim-fswitch' pluginTeddy Wing
Makes switching to alternate files much more efficient. Will be using this for Objective-C implementation and header files, but it could be useful in other contexts, even outside the C realm.
2018-12-13Add 'tabular' pluginTeddy Wing
2018-11-24Add 'vim-dome-key' pluginTeddy Wing
Syntax highlighting for DomeKey mapping files.
2018-04-19Update 'vim-tabs-grep' to v1.0.0Teddy Wing
The `:TabsGrep` command now takes a glob instead of a regex pattern.
2018-04-08Add 'vim-tabs-grep' pluginTeddy Wing
Provides a `:TabsGrep` command that enables `:tabs` output to be filtered, making it easier to find out which tab a file is on.
2018-04-06github-url: Copy the URL to the clipboard in addition to printing itTeddy Wing
Previously all we did was `echo` the generated URL to the command line. This was mainly for debugging purposes, but it strikes me that this would be nice to keep so that users can validate that the correct URL was generated. In addition to doing this, though, we need to provide an easy way to send that URL string into other programs like chat or an input field in a web browser. Copy the URL to the Mac OS X clipboard to make it easier to share.
2018-04-06github-url: Add `--no-patch` to `git show` commandTeddy Wing
If there's a diff in the index, that will get included in the output of this command, meaning that just after the SHA, there will be a multi-line diff string that completely messes up the constructed URL. Use the `--no-patch` flag to suppress diff output.
2018-04-06github-url: Move functions into `autoload`Teddy Wing
Improve performance by eliminating the functions from the `plugin` file. Also introduces a new `github_url#GitHubURL()` function that serves as an entry point into the plugin. Add a `g:loaded_github_url` check to prevent plugin re-sourcing and be a good Vim citizen.
2018-04-06github-url: Get rid of useless `echo`Teddy Wing
I used this for testing purposes but it's no longer relevant.
2018-04-06github-url: Document functionsTeddy Wing
Add doc comments to these functions.
2018-04-06github-url: Don't add ending line to URL if it wasn't part of the rangeTeddy Wing
If the command was executed as: :6GitHubFileURL we previously appended `#L6-L6` to the URL. This change appends only `#L6` in that case.
2018-04-06github-url: Add `<count>` to commandTeddy Wing
Using a `count` of 0 allows us to determine in `s:FileURL` whether a range was given on the command line. This count needs to be passed into the function explicitly with `<count>`.
2018-04-06Add 'github-url' pluginTeddy Wing
A rough working implementation of a plugin that generates a GitHub URL for the current file. It gets the base URL from the current Git repo's `origin` remote and uses the current commit SHA. Lines can also be highlighted by passing a range to the command. This makes it easier to share a bit of code that I see in the editor with other people on my team in chat or the issue tracker.
2018-03-28git-blamer: Run `git show` on <Enter>Teddy Wing
When the `<Enter>` key is pressed in the GitBlamer window, run `!git show` on the commit from the current cursor line of the blame. This allows a changed line to be inspected in the context of its original changeset. It also saves me time from my previous workflow: cpe^Zgit show <Apple-P><Enter>
2018-03-25git-blamer: Refocus original window when blamer buffer is closedTeddy Wing
Previously, when the GitBlamer window was closed, the window it was opened from would not be re-focused. Because of this, you couldn't just pick up where you left off, you had to run a window command first. This change re-focuses the original window automatically, bringing you right where you were before opening GitBlamer. Unfortunately, this seemingly simple want is not easy to do in VimL. There's a `WinLeave` autocmd, but that event gets executed _before_ leaving a window. Similarly, the `BufWinLeave` autocmd we already had gets executed before the buffer is removed from the window. Because these events happen before the window is left, running the `wincmd w` command doesn't work. We need a way to run the command after the window is closed, allowing us to work with the new window layout and window numbers. In order to run `wincmd w` at the proper time, we add a new autocmd upon closing the GitBlamer window that gets executed when any window is entered. That autocmd refocuses the correct window and removes itself, having served its purpose. I used a tab variable to store the window number because it was a way to allow multiple GitBlamer instances in different tabs. Otherwise, the autocmd would be attached to a window that isn't correct in other tabs. Also, augroups can't have dynamic names, so we can't create them programmatically, preventing us from having multiple autocmds with different window numbers for different tabs. The disadvantage of using a tab variable is that window focus restoration doesn't work when multiple GitBlamers are opened in a single tab.
2018-03-24git-blamer: Fix bug when `nowrap`Teddy Wing
If `nowrap` is set, the plugin causes an error because it tries to concatenate the `restore` variable which hasn't been defined. Define the variable outside the `if &l:wrap` condition to ensure it's available for concatenation.
2018-03-07git-blamer: Set `nowrap` on bufferTeddy Wing
In order to get the cursor lines to correctly match up horizontally in all cases, set 'nowrap' on the buffer. To set 'wrap' back, follow fugitive.vim's example: https://github.com/tpope/vim-fugitive/blob/f3ccb0c12ee4985b8808f83059830a24cc92821c/plugin/fugitive.vim#L2038-L2040
2018-03-07git-blamer: Add `q` mapping to quit windowTeddy Wing
Makes it just a bit easier to close the GitBlamer window. Since we shouldn't need macros in this panel it should be fine.
2018-03-07git-blamer: Use `syncbind` to aid horizontal line alignmentTeddy Wing
Adding `syncbind` appears to fix the bug where in certain cases the GitBlamer cursor line and the buffer cursor line weren't horizontally aligned.
2018-03-07git-blamer: Use `cursor()` instead of `setpos()`Teddy Wing
Use the `cursor()` function to set the position of the cursor. This call is simpler than `setpos()`, and more descriptive than `execute l:top_line` (that was inspired by fugitive.vim, https://github.com/tpope/vim-fugitive/blob/f3ccb0c12ee4985b8808f83059830a24cc92821c/plugin/fugitive.vim#L2048-L2064)
2018-03-07git-blamer: Align cursor lines of buffer and GitBlamer windowTeddy Wing
Take the mechanism that Fugitive.vim uses: https://github.com/tpope/vim-fugitive/blob/f3ccb0c12ee4985b8808f83059830a24cc92821c/plugin/fugitive.vim#L2048-L2064 This positions the cursor lines on the same horizontal line so that blame information can be read on the same line as the code it corresponds to. Not sure, but it doesn't seem to work exactly right on one of my machines, but did appear to work correctly on another. Could just be the fault of 'wrap' though.
2018-03-07git-blamer: Remove terminating whitespaceTeddy Wing
I don't really like these any more.
2018-03-07git-blamer: Fix bug causing `cursorbind` to be set on other windowsTeddy Wing
In some instances with more than one window open, closing the GitBlamer window would cause other windows in the tab to have `cursorbind` (and presumably `scrollbind`) set. Fix the bug by setting `scrollbind` and `cursorbind` on the buffer (these are window-local variables, we'll have to find out if it's weird to set them on a buffer), and store the "restore" command in a buffer-local variable (local to the GitBlamer window).
2018-03-05Add 'vim-rails-locale-alternate' pluginTeddy Wing
Facilitates opening Rails locale files in alternate languages.
2018-02-06Create 'vim-latearliest' pluginTeddy Wing
Adds two new commands that allow you to move to the beginning and end of undo history.
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-07-09Update 'vim-grappele' to v0.0.4Teddy Wing
Doesn't clobber saved location when using `G` without a count.
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-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