| Age | Commit message (Collapse) | Author |
|
Like `<C-w>n` except that instead of opening a new buffer in a
horizontal split, it opens a vertical one. This can be preferred
depending on the existing window layout.
|
|
Allow us to repeat system pasting using `.`.
|
|
I was having trouble with completion and I have a feeling that this
setting is confusing things.
|
|
Allow repeating the ArgWrap mapping via 'repeat.vim' to make it even
easier to use.
|
|
Alias `T` to `TComment` instead of using a cabbrev.
The abbreviation would mess up commands with "t" in them, like turning
`tjump` into `TCommentjump`.
Replace the abbreviation with a new `T` command that acts as an alias
for `TComment`. I didn't include argument completion because I don't use
that. Otherwise, replicate the `TComment` command's definition and pass
all parameters to it. This gives us a short alias for commenting, and
`T` is the first completion with `:t<Tab>`.
|
|
I've been using my `TBuffer` command recently, but don't like how I have
to type out parts of the file name interspersed with "*"s, and press
`<Tab>` to ensure I'm getting the right file in case there are multiple
matches.
Make it easier to use `TBuffer` by allowing fuzzy finding with Pick.
This allows us to filter the list of buffers, choosing one to pass to
`TBuffer`.
Used the buffer list because the function is readily available, and
because there's no easy way to get a list of all buffer names in all
tabs. I'd probably have to map over `gettabinfo()`, and get the buffer
name for each window. Or manually filter the `:tabs` output.
Chose `db` because `dt` is taken for opening a file in a new tab, and
the word "tab" ends in "b". Now that I think about it, though, this
command deals with buffers, so it probably makes more sense to put it
under the "b" namespace.
|
|
Since this removes the path and extension, it makes it easier to use
than `<C-r>%` when I want to insert a title or symbol based on the
file's name.
|
|
By default, vim-go sets the quickfix window's height to be the number of
quickfix items. This is problematic when, for example, there's a single
error item, and the quickfix window opens below a narrow window (for
example, in one of three vertical splits). In that case, the error gets
line wrapped, and quickfix window is only one line tall, meaning I can't
read the full error.
Set the window height to Vim's default of 10 lines. Vim-go will collapse
the height to 10 lines if the variable is set to a number greater than
10, and 5 lines was too short in practise.
|
|
Allow these next/previous mappings for the quickfix and location list to
take counts.
|
|
|
|
Analogue to `<leader>cf`, which copies the relative path.
|
|
Got to be too annoying.
|
|
Since I turned `gopls` off, vim-go complains when I try to use a "go to
definition" mapping. Turn off vim-go's overrides so I can use ctags,
which is much faster than any of the Go tools.
|
|
The `gopls` tool is super slow and eats up way too many computing
resources.
|
|
Enable project search within Vim using Ripgrep.
|
|
We already have an n_<leader>w mapping. This new one gives us the
ability to refine the search term to include more than a single word.
now we can include multiple words and punctuation in searches.
|
|
After reading Drew Neil's Follow My Leader again
(http://vimcasts.org/blog/2014/02/follow-my-leader/), I discovered this
issue in which Tim Pope suggests mappings for the SplitJoin plugin:
https://github.com/AndrewRadev/splitjoin.vim/issues/14#issuecomment-9666431
This inspired my to add a mapping for `ArgWrap`. I decided not to before
because `:ar<Tab><Enter>` seemed like it wasn't much effort to type.
But, why not make this a touch quicker?
At first I considered `cJ`, which is available:
nnoremap cJ :ArgWrap<cr>
However, in the aforementioned issue, Pope suggests `gS` as being a free
lhs sequence, which seems nicer.
|
|
The Vim I'm using on Windows has `+python/dyn` and `+python3/dyn` (no
`+python3`), but it doesn't seem like it has a Python interpreter that
Vim can find. Use Undotree instead of Gundo there since it doesn't
require Python.
|
|
Since I allowed hidden files, I get everything in `.git` included in the
Pick list. Filter out these files to make the list a bit less
overwhelming.
|
|
Over the years and as I've been using Vim, I've gradually stopped liking
this style, and now prefer blank lines without whitespace.
Rather than continuing to override the default for different filetypes,
it feels like it's time to change the default.
|
|
Counteract CVE-2019-12735, arbitrary code execution in Vim/Neovim from
modelines:
https://github.com/numirias/security/blob/master/doc/2019-06-04_ace-vim-neovim.md
Sad to disable something that I use on occasion, but it should be done.
|
|
Since I'm not writing Ruby regularly right now, move these mappings to
the Ruby ftplugin so I don't accidentally try to run a spec in another
language where it makes no sense.
|
|
Match Gundo's behaviour.
|
|
I got this error today when opening Gundo:
"__Gundo__" [New File]
Error detected while processing function gundo#GundoToggle[1]..<SNR>102_GundoToggle[6]..<SNR>102_GundoOpen[31]..<SNR>102_GundoRenderPreview:
line 2:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "HOME/.vim/bundle/gundo/autoload/gundo.py", line 474, in GundoRenderPreview
_output_preview_text(_generate_preview_diff(current, node_before, node_after))
File "HOME/.vim/bundle/gundo/autoload/gundo.py", line 382, in _generate_preview_diff
before_time, after_time))
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/difflib.py", line 1177, in unified_diff
_check_types(a, b, fromfile, tofile, fromfiledate, tofiledate, lineterm)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/difflib.py", line 1312, in _check_types
raise TypeError('all arguments must be str, not: %r' % (arg,))
TypeError: all arguments must be str, not: 74
Didn't really want to bother investigating, so I tried Undotree and it
worked. Since I have different Vims on different machines, keep Gundo as
before, but use Undotree instead when compiled with +python3.
|
|
On a couple of occasions I've thought it would be useful to have this,
so let's activate it.
|
|
Add a mapping to close tabs with multiple windows more quickly.
|
|
So that hidden project files can be opened quickly like the rest.
|
|
For better documentation.
|
|
The Vim-Go plugin uses the location list for certain operations. Add
these shortcuts to make it quicker to navigate.
|
|
'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.
|
|
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
|
|
|
|
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.
|
|
Searches the `<cword>` with Ripgrep for more streamlined project
searching.
|
|
Toggling spell checking should not happen for the entire Vim session,
only for the current buffer. We don't want to be editing regular text
and then switch into a code file and find spell checking turned on.
|
|
One frustration that happens every so often is having to manually type
`:set spe<Tab><CR>` or `:set nosp<Tab><CR>` to turn spell checking on
and off. It's not often that I need to toggle spell checking, but when I
do, I notice it as being bothersome. I think it's finally time to add a
mapping for this.
|
|
When any of my RSpec commands are used, log a message to a file that
says which one was just used.
These statistics will be used for an experiment, gathering frequency
data over time. That data will then be used to determine how often the
lowercase variants are used, and how often the uppercase variants are
used. If uppercase occurs more often than lowercase, the commands should
be swapped, because lowercase takes less time to type.
|
|
Like our unicode "hole" mapping to run the whole spec file, use "flag in
hole" (U+26F3) to run the nearest spec test. This corresponds to
Shift-extra ISO key on my keyboard.
|
|
I'm now doing some work on a machine with an ISO keyboard layout, which
gives me one extra key compared to my normal ANSI layout (really cool!).
To take full advantage of this, I created a custom software keyboard
layout that changes the extra key next to the left "Shift" key to a
unicode U+1F573 "hole" character. Since I'm not actually going to be
typing that character, it gives me an easy hook for remapping. This new
mapping allows me to run a spec file with a single key press.
|
|
I had previously defined this command as 'af83'-project-specific. Now
I've become used to it and want to use it everywhere, so promote it to a
global mapping.
|
|
I installed my Vim config on another machine recently and noticed that
it didn't automatically set 'bs=2', like in my normal environment. Put
this in our vimrc because it should just work everywhere.
|
|
Thanks to "aegray" for asking how to jump to a specific window using
automatic numbers instead of using `<C-w>hjklw` on Freenode#vim. This
prompted me to look up `:h winnr()`, which I remember from a long time
ago, and learn that you can use the window numbers with `<C-w>w`, as in
`3<C-w>w`.
This will make it much easier to move around between my sometimes many
windows. In order to be able to tell which window has which number, add
the `winnr()` to the statusline.
|
|
Tested this out for a while without committing it and it turns out I
actually started using this mapping frequently enough, so I'm saving it.
The real impetus for this is that I recently (in the last couple months)
set:
$ git config commit.verbose 1
to get a diff of changes to be committed in my Vim commit buffer. This
is really handy. Often I end up opening Vim windows to see the rest of
the diff while still having my commit message open and visible. Thus my
normal workflow of writing a commit message and committing with ZZ no
longer works in these cases where there are multiple windows open. To
more quickly save the commit message and quit all windows, this command
comes in really handy.
|
|
A mapping to invoke our new 'whitespace-method-chain' plugin.
|
|
Get rid of this freaking good-for-nothing command that keeps g'all dang
messing me the frak up and closing my windows!
|
|
When hitting <C-w> to initiate a window command, I kept accidentally
hitting <C-w>q and quitting the window I was in. This was extremely
aggravating, because (1) it would be surprising and confusing for a
couple seconds, and (2) I'd have to stop what I was doing and get my
workspace back to what it was before.
I was accidentally hitting it because the 'w' and 'q' keys are so close
together.
The only difference I can see between <C-w>q and <C-w>c is that the 'q'
version will quit Vim if the current window is the last one. I don't see
myself needing that functionality with 'ZQ' readily available. Since
closing a window is a destructive operation, I prefer it being farther
away on the keyboard (even though 'c' is right next to 'v' and that
confusion has messed me up sometimes).
All that said, get rid of this command that has a more useful
equivalent, that I don't see myself using, and that has messed me up at
least three times already.
|
|
Using `<leader>z` works well, but now I want to be able to run a single
test so I can iterate while writing it.
|
|
Typing <leader>tf was too many keys. I wanted to shorten the command a
bit to make running tests really quick.
|
|
Leverage 'vim-rspec' to make it easy for us to run the current spec
file.
|
|
I never use this command, so I don't really see a need to keep it in my
vimrc. Removing it along with the "Commands" section marker (since that
was our only command defined here).
|