on master help sign in
Add more surround pair characters
4754b2eGokul Soumya
helix-core/src/surround.rs+9−1
@@ -1,7 +1,15 @@
1use crate::{search, Selection};
1use crate::{search, Selection};
2use ropey::RopeSlice;
2use ropey::RopeSlice;
3
3
4−pub const PAIRS: &[(char, char)] = &[('(', ')'), ('[', ']'), ('{', '}'), ('<', '>')];
4+pub const PAIRS: &[(char, char)] = &[
5+ ('(', ')'),
6+ ('[', ']'),
7+ ('{', '}'),
8+ ('<', '>'),
9+ ('«', '»'),
10+ ('「', '」'),
11+ ('(', ')'),
12+];
5
13
6/// Given any char in [PAIRS], return the open and closing chars. If not found in
14/// Given any char in [PAIRS], return the open and closing chars. If not found in
7/// [PAIRS] return (ch, ch).
15/// [PAIRS] return (ch, ch).