File: rc

package info (click to toggle)
dte 1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,152 kB
  • sloc: ansic: 28,421; sh: 94; awk: 56; makefile: 13; sed: 1
file content (64 lines) | stat: -rw-r--r-- 2,544 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
include -b binding/default
include -b color/default
include -b compiler/gcc
include -b compiler/go

alias builtin 'include -b'
alias help 'run man dterc'
alias make 'compile gcc make'
alias man 'run man'
alias read 'pipe-from cat'
alias reverse-lines 'filter tac'
alias sort-lines 'filter sh -c "LC_COLLATE=C sort"'
alias split-words 'replace -g "[ \t]+" "\n"'
alias trim-lines 'replace "[ \t]+$" ""'
alias xsel 'pipe-to xsel -b'
alias exit quit

errorfmt basic '^([^:]+):([0-9]+):([0-9]+):' file line column
errorfmt basic '^([^:]+):([0-9]+):' file line
alias git-grep 'compile -1s basic git grep -n'

# Remove possible 'F' from $LESS so that less will always wait
# for keypress and "run" can be used without "-p".
# ('R' = allow ANSI colors, 'S' = chop long lines)
setenv LESS RS

ft -f dte '/\.?dte/(config/)?(rc|((syntax|color|binding|compiler)/.*))$'
ft -f mail '/tmpmsg-.*\.txt$|pico\.[0-9]+|mutt(ng)?-*-\w+|mutt[a-zA-Z0-9_-]{6}'

# Don't remember cursor position for git temporary files
option gitcommit,gitrebase file-history false
option -r '/\.git/.*\.diff$' file-history false

# Try to detect indent settings based on existing file contents
option c,css,d,java,javascript,lua,nginx,php,sh,vala detect-indent 2,4,8

# Scan for braces to determine next auto-ident size
option c,css,d,go,java,javascript,lua,nginx,php,sh,vala brace-indent true

# Override indent options for Makefiles, since they almost always require tabs
option make indent-width 8 expand-tab false emulate-tab false

# Use space indents in YAML files, since the language spec doesn't allow tabs
option yaml \
    expand-tab true \
    emulate-tab true \
    ws-error tab-indent,tab-after-indent,trailing,special

# Patterns used to detect indent size when "auto-indent" option is enabled
option c indent-regex '^[ \t]*(case|default|do|else|for|if|while)\b'
option java indent-regex '^[ \t]*(case|default|do|else|for|if|while)\b'
option lua indent-regex '(then|do|repeat|else) *$|function *[A-Za-z0-9_.:]* *\([A-Za-z0-9_, ]*\) *$'
option php indent-regex '^[ \t]*(case|default|do|else|for|foreach|if|while)\b'
option python indent-regex ':[ \t]*(#.*)?$'
option sh indent-regex '(^|;)[ \t]*(do|else|then)\b'

# Don't highlight whitespace errors in diff and mail files
option diff,mail ws-error 0

# Aliases for renamed built-in commands (for backwards compatibility)
alias format-paragraph wrap-paragraph
alias pass-through pipe-from
alias git-open 'exec-open sh -c "git ls-files $(git rev-parse --show-cdup) | fzf -m --reverse"'
alias insert-builtin 'show include'