-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.nanorc
70 lines (60 loc) · 1.63 KB
/
.nanorc
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
65
66
## ~/.nanorc: nano 5.x user config
## syntax highlighting
include ~/.local/share/nano/*.nanorc
## editor
unset jumpyscrolling
set softwrap
set fill 79
set tabsize 4
set autoindent
set wordchars "$-:._"
set matchbrackets "(<[{)>]}"
set trimblanks
set afterends
set atblanks
set unix
## convenience
unset locking
set positionlog
unset historylog
## keybinds
bind ^Z undo main
## disable Ctrl+S to save
unbind ^S main
## keybind macros
## use M-V to insert keystroke literals
## execute current line
## cut current line, execute as shell command, paste output underneath
## allows shell commands within inline comments
## but not /* single-line C-style comments */
bind M-1 "echo "" | sed -E 's,^[#*\\/; ]+? (.*),\1,g' | sh" main
## jump to ctags definition
## move cursor to right of word, mark to beginning, copy marked region,
## paste cutbuffer as search token for nano-overlay --ctags mode,
## opens matches in a sub-shelled nano instance
bind M-2 "[C[D6nano-overlay -e '' 1>&0 2>&0" main
## opens matches in a new terminal window as a background nano instance
bind M-4 "[C[D6visual nano-overlay -e '' &" main
## execute formatter (DESTRUCTIVE!)
## cut current line, execute as shell command, accept buffer as stdin,
## return to top of buffer, paste original line
bind M-0 "|\" main
## ui
set emptyline
set nohelp
set constantshow
unset linenumbers
set indicator
## color scheme
set titlecolor black,cyan
set statuscolor black,white
set errorcolor black,red
set numbercolor lightblack
set scrollercolor lightblack
set keycolor bold,blue
set functioncolor white
set stripecolor lightblack,black