Surround is a plugin that gives you shortcuts to deal with punctuation and tags that surround text.įor example, let’s say you have the string: See the documentation on GitHub for details. Of course, as with most Vim plugins, there are about a bazillion ways you can customize SuperTab. The easiest way to install SuperTab is to grab the file supertab.vmb (which is an archive called a “vimball”) and place it into your “~/.vim/bundle” directory. SuperTab just completed the word “SuperTab” for me when I typed “S” +. It displays a menu of possible word completions when you type the tab key after a non-blank character. SuperTab #Īre you a huge fan of bash-style tab completion like I am? Check out SuperTab. Generating a manual in this fashion is standard practice when installing Vim plugins. You can now use the command :help NERD_tree to view the help documentation at any time. Now generate the reference manual for NERDTree by running this command within Vim (note: press the “esc” key to get to the command prompt): The developer recommends installing it via Pathogen like so: Press “?” to view a list of key commands. To use NERDTree, execute :NERDTree and :NERDTreeClose to exit it. NERDTree is a tree-style file browser for Vim. Now every plugin that you place in a subdirectory of “~/.vim/bundle” will be automatically installed. Then add these lines to your ~/.vimrc file: Also create the directory “~/.vim/bundle”. To install Pathogen, grab the file pathogen.vim from here and place it in the directory “~/.vim/autoload” (create that directory first if it doesn’t already exist). Pathogen solves this problem by placing each plugin in its own directory within “~/.vim/bundle”. This can get messy when you have a lot of plugins that consist of more than one file, and you might have trouble identifying the appropriate files when you want to remove a plugin. By default, Vim places all of its plugin files in the same directory. Pathogen is a package manager for Vim plugins, and it should be the first plugin you install. If you lean towards hating it now, give these plugins a try and then see how you feel. Today I’m going to introduce 8 useful plugins that will help you be more productive when using Vim. If you can dream it up, there’s probably a plugin for it. One of Vim’s features is extreme extensibility. I’m still acclimating, but I love Vim more every day. It takes patience to learn how to control Vim with key commands when you’re used to using graphical text editors. If you’ve used Vim before, you know there’s a bit of a learning curve.
0 Comments
Leave a Reply. |