Ben Kunkle
fc920bf63d
Improve behavior around word-based brackets in bash ( #29700 )
...
Closes #28414
Makes it so that `do`, `then`, `done`, `else`, etc are treated as
brackets in bash. They are not auto-closed *yet* as that requires
additional work to function properly, however they can now be toggled
between using `%` in vim. Additionally, newlines are inserted like they
are with regular brackets (`{}()[]""''`) when hitting enter between
them.
While `if <-> fi` `while/for <-> done` and `case <-> esac` are the
*logical* matching pairs, I've opted to instead match between `then <->
else/elif/fi` `do <-> done` and `in <-> esac` as these are the pairs
that delimit the sub-scope, and are more similar to the `{}` style
bracket pairs than `if <-> }` in a c-like syntax. This does cause some
wierd behavior with `else` in `if` expressions as it matches both with
the previous `then` as well as the following `fi`, so in this case
```bash
if true; then
foo
else
bar
f|i
```
after hitting `%` twice times (where cursor is `|`), the cursor will end
up on the `then` instead of back on the `fi` as hitting `%` on the else
will *always* navigate up to the `then`
Release Notes:
- vim: Improved behavior around word-based delimiters in bash (`do <->
done`, `then <-> fi`, etc) so they can be toggled between using `%`
2025-04-30 19:57:29 +00:00
..
2025-04-07 18:10:01 +00:00
2025-04-30 18:00:00 +00:00
2025-04-24 15:17:33 +00:00
2025-04-25 21:16:43 +00:00
2025-04-02 13:26:34 -07:00
2025-04-29 21:58:45 -03:00
2025-04-29 21:58:45 -03:00
2025-04-23 20:54:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-27 19:23:37 -07:00
2025-04-30 18:00:00 +00:00
2025-04-30 18:00:00 +00:00
2025-04-02 13:26:34 -07:00
2025-04-23 20:54:09 +00:00
2025-04-15 09:35:13 -06:00
2025-04-28 09:21:27 +00:00
2025-04-02 13:26:34 -07:00
2025-04-29 12:18:32 -04:00
2025-04-07 20:26:55 +00:00
2025-04-10 22:58:41 +00:00
2025-04-23 20:54:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-11 17:38:14 +00:00
2025-04-28 11:12:16 -04:00
2025-04-02 13:26:34 -07:00
2025-04-30 19:06:39 +00:00
2025-04-29 17:57:39 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 22:15:24 +00:00
2025-04-02 13:26:34 -07:00
2025-04-17 17:29:19 +00:00
2025-04-28 22:15:24 +00:00
2025-04-23 15:43:33 -03:00
2025-04-23 20:54:09 +00:00
2025-04-19 23:26:29 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 18:20:03 +00:00
2025-04-26 01:44:56 +02:00
2025-04-28 22:15:24 +00:00
2025-04-28 09:21:27 +00:00
2025-04-30 05:57:53 +00:00
2025-04-19 23:26:29 +00:00
2025-04-29 22:08:06 -06:00
2025-04-02 13:26:34 -07:00
2025-04-30 21:44:20 +05:30
2025-04-30 15:21:19 -04:00
2025-04-11 22:01:25 +00:00
2025-04-29 01:24:13 +00:00
2025-04-02 13:26:34 -07:00
2025-04-29 01:24:13 +00:00
2025-04-30 09:39:17 +05:30
2025-04-28 15:23:25 +00:00
2025-04-15 21:36:30 -04:00
2025-04-30 22:58:33 +05:30
2025-04-02 13:26:34 -07:00
2025-04-25 14:46:02 -04:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-25 14:46:02 -04:00
2025-04-23 20:54:09 +00:00
2025-04-30 11:25:26 -04:00
2025-04-23 20:54:09 +00:00
2025-04-30 04:55:07 +00:00
2025-04-30 16:24:05 +08:00
2025-04-20 00:53:30 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-28 11:12:16 -04:00
2025-04-02 13:26:34 -07:00
2025-04-29 21:58:45 -03:00
2025-04-29 19:30:16 +00:00
2025-04-10 21:16:43 +00:00
2025-04-18 14:15:19 +00:00
2025-04-22 21:16:54 +00:00
2025-04-11 01:47:40 +05:30
2025-04-23 20:54:09 +00:00
2025-04-29 19:53:05 -06:00
2025-04-02 13:26:34 -07:00
2025-04-29 16:26:27 +02:00
2025-04-28 23:43:16 +00:00
2025-04-30 04:55:07 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 09:21:27 +00:00
2025-04-30 19:57:29 +00:00
2025-04-02 13:26:34 -07:00
2025-04-08 16:01:27 +00:00
2025-04-02 13:26:34 -07:00
2025-04-23 22:27:27 +00:00
2025-04-30 02:13:13 +00:00
2025-04-29 19:30:16 +00:00
2025-04-07 18:46:09 +00:00
2025-04-29 21:58:45 -03:00
2025-04-23 21:24:41 -03:00
2025-04-19 23:29:36 +00:00
2025-04-23 20:51:01 -06:00
2025-04-28 11:12:16 -04:00
2025-04-08 16:09:06 -06:00
2025-04-28 21:44:28 -04:00
2025-04-24 14:55:37 +00:00
2025-04-23 12:38:46 -04:00
2025-04-23 20:54:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-23 20:54:09 +00:00
2025-04-11 23:02:50 +00:00
2025-04-02 13:26:34 -07:00
2025-04-30 15:01:52 +00:00
2025-04-28 09:21:27 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 19:47:40 +00:00
2025-04-29 19:53:05 -06:00
2025-04-23 20:54:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-22 21:32:32 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 11:12:16 -04:00
2025-04-29 19:30:16 +00:00
2025-04-28 11:12:16 -04:00
2025-04-02 13:26:34 -07:00
2025-04-03 23:32:50 +02:00
2025-04-16 20:22:44 +00:00
2025-04-28 16:50:47 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 09:21:27 +00:00
2025-04-28 16:50:47 +00:00
2025-04-02 13:26:34 -07:00
2025-04-25 17:41:49 +03:00
2025-04-27 19:04:51 +00:00
2025-04-28 09:21:27 +00:00
2025-04-02 13:26:34 -07:00
2025-04-18 12:11:54 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 22:15:24 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-08 16:09:06 -06:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-28 09:21:27 +00:00
2025-04-26 00:16:21 +00:00
2025-04-26 01:44:56 +02:00
2025-04-02 13:26:34 -07:00
2025-04-21 21:30:21 -07:00
2025-04-29 16:06:43 +00:00
2025-04-29 16:06:43 +00:00
2025-04-09 01:53:54 +00:00
2025-04-23 20:54:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-23 14:06:58 +00:00
2025-04-28 14:29:17 +00:00
2025-04-02 13:26:34 -07:00
2025-04-28 15:23:25 +00:00
2025-04-16 19:05:57 +02:00
2025-04-30 17:46:11 +00:00
2025-04-08 16:09:06 -06:00
2025-04-08 16:09:06 -06:00
2025-04-07 19:03:24 +00:00
2025-04-29 16:06:43 +00:00
2025-04-02 13:26:34 -07:00
2025-04-29 19:55:02 -06:00
2025-04-23 20:54:09 +00:00
2025-04-23 15:30:20 +00:00
2025-04-23 15:30:20 +00:00
2025-04-30 17:46:11 +00:00
2025-04-29 15:15:45 +00:00
2025-04-25 20:06:40 +00:00
2025-04-30 12:52:25 -04:00
2025-04-24 16:42:06 -03:00
2025-04-27 02:31:25 +00:00
2025-04-25 16:11:58 +00:00
2025-04-23 20:54:09 +00:00