Adding the bindable function 'gotodir', documenting it, and also

documenting 'tofiles' and 'flipnewbuffer', and correcting the
description of 'gototext' (not being about the file browser).


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5015 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-06-23 20:03:25 +00:00
parent a0f66c0691
commit ef16223661
4 changed files with 43 additions and 13 deletions

View File

@ -4,6 +4,10 @@
* src/proto.h, src/global.c, src/search.c: Rename 'no_replace_void()' * src/proto.h, src/global.c, src/search.c: Rename 'no_replace_void()'
to 'flip_replace_void()', to show what it actually does. to 'flip_replace_void()', to show what it actually does.
* doc/man/nanorc.5, doc/texinfo/nano.texi: Update the docs for that. * doc/man/nanorc.5, doc/texinfo/nano.texi: Update the docs for that.
* src/global.c (strtosc): Add the bindable function 'gotodir'.
* doc/man/nanorc.5, doc/texinfo/nano.texi: Document the bindable
functions 'tofiles','gotodir' and 'flipnewbuffer', and correct
the description of 'gototext' (not being about the file browser).
2014-06-22 Benno Schulenberg <bensberg@justemail.net> 2014-06-22 Benno Schulenberg <bensberg@justemail.net>
* src/browser.c (parse_browser_input), src/help.c (parse_help_input): * src/browser.c (parse_browser_input), src/help.c (parse_help_input):

View File

@ -364,7 +364,8 @@ Inserts a file into the current buffer (or into a new buffer when multibuffer
is enabled). is enabled).
.TP .TP
.B whereis .B whereis
Searches for text in the current buffer. Searches for text in the current buffer -- or for filenames matching
a string in the current list in the file browser.
.TP .TP
.B searchagain .B searchagain
Repeats the last search command. Repeats the last search command.
@ -461,6 +462,9 @@ Goes to the last line of the file.
.B gotoline .B gotoline
Goes to a specific line (and column if specified). Goes to a specific line (and column if specified).
.TP .TP
.B gototext
Switches from targetting a line number to searching for text.
.TP
.B findbracket .B findbracket
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
(pairs) with the one under the cursor. (pairs) with the one under the cursor.
@ -520,8 +524,16 @@ Toggles between searching for something and replacing something.
.B flipexecute .B flipexecute
Toggles between inserting a file and executing a command. Toggles between inserting a file and executing a command.
.TP .TP
.B gototext .B flipnewbuffer
Searches for files matching a string in the file browser (reading or writing files). Toggles between inserting into the current buffer and into a new
empty buffer.
.TP
.B tofiles
Starts the file browser, allowing to select a file from a list.
.TP
.B gotodir
Goes to a directory to be specified, allowing to browse anywhere
in the filesystem.
.TP .TP
.B dosformat .B dosformat
When writing a file, switches to writing a DOS format (CR/LF). When writing a file, switches to writing a DOS format (CR/LF).

View File

@ -890,7 +890,8 @@ Inserts a file into the current buffer (or into a new buffer when multibuffer
is enabled). is enabled).
@item whereis @item whereis
Searches for text in the current buffer. Searches for text in the current buffer -- or for filenames matching
a string in the current list in the file browser
@item searchagain @item searchagain
Repeats the last search command. Repeats the last search command.
@ -987,6 +988,9 @@ Goes to the last line of the file.
@item gotoline @item gotoline
Goes to a specific line (and column if specified). Goes to a specific line (and column if specified).
@item gototext
Switches from targetting a line number to searching for text.
@item findbracket @item findbracket
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
(pairs) with the one under the cursor. (pairs) with the one under the cursor.
@ -1046,8 +1050,9 @@ Toggles between searching for something and replacing something.
@item flipexecute @item flipexecute
Toggles between inserting a file and executing a command. Toggles between inserting a file and executing a command.
@item gototext @item flipnewbuffer
Searches for files matching a string in the file browser (reading or writing files). Toggles between inserting into the current buffer and into a new
empty buffer.
@item dosformat @item dosformat
When writing a file, switches to writing a DOS format (CR/LF). When writing a file, switches to writing a DOS format (CR/LF).
@ -1064,6 +1069,13 @@ When writing a file, 'prepends' (writes at the beginning) instead of overwriting
@item backup @item backup
When writing a file, creates a backup of the current file. When writing a file, creates a backup of the current file.
@item tofiles
Starts the file browser, allowing to select a file from a list.
@item gotodir
Goes to a directory to be specified, allowing to browse anywhere
in the filesystem.
@item firstfile @item firstfile
Goes to the first file when using the file browser (reading or writing files). Goes to the first file when using the file browser (reading or writing files).

View File

@ -1480,12 +1480,6 @@ sc *strtosc(char *input)
} else if (!strcasecmp(input, "gototext")) { } else if (!strcasecmp(input, "gototext")) {
s->scfunc = gototext_void; s->scfunc = gototext_void;
s->execute = FALSE; s->execute = FALSE;
#ifndef DISABLE_BROWSER
} else if (!strcasecmp(input, "browser") ||
!strcasecmp(input, "tofiles")) {
s->scfunc = to_files_void;
s->execute = FALSE;
#endif
} else if (!strcasecmp(input, "dosformat")) { } else if (!strcasecmp(input, "dosformat")) {
s->scfunc = dos_format_void; s->scfunc = dos_format_void;
s->execute = FALSE; s->execute = FALSE;
@ -1507,11 +1501,19 @@ sc *strtosc(char *input)
s->execute = FALSE; s->execute = FALSE;
#endif #endif
#ifndef DISABLE_MULTIBUFFER #ifndef DISABLE_MULTIBUFFER
} else if (!strcasecmp(input, "newbuffer")) { } else if (!strcasecmp(input, "flipnewbuffer") ||
!strcasecmp(input, "newbuffer")) {
s->scfunc = new_buffer_void; s->scfunc = new_buffer_void;
s->execute = FALSE; s->execute = FALSE;
#endif #endif
#ifndef DISABLE_BROWSER #ifndef DISABLE_BROWSER
} else if (!strcasecmp(input, "tofiles") ||
!strcasecmp(input, "browser")) {
s->scfunc = to_files_void;
s->execute = FALSE;
} else if (!strcasecmp(input, "gotodir")) {
s->scfunc = goto_dir_void;
s->execute = FALSE;
} else if (!strcasecmp(input, "firstfile")) { } else if (!strcasecmp(input, "firstfile")) {
s->scfunc = do_first_file; s->scfunc = do_first_file;
s->execute = FALSE; s->execute = FALSE;