added some corrections to bin/statusbar; the xterm font size is
[home.git] / .nexrc
blobeb860f9ce182eb564499c4d9df17fdb15aa7d215
1 " $Id: .nexrc,v 1.4 2016/12/08 12:27:41 fstef Exp $
3 " nvi editor configuration file
6 " ------------------------------------------------------------------------------
7 " Copywhat (?) 2016 stefano ferro <fstef@cryptolab.net>
8
9 " This work is protected by the Berne Convention but nobody can tell us
10 " what we can do and what we can't, so we don't care.
11 " Anybody caught use, copy, hacking, and distribute this work for any 
12 " purpose, or otherwise experience it, without our permission. 
13 " Credit the creator of this work is a matter of ethics, not a matter 
14 " of law, so is up to you.
15
16 " THE WORK IS PROVIDED "AS IS" AND YOU USE IT AT YOUR OWN RISK.
17 " ------------------------------------------------------------------------------
20 "SET OPTIONS
22 "   There are a large number of options that may be set (or unset) to
23 "   change the editor's behavior. This section describes the options, their
24 "   abbreviations and their default values.
25 "   In each entry below, the first part of the tag line is the full name of
26 "   the option, followed by any equivalent abbreviations. The part in
27 "   square brackets is the default value of the option. Most of the options
28 "   are boolean, i.e., they are either on or off, and do not have an
29 "   associated value.
30 "   Options apply to both ex and vi modes, unless otherwise specified.
32 "   altwerase [off]
33 "          vi only. Select an alternate word erase algorithm.
35 "   autoindent, ai [off]
36 "          Automatically indent new lines.
37 set autoindent
39 "   autoprint, ap [on]
40 "          ex only. Display the current line automatically.
42 "   autowrite, aw [off]
43 "          Write modified files automatically when changing files or
44 "          suspending the editor session.
46 "   backup [""]
47 "          Back up files before they are overwritten.
49 "   beautify, bf [off]
50 "          Discard control characters.
52 "   cdpath [environment variable CDPATH, or current directory]
53 "          The directory paths used as path prefixes for the cd command.
55 "   cedit [no default]
56 "          Set the character to edit the colon command-line history.
58 "   columns, co [80]
59 "          Set the number of columns in the screen.
61 "   comment [off]
62 "          vi only. Skip leading comments in shell, C and C++ language
63 "          files.
65 "   directory, dir [environment variable TMPDIR, or /tmp]
66 "          The directory where temporary files are created.
68 "   edcompatible, ed [off]
69 "          Remember the values of the ‘c’ and ‘g’ suffixes to the
70 "          substitute commands, instead of initializing them as unset for
71 "          each new command.
73 "   errorbells, eb [off]
74 "          ex only. Announce error messages with a bell.
76 "   escapetime [1]
77 "          The tenths of a second ex/vi waits for a subsequent key to
78 "          complete an ⟨escape⟩ key mapping.
80 "   exrc, ex [off]
81 "          Read the startup files in the local directory.
83 "   extended [off]
84 "          Use extended regular expressions (EREs) rather than basic
85 "          regular expressions (BREs). See re_format(7) for more
86 "          information on regular expressions.
88 "   filec [⟨tab⟩]
89 "          Set the character to perform file path completion on the colon
90 "          command line.
92 "   fileencoding, fe [auto detect]
93 "          Set the encoding of the current file.
95 "   flash [on]
96 "          Flash the screen instead of beeping the keyboard on error.
97 set noflash
99 "   hardtabs, ht [0]
100 "          Set the spacing between hardware tab settings. This option
101 "          currently has no effect.
103 "   iclower [off]
104 "          Makes all regular expressions case-insensitive, as long as an
105 "          upper-case letter does not appear in the search string.
107 "   ignorecase, ic [off]
108 "          Ignore case differences in regular expressions.
110 "   inputencoding, ie [locale]
111 "          Set the encoding of your input characters.
113 "   keytime [6]
114 "          The tenths of a second ex/vi waits for a subsequent key to
115 "          complete a key mapping.
117 "   leftright [off]
118 "          vi only. Do left-right scrolling.
120 "   lines, li [24]
121 "          vi only. Set the number of lines in the screen.
123 "   lisp [off]
124 "          vi only. Modify various search commands and options to work with
125 "          Lisp. This option is not yet implemented.
127 "   list [off]
128 "          Display lines in an unambiguous fashion.
130 "   lock [on]
131 "          Attempt to get an exclusive lock on any file being edited, read
132 "          or written.
134 "   magic [on]
135 "          When turned off, all regular expression characters except for
136 "          ‘^’ and ‘$’ are treated as ordinary characters. Preceding
137 "          individual characters by ‘\’ re-enables them.
139 "   matchchars [[]{}()]
140 "          Character pairs looked for by the % command.
142 "   matchtime [7]
143 "          vi only. The tenths of a second ex/vi pauses on the matching
144 "          character when the showmatch option is set.
146 "   mesg [on]
147 "          Permit messages from other users.
148 set nomesg
150 "   msgcat [/usr/share/vi/catalog/]
151 "          Selects a message catalog to be used to display error and
152 "          informational messages in a specified language.
154 "   modelines, modeline [off]
155 "          Read the first and last few lines of each file for ex commands.
156 "          This option will never be implemented.
158 "   noprint [""]
159 "          Characters that are never handled as printable characters.
161 "   number, nu [off]
162 "          Precede each line displayed with its current line number.
163 set nu
165 "   octal [off]
166 "          Display unknown characters as octal numbers, instead of the
167 "          default hexadecimal.
169 "   open [on]
170 "          ex only. If this option is not set, the open and visual commands
171 "          are disallowed.
173 "   optimize, opt [on]
174 "          vi only. Optimize text throughput to dumb terminals. This option
175 "          is not yet implemented.
177 "   paragraphs, para [IPLPPPQPP LIpplpipbp]
178 "          vi only. Define additional paragraph boundaries for the { and }
179 "          commands.
181 "   path [""]
182 "          Define additional directories to search for files being edited.
184 "   print [""]
185 "          Characters that are always handled as printable characters.
187 "   prompt [on]
188 "          ex only. Display a command prompt.
190 "   readonly, ro [off]
191 "          Mark the file and session as read-only.
193 "   recdir [/var/tmp/vi.recover]
194 "          The directory where recovery files are stored.
196 "   redraw, re [off]
197 "          vi only. Simulate an intelligent terminal on a dumb one. This
198 "          option is not yet implemented.
200 "   remap [on]
201 "          Remap keys until resolved.
202 "set noremap
204 "   report [5]
205 "          Set the number of lines about which the editor reports changes
206 "          or yanks.
208 "   ruler [off]
209 "          vi only. Display a row/column ruler on the colon command line.
210 set ruler
212 "   scroll, scr [window size / 2]
213 "          Set the number of lines scrolled.
215 "   searchincr [off]
216 "          Makes the / and ? commands incremental.
217 set searchincr
219 "   sections, sect [NHSHH HUnhsh]
220 "          vi only. Define additional section boundaries for the [[ and ]]
221 "          commands.
223 "   secure [off]
224 "          Turns off all access to external programs.
226 "   shell, sh [environment variable SHELL, or /bin/sh]
227 "          Select the shell used by the editor.
229 "   shellmeta [~{[*?$`'"\]
230 "          Set the meta characters checked to determine if file name
231 "          expansion is necessary.
233 "   shiftwidth, sw [8]
234 "          Set the autoindent and shift command indentation width.
235 set shiftwidth=4
237 "   showmatch, sm [off]
238 "          vi only. Note the left matching characters when the right ones
239 "          are inserted.
240 set showmatch
242 "   showmode, smd [off]
243 "          vi only. Display the current editor mode and a “modified” flag.
244 set showmode
246 "   sidescroll [16]
247 "          vi only. Set the amount a left-right scroll will shift.
249 "   slowopen, slow [off]
250 "          Delay display updating during text input. This option is not yet
251 "          implemented.
253 "   sourceany [off]
254 "          Read startup files not owned by the current user. This option
255 "          will never be implemented.
257 "   tabstop, ts [8]
258 "          This option sets tab widths for the editor display.
259 set tabstop=4
260 set ts=4
262 "   taglength, tl [0]
263 "          Set the number of significant characters in tag names.
265 "   tags, tag [tags]
266 "          Set the list of tags files.
268 "   term, ttytype, tty [environment variable TERM]
269 "          Set the terminal type.
271 "   terse [off]
272 "          This option has historically made editor messages less verbose.
273 "          It has no effect in this implementation.
275 "   tildeop [off]
276 "          Modify the ~ command to take an associated motion.
278 "   timeout, to [on]
279 "          Time out on keys which may be mapped.
281 "   ttywerase [off]
282 "          vi only. Select an alternate erase algorithm.
284 "   verbose [off]
285 "          vi only. Display an error message for every error.
286 set verbose
288 "   w300 [no default]
289 "          vi only. Set the window size if the baud rate is less than 1200
290 "          baud.
292 "   w1200 [no default]
293 "          vi only. Set the window size if the baud rate is equal to 1200
294 "          baud.
296 "   w9600 [no default]
297 "          vi only. Set the window size if the baud rate is greater than
298 "          1200 baud.
300 "   warn [on]
301 "          ex only. This option causes a warning message to be printed on
302 "          the terminal if the file has been modified since it was last
303 "          written, before a ! command.
305 "   window, w, wi [environment variable LINES − 1]
306 "          Set the window size for the screen.
308 "   windowname [off]
309 "          Change the icon/window name to the current file name.
311 "   wraplen, wl [0]
312 "          vi only. Break lines automatically, the specified number of
313 "          columns from the left-hand margin. If both the wraplen and
314 "          wrapmargin edit options are set, the wrapmargin value is used.
316 "   wrapmargin, wm [0]
317 "          vi only. Break lines automatically, the specified number of
318 "          columns from the right-hand margin. If both the wraplen and
319 "          wrapmargin edit options are set, the wrapmargin value is used.
321 "   wrapscan, ws [on]
322 "          Set searches to wrap around the end or beginning of the file.
323 set nowrapscan
325 "   writeany, wa [off]
326 "          Turn off file-overwriting checks.
328 "------------------------------------------------------------------------------ 
329 "                                                                macros
330 "------------------------------------------------------------------------------ 
332 " the maps belowe are self-explanatory
333 map ; :
334 map g 1G
336 " abbreviations
337 ab iron stefano <ironsteve@autistici.org>
338 ab fs fstef <fstef@cryptolab.net>
340 " write a delimiter line
341 ab cmt \e78i-\e
343 " write file name, timestamp of revision and author name
344 ab tl  $Id:\e:r!ls %\rkJA,v\emj:r !date "+\%Y/\%m/\%d \%T"\rkJA fstef Exp $\e`ja
346 " write the license template
347 ab lic \e:r!~/bin/license\r$