From cd6644ea4ddc78597934ab0ef5ba50e3c3daa927 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sat, 8 Jul 2023 23:25:41 +0200 Subject: Moved to a simpler SSG --- public/extending-dte-editor.html | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100755 public/extending-dte-editor.html (limited to 'public/extending-dte-editor.html') diff --git a/public/extending-dte-editor.html b/public/extending-dte-editor.html new file mode 100755 index 0000000..05e9d86 --- /dev/null +++ b/public/extending-dte-editor.html @@ -0,0 +1,46 @@ +Extending dte editor

Extending dte editor

May 31, 2023

dte is an interesting editor I started +using lately more and more. Since it is using +execvp() it can be easily extended. I +needed comment/uncomment feature so I created a small utility that does this for +me. Code lives on repository dte +extensions but this +utilities can be used for whatever you want. Make sure you have version 1.11 or +above.

Next one will be invoking formatter based on the type of a file.

My config that works for me.

set show-line-numbers true;
+set tab-width 4;
+set case-sensitive-search false;
+
+# Special aliases
+alias m_comment 'exec -s -i line -o buffer -e errmsg ~/.dte/bin/comment'
+alias m_format 'save; exec go fmt .; reload'
+alias m_duplicate 'copy;paste';
+
+# Useful aliases.
+alias m_force_close 'quit -f';
+alias m_reload 'close; open $FILE'
+
+# Key bindings.
+bind M-s save;
+bind M-q m_force_close;
+bind M-z refresh;
+bind C-down blkdown;
+bind C-up blkup;
+bind C-_ m_comment;
+bind M-. m_format;
+bind C-d m_duplicate;
+
+# Syntax highlighting.
+hi preproc magenta;
+hi keyword red;
+hi linenumber blue;
+hi comment cyan;
+
\ No newline at end of file -- cgit v1.2.3