Add word and line movement in vim normal mode

Add jump to start and end of the document
Move vim tests to relevant vim files
Rename VimTestAppContext to VimTestContext for brevity
Improve VimTestContext assertions to pretty print locations when selection position assertion panics
This commit is contained in:
Keith Simmons 2022-03-27 17:58:28 -07:00
parent 3ae5fc74c9
commit a7a52ef3f7
10 changed files with 766 additions and 278 deletions

View file

@ -276,6 +276,16 @@ pub enum CharKind {
Word,
}
impl CharKind {
pub fn coerce_punctuation(self, treat_punctuation_as_word: bool) -> Self {
if treat_punctuation_as_word && self == CharKind::Punctuation {
CharKind::Word
} else {
self
}
}
}
impl Buffer {
pub fn new<T: Into<Arc<str>>>(
replica_id: ReplicaId,