| Age | Commit message (Collapse) | Author |
|
|
|
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).
|
|
* Set a Lisp implementation (SBCL)
* Define the SWANK command (copied from Slimv's documentation). The docs
provide three different command options, one that creates a new OS X
Terminal window using `osascript` (which I didn't really like as it's
intrusive), and the other two using `screen` and `tmux`. Opted for the
`screen` version.
|
|
Since our `<leader>sb` mapping is a toggle command for `scrollbind`,
it can be hard to know whether it's on or off after invoking it if you
haven't been paying attention. Output `setl scrollbind?` after
performing the toggle so that the current `scrollbind` value displays in
the command line area to make it clear what happened.
|
|
This is to make it easier to preview HTML files in a browser. Otherwise
I would either open the file in Finder with `<leader>of` and drag it to
a browser in my Dock or open a new terminal, `cd` into the right
directory, start a Python `SimpleHTTPServer`, and finally navigate to
`localhost:8000/___` in a browser. This makes doing the first option
quick and easy.
Since we're opening the file directly, this will use the `file://`
protocol, but that's enough to be able to take a look at small pages.
|
|
Copy the current file's path with `pbcopy` to make it faster to perform
operations on the current file in another shell window.
|
|
Setting this is no longer necessary to make Auditory sounds turn off by
default because they now start off as of version 0.1.0 (we're now at
0.1.2 – 8d14cf29ab0f9200a23362980f94bfa232810c4c).
|
|
Use `git log -p -- [file]` instead of the version without hyphens to
explicitly tell `git log` that we want the log of a file.
|
|
Open the current file's `git log -p [file]` with a quick mapping so I
don't have to switch to another terminal or Ctrl-Z and type in the git
command manually. This is something that I do quite often so it felt
ripe for a mapping to make it quicker.
|
|
* Remove project files from the ignore list
* Add project config files as they are now
* Create a new untracked file to keep track of project directory paths
The reason why I never tracked project files in the repo was because I
didn't want my file paths to be shared publicly. But over time I've been
making changes to my `flashnotes.vim` config and wanted to be able to
track those changes, especially the `ctags` ones.
Now, I'm able to track those config files and still hide my file paths
from public view using a set of environment variables defined in
`.vim/projects/file-paths.vim`.
|
|
"changes" instead of "changed"
|