![]() If you followed the previous article - you may have chosen to remap the leader key to ,).Īnyway, press l and you'll see a list of open buffers with numbers - you'll also see that we're in COMMAND mode and that the :b command has already been typed out in the command line. Type l (where is whatever your current leader key is. vimrc? Yup, you guessed it - we can use the l keybind we just defined. How do we switch back to the buffer containing our. :e ~/deleteme.txtNow we're in a new, blank file called deleteme.txt. What we can do is add a keybind that will run that functionality for us. Is there a more efficient way to do this? So you have one command to list all of the buffers and another command to switch buffers. Then enter the command :b, where is the number that was next to the buffer you want to switch to. Make a note of the number next to the buffer you want to switch to. That will show you a numbered list of buffers that are currently loaded. ![]() Hit escape to ensure you're in Normal mode (or use jj if you've been following along with this series) and then enter the command :ls. And whenever we open several files in this way in Vim, each file we open is loaded into a different buffer and we typically find ourselves looking at the first file from the list of files we passed to vim.Īll of the other files that were in the list are loaded into vim.Īnd the first question many vim users have is - "Where are the rest of my files and how can I access them?", or "How do I switch to another file/buffer?".
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |