Christian Brabandt | 015c84c | 2024-10-07 21:48:32 +0200 | [diff] [blame] | 1 | *usr_toc.txt* For Vim version 9.1. Last change: 2024 Oct 07 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2 | |
| 3 | VIM USER MANUAL - by Bram Moolenaar |
| 4 | |
h-east | 738ebfe | 2024-10-05 16:56:47 +0200 | [diff] [blame] | 5 | Table Of Contents *user-manual* *usr* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 6 | |
| 7 | ============================================================================== |
| 8 | Overview ~ |
| 9 | |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 10 | Getting Started ~ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 11 | |usr_01.txt| About the manuals |
| 12 | |usr_02.txt| The first steps in Vim |
| 13 | |usr_03.txt| Moving around |
| 14 | |usr_04.txt| Making small changes |
| 15 | |usr_05.txt| Set your settings |
| 16 | |usr_06.txt| Using syntax highlighting |
| 17 | |usr_07.txt| Editing more than one file |
| 18 | |usr_08.txt| Splitting windows |
| 19 | |usr_09.txt| Using the GUI |
| 20 | |usr_10.txt| Making big changes |
| 21 | |usr_11.txt| Recovering from a crash |
| 22 | |usr_12.txt| Clever tricks |
| 23 | |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 24 | Editing Effectively ~ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 25 | |usr_20.txt| Typing command-line commands quickly |
| 26 | |usr_21.txt| Go away and come back |
| 27 | |usr_22.txt| Finding the file to edit |
| 28 | |usr_23.txt| Editing other files |
| 29 | |usr_24.txt| Inserting quickly |
| 30 | |usr_25.txt| Editing formatted text |
| 31 | |usr_26.txt| Repeating |
| 32 | |usr_27.txt| Search commands and patterns |
| 33 | |usr_28.txt| Folding |
| 34 | |usr_29.txt| Moving through programs |
| 35 | |usr_30.txt| Editing programs |
| 36 | |usr_31.txt| Exploiting the GUI |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 37 | |usr_32.txt| The undo tree |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 38 | |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 39 | Tuning Vim ~ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 40 | |usr_40.txt| Make new commands |
| 41 | |usr_41.txt| Write a Vim script |
| 42 | |usr_42.txt| Add new menus |
| 43 | |usr_43.txt| Using filetypes |
| 44 | |usr_44.txt| Your own syntax highlighted |
Bram Moolenaar | 65e0d77 | 2020-06-14 17:29:55 +0200 | [diff] [blame] | 45 | |usr_45.txt| Select your language (locale) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 46 | |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 47 | Writing Vim script ~ |
| 48 | |usr_50.txt| Advanced Vim script writing |
Bram Moolenaar | 8cc5b55 | 2022-06-23 13:04:20 +0100 | [diff] [blame] | 49 | |usr_51.txt| Write plugins |
| 50 | |usr_52.txt| Write larger plugins |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 51 | |
| 52 | Making Vim Run ~ |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 53 | |usr_90.txt| Installing Vim |
| 54 | |
| 55 | |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 56 | Reference manual ~ |
Bram Moolenaar | 910f66f | 2006-04-05 20:41:53 +0000 | [diff] [blame] | 57 | |reference_toc| More detailed information for all commands |
Bram Moolenaar | ca003e1 | 2006-03-17 23:19:38 +0000 | [diff] [blame] | 58 | |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 59 | The user manual (an older version) is available as a single, ready to print |
| 60 | HTML and PDF file here: |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 61 | http://vimdoc.sf.net |
| 62 | |
| 63 | ============================================================================== |
| 64 | Getting Started ~ |
| 65 | |
| 66 | Read this from start to end to learn the essential commands. |
| 67 | |
| 68 | |usr_01.txt| About the manuals |
| 69 | |01.1| Two manuals |
| 70 | |01.2| Vim installed |
| 71 | |01.3| Using the Vim tutor |
| 72 | |01.4| Copyright |
| 73 | |
| 74 | |usr_02.txt| The first steps in Vim |
| 75 | |02.1| Running Vim for the First Time |
| 76 | |02.2| Inserting text |
| 77 | |02.3| Moving around |
| 78 | |02.4| Deleting characters |
| 79 | |02.5| Undo and Redo |
| 80 | |02.6| Other editing commands |
| 81 | |02.7| Getting out |
| 82 | |02.8| Finding help |
| 83 | |
| 84 | |usr_03.txt| Moving around |
| 85 | |03.1| Word movement |
| 86 | |03.2| Moving to the start or end of a line |
| 87 | |03.3| Moving to a character |
| 88 | |03.4| Matching a paren |
| 89 | |03.5| Moving to a specific line |
| 90 | |03.6| Telling where you are |
| 91 | |03.7| Scrolling around |
| 92 | |03.8| Simple searches |
| 93 | |03.9| Simple search patterns |
| 94 | |03.10| Using marks |
| 95 | |
| 96 | |usr_04.txt| Making small changes |
| 97 | |04.1| Operators and motions |
| 98 | |04.2| Changing text |
| 99 | |04.3| Repeating a change |
| 100 | |04.4| Visual mode |
| 101 | |04.5| Moving text |
| 102 | |04.6| Copying text |
| 103 | |04.7| Using the clipboard |
| 104 | |04.8| Text objects |
| 105 | |04.9| Replace mode |
| 106 | |04.10| Conclusion |
| 107 | |
| 108 | |usr_05.txt| Set your settings |
| 109 | |05.1| The vimrc file |
| 110 | |05.2| The example vimrc file explained |
Bram Moolenaar | 68e6560 | 2019-05-26 21:33:31 +0200 | [diff] [blame] | 111 | |05.3| The defaults.vim file explained |
| 112 | |05.4| Simple mappings |
| 113 | |05.5| Adding a package |
| 114 | |05.6| Adding a plugin |
| 115 | |05.7| Adding a help file |
| 116 | |05.8| The option window |
| 117 | |05.9| Often used options |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 118 | |
| 119 | |usr_06.txt| Using syntax highlighting |
| 120 | |06.1| Switching it on |
| 121 | |06.2| No or wrong colors? |
| 122 | |06.3| Different colors |
| 123 | |06.4| With colors or without colors |
| 124 | |06.5| Printing with colors |
| 125 | |06.6| Further reading |
| 126 | |
| 127 | |usr_07.txt| Editing more than one file |
| 128 | |07.1| Edit another file |
| 129 | |07.2| A list of files |
| 130 | |07.3| Jumping from file to file |
| 131 | |07.4| Backup files |
| 132 | |07.5| Copy text between files |
| 133 | |07.6| Viewing a file |
| 134 | |07.7| Changing the file name |
| 135 | |
| 136 | |usr_08.txt| Splitting windows |
| 137 | |08.1| Split a window |
| 138 | |08.2| Split a window on another file |
| 139 | |08.3| Window size |
| 140 | |08.4| Vertical splits |
| 141 | |08.5| Moving windows |
| 142 | |08.6| Commands for all windows |
| 143 | |08.7| Viewing differences with vimdiff |
| 144 | |08.8| Various |
| 145 | |
| 146 | |usr_09.txt| Using the GUI |
| 147 | |09.1| Parts of the GUI |
| 148 | |09.2| Using the mouse |
| 149 | |09.3| The clipboard |
| 150 | |09.4| Select mode |
| 151 | |
| 152 | |usr_10.txt| Making big changes |
| 153 | |10.1| Record and playback commands |
| 154 | |10.2| Substitution |
| 155 | |10.3| Command ranges |
| 156 | |10.4| The global command |
| 157 | |10.5| Visual block mode |
| 158 | |10.6| Reading and writing part of a file |
| 159 | |10.7| Formatting text |
| 160 | |10.8| Changing case |
| 161 | |10.9| Using an external program |
| 162 | |
| 163 | |usr_11.txt| Recovering from a crash |
| 164 | |11.1| Basic recovery |
| 165 | |11.2| Where is the swap file? |
| 166 | |11.3| Crashed or not? |
| 167 | |11.4| Further reading |
| 168 | |
| 169 | |usr_12.txt| Clever tricks |
| 170 | |12.1| Replace a word |
| 171 | |12.2| Change "Last, First" to "First Last" |
| 172 | |12.3| Sort a list |
| 173 | |12.4| Reverse line order |
| 174 | |12.5| Count words |
| 175 | |12.6| Find a man page |
| 176 | |12.7| Trim blanks |
| 177 | |12.8| Find where a word is used |
| 178 | |
| 179 | ============================================================================== |
| 180 | Editing Effectively ~ |
| 181 | |
| 182 | Subjects that can be read independently. |
| 183 | |
| 184 | |usr_20.txt| Typing command-line commands quickly |
| 185 | |20.1| Command line editing |
| 186 | |20.2| Command line abbreviations |
| 187 | |20.3| Command line completion |
| 188 | |20.4| Command line history |
| 189 | |20.5| Command line window |
| 190 | |
| 191 | |usr_21.txt| Go away and come back |
| 192 | |21.1| Suspend and resume |
| 193 | |21.2| Executing shell commands |
| 194 | |21.3| Remembering information; viminfo |
| 195 | |21.4| Sessions |
| 196 | |21.5| Views |
| 197 | |21.6| Modelines |
| 198 | |
| 199 | |usr_22.txt| Finding the file to edit |
| 200 | |22.1| The file explorer |
| 201 | |22.2| The current directory |
| 202 | |22.3| Finding a file |
| 203 | |22.4| The buffer list |
| 204 | |
| 205 | |usr_23.txt| Editing other files |
| 206 | |23.1| DOS, Mac and Unix files |
| 207 | |23.2| Files on the internet |
| 208 | |23.3| Encryption |
| 209 | |23.4| Binary files |
| 210 | |23.5| Compressed files |
| 211 | |
| 212 | |usr_24.txt| Inserting quickly |
| 213 | |24.1| Making corrections |
| 214 | |24.2| Showing matches |
| 215 | |24.3| Completion |
| 216 | |24.4| Repeating an insert |
| 217 | |24.5| Copying from another line |
| 218 | |24.6| Inserting a register |
| 219 | |24.7| Abbreviations |
| 220 | |24.8| Entering special characters |
| 221 | |24.9| Digraphs |
| 222 | |24.10| Normal mode commands |
| 223 | |
| 224 | |usr_25.txt| Editing formatted text |
| 225 | |25.1| Breaking lines |
| 226 | |25.2| Aligning text |
| 227 | |25.3| Indents and tabs |
| 228 | |25.4| Dealing with long lines |
| 229 | |25.5| Editing tables |
| 230 | |
| 231 | |usr_26.txt| Repeating |
| 232 | |26.1| Repeating with Visual mode |
| 233 | |26.2| Add and subtract |
| 234 | |26.3| Making a change in many files |
| 235 | |26.4| Using Vim from a shell script |
| 236 | |
| 237 | |usr_27.txt| Search commands and patterns |
| 238 | |27.1| Ignoring case |
| 239 | |27.2| Wrapping around the file end |
| 240 | |27.3| Offsets |
| 241 | |27.4| Matching multiple times |
| 242 | |27.5| Alternatives |
| 243 | |27.6| Character ranges |
| 244 | |27.7| Character classes |
| 245 | |27.8| Matching a line break |
| 246 | |27.9| Examples |
| 247 | |
| 248 | |usr_28.txt| Folding |
| 249 | |28.1| What is folding? |
| 250 | |28.2| Manual folding |
| 251 | |28.3| Working with folds |
| 252 | |28.4| Saving and restoring folds |
| 253 | |28.5| Folding by indent |
| 254 | |28.6| Folding with markers |
| 255 | |28.7| Folding by syntax |
| 256 | |28.8| Folding by expression |
| 257 | |28.9| Folding unchanged lines |
Bram Moolenaar | fa13eef | 2013-02-06 17:34:04 +0100 | [diff] [blame] | 258 | |28.10| Which fold method to use? |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 259 | |
| 260 | |usr_29.txt| Moving through programs |
| 261 | |29.1| Using tags |
| 262 | |29.2| The preview window |
| 263 | |29.3| Moving through a program |
| 264 | |29.4| Finding global identifiers |
| 265 | |29.5| Finding local identifiers |
| 266 | |
| 267 | |usr_30.txt| Editing programs |
| 268 | |30.1| Compiling |
| 269 | |30.2| Indenting C files |
| 270 | |30.3| Automatic indenting |
| 271 | |30.4| Other indenting |
| 272 | |30.5| Tabs and spaces |
| 273 | |30.6| Formatting comments |
| 274 | |
| 275 | |usr_31.txt| Exploiting the GUI |
| 276 | |31.1| The file browser |
| 277 | |31.2| Confirmation |
| 278 | |31.3| Menu shortcuts |
| 279 | |31.4| Vim window position and size |
| 280 | |31.5| Various |
| 281 | |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 282 | |usr_32.txt| The undo tree |
Bram Moolenaar | 730cde9 | 2010-06-27 05:18:54 +0200 | [diff] [blame] | 283 | |32.1| Undo up to a file write |
| 284 | |32.2| Numbering changes |
| 285 | |32.3| Jumping around the tree |
| 286 | |32.4| Time travelling |
Bram Moolenaar | c01140a | 2006-03-24 22:21:52 +0000 | [diff] [blame] | 287 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 288 | ============================================================================== |
| 289 | Tuning Vim ~ |
| 290 | |
| 291 | Make Vim work as you like it. |
| 292 | |
| 293 | |usr_40.txt| Make new commands |
| 294 | |40.1| Key mapping |
| 295 | |40.2| Defining command-line commands |
| 296 | |40.3| Autocommands |
| 297 | |
| 298 | |usr_41.txt| Write a Vim script |
| 299 | |41.1| Introduction |
| 300 | |41.2| Variables |
| 301 | |41.3| Expressions |
| 302 | |41.4| Conditionals |
| 303 | |41.5| Executing an expression |
| 304 | |41.6| Using functions |
| 305 | |41.7| Defining a function |
Bram Moolenaar | 7c62692 | 2005-02-07 22:01:03 +0000 | [diff] [blame] | 306 | |41.8| Lists and Dictionaries |
Bram Moolenaar | 63f3260 | 2022-06-09 20:45:54 +0100 | [diff] [blame] | 307 | |41.9| White space |
| 308 | |41.10| Line continuation |
| 309 | |41.11| Comments |
| 310 | |41.12| Fileformat |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 311 | |
| 312 | |usr_42.txt| Add new menus |
| 313 | |42.1| Introduction |
| 314 | |42.2| Menu commands |
| 315 | |42.3| Various |
| 316 | |42.4| Toolbar and popup menus |
| 317 | |
| 318 | |usr_43.txt| Using filetypes |
| 319 | |43.1| Plugins for a filetype |
| 320 | |43.2| Adding a filetype |
| 321 | |
| 322 | |usr_44.txt| Your own syntax highlighted |
| 323 | |44.1| Basic syntax commands |
| 324 | |44.2| Keywords |
| 325 | |44.3| Matches |
| 326 | |44.4| Regions |
| 327 | |44.5| Nested items |
| 328 | |44.6| Following groups |
| 329 | |44.7| Other arguments |
| 330 | |44.8| Clusters |
| 331 | |44.9| Including another syntax file |
| 332 | |44.10| Synchronizing |
| 333 | |44.11| Installing a syntax file |
| 334 | |44.12| Portable syntax file layout |
| 335 | |
Bram Moolenaar | e7b1ea0 | 2020-08-07 19:54:59 +0200 | [diff] [blame] | 336 | |usr_45.txt| Select your language (locale) |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 337 | |45.1| Language for Messages |
| 338 | |45.2| Language for Menus |
| 339 | |45.3| Using another encoding |
| 340 | |45.4| Editing files with a different encoding |
| 341 | |45.5| Entering language text |
| 342 | |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 343 | ============================================================================== |
| 344 | Writing Vim script ~ |
| 345 | |
Bram Moolenaar | cfa8f9a | 2022-06-03 21:59:47 +0100 | [diff] [blame] | 346 | |usr_50.txt| Advanced Vim script writing |
Bram Moolenaar | 63f3260 | 2022-06-09 20:45:54 +0100 | [diff] [blame] | 347 | |50.1| Exceptions |
Bram Moolenaar | 8a3b805 | 2022-06-26 12:21:15 +0100 | [diff] [blame] | 348 | |50.2| Function with variable number of arguments |
Bram Moolenaar | 63f3260 | 2022-06-09 20:45:54 +0100 | [diff] [blame] | 349 | |50.3| Restoring the view |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 350 | |
| 351 | |usr_51.txt| Write plugins |
| 352 | |51.1| Writing a generic plugin |
| 353 | |51.2| Writing a filetype plugin |
| 354 | |51.3| Writing a compiler plugin |
Bram Moolenaar | cfa8f9a | 2022-06-03 21:59:47 +0100 | [diff] [blame] | 355 | |51.4| Distributing Vim scripts |
Bram Moolenaar | 30ab04e | 2022-05-14 13:33:50 +0100 | [diff] [blame] | 356 | |
Bram Moolenaar | cfa8f9a | 2022-06-03 21:59:47 +0100 | [diff] [blame] | 357 | |usr_52.txt| Write larger plugins |
| 358 | |52.1| Export and import |
| 359 | |52.2| Autoloading |
| 360 | |52.3| Autoloading without import/export |
| 361 | |52.4| Other mechanisms to use |
| 362 | |52.5| Using a Vim9 script from legacy script |
Christian Brabandt | 015c84c | 2024-10-07 21:48:32 +0200 | [diff] [blame] | 363 | |52.6| Vim9 examples: comment and highlight-yank plugin |
Bram Moolenaar | 73fef33 | 2020-06-21 22:12:03 +0200 | [diff] [blame] | 364 | |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 365 | ============================================================================== |
| 366 | Making Vim Run ~ |
| 367 | |
| 368 | Before you can use Vim. |
| 369 | |
| 370 | |usr_90.txt| Installing Vim |
| 371 | |90.1| Unix |
| 372 | |90.2| MS-Windows |
| 373 | |90.3| Upgrading |
| 374 | |90.4| Common installation issues |
| 375 | |90.5| Uninstalling Vim |
| 376 | |
| 377 | ============================================================================== |
| 378 | |
Bram Moolenaar | d473c8c | 2018-08-11 18:00:22 +0200 | [diff] [blame] | 379 | Copyright: see |manual-copyright| vim:tw=78:ts=8:noet:ft=help:norl: |