Lines Matching refs:to
9 can edit files that are compressed or encrypted. Some files need to be
20 Previous chapter: |usr_22.txt| Finding the file to edit
26 Back in the early days, the old Teletype machines used two characters to
27 start a new line. One to move the carriage back to the first position
28 (carriage return, <CR>), another to move the paper up (line feed, <LF>).
32 standardized on <CR>. The Microsoft Windows folks decided to keep the old
34 This means that if you try to move a file from one system to another, you
38 when a new file is edited. The following command, for example, tells Vim to
65 On Unix, <NL> is used to break a line. It's not unusual to have a <CR>
68 On the Macintosh, where <CR> is the line break character, it's possible to
70 The result is that it's not possible to be 100% sure whether a file
73 for this type of file. To check for this format anyway, add "mac" to
84 If you use the good old Vi and try to edit an MS-DOS format file, you will
86 detection avoids this. Suppose you do want to edit the file that way? Then
87 you need to overrule the format: >
100 You can use the 'fileformat' option to convert from one file format to
102 that you want to convert to UNIX format. Start by editing the MS-DOS format
106 Vim will recognize this as a dos format file. Now change the file format to
117 Someone sends you an e-mail message, which refers to a file by its URL. For
123 You could start a program to download the file, save it on your local disk and
124 then start Vim to edit it.
125 There is a much simpler way. Move the cursor to any character of the URL.
130 With a bit of luck, Vim will figure out which program to use for downloading
134 the URL is wrong, you don't have permission to read it, the network connection
135 is down, etc. Unfortunately, it's hard to tell the cause of the error. You
136 might want to try the manual way of downloading the file.
147 to be available on your computer. On most Unix systems "ftp" and "rcp" will
148 be present. "scp" and "wget" might need to be installed.
159 Some information you prefer to keep to yourself. For example, when writing
161 to figure out a way to read the questions before the exam starts. Vim can
163 To start editing a new file with encryption, use the "-x" argument to start
174 will cause trouble, Vim asks you to enter the key again:
179 finish editing the file and tell Vim to exit, the file is encrypted and
181 When you edit the file with Vim, it will ask you to enter the same key
182 again. You don't need to use the "-x" argument. You can also use the normal
183 ":edit" command. Vim adds a magic string to the file by which it recognizes
185 If you try to view this file using another program, all you get is garbage.
187 Vim does not have a mechanism to check if the key is the right one (this makes
188 it much harder to break the key).
193 To disable the encryption of a file, set the 'key' option to an empty string:
198 Setting the 'key' option to enable encryption is not a good idea, because
211 The encryption algorithm used by Vim is not very strong. It is good enough to
212 keep out the casual prowler, but not good enough to keep out a cryptology
215 the time needed to crack a password. You can disable the swap file, but then
216 a crash will cause you to lose your work, since Vim keeps all the text in
220 For example, to edit the encrypted file "file.txt" without a swap file use the
230 more often to avoid the risk of losing your changes.
236 If you really want to secure the contents of a file, edit it only on a
237 portable computer not connected to a network, use good encryption tools, and
253 effects are turned off. For example, 'textwidth' is set to zero, to avoid
256 Binary mode can be used to change a message in a program. Be careful not to
258 "R" to enter replace mode.
264 Otherwise, the "ga" command can be used to see the value of the character
289 To move to a specific byte in the file, use the "go" command. For
290 example, to move to byte 2345: >
304 Now convert the file to a hex dump with xxd: >
315 ordinary text. Changing the hex does not cause the printable character to be
338 Vim uses the mentioned programs to do the actual compression and
339 decompression. You might need to install the programs first.