aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-05-17ftplugin/go.vim: Add mapping to `:GoTestCompile`Teddy Wing
Make it faster to compile tests without running them.
2019-05-17ftplugin/go.vim: Make `go run` mapping run root main packageTeddy Wing
The `Plug` mapping wasn't finding my `main` package from a sub-package. Change it to force running for the main package in the `pwd` directory.
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-10Set `GoGuruScope` in AODocs UFO projectTeddy Wing
To enable `:GoCallers` by telling it to search in the root package.
2019-05-10ftplugin/go.vim: Add a few mappings to Vim-GoTeddy Wing
Mappings to build projects and run tests.
2019-05-10vimrc: Include hidden files in the Pick listTeddy Wing
So that hidden project files can be opened quickly like the rest.
2019-05-10vimrc: Use long CLI options to `ag` in `g:pick_command`Teddy Wing
For better documentation.
2019-05-08vimrc: Add next/previous shortcuts for the location listTeddy Wing
The Vim-Go plugin uses the location list for certain operations. Add these shortcuts to make it quicker to navigate.
2019-05-08vimrc: Add basic 'vim-go' settingsTeddy Wing
'vim-go' displays this error message when running older versions of Vim: vim-go requires Vim 7.4.2009 or Neovim 0.3.1, but you're using an older version. Please update your Vim for the best vim-go experience. If you really want to continue you can set this to make the error go away: let g:go_version_warning = 0 Note that some features may error out or behave incorrectly. Please do not report bugs unless you're using Vim 7.4.2009 or newer or Neovim 0.3.1.O If I'm running a version of Vim that would cause the error message to display, I'm probably not editing Go code, so it doesn't matter. In this case, the error message just interferes with normal operations. Use `goimports` instead of `go fmt` for on-save formatting.
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.
2019-05-04vimrc: Have Gundo use Python 3 when Vim is compiled with `+python3`Teddy Wing
After recently installing my vimrc on a newer machine and trying Gundo, I ended up with this error message: Gundo requires Vim to be compiled with Python 2.4+ Fortunately, it also supports Python 3 via a flag. Thanks to Carl Patenaude Poulin (https://bitbucket.org/cpoulin) for this solution: https://bitbucket.org/sjl/gundo.vim/issues/42/about-python3-support#comment-32289592
2019-05-04vimrc: Use `.agignore` in Pick commandTeddy Wing
2019-05-04Add ftdetect/typescript.vimTeddy Wing
Trying out Typescript in a project. Instead of getting a Typescript Vim plugin, just use the Javascript syntax highlighter for simplicity.
2018-12-13Update 'vim-grappele' to v0.1.0Teddy Wing
Includes visual and operator-pending mode mappings.
2018-12-13ftplugin/objc.vim: Switch alternates on <C-^>Teddy Wing
Use FSwitch to swap .h and .m files in the current window when `<C-^>` is pressed.
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-24ftplugin/todo.vim: Don't change highlighting of non-todo filesTeddy Wing
Previously, the custom highlighting I had added for TODO files would infect the highlighting of all other files in the same Vim session. Only change the highlighting of the `todoUndone` group so that it doesn't affect anything else.
2018-11-24Add ftplugin/dome_key.vimTeddy Wing
Use the plugin's ftplugin. This gives us the proper comment string.
2018-11-24Add 'vim-dome-key' pluginTeddy Wing
Syntax highlighting for DomeKey mapping files.
2018-11-24Add ftplugin/make.vimTeddy Wing
Set the correct comment string for make.
2018-11-24Add ftplugin/objc{,pp}.vimTeddy Wing
Filetype plugins for Objective-C. Turns out editing ObjC in Vim is somewhat surprisingly whoppingly better than Xcode. This gets indentation set to 4-space tabs and sets the comment correct prefix (Tcomment forces /* ... */). Include `objcpp` also because ObjC header files get recognised by Vim as ObjC++.
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-04-06vimrc: Add `z<C-]>` mappingTeddy Wing
For jumping to a tag, `<C-]>` is great, but I usually like to have the current buffer stay open and look at the tag source in a different window. This new mapping gives me a quick way to do that.
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-19projects/af83.vim: Add `NO_RCOV=1` to `g:rspec_command`Teddy Wing
Speed up tests by disabling the test coverage report generator using the STIF project's custom environment variable flag.
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.