|
| 1 | +## Vim 7.4 for ATARI ST/TOS |
| 2 | + |
| 3 | +[View the original README](README.txt) |
| 4 | + |
| 5 | +The following [help document](runtime_tos/doc/os_atari.txt) can also be viewed in Vim using |
| 6 | + |
| 7 | +`:help atari` |
| 8 | + |
| 9 | +``` |
| 10 | +*os_atari.txt* For Vim version 7.4. Last change: Sep 2024 |
| 11 | + |
| 12 | + Notes on the Atari TOS Port |
| 13 | + |
| 14 | +|TOS_01| Introduction |
| 15 | +|TOS_02| Installation |
| 16 | +|TOS_03| Using a Shell |
| 17 | +|TOS_04| Setting the Palette |
| 18 | +|TOS_05| Changing Resolution |
| 19 | +|TOS_06| Changing the Keyboard Repeat Rate |
| 20 | +|TOS_07| Development |
| 21 | + |
| 22 | +============================================================================== |
| 23 | + |
| 24 | +*TOS_01* Introduction *atari* |
| 25 | + |
| 26 | +The distribution contains tiny, small and normal feature builds. The |
| 27 | +executables are named vimt.ttp, vims.ttp and vim.ttp respectively. There are |
| 28 | +also 68020-60 builds of each. |
| 29 | + |
| 30 | +vimt.ttp starts and quits much faster than vim.ttp and is also much smaller |
| 31 | +(~450Kb vs. ~1Mb) but has far fewer features (e.g. splits, command windows and |
| 32 | +eval are missing). |
| 33 | + |
| 34 | +Use the :version command to check what features a build has. |
| 35 | + |
| 36 | +============================================================================== |
| 37 | + |
| 38 | +*TOS_02* Installation |
| 39 | + |
| 40 | +The distribution includes a cut down runtime. You may use the full Vim runtime |
| 41 | +(or add files to it) if you wish but having fewer files to glob improves |
| 42 | +performance. |
| 43 | + |
| 44 | +You should set the following environment variables in your shell: |
| 45 | +VIM |
| 46 | +VIMRUNTIME |
| 47 | +HOME |
| 48 | +TMP |
| 49 | + |
| 50 | +However, if not set the following defaults are used: |
| 51 | +VIM=C:\VIM |
| 52 | +VIMRUNTIME=C:\VIM\RT |
| 53 | + |
| 54 | +The following variables are available in the normal build (which supports the |
| 55 | +'eval' feature): |
| 56 | + |
| 57 | +*v:resolution* The current resolution. |
| 58 | + Either st-{low,med,hi}, tt-{low,med,hi} or a Falcon mode |
| 59 | + such as 320x200, 384x240 etc |
| 60 | +*v:machine* The current machine. |
| 61 | + Either ST, STe, TT, Falcon or unknown |
| 62 | +*v:os* The current OS. |
| 63 | + Either TOS, MagiC, MiNT or Geneva |
| 64 | + |
| 65 | +They could be used to conditionally set options in your vimrc. |
| 66 | + |
| 67 | +You may need to test for the availability of a feature in vimrc. Do this |
| 68 | +using has(), e.g. |
| 69 | + |
| 70 | +if has("eval") |
| 71 | + compiler DEVPAC |
| 72 | + color BLUE |
| 73 | +endif |
| 74 | + |
| 75 | +if has("eval") && v:os=="TOS" |
| 76 | + " set options, define functions. Whatever you want |
| 77 | +endif |
| 78 | + |
| 79 | +ATARI Vim looks for vimrc files in the usual places. Check where these are |
| 80 | +using the :version command. |
| 81 | + |
| 82 | +It is recommended to store user files in $HOME\vimfiles. |
| 83 | + |
| 84 | +============================================================================== |
| 85 | + |
| 86 | +*TOS_03* Using a Shell *shell* *gulam* |
| 87 | + |
| 88 | +Any shell that sets the _shell_p vector can be used, e.g. Gulam. |
| 89 | + |
| 90 | +:lmake and :lopen can be used in vim.ttp. By default Vim attempts to execute |
| 91 | +the make utility in the current working directory. If make is not installed, |
| 92 | +the simplest way to get this to work is to create a shell script. |
| 93 | + |
| 94 | +e.g. 'make.g' might contain: |
| 95 | + |
| 96 | +d:\devpac\gen.ttp main.s |
| 97 | + |
| 98 | +You will also need to set the make program like so: |
| 99 | + |
| 100 | + :set makeprg=make.g |
| 101 | + |
| 102 | +Then to make, use: |
| 103 | + |
| 104 | + :lmake |
| 105 | + |
| 106 | +The cut down runtime includes compiler files for gcc, devpac and vasm. These |
| 107 | +files will format the error output from these programs for display by :lopen. |
| 108 | + |
| 109 | +For devpac you will need to set the default compiler first. Do this with the |
| 110 | +command: |
| 111 | + |
| 112 | + :compiler DEVPAC |
| 113 | + :compiler<SP><TAB> to enumerate them |
| 114 | + |
| 115 | +============================================================================== |
| 116 | + |
| 117 | +*TOS_04* Setting the Palette *paltos* *palvim* *palmap* *sane* |
| 118 | + |
| 119 | +Vim colours are numbered thus: |
| 120 | + |
| 121 | +0 Black |
| 122 | +1 DarkBlue |
| 123 | +2 DarkGreen |
| 124 | +3 DarkCyan |
| 125 | +4 DarkRed |
| 126 | +5 DarkMagenta |
| 127 | +6 Brown |
| 128 | +7 LightGray |
| 129 | +8 DarkGray |
| 130 | +9 Blue |
| 131 | +10 Green |
| 132 | +11 Cyan |
| 133 | +12 Red |
| 134 | +13 Magenta |
| 135 | +14 Yellow |
| 136 | +15 White |
| 137 | + |
| 138 | +When ATARI Vim starts it assumes that a default ST palette is set and maps Vim |
| 139 | +colours to ST colours as best it can. |
| 140 | + |
| 141 | +The distribution includes many Vim colour schemes. Some target 256 colour |
| 142 | +xterm displays so will not display perfectly. Tab through all colour schemes |
| 143 | +with: |
| 144 | + |
| 145 | + :color<SP><TAB> |
| 146 | + |
| 147 | +For example, to set the blue scheme use: |
| 148 | + |
| 149 | + :color blue |
| 150 | + |
| 151 | +Remove a colour scheme using: |
| 152 | + |
| 153 | + :color DEFAULT |
| 154 | + |
| 155 | +You can check the current highlighting scheme using the :hi command. You may |
| 156 | +wish to override some highlighting options, e.g. |
| 157 | + |
| 158 | + :hi Search ctermbg=0 ctermfg=15 |
| 159 | + |
| 160 | +:palvim (single TOS only) |
| 161 | + |
| 162 | +Better colour compatibility is achieved by changing the ST palette to match |
| 163 | +Vim. A colour remapping occurs to ensure that the Vim background colour |
| 164 | +matches the border colour. When using a resolution with fewer than 16 |
| 165 | +colours an additional colour remapping takes place. This port supports a |
| 166 | +maximum of 16 colours even on the TT and Falcon. |
| 167 | + |
| 168 | +When Vim is quit, the startup palette is restored. |
| 169 | + |
| 170 | +:paltos (single TOS only) |
| 171 | + |
| 172 | +This sets a default ST palette, potentially overriding the palette set when |
| 173 | +Vim started. |
| 174 | + |
| 175 | +When Vim is quit, the startup palette is restored. |
| 176 | + |
| 177 | +:palmap {16 hex char string} |
| 178 | + |
| 179 | +You may map your existing palette to the Vim colour numbers by supplying a 16 |
| 180 | +character hex string; one hex digit per colour indexes 0 through to 15. |
| 181 | + |
| 182 | +e.g. |
| 183 | + |
| 184 | + :palmap abc0123456789def |
| 185 | + |
| 186 | +will map colour index 10 to Vim colour number 0 etc |
| 187 | + |
| 188 | +:sane |
| 189 | + |
| 190 | +Will restore your palette and resolution to their startup values. |
| 191 | + |
| 192 | +============================================================================== |
| 193 | + |
| 194 | +*TOS_05* Changing Resolution *rez* |
| 195 | + |
| 196 | +:rez will display the current resolution. |
| 197 | +:rez name will set the named resolution. |
| 198 | +:rez<SP><TAB> will allow you to <TAB> through all valid resolutions. |
| 199 | +:sane will restore your palette and resolution to their startup |
| 200 | + values. |
| 201 | + |
| 202 | +When Vim is quit, the startup resolution is restored. |
| 203 | + |
| 204 | +The current resolution is stored in the variable |v:resolution|. |
| 205 | + |
| 206 | +============================================================================== |
| 207 | + |
| 208 | +*TOS_06* Changing the Keyboard Repeat Rate *Kbrate* |
| 209 | + |
| 210 | +:Kbrate Display the current setting. |
| 211 | +:Kbrate initial every Set keypresses to repeat after an initial |
| 212 | + number of ticks and then every n 50/60Hz ticks. |
| 213 | + |
| 214 | +Typically, having multiple split windows open will slow down Vim. When Vim is |
| 215 | +slow you may find it useful to alter the Kbrate, particularly the 'every' |
| 216 | +value. Increasing it prevents the input buffer becoming too full and makes |
| 217 | +Vim feel more responsive. |
| 218 | + |
| 219 | +When Vim is quit, the startup keyboard rate is restored. |
| 220 | + |
| 221 | +============================================================================== |
| 222 | + |
| 223 | +*TOS_07* Development *develop* |
| 224 | + |
| 225 | +Changes to the existing code are wrapped with the 'TOS' macro. |
| 226 | + |
| 227 | +All os_atari_* files and Make_tos.mak are specific to this port. |
| 228 | + |
| 229 | +============================================================================== |
| 230 | + |
| 231 | +vim:tw=78:ts=8:ft=help:norl:noexpandtab: |
| 232 | +``` |
0 commit comments