summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Greg Hurrell [Sat, 12 Jun 2021 17:17:43 +0000 (19:17 +0200)]
chore: move "master" → "main"
Greg Hurrell [Fri, 12 Jun 2020 16:05:24 +0000 (18:05 +0200)]
chore: prepare v1.1. release
Greg Hurrell [Fri, 12 Jun 2020 15:56:16 +0000 (17:56 +0200)]
chore: ignore "media" worktree
To facilitate use of:
git worktree add media origin/media
or similar.
Greg Hurrell [Fri, 12 Jun 2020 15:55:52 +0000 (17:55 +0200)]
docs: add demo gif to README
Greg Hurrell [Fri, 12 Jun 2020 15:42:07 +0000 (17:42 +0200)]
docs: restore header image
Accidentally blown away in
4283529e4274b42f8831ee2895469b5d53ec6153.
Previously, I had injected it by hand, but now, docvim has support for
an `@image` tag, so this is the right way to do it.
Greg Hurrell [Fri, 12 Jun 2020 15:37:33 +0000 (17:37 +0200)]
Merge branch 'pull/11'
Closes: https://github.com/wincent/scalpel/pull/11
* pull/11:
doc: update AUTHORS and HISTORY sections
refactor: replace hard-coded "$" with "very magic" list
Escape '$' when launching Scalpel
Greg Hurrell [Fri, 12 Jun 2020 15:35:20 +0000 (17:35 +0200)]
doc: update AUTHORS and HISTORY sections
Greg Hurrell [Fri, 12 Jun 2020 15:22:06 +0000 (17:22 +0200)]
refactor: replace hard-coded "$" with "very magic" list
As the PR duly notes, it's hard to imagine an obvious use case where
some "special" character other than "$" is part of a Vim "word", but if
we're going to do this, we might as well work for all possible
definitions of `'iskeyword'`.
I was originally thinking we should do this based on what is in
`'iskeyword'`, but we can just do a blanket rule and escape literally
everything that might have "very magic" significance. Note that in
preparing the list of characters to be escaped, we have to double escape
the following to produce a valid `:execute` string:
- '"' because the list itself is double-quoted.
- '\' because it is in the list and we need to preserve it.
- '|' because otherwise it will terminate the command.
Test plan:
Set a bizarre `'iskeyword'` like:
:set iskeyword=@,34,39,41,47-57,92,_,124,192-255
ie. in additional to the typical 48-57,192-255 range, also add:
34 = "
39 = '
41 = )
47 = /
92 = \
124 = |
and then hit the mapping with the cursor over a "word" like this one:
'"/\|')
(That example chosen simply because it appears in the source.)
Keng Kiat Lim [Wed, 10 Jun 2020 02:09:45 +0000 (19:09 -0700)]
Escape '$' when launching Scalpel
Greg Hurrell [Wed, 6 Mar 2019 11:33:57 +0000 (12:33 +0100)]
Prepare for v1.0.1 release
Greg Hurrell [Mon, 18 Feb 2019 23:58:49 +0000 (00:58 +0100)]
Prefer execute() when available to avoid potential nested :redir issues
Greg Hurrell [Thu, 3 Jan 2019 02:26:41 +0000 (03:26 +0100)]
Fix clowniness of commit
c00f46b
Need to keep the "g" flag in the same place as before. Perhaps I
shouldn't be doing this so late:
commit
c00f46bd2c556b348ae2a256ef003c219574def0
Author: Greg Hurrell <greg@hurrell.net>
Date: Thu Jan 3 02:14:46 2019 +0100
Greg Hurrell [Thu, 3 Jan 2019 01:44:48 +0000 (02:44 +0100)]
doc: prepare for 1.0 release
- Add links to screencasts.
- Add FAQ explaining why you'd want to use Scalpel.
- Update HISTORY.
Greg Hurrell [Thu, 3 Jan 2019 01:14:46 +0000 (02:14 +0100)]
Take into account 'gdefault' setting
If the user has 'gdefault' set (not the default), then the "g" flag
actually turns *off* global replacement instead of turning it on. So,
check for 'gdefault' in order to decide whether or not to pass the "g"
(we always want to do global replacements).
Reported here:
https://twitter.com/briemens/status/
1080554857998757888
My guess at problem here:
https://twitter.com/wincent/status/
1080616775681798144
Confirmed that it was here:
https://twitter.com/briemens/status/
1080618527218978816
Greg Hurrell [Sun, 29 Jul 2018 06:07:04 +0000 (23:07 -0700)]
Prepare for 0.5 release
Greg Hurrell [Sun, 29 Jul 2018 06:03:34 +0000 (23:03 -0700)]
Fix VISUAL mode in older Vim
Looks like the tokenizer in older Vim such as 7.4.629 barfs on list
sublist syntax involving variables with the `l:` qualifier. Provide it
some parens to help it avoid getting confused.
Closes: https://github.com/wincent/scalpel/issues/8
Greg Hurrell [Tue, 24 Jul 2018 06:42:35 +0000 (23:42 -0700)]
doc: prepare for 0.4 release
Greg Hurrell [Tue, 24 Jul 2018 06:31:02 +0000 (23:31 -0700)]
Fix problem with replacement sequences containing the number "1"
`\1` in a `[]` collection was equivalent to literal "1" instead of the
intended back-reference to the delimiter. This meant that `[^\1]` was
equivalent to `[^1]`, and when embedded in the larger expression meant
that a pattern like `/a2/a1/` was failing to match.
Closes: https://github.com/wincent/scalpel/issues/7
Greg Hurrell [Thu, 10 May 2018 15:07:05 +0000 (08:07 -0700)]
Prep for 0.3 release
Greg Hurrell [Wed, 9 May 2018 15:04:15 +0000 (08:04 -0700)]
Use getpos('.') instead of getcurpos() on old Vim
`getcurpos()` came in somewhere in the Vim 7.4 series.
Greg Hurrell [Thu, 7 Sep 2017 16:49:15 +0000 (09:49 -0700)]
Allow other pattern delimiters
Closes: https://github.com/wincent/scalpel/issues/5
Greg Hurrell [Wed, 12 Oct 2016 01:07:19 +0000 (18:07 -0700)]
Add empty .watchmanconfig
Allows a Watchman instance configured with `enforce_root_files` to watch
this directory even if `root_files` does not contain any of the files in
the directory. (Necessary to get around undesired corporate
`/etc/watchman.json` config.)
Greg Hurrell [Mon, 13 Jun 2016 15:36:09 +0000 (08:36 -0700)]
Prepare for 0.2 release
Greg Hurrell [Mon, 13 Jun 2016 13:53:18 +0000 (06:53 -0700)]
Suppress "N substitutions on N lines" messages
Cool. I really wanted to be able to do this, and I just found `'report'` in the
Vim help.
Greg Hurrell [Sun, 12 Jun 2016 06:54:38 +0000 (23:54 -0700)]
Freshen documentation
With the latest master branch of docvim.
Greg Hurrell [Thu, 9 Jun 2016 14:39:13 +0000 (07:39 -0700)]
doc: note how to generate docs for release
Greg Hurrell [Thu, 9 Jun 2016 14:35:40 +0000 (07:35 -0700)]
Add Vim help documentation generated by docvim
Greg Hurrell [Thu, 2 Jun 2016 06:46:29 +0000 (23:46 -0700)]
Add logo to README
Greg Hurrell [Thu, 2 Jun 2016 06:42:27 +0000 (23:42 -0700)]
Fix some wrapping
Greg Hurrell [Mon, 30 May 2016 07:38:58 +0000 (00:38 -0700)]
doc: Fix a typo in the README
Greg Hurrell [Mon, 30 May 2016 07:35:55 +0000 (00:35 -0700)]
Replace README with docvim-generated version
Greg Hurrell [Thu, 26 May 2016 15:53:25 +0000 (08:53 -0700)]
Update docs with info about visual mode operation
Greg Hurrell [Thu, 26 May 2016 15:49:58 +0000 (08:49 -0700)]
Be a good autocmd citizen
Greg Hurrell [Thu, 26 May 2016 15:46:27 +0000 (08:46 -0700)]
Hack around <cword> issue using CursorMoved autocmd
I'd rather not run code on every single cursor move event, but there is no other
way, and this is not much code.
Greg Hurrell [Thu, 26 May 2016 15:20:48 +0000 (08:20 -0700)]
Attempt fix for <cword> not being useful in VISUAL mode
Don't get too excited, as this doesn't actually work. I thought it would, but
`getcurpos` is always returning top/left in multi-line visual mode. Showing my
work here anyway. May have to revert it.
- VISUAL: works
- VISUAL BLOCK:
- works if block spans only single line
- returns top/left word otherwise
- VISUAL LINE: always returns top/left word, even when block spans only single
line
In short, I think this behaves exactly like `<cword>` and with exactly the same
limitations.
Greg Hurrell [Thu, 26 May 2016 14:08:30 +0000 (07:08 -0700)]
Work in VISUAL mode
This mostly works pretty well. One gotcha is that `<cword>` expands to the first
word of the selection in VISUAL mode, not the word under the cursor. I think
this is technically because VIM actually does move the cursor to the top before
calling any function.
There may be a workaround, but it will be pretty involved, so I will save it for
another commit (IFF I can get it working).
Greg Hurrell [Fri, 29 Apr 2016 15:31:51 +0000 (08:31 -0700)]
Ignore release archives
Greg Hurrell [Fri, 29 Apr 2016 15:19:18 +0000 (08:19 -0700)]
Add README
Greg Hurrell [Fri, 29 Apr 2016 15:19:06 +0000 (08:19 -0700)]
Rename ScalpelSubstitute to Scalpel
Greg Hurrell [Fri, 29 Apr 2016 14:54:27 +0000 (07:54 -0700)]
Denest
Greg Hurrell [Fri, 29 Apr 2016 14:45:22 +0000 (07:45 -0700)]
Rename :Substitute to :Scalpel
Makes more sense, and is very unlikely to ever clash with another plug-in.
Greg Hurrell [Fri, 29 Apr 2016 14:45:06 +0000 (07:45 -0700)]
Add validation of command name
Greg Hurrell [Fri, 29 Apr 2016 14:37:29 +0000 (07:37 -0700)]
Add basic configuration
No sanity checking yet, so people can do crazy shit if they want.
Greg Hurrell [Fri, 29 Apr 2016 14:18:29 +0000 (07:18 -0700)]
Add standard plug-in boilerplate
Greg Hurrell [Fri, 29 Apr 2016 14:17:39 +0000 (07:17 -0700)]
Add LICENSE.md
Greg Hurrell [Fri, 29 Apr 2016 14:16:29 +0000 (07:16 -0700)]
Add license headers
Greg Hurrell [Fri, 29 Apr 2016 14:11:40 +0000 (07:11 -0700)]
Carry "a" flag around when looping back to top of buffer
In an utterly bizarre VimL gotcha, the `&` last flags argument has to go away at
the end because otherwise Vim will use the flags from inside the `if l:last ==#
'a'` loop body, even if the body wasn't evaluated. This is presumably because it
really is evaluated (everything is "eval"), except without side-effects, other
than clobbering the last-flags state, that is.
Amazing.
Greg Hurrell [Fri, 29 Apr 2016 13:59:30 +0000 (06:59 -0700)]
Drop empty trailing comment
Greg Hurrell [Fri, 29 Apr 2016 13:47:20 +0000 (06:47 -0700)]
Rename autoloaded functions to match directory structure
Greg Hurrell [Fri, 29 Apr 2016 13:44:06 +0000 (06:44 -0700)]
Import base from dotfiles
https://github.com/wincent/wincent/commit/
4dda6f258834a9
Greg Hurrell [Fri, 29 Apr 2016 01:50:25 +0000 (18:50 -0700)]
Initial commit