In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Preface
When using VIM daily, there is often a need to jump to a file under a specific directory:
When you use vimwiki to take notes, you will save all your notes in the directory ~ / vimwiki by default. When we want to view some notes, we will open a file in that directory. I usually write some shell tools and save them in the ~ / bin directory, so there is a need to create or open files in this directory. If you use plug-ins such as ultisnip, you need to often edit snippets files corresponding to different types of files.
According to my personal experience, there are still many requirements for opening a file in a specific directory, so I wrote a plug-in FileJumper to implement this requirement.
This plug-in provides the following features:
Through one-line configuration, command; bound to a directory can be quickly defined, a file in the corresponding directory can be quickly opened by executing command filename, the full-text file name can be filled by tab key, and files can be opened in different modes by specifying different vim commands, such as command filename vnew, etc.
The following will describe how to install and configure the plug-in that is already used.
Installation and configuration
You can install it through vim-plug:
Plug 'https://github.com/hiberabyss/FileJumper'
After installation, use the configuration variable g:file_jumper_command to define different command. Here is the default configuration of the plug-in:
Let g:file_jumper_command = {\ "Gbin": {'dir': expand ("$HOME/bin"),' extension':'},\ "Gwiki": {'dir': g:myvimwikidir,' extension': '.wiki', 'keymap':' wg'},\} Gbin and the like are command names; dir represents the directory bound to this command Extension represents the default suffix of the file in the corresponding directory, which is automatically added when the file is opened; keymap means to map a shortcut to this command
How to use
Executing Gbin pyserver will open the corresponding file by default through tabnew ~ / bin/pyserver:
In the above demonstration, we just typed py and then pressed the tab key to automatically complete the file name pyserver.
We can also decide how to open the file by adding the vim command:
As can be seen from the above demonstration, after using vnew or e, vim will open the file differently from the default. We can also use compound commands such as bot vnew.
Summary
The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.