diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-11-24 04:38:16 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2024-11-24 04:51:34 +0300 |
commit | 23c90e37ff48707c4aabdb8b1460df382a600d7a (patch) | |
tree | 08547d899cc281ba2be0d96c785e64e7a4d04313 /src/main.c | |
parent | 26e54b9248ca8be07530fb19422082827ee1fead (diff) | |
download | sciteco-23c90e37ff48707c4aabdb8b1460df382a600d7a.tar.gz |
added special Q-Register ":" for accessing dot
* We cannot call it "." since that introduces a local register
and we don't want to add an unnecessary syntactic exception.
* Allows the idiom [: ... ]: to temporarily move around.
Also, you can now write ^E\: without having to store dot in a register first.
* In the future we might add an ^E register as well for byte offsets.
However, there are much fewer useful applications.
* Of course, you can now also write nU: instead of nJ, Q: instead of "." and
n%: instead of "nC.". However it's all not really useful.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -399,6 +399,8 @@ main(int argc, char **argv) teco_qreg_table_insert(&teco_qreg_table_globals, teco_qreg_plain_new("_", 1)); /* replacement string register */ teco_qreg_table_insert(&teco_qreg_table_globals, teco_qreg_plain_new("-", 1)); + /* current document's dot (":") */ + teco_qreg_table_insert(&teco_qreg_table_globals, teco_qreg_dot_new()); /* current buffer name and number ("*") */ teco_qreg_table_insert(&teco_qreg_table_globals, teco_qreg_bufferinfo_new()); /* current working directory ("$") */ |