nanorc.sample 3.11 KB
Newer Older
1
2
3
# Sample initialization file for GNU nano
# Please note that you must have configured nano with 
# --enable-nanorc for this file to be read!
4
5
#
# To make sure a value is not enabled, use "unset <option>"
6

7
8
9
10
11
# Use auto-indentation
# set autoindent

# Backup files to filename~
# set backup
12
13
14
15
16
17
18

# Constantly update the cursor position
# set const

# Use cut to end of line with ^K by default
# set cut

19
# Use this value instead of the default
Chris Allegretta's avatar
Chris Allegretta committed
20
21
# An out-of-range negative value can make nano die complaining that the
# screen is too small
22
23
24
25
26
27
28
29
30
31
32
33
34
# set fill -8

# Use alternate keypad routines
# set keypad

# Allow multiple file buffers (using ^R inserts into separate buffer)
# You must have configured with --enable-multibuffer or --enable-extra
# for this to work
#
# set multibuffer

# Don't convert files from DOS/Mac format
# set noconvert
35
36
37
38

# Don't follow symlinks when writing files
# set nofollow

39
40
41
42
43
44
# Don't display the help lists at the bottom of the screen
# set nohelp

# Don't wrap text at all
# set nowrap

45
46
47
# Set operating directory (chroot of sorts)
# set operatingdir "~"

Chris Allegretta's avatar
Chris Allegretta committed
48
# Use Pico Compatibility mode for the shortcut lists and search text
49
50
# set pico

Chris Allegretta's avatar
Chris Allegretta committed
51
52
53
54
55
56
# The email-quote string.  This is a "regular expression" if your
# system supports them, otherwise a literal string.  Default
# set quotestr "^([ \t]*[|>:}#])+" if you have regexps, otherwise
# set quotestr "> ".
# You can get old nano quoted-justify behavior via:
# set quotestr "(> )+"
57

58
59
60
61
62
# Do regular expression searches by default 
# set regexp

# Use smooth scrolling as the default
# set smooth
63

64
65
66
# Use this spelling checker instead of the default one
# set speller aspell

Chris Allegretta's avatar
Chris Allegretta committed
67
# Allow nano to be suspended with ^Z
68
69
# set suspend

Chris Allegretta's avatar
Chris Allegretta committed
70
# Use this tab size instead of the default; it must be greater than 0
71
# set tabsize 4
72

73
74
# Save automatically on exit, don't prompt
# set tempfile
75

76
77
# Disallow file modification, why would you want this in an rc file? ;)
# set view
78

79
# Color setup
80
81
82
# Format: 
# syntax "short description" ["filename regex" ...]
# color foreground,background "regex" ["regex"...]
83
84
#
# Legal colors are: white, black, red, blue, green, yellow, purple, cyan
Jordi Mallach's avatar
Jordi Mallach committed
85
# You may use the prefix "bright" to mean a stronger color highlight
86
#
87
88
# To use multi-line regexes use the start="regex" end="regex" format.
#
89
90
91
# If your system supports transparency, not specifying a background
# color will use a transparent color.  If you don't want this, be sure
# to set the background color to black or white.
92

Chris Allegretta's avatar
Chris Allegretta committed
93
# syntax "c-file" ".*\.c$" ".*\.h$"
94
# color red "\<[A-Z_]{2,}\>" 
95
96
97
98
99
# color green "\<float\>" "\<char\>" "\<int\>" "\<void\>"
# color green "\<static\>" "\<const\>" "\<struct\>" 
# color brightyellow "\<if\>" "\<while\>" "\<do\>" "\<else\>" "\<case\>" "\<switch\>"
# color brightcyan "#define" "#include" "#ifn*def" "#endif" 
# color brightcyan "#elif" "#else" "#if"
100

101
102
103
# You will in general want your comments and strings to come last,
# because syntax highlighting rules will be applied in the order they are
# read in
104

105
# color brightyellow "<[^= ]*>" "\"[^"]*\""
106
# color brightblue "//.*"
Chris Allegretta's avatar
Chris Allegretta committed
107
# color brightblue start="/\*" end="\*/"
108
109

# For this you will probably want to set your editor to "nano -Y mutt"
110

111
112
# syntax "mutt"
# color green "^>.*"