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.
|
|
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.
|
|
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.
|
|
I've been testing this binding as a candidate for a potential
replacement of my existing `<leader>mk` mapping. It's easier on the
hands than the existing one.
Since `,` doesn't seem to be a valid mark location, and it's right next
to the "m" key on a Qwerty keyboard, this seemed like an ideal
combination of keys for a relatively frequent action.
|
|
Enable it by default in AODocs paths.
|
|
Makes it easier to search and replace with `n` and visual selection.
Though perhaps `gn` would solve this? Though not in cases where I need
to replace something that's different from the search pattern.
|
|
I removed the Slimv plugin in b0f617dcc33b2207dfb87b899a655f62ecad53ca.
We no longer need these settings.
|
|
Paredit turns filetype indent on globally, messing up all files, not
just Lisp files. Prevent Paredit from changing these settings.
I don't think we really need Paredit's filetype indent as that's already
handled by Vlime.
|
|
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.
|