Austin W Smith
db65482581
Fix pasting read-only registers (:, %, and .) ( #239 )
...
The bug/error was from attempting to use setreg() on a read-only
register. The fix is to use the unnamed (") register as a placeholder
when a read-only register is detected, and then restore the unnamed
register afterwards.
2025-08-16 12:51:54 -04:00
Ryutaro Yamada
6d44a6dc2e
Fix [f and ]f behavior in directory containing [, $
...
Without this, glob() fails to list files and [f/]f works incorrectly
when a path contains a special character such as "[".
Resolves: https://github.com/tpope/vim-unimpaired/pull/232
2022-11-20 20:08:23 -05:00
Tim Pope
efdc6475f7
unimpaired.vim 2.1
...
* Provide <Plug> maps for all built-ins.
* Never override user maps with Unimpaired maps.
* Call :colder/:cnewer when invoking [f/]f in quickfix window.
* Provide 'colorcolumn' option maps on [ot/]ot/yot.
* Support [n/]n in visual mode.
* Handle count on [A/]A/[B/]B.
* Make URL encoding Unicode safe.
* XML encode ' (apostrophe) as '.
v2.1
2022-05-26 14:31:47 -04:00
Tim Pope
98427183e2
Restore zv after [Q/]Q/[L/]L
2022-04-29 01:34:46 -04:00
Tim Pope
f9b7c0704b
Handle count on [A/]A/[B/]B
...
Resolves: https://github.com/tpope/vim-unimpaired/issues/69
2022-04-29 01:10:16 -04:00
David Briscoe
cf9d74cc55
Check loclist before quickfix
...
Fix [f in loclist fails gives message about quickfix instead of doing
:lolder
:h getwininfo() says:
loclist 1 if showing a location list
quickfix 1 if quickfix or location list window
Since quickfix is true for both, we need to check it last.
Test
h getloc
lgetbuffer
h :lgetbuffer
lgetbuffer
lopen
" at this point [f will fail but lolder will not
2022-04-28 22:57:45 -04:00
Tim Pope
e52cb4d77f
Provide 'colorcolumn' option maps on "t"
...
Resolves: https://github.com/tpope/vim-unimpaired/pull/203
Resolves: https://github.com/tpope/vim-unimpaired/pull/224
2022-04-28 22:05:37 -04:00
Tim Pope
a1fd1f02f1
Revert to "s" for 'spell' option maps
...
I still might pursue this, but we'll keep the old maps as the official
ones until I'm ready to commit.
2022-04-28 21:45:35 -04:00
Tim Pope
80ab990c7f
Improve robustness of paste maps
...
InsertLeave doesn't fire on CTRL-C, and not even a map will help because
paste mode disables maps. On Neovim we can use ModeChanged. On Vim
we'll make do with what we have.
2022-04-10 19:03:16 -04:00
Tim Pope
f992923d33
Tweak spell toggle letter again
...
This version is based on the numerous z spelling maps, like z=.
2022-02-02 05:38:25 -05:00
Tim Pope
e4006d68cd
Fix accidental shadow of paste toggle maps
2021-10-17 21:58:16 -04:00
Tim Pope
4910e20fde
Introduce <s/>s/=s as option toggle alternative
2021-10-17 20:50:07 -04:00
Tim Pope
39f195d7e6
Define maps less indirectly
...
By defining maps inline with :exe, :verbose map now reports the correct
line number of their definition.
2021-09-24 14:11:04 -04:00
Tim Pope
112e23a22f
Use parenthetical plug maps for everything else
2021-09-19 07:20:12 -04:00
Tim Pope
741057c46c
Use parenthetical plug maps for next/previous
2021-09-19 07:20:12 -04:00
Tim Pope
9cf8b258e4
Use getreginfo() to save/restore unnamed register
2021-09-19 07:20:12 -04:00
Tim Pope
cbca5cf8c4
Remove broken garbage from botched commit
...
This partially reverts commit fe87cbd9ac .
Resolves: https://github.com/tpope/vim-unimpaired/issues/219
2021-09-19 07:20:02 -04:00
Tim Pope
f2167780b7
Use parenthetical plug maps for encoding/decoding
2021-09-19 05:45:42 -04:00
Tim Pope
77a878c4b0
Don't encode trailing newline of block selection
...
This feels more natural for string encoding.
2021-09-19 05:45:42 -04:00
Tim Pope
c51ed44518
Hide ugly plug map on option toggle with 'showcmd'
2021-09-17 00:38:17 -04:00
Tim Pope
5a0fb631f3
Add [C and ]C string encoding maps
...
References: https://github.com/tpope/vim-unimpaired/issues/195
2021-09-17 00:26:42 -04:00
Tim Pope
58e4434f5e
Add <Plug> maps for option toggles
...
Let's start moving towards the de facto standard of <Plug>(whatever).
2021-09-11 16:59:31 -04:00
Tim Pope
4173df71af
Remove co and =o stub maps
2021-09-11 16:58:32 -04:00
Tim Pope
825a3ee640
Document [f/]f :colder/:cnewer
...
References: https://github.com/tpope/vim-unimpaired/pull/218
2021-09-10 23:12:57 -04:00
Teo Ljungberg
c147741c64
Support navigating the quickfix history ( #218 )
...
We are enhancing the already built in [f and ]f mappings to go to the
:colder respectively :cnewer versions of the quickfix and location list.
2021-08-26 13:07:47 -04:00
Tim Pope
aee3455e19
Use consistent filename sorting for [f and ]f
...
Resolves: https://github.com/tpope/vim-unimpaired/issues/215
2021-08-15 17:13:36 -04:00
Tim Pope
ee21252c03
Hide stacktrace for errors and warnings in blank line maps
...
Resolves: https://github.com/tpope/vim-unimpaired/issues/88
Resolves: https://github.com/tpope/vim-unimpaired/pull/214
2021-08-01 11:18:28 -04:00
Nizamuddin Sulieman
4afbe5ebf3
Fix: skip while loop if keys is empty
2020-04-26 13:00:55 -04:00
Tim Pope
08e66532bf
Add sponsor button
2019-11-12 18:40:10 -05:00
Tim Pope
ab7082c0e8
Support [n/]n in visual mode
...
Closes https://github.com/tpope/vim-unimpaired/issues/22
2019-08-07 15:16:55 -04:00
Tim Pope
a49c4f2bf0
Fix paste maps with a count
...
Closes https://github.com/tpope/vim-unimpaired/issues/183
2019-06-28 20:21:36 -04:00
Tim Pope
c4aed6ed1a
Defer to all other maps
...
Closes https://github.com/tpope/vim-unimpaired/issues/184
References https://github.com/tpope/vim-unimpaired/issues/185
2019-06-28 19:22:51 -04:00
Tim Pope
e77923053f
Don't interfere with custom c and = maps
...
Closes https://github.com/tpope/vim-unimpaired/issues/180
2019-03-21 07:36:32 -04:00
kiryph
e116ccf278
Update outdated mapping =os in README.markdown
2019-03-19 17:06:55 -04:00
__
cb23e3f94a
Repeat pasting visual line register
2019-03-14 17:14:28 -04:00
Martin Toman
d1c96df760
encode ' (apostrophe) as '
2019-03-09 13:54:54 -05:00
Brent J. Nordquist
5694455d72
Change order in documentation
...
so each invocation matches its respective command in order
2019-01-17 13:25:29 -05:00
solawing
b3f0f752d7
Make URL encoding Unicode safe
2018-12-30 13:35:22 -05:00
Tim Pope
9da253e92c
Make URL encoding Unicode safe
...
Closes https://github.com/tpope/vim-unimpaired/issues/51
2018-12-20 14:37:32 -05:00
Tim Pope
d6325994b3
Restore legacy maps
2018-07-26 16:18:56 -04:00
Tim Pope
46e0ce7035
unimpaired.vim 2.0
...
* Drop deprecated [o and ]o aliases for [f and ]f.
* Map [o, ]o, and yo to enable, disable, and toggle options.
* Map [op, ]op, and yop to enable paste mode for one insert.
* Map [p, ]p, [P, and ]P to force line-wise paste.
* Map <p, <P, >p, >P, =p, and =P as re-indenting paste maps.
* Map [<C-T> and ]<C-T> as :ptprevious and :ptnext.
* Bug fixes.
v2.0
2018-07-26 16:11:07 -04:00
Tim Pope
fcc313f5df
Fix crashes on older versions of Vim
2018-07-26 15:38:26 -04:00
Tim Pope
211e4e9fc7
Drop legacy maps for release
...
None of these were in 1.3, so we don't need warnings for stable users.
2018-07-24 23:08:48 -04:00
Tim Pope
a3836ea7a0
Drop obsolete help reference
2018-07-24 18:37:32 -04:00
Tim Pope
1a4bfc16b6
Drop mapping customization documentation
...
In practice this was way more confusing than helpful. Leave the feature
for enterprising users but stop encouraging its use.
2018-07-24 18:37:08 -04:00
Tim Pope
da7921aad2
Revert "Make encoding maps available on angle brackets"
...
This reverts commit bdd88b9ea6 .
References https://github.com/tpope/vim-unimpaired/issues/160
2018-07-14 21:54:49 -04:00
Tim Pope
d53b0bd6e3
Don't wait until VimEnter to map
...
I did this to allow other plugins to fiddle with g:nremap first, but it
makes things too hard to unmap the old fashioned way.
2018-07-13 15:18:11 -04:00
Tim Pope
6ebb041d52
Revert "Make angle bracket encoding maps official"
...
This reverts commit d58794f9a3 .
Closes https://github.com/tpope/vim-unimpaired/issues/160
2018-07-13 15:14:49 -04:00
Tim Pope
d58794f9a3
Make angle bracket encoding maps official
2018-07-05 14:16:42 -04:00
Tim Pope
bdd88b9ea6
Make encoding maps available on angle brackets
...
This seems like a more natural place for them, seeing as how they are
operators.
2018-07-05 14:05:28 -04:00