8/25/2023 0 Comments Add vim shortcuts![]() In general, CTRL-v is used to enter the keystroke (or control character) that follows rather than being interpreted literally. The CTRL-v is essential since without it the would signal the end of the map, and we want to include the as part of the mapped comma. ![]() The command to set this up is: :map, :wCTRL-v The key I've chosen for this purpose is the comma, which is not part of the standard vi command set. This is only three keystrokes, but since I do it so frequently, I'd rather use only one. My first example involves the write command, used to save the current state of the file you're working on: :w Set up your own command abbreviations with the map command. CTRL- x indicates simultaneously pressing the Control key and the x key (whatever x happens to be). I'll use to designate pressing the RETURN or ENTER key, and for the space bar. I'm also grateful for Chris's helpful suggestions, which I incorporated here.įirst, let's review some conventions. I hope that the techniques described below will facilitate your writing, programming, and data manipulation.īefore proceeding, I'd like to thank Chris Hermansen (who recruited me to write this article) for checking my draft with Vim, as I use another version of vi. It's a form of what is known as muscle memory, which in this case might well be called finger memory.Īfter you get a grasp of the main approach and basic commands, you can make editing with vi even more powerful and streamlined by using its customization options to create shortcuts. Learning the vi text editor takes some effort, but experienced vi users know that after a while, using basic commands becomes second nature.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |