flâneur

Learn-Vim/ch03_searching_files.md at master · iggredible/Learn-Vim

github.com · 2,714 words · saved by 2 readers

The goal of this chapter is to give you an introduction on how to search quickly in Vim. Being able to search quickly is a great way to jump-start your Vim productivity. When I figured out how to search files quickly, I made the switch to use Vim full-time. This chapter is divided into two parts: how to search without plugins and how to search with fzf.vim plugin. Let's get started! To open a file in Vim, you can use :edit. If file.txt exists, it opens the file.txt buffer. If file.txt doesn't exist, it creates a new buffer for file.txt. Autocomplete with <Tab> works with :edit. For example, if your file is inside a Rails app controller users controller directory ./app/controllers/users_controllers.rb, you can use <Tab> to expand the terms quickly: :edit accepts wildcards arguments. * matches any file in the current directory. If you are only looking for files with .yml extension in the current directory: Vim will give you a list of all .yml files in the current directory to choose from

Ch03. Searching Files The goal of this chapter is to give you an introduction on how to search quickly in Vim. Being able to search quickly is a great way to jump-start your Vim productivity. When I figured out how to search files quickly, I made the switch to use Vim full-time. This chapter is divided into two parts: how to search without plugins and how to search with fzf.vim plugin. Let's get started! Opening and Editing Files To open a file in Vim, you can use :edit. :edit file.txt If file.txt exists, it opens the file.txt buffer. If file.txt doesn't exist, it creates a new buffer…

saved by

related reading