diff options
author | 2013-05-20 12:41:29 -0400 | |
---|---|---|
committer | 2013-05-20 12:41:29 -0400 | |
commit | cd53300ce7b4b6ce90dcf95525fd7cc14efc3685 (patch) | |
tree | 907466d522cc6939b42b6d043e991c27e09a1cea /doc/04_WorkingWithFiles.md | |
parent | d042865f672d6708df80250c9c59172148a55f11 (diff) | |
download | textadept-cd53300ce7b4b6ce90dcf95525fd7cc14efc3685.tar.gz textadept-cd53300ce7b4b6ce90dcf95525fd7cc14efc3685.zip |
Rewrote the manual to use the active voice.
Diffstat (limited to 'doc/04_WorkingWithFiles.md')
-rw-r--r-- | doc/04_WorkingWithFiles.md | 153 |
1 files changed, 75 insertions, 78 deletions
diff --git a/doc/04_WorkingWithFiles.md b/doc/04_WorkingWithFiles.md index ff8ce0fa..029f2e0d 100644 --- a/doc/04_WorkingWithFiles.md +++ b/doc/04_WorkingWithFiles.md @@ -2,32 +2,33 @@ ## Buffers -One of the first things you will notice when opening multiple files in Textadept -is that there is no tab bar showing the files that are open. This was a design -decision because Textadept was built to support unlimited split views. Having a -single tab bar for multiple views would cause confusion and having one tab bar -per view would clutter the interface. +One of the first things notably absent when opening multiple files in Textadept +is the lack of a tab bar showing the open files. This design decision allowed +Textadept to support unlimited split views from the very beginning. Having a +single tab bar for multiple views causes confusion and having one tab bar per +view clutters the interface. Instead of having tabs, Textadept has the buffer browser. Press `Ctrl+B` (`⌘B` on Mac OSX | `M-B` or `M-S-B` in curses) to open it.  -The buffer browser shows you a list of currently open buffers, the most recent +The buffer browser displays a list of currently open buffers, the most recent towards the bottom. Typing part of any filename filters the list. Spaces are -wildcards. You can also just use the arrow keys. Pressing `Enter` or selecting -`OK` switches to the selected buffer. +wildcards. The arrow keys move the selection up and down. Pressing `Enter`, +selecting `OK`, or double-clicking a buffer in the list switches to the selected +buffer.  -You can see which buffer is active by looking at Textadept's titlebar. Pressing +Textadept shows the name of the active buffer in its titlebar. Pressing `Ctrl+Tab` (`^⇥` on Mac OSX | `M-N` in curses) cycles to the next buffer and `Ctrl+Shift+Tab` (`^⇧⇥` | `M-P`) cycles to the previous one. ### Settings Individual files have three configurable settings: indentation, line endings, -and encoding. Indentation is composed of an indentation character and an +and encoding. Indentation consists of an indentation character and an indentation size. Line endings are characters that separate lines. File encoding determines how text characters are displayed. Textadept shows these settings in the buffer status statusbar. @@ -36,45 +37,42 @@ settings in the buffer status statusbar. #### Indentation -Indentation is usually set by a [language-specific module][] or by the user's -[settings][]. By default, indentation is 2 spaces. You can toggle between using -tabs and spaces manually by pressing `Ctrl+Alt+Shift+T` (`^⇧T` on Mac OSX | -`M-T` or `M-S-T` in curses). Toggling between tabs and spaces only affects -future indentation; it does not convert existing indentation. `Ctrl+Alt+I` (`^I` -| `M-I`) performs the conversion. (If the buffer is using tabs, all indenting -spaces are converted to tabs. If the buffer is using spaces, all indenting tabs -are converted to spaces.) Similarly, you can set indentation size manually using -the "Buffer -> Indentation" menu. +Usually, [language-specific modules][] or [user settings][] dictate the +buffer's indentation setting. By default, indentation is 2 spaces. Pressing +`Ctrl+Alt+Shift+T` (`^⇧T` on Mac OSX | `M-T` or `M-S-T` in curses) manually +toggles between using tabs and spaces, although this only affects future +indentation. Existing indentation remains unchanged. `Ctrl+Alt+I` (`^I` | `M-I`) +performs the conversion. (If the buffer uses tabs, all indenting spaces convert +to tabs. If the buffer uses spaces, all indenting tabs convert to spaces.) +Similarly, the "Buffer -> Indentation" menu manually sets indentation size. -[language-specific module]: 07_Modules.html#Buffer.Properties -[settings]: 08_Preferences.html#Buffer.Settings +[language-specific modules]: 07_Modules.html#Buffer.Properties +[user settings]: 08_Preferences.html#Buffer.Settings #### Line Endings -Line endings, commonly known as end-of-line (EOL) markers, are set for new files -based on the current platform. On Windows, CRLF ("\r\n") is used. Otherwise, LF -("\n") is. This can be changed manually using the "Buffer -> EOL Mode" menu. -Unlike indentation settings, switching EOL modes converts all existing EOLs -automatically. Textadept attempts to auto-detect the EOL mode of opened files -regardless of the current platform, but falls back to the defaults mentioned -earlier when necessary. +The current platform determines which line endings, commonly known as +end-of-line (EOL) markers, to use by default. On Windows it is CRLF ("\r\n"). On +all other platforms it is LF ('\n'). Textadept first tries to auto-detect the +EOL mode of opened files before falling back on the platform default. The +"Buffer -> EOL Mode" menu manually changes line endings and, unlike indentation +settings, automatically converts all existing EOLs. #### Encodings -Textadept represents all characters and strings internally as UTF-8. You will -not notice any difference for working with files containing ASCII text since -UTF-8 is compatible with it. Textadept can also detect ISO-8859-1 and MacRoman, -the primary encodings used on Windows and Mac OSX respectively. Files with more -exotic encodings may not be detected properly, if at all. You can change the -list of encodings Textadept tries to detect via [`io.encodings`][]. +Textadept represents all characters and strings internally as UTF-8. UTF-8 is +compatible with ASCII so those files are always detected properly. Textadept +also recognizes ISO-8859-1 and MacRoman, two common encodings used on Windows +and Mac OSX respectively. If you work with files whose encodings Textadept does +not recognize, add the encodings to [`io.encodings`][] in your [preferences][]. -It is recommended to use UTF-8 encoded files because UTF-8 is very well -supported by other text editors and operating systems. You can change file -encoding via the "Buffer -> Encoding" menu. Conversion is immediate, requiring -no separate steps. Textadept saves new files as UTF-8 by default, but does not -alter the encoding of existing files. +UTF-8 is the recommended file encoding because of its wide support by other text +editors and operating systems. The "Buffer -> Encoding" menu changes the file +encoding and performs the conversion. Textadept saves new files as UTF-8 by +default, but does not alter the encoding of existing ones. [`io.encodings`]: api/io.html#encodings +[preferences]: 08_Preferences.html ### Recent Files @@ -84,25 +82,25 @@ files to reopen. ### Sessions -By default, Textadept saves its state on exit so it can be restored the next -time the editor starts up. You can disable this by passing the `-n` or -`--nosession` switch to Textadept on startup. Sessions can be manually saved and -opened via the "File -> Save Session..." and "File -> Load Session..." menus or -by using the `-s` and `--session` switches on startup. The switches accept the -path of a session file or the name of a session in *~/.textadept/*. Session -files store information such as open buffers, current split views, caret and -scroll positions in each buffer, Textadept's window size, and recently opened -files. Tampering with session files may have unintended consequences. +By default, Textadept saves its state when quitting in order to restore it the +next time the editor starts up. Passing the `-n` or `--nosession` switch to +Textadept on startup disables this feature. The "File -> Save Session..." and +"File -> Load Session..." menus manually save and open sessions while the `-s` +and `--session` switches load a session on startup. The switches accept the path +of a session file or the name of a session in *~/.textadept/*. Session files +store information such as open buffers, current split views, caret and scroll +positions in each buffer, Textadept's window size, and recently opened files. +Tampering with session files may have unintended consequences. ### Snapopen A quicker, though slightly more limited alternative to the standard file -selection dialog is snapopen. It behaves like the buffer browser, but displays a -list of files to open, including files in sub-directories. You can snapopen the -current file's directory with `Ctrl+Alt+Shift+O` (`^⌘⇧O` on Mac OSX | `M-S-O` in -curses) or from the "Tools -> Snapopen -> Current Directory" menu. Snapopen is -pretty limited from the menu, but more versatile in [scripts][]. `Ctrl+U` (`⌘U` -| `^U`) snaps open *~/.textadept/*. +selection dialog is snapopen. It too behaves like the buffer browser, but +displays a list of files to open, including files in sub-directories. Pressing +`Ctrl+Alt+Shift+O` (`^⌘⇧O` on Mac OSX | `M-S-O` in curses) snaps open the +current file's directory and `Ctrl+U` (`⌘U` | `^U`) snaps open *~/.textadept/*. +Snapopen is pretty limited from the "Tools -> Snapopen" menu, but more versatile +in [scripts][]. [scripts]: api/io.html#snapopen @@ -112,31 +110,31 @@ pretty limited from the menu, but more versatile in [scripts][]. `Ctrl+U` (`⌘U ### Split Views -Textadept allows you to split the editor window as many times as you like both -horizontally and vertically. `Ctrl+Alt+S` or `Ctrl+Alt+H` splits horizontally -into top and bottom views and `Ctrl+Alt+V` splits vertically (`^S` and `^V` -respectively on Mac OSX | N/A in curses) into side-by-side views. You can resize -the splitter bar by clicking and dragging with the mouse or using `Ctrl+Alt++` -and `Ctrl+Alt+-` (`^+` and `^-` | N/A). The same file can be opened in multiple -views. +Textadept allows you to split the editor window an unlimited number of times +both horizontally and vertically. `Ctrl+Alt+S` or `Ctrl+Alt+H` splits +horizontally into top and bottom views and `Ctrl+Alt+V` splits vertically (`^S` +and `^V` respectively on Mac OSX | N/A in curses) into side-by-side views. +Clicking and dragging on the splitter bar with the mouse or pressing +`Ctrl+Alt++` and `Ctrl+Alt+-` (`^+` and `^-` | N/A) resizes the split. Textadept +supports viewing a single buffer in two or more views. -Pressing `Ctrl+Alt+N` (`^⌥⇥` on Mac OSX | N/A in curses) goes to the next view -and `Ctrl+Alt+P` (`^⌥⇧⇥` | N/A) goes to the previous one. Note: depending on the -split sequence, the order when cycling between views may be unexpected. +Pressing `Ctrl+Alt+N` (`^⌥⇥` on Mac OSX | N/A in curses) jumps to the next view +and `Ctrl+Alt+P` (`^⌥⇧⇥` | N/A) jumps the previous one. However, depending on +the split sequence, the order when cycling between views may not be linear. To unsplit a view, enter the view to keep open and press `Ctrl+Alt+W` (`^W` on Mac OSX | N/A in curses). To unsplit all views, use `Ctrl+Alt+Shift+W` (`^⇧W` | N/A). -Split views are unavailable in curses. +Textadept curses does not support split views. ### Settings Individual views have many configurable settings. Among the more useful settings are viewing line endings, handling long lines, viewing indentation guides, and -viewing whitespace. These options change how buffers in the _current_ view are -displayed. Changing a setting in one view does not change that setting in -any other split view. It will have to be done manually. +viewing whitespace. These options change how to display buffers in the _current_ +view. Changing a setting in one view does not change that setting in +any other split view. You must do it manually. #### Line Endings @@ -145,28 +143,27 @@ Normally, EOL characters ("\r" and "\n") are invisible. Pressing #### Long Lines -By default, lines with more characters than the view can show are not wrapped -into view. `Ctrl+Alt+\` (`^\` on Mac OSX | none in curses) toggles line -wrapping. +By default, lines with more characters than the view can show do not wrap into +view. `Ctrl+Alt+\` (`^\` on Mac OSX | none in curses) toggles line wrapping. #### Indentation Guides -By default, small guiding lines are shown based on indentation level. -`Ctrl+Alt+Shift+I` (`^⇧I` on Mac OSX | N/A in curses) toggles showing these -guides. +Views show small guiding lines based on indentation level by default. +`Ctrl+Alt+Shift+I` (`^⇧I` on Mac OSX | N/A in curses) toggles the visibility of +these guides. -Indentation guides are unavailable in curses. +Textadept curses does not support indentation guides. #### Whitespace Normally, whitespace characters, tabs and spaces, are invisible. Pressing `Ctrl+Alt+Shift+S` (`^⇧S` on Mac OSX | none in curses) toggles their visibility. -Visible spaces are shown as dots and visible tabs are shown as arrows. +Visible spaces show up as dots and visible tabs show up as arrows. ### Zoom -You can temporarily increase or decrease the font size in a view with `Ctrl+=` +To temporarily increase or decrease the font size in a view, press `Ctrl+=` (`⌘=` on Mac OSX | N/A in curses) and `Ctrl+-` (`⌘-` | N/A) respectively. `Ctrl+0` (`⌘0` | N/A) resets the zoom. -Zooming is unavailable in curses. +Textadept curses does not support zooming. |