109 Commits

Author SHA1 Message Date
machakann 4da6734499 Implement search-forward feature for textobjects 2022-07-23 01:26:54 +09:00
machakann f3f7542098 Fix a bug of textobj-query with inprintable input 2022-02-06 22:37:28 +09:00
machakann 70022d9277 Implement g:sandwich#input_fallback option 2022-02-06 22:35:23 +09:00
machakann 1d67705ec1 Merge branch 'master' into develop 2022-01-30 21:51:05 +09:00
machakann 39673fb3ce Elect textobjects by representative length
Textobj-auto has elected text by wrapped text excluding surroundings. However, this method works unintentionally, for example, reported at #127. This commit changes the election algorithm to use representative lengths; it is the length of wrapped text excluding surroundings if the cursor inside or including surroundings if the cursor is on either one of the surroundings.
2022-01-30 21:38:21 +09:00
machakann 665414fe90 Revert "Elect item by the length from head to tail"
This reverts commit 6e686dae33.
2022-01-29 22:15:45 +09:00
machakann 6e686dae33 Elect item by the length from head to tail 2022-01-08 21:42:55 +09:00
machakann 95d41c9ab1 Revert "Change the rule to select by auto-textobject"
This reverts commit a68205cdc7.
It's not so easy to understand the rules to select buffer text.
2021-12-31 18:54:51 +09:00
machakann a68205cdc7 Change the rule to select by auto-textobject
It has been chosen only by the length of inner wrapped text.
Now a text under the cursor will be prioritized.
2021-12-26 02:14:59 +09:00
machakann ad7723c238 Implement module-like inter-file communication 2021-11-29 00:16:03 +09:00
machakann ac3affcb8f Could not cancel action with Esc if input is not a character 2021-11-28 20:15:32 +09:00
machakann ffe2bae2fc Add a simple way to set timeout option both for operators and textobjects
Use g:sandwich#timeout and g:sandwich#timeoutlen.

Reported at #123
2021-11-28 16:30:11 +09:00
machakann 8a5fdcb534 Rename global option pickers 2021-11-27 22:14:51 +09:00
machakann 8314e35da5 Textobject should refer 'timeout' option
Use g:textobj#sandwich#timeout for private setting.

Reported at #123
2021-11-27 21:41:32 +09:00
machakann 4cd1ea8db6 Reduce global key mappings 2021-09-12 01:40:40 +09:00
naohiro ono 241cb3f402 Use string comparison instead of pattern matching when filtering by filetype filter 2021-09-03 17:45:48 +09:00
machakann 0f5278e58b Magic character "t" and "T" doesn't work well with :set selection=exclusive
Reported at #98
2020-07-26 22:31:14 +09:00
machakann fa2fc27b91 Add action filter for textobj-sandwich
"add" in the action filter prohibits to take effect for textobject and "delete" and "all" in it allows for convenience.
Related #72
2019-03-02 16:04:47 +08:00
machakann fa01fa2356 Fix a bug in corresponding quotes searching (#63)
match_syntax option was used but highlight was not so reliable always.
2018-03-26 19:30:38 +08:00
machakann a1f4a3b64e Suppress errorbell 2018-02-03 13:17:50 +08:00
machakann 4386d90d96 Key input haven't timed-out in some cases. (#56) 2017-11-27 00:48:56 +08:00
machakann 77401e9507 Buns should have not been escaped before passing to operator-sandwich. (#40) 2017-03-22 00:48:43 +08:00
machakann e1467e2e4d Fix a bug when canceled. 2017-03-18 16:04:44 +08:00
machakann 7f61cb63f3 Fix a bug when no surround has found. 2017-03-18 15:45:52 +08:00
machakann 2316553e8b Refactoring: Quit earlier 2017-03-14 12:43:11 +08:00
machakann c36a624a1b Refactoring: Save the original cursor position for each sandwich object. 2017-03-13 00:19:35 +08:00
machakann 7ec5527615 Refactoring: Move some functions from textobj object to sandwich object. 2017-03-13 00:19:34 +08:00
machakann 8dd0122f35 Obsolete sandwich.startpos(). 2017-03-13 00:19:33 +08:00
machakann 638580e541 Refactoring: Split textobj.is_valid_candidate() function into small functions. 2017-03-13 00:19:32 +08:00
machakann c0944f3e1e Refactoring: Rename stuff object to sandwich object.
The name stuff is too ambiguous.
2017-03-13 00:19:31 +08:00
machakann 5db9480480 Move s:uniq_recipes() and s:query() into methods of recipes object. 2017-03-13 00:19:29 +08:00
machakann e88162acbe Refactoring: Update option handlings. 2017-03-13 00:19:28 +08:00
machakann 43f03bfa07 Refactoring textobjects: Modify constructors and reduce duplicate info between textobj and stuff. 2017-03-13 00:19:08 +08:00
machakann d05ea415ac Fix a bug on the expanding selection feature with 'external' recipes. 2017-03-03 12:23:08 +08:00
machakann 0d2cb8a7fb Fix a bug on the use of argument recipes. 2017-02-25 11:32:03 +08:00
machakann f77264809e g:textobj#sandwich#object should be restored.
This is required in case that textobj-sandwich call textobj-sandwich itself in its recipe.
2017-02-23 23:30:47 +08:00
machakann dd645deca4 s:is_input_matched() function should not change original info.
The values in 'buns'/'input' key may be filtered and it may cause problem in dot-repeating.
2017-02-23 23:29:18 +08:00
machakann 421fcf4196 "listexpr" should be off when synchronizing. 2016-12-04 01:07:11 +08:00
machakann d75f1ce282 Textobjects could be sometimes slow. 2016-11-06 22:03:04 +08:00
machakann 180dd8e9b5 Add workaround for a bug of textobjects it/at.
if a string like '<~' or '<[' is in a buffer, it/at gives E33 or E55 (probably) unintentionally.
2016-10-30 12:59:28 +09:00
machakann 6ea50895c5 Synchronized buns should not be escaped. (#25) 2016-10-11 19:46:39 +08:00
machakann 1fa19101f8 Delete surroundings selectively when 'synchro' option is on. (#21) 2016-10-11 00:47:43 +09:00
machakann 49984c9ea6 Blash up magicchar:i and add magicchar:I. (#18) 2016-08-17 14:01:53 +08:00
machakann 03308424cf Make 'listexpr' option valid also with textobj-sandwich. (#16) 2016-08-16 18:59:19 +08:00
machakann 77d676c1fa Release 'Magic characters's.
Ready for #18.
2016-08-13 17:13:57 +08:00
machakann e88ca68456 Tiny refactoring. 2016-08-13 17:13:50 +08:00
machakann 6b97f59465 Surely get colmax (#17). 2016-07-28 21:58:46 +08:00
machakann be830ac762 Fix a potential bug after vim-7.4.1976
Use s:colmax instead of 1/0 because 1/0 might be 'long' type, 64bit.
2016-07-23 19:56:31 +08:00
machakann 78ab9db292 Better way to get a length on a buffer. 2016-05-19 12:21:51 +08:00
machakann 92a53758df Update the system for 'synchro' option. 2016-05-12 21:28:26 +08:00