Assortment of extensions for dte code editor.
These extensions are work in progress so use at your own risk!
This utilities can also be used without editor and as a CLI tool. You
can pass in parts of the code like cat file.c | ./comment
.
You can check keybindings for the editor with dte -K
and start
pressing keys to see what the combination for rc file is.
- You need to have at least version 1.11 or above of dte installed.
- Compile with
make
ormake all
. - Copy binaries to ~/.dte/bin with
make install
.
Code should compile with gcc, clang and tcc.
Comments and uncomments a line or a selection. Currenly only works with
//
style of comments.
RC file configuration (~/.dte/rc)
alias comment 'exec -s -i line -o buffer -e errmsg ~/.dte/bin/comment';
bind C-_ comment;
(C-_ on my keyboard layout means Ctrl+forwardslash)
Formats current buffer based on file extention.
Currently supports:
- Clang formatter for C files
- Go fmt for Go files
- Prettier for JSON, JS, HTML, CSS
RC file configuration (~/.dte/rc)
alias format='save -f; exec -s -e errmsg ~/.dte/bin/format $FILE; reload';
bind M-f format;