Miscellaneous
Quick tips! I’ve got a list of handy shortcuts and commands that save the day when I need them. They’re total time-savers!
-
Krisp AI
- extract speaker and time from a line:
- select the pattern:
SpeakerA | 00:00:%s/^\([A-z0-9 ]\+| [0-9]\+\(:[0-9]\+\)\+\)$/- \1/gc:%s/^\([A-z0-9 ]\+| [0-9]\+:[0-9]\+\)$/- \1/gc
- select lines that not start with the char
-::%s/\(^[^-].\+\)/ - \0/gc:%s/\(^[^-].\+\)/ - \1/gc
\0means the whole find and\1means a sub group under the find - the sub group is defined by parenthesis “(subgroup)”.
- select the pattern:
- extract speaker and time from a line:
-
diff
# this is equivalent to calling vimdiff directly. vim -d file1 [file2 ...]start and stop diff of two files opened in 2 windows (works in both, vertical and horizontal split):
# You can also open vim in split-screen mode, with the -O option:- vim -O file1 [file2 ...]# to then turn on diff mode :windo diffthis # To then turn off diff mode :windo diffoffdiff JSON files
vim -d <(git show HEAD~1:./snippets.json | jq . -) <(git show HEAD~2:./snippets.json | jq . -) vim -d <(git show f87d746:./snippets.json | jq . -) <(git show c147b39:./snippets.json | jq . -) diff -u <(git show f87d746:./snippets.json | jq . -) <(git show c147b39:./snippets.json | jq . -) vimdiff <(git show f87d746:./snippets.json | jq . -) <(git show c147b39:./snippets.json | jq . -)