Commit Graph

66 Commits

Author SHA1 Message Date
cohama
3eea6c08fd Add :ExchangeClear command 2014-11-24 16:03:57 +00:00
Tom McDonald
f841536eac Correction in doc: Visual mapping is X 2014-06-30 15:57:27 -04:00
Tom McDonald
584ceeb136 Reflect use of xmap over vmap in documentation 2014-06-30 15:53:29 -04:00
Tom McDonald
9c025e5914 Merge pull request #27 from inkarkat/fix-selection-exclusive
Support :set selection=exclusive
2014-06-24 11:26:05 -04:00
Tom McDonald
2fb1feb5c7 Merge pull request #26 from inkarkat/no-select-mode-mapping
Do not create a select mode default mapping.
2014-06-24 10:46:05 -04:00
Tom McDonald
a7f31d4c7a Merge pull request #25 from inkarkat/fix-typos
Fix typos in documentation.
2014-06-24 10:45:12 -04:00
Ingo Karkat
55421a1852 Support :set selection=exclusive
With this, the '> mark points to after the end of the selection.
- Do not change the 'selection' value when the plugin is triggered from visual mode, so that we can grab the original selection.
- Simplification: gv can be used instead of "`<" . a:type . "`>" to restore the original selection. This also deals with blockwise-to-end in all cases.
- For the highlighting, the end position must be corrected. Since these are byte indices, we cannot just decrement by 1, but have to subtract the length of the last selected character!
2014-06-24 16:33:37 +02:00
Ingo Karkat
d578e14e89 Do not create a select mode default mapping.
In select mode (the variant of visual mode), any printable characters should override the selection (see below :help v_CTRL-G), so no such mappings should exist. Limit the default visual mode mapping to visual mode (:xmap). (The <Plug>(Exchange) can and should be defined for both.)
2014-06-24 16:28:41 +02:00
Ingo Karkat
75a3ff822a Fix typos in documentation. 2014-06-24 16:27:10 +02:00
Tom McDonald
c83bfb20bc Clearly explain Visual mode mapping in README 2014-04-27 10:31:37 -04:00
Tom McDonald
72d9f0a3cf Add "expand" functionality
When one exchange region is completely contained within another,
replace the larger one with the smaller one.

The term "expand" may seem counter-intuitive, as the result is less
text, but think of it this way: the smaller region is "expanding"
to occupy the space previously defined by the larger region.
2014-04-27 10:28:16 -04:00
Tom McDonald
a55ebe1c8d Use srings to describe exchange region comparison
... in preparation for things to come.
2014-04-27 10:14:13 -04:00
Tom McDonald
06f62c9f51 Ensure 'selection' is set to inclusive
References #23.
2014-04-26 08:25:46 -04:00
Tom McDonald
105cf06d43 Use '[ and '] marks instead of a-z marks
Closes #22.
2014-04-08 17:09:22 -04:00
Tom McDonald
c307765978 Use less popular marks during exchange
At least until I can figure out why they're being overwritten.

References #22.
2014-04-08 15:21:36 -04:00
Tom McDonald
694d00abe9 Use clearer variable names for mark backups 2014-04-08 15:20:29 -04:00
Tom McDonald
771336e5eb Link to Vimcasts Episode 65 in README 2014-03-10 11:00:10 -04:00
Tom McDonald
e2da5d3c1e Merge pull request #20 from wellle/visual-X
Use X as visual mapping for Exchange
2014-02-24 19:40:49 -05:00
Christian Wellenbrock
0e43efeede Update Readme and docs regarding {visual}X 2014-02-25 01:37:04 +01:00
Christian Wellenbrock
ff52604e80 Use X as visual mapping for Exchange 2014-02-25 00:19:48 +01:00
Tom McDonald
b82a774e6f Merge pull request #19 from bps/workaround-vim-7-3-411
Use a named register for visual mode put.
2014-02-04 11:23:10 -08:00
Brian Smyth
57fe37a89c Use a named register for visual mode put.
Save and restore both the unnamed and z registers. Using the z register
works around the bug addressed by Vim patch 7.3.411.
2014-02-04 12:39:30 -05:00
Tom McDonald
1554f82773 Merge pull request #17 from michamos/master
Link 'IncSearch' for default highlight group
2014-01-07 09:27:53 -08:00
Micha Moskovic
ac8ae24d73 Link 'IncSearch' for default highlight group
The previous green one is completely arbitrary and looks ugly with some colorschemes.
2014-01-07 18:12:25 +01:00
Tom McDonald
d67bace226 Improve highlighting coverage
* Support gui
* Use colors available for terminals with 8 colors
2014-01-05 11:06:07 -05:00
Tom McDonald
53b2b497b0 Maintain cursor position when exchanging
Closes #16.
2014-01-01 11:32:54 -05:00
Tom McDonald
39895312ec Highlight the first defined exchange region
Closes #13.
2014-01-01 11:03:33 -05:00
Tom McDonald
abd197fb5e Link to Wiki from README 2013-12-22 10:32:42 -05:00
Tom McDonald
80f24f2398 Change <Plug> mappings to avoid prefix strings
Any custom mappings to <Plug>Exchange, <Plug>ExchangeLine, or
<Plug>ExchangeClear will have to be changed to map to <Plug>(Exchange),
<Plug>(ExchangeLine), and <Plug>(ExchangeClear).

References #12
2013-12-22 10:05:38 -05:00
Tom McDonald
88bb271e2d Fix incorrect visual mapping to cxx
Fixes #12.
2013-12-22 09:28:36 -05:00
Tom McDonald
10591c8be9 Explain issue #11 caveat and solutions in README 2013-12-21 23:23:06 -05:00
Tom McDonald
1626560482 Add documentation for overriding maps 2013-12-21 23:00:46 -05:00
Tom McDonald
855b57077e Allow default mappings to be overridden
Partial solution to #11
2013-12-21 22:51:50 -05:00
Tom McDonald
fba5bcea8c Detect overlap for two blockwise regions 2013-12-12 15:12:14 -05:00
Tom McDonald
ec7f183583 Fix quoting for escaped <C-V> sequence
This bug would probably have never affected anyone, since it only
comes up when a normal-mode motion results in a blockwise selection.
2013-12-12 15:06:40 -05:00
Tom McDonald
2d7ef58550 Use getreg() instead of macro syntax 2013-12-11 10:19:25 -05:00
Tom McDonald
62ae17d31a Use " register instead of @ 2013-12-11 10:17:26 -05:00
Tom McDonald
6e08553618 Merge pull request #9 from Raimondi/patch-1 2013-12-11 10:03:48 -05:00
Tom McDonald
a0e2169959 Use setreg() to preserve yanked text's -wise mode 2013-12-11 10:03:15 -05:00
Israel Chauca Fuentes
07d9946872 Use getregtype() to restore register's mode. 2013-12-11 09:23:52 -05:00
Tom McDonald
97cb52ef8c Answer some FAQs in the README 2013-12-10 22:11:40 -05:00
Tom McDonald
9b3e64c704 Mention use of visual mode in help and README 2013-12-10 12:48:57 -05:00
Tom McDonald
ba97b9900b Fix help tags missed from copy/paste 2013-12-10 12:09:59 -05:00
Tom McDonald
910392c0a4 Merge pull request #7 from michamos/no-mappings
Make the default mappings optional
2013-12-10 12:06:42 -05:00
Tom McDonald
5ecbcb7727 Change formatting of SETTINGS help section 2013-12-10 12:06:09 -05:00
Micha Moskovic
00b3dd0274 Make the default mappings optional 2013-12-10 17:43:08 +01:00
Tom McDonald
ae6495dafc Protect against mapped underscore
Refs pull request #3
2013-12-10 09:16:01 -05:00
Tom McDonald
87398ce633 Merge pull request #6 from jebaum/master
make sure to paste from unnamed register
2013-12-10 03:24:26 -08:00
James Baumgarten
a1745846e6 make sure to paste from unnamed register 2013-12-10 01:18:03 -08:00
Tom McDonald
377e890242 Add documentation for cxx 2013-12-09 20:59:35 -05:00