If you're like me then you have a centralised repository for Vim's settings. There are situations, however, where local settings are required. For example, I may want subtly different settings when working on files on a server, but still want to load my preferred .vimrc as well.
One way to solve this that I've seen used in dotfiles on GitHub is to source a "local" settings file:
if filereadable('~/.vim/local.vim')
so ~/.vim/local.vim
endif
This snippet can be placed in your centralised .vimrc, and then machines or accounts that require tailoring can be supported by creating a suitable ~/.vim/local.vim file. In the other cases where this isn't required, filereadable is used to prevent loading a non-existent file.
Fanf,ingTastic; (License: Vim) by Barry Arthur provides several ways to enhance Ff,Tt and ;. Once installed, the default settings allow the supported motion commands to wrap lines, and there are additional options for ignoring case and aliasing keys:
'fanfingtastic_all_inclusive': Makes backward movements inclusive
'fanfingtastic_fix_t': Fixes the behavior of tT,;
'fanfingtastic_ignorecase': Provides case insensitive fFtT;
'fanfingtastic_use_jumplist'Adds the movementsments of fFtT; to the jumplist
Taboo
Taboo (GitHub: gcmt / taboo.vim, License: MIT) by Giacomo Comitti is a small tab management plugin. It provides easy shortcuts for renaming tabs, and opening tabs with a prompt for the tab name. The naming scheme for unnamed tabs can also be changed by setting g:taboo_format.
Visual mode and Blockwise Visual mode have several associated settings. In this article, we're going to look at virtualedit, which is definitely something to consider adding to your .vimrc.
To get up to speed with Visual mode, take a look at these previous Vim 101 articles:
The virtualedit setting basically allows block selections to operate across lines regardless of the underlying text. In this screenshot, I've pressed CTRL-V and selected a block. Notice how the block is limited to the characters in the file:
VimTouch (GitHub: momodalo / vimtouch, License: Apache 2.0) by David Tao is an open source port of Vim to Android devices. I currently have Gingerbread and Jelly Bean devices, and it runs on all of them.
The app launches with a menu of commonly used shortcuts, and the standard Android icons for saving files and a popup menu. A ~/.vimrc file is supported, and so are tabs and windows. Tapping windows and tabs works as expected, as does Vim's standard file management and navigation commands. Coloured syntax highlighting is enabled by default.
another-vim-addon-manager by Evsyukov Denis uses Ruby and Rake as a way to install Vim scripts. It uses a file called plugins.yaml to define the required repository URLs:
By default, a YAML file is created that includes Pathogen -- this is the default way plugins are managed. In that sense, this addon manager is a wrapper around Pathogen.
layoutManager
layoutManager by Alexandre Viau allows tabs, templates, and windows to be named and manipulated in a similar way to panels in a GUI IDE. Text can be sent to specific named windows -- one window could contain compiler output, another could display the code, while a further window displays a text-based menu of build operations.
I don't know how much nontechnical writers care about brackets -- there probably aren't that many brackets in the average novel, fiction or non. Programming is another matter. Every language seems to make use of all brackets, including curly and square.
Vim has a few standard ways to deal with brackets, and standard Vim distributions also come bundled with bracket-related plugins.
Movement and Selection
Moving the cursor over a bracket and pressing % will cause the cursor to jump to the corresponding bracket. This is useful for unravelling nested and mixed brackets -- repeatedly pressing % provides a clear visual indication.
There's a competition going on at reddit to win a free Vim keycap, available for purchase through techkeys.us. The actual key itself is designed to fit Cherry MX keys along the top two rows.
In my quest for the perfect keyboard, I've also found some interesting keyboards and keycaps available through EliteKeyboards, and The Keyboard Company who are based in the UK and resell through Amazon.
GrepTasks (GitHub: vim-scripts / GrepTasks) by Ingo Karkat helps search for FIXME, TODO, and other markers. The current buffer can be searched, and also all files in the argument-list.
The plugin's readme file also mentions TaskMotions.vim which adds movement commands for markers.
easybuffer.vim
easybuffer.vim (GitHub: troydm / easybuffer.vim, License: Vim) by Dmitry Geurkov displays buffers in a table-like view with shortcut keys for quickly switching between them. The keyboard shortcuts for switching buffers are defined in g:easybuffer_chars.
Vim has a built in way to look up help for keywords -- the K command. Moving the cursor over a word then typing K will attempt to load a man page by running the man command in the terminal.
Many programming languages have manual systems that work in a similar way -- Ruby's ri and Go's godoc spring to mind -- Vim can support these languages by setting a custom command with keywordprg.
For example, the file that integrates Ruby's ri command (ftplugin/ruby.vim) uses setlocal to make ri the default keyword program:
It took over 120 total hours to research, plan, design and create this cheat-sheet. It is meant to be a collection of Vim's "biggest bang for your buck" features: the stuff that will provide the most usefulness to the most people.
The Vim Cheat Sheet Poster by Max Cantor is a carefully created movie-sized poster for key Vim editing commands and concepts. It was started as a Kickstarter project, and was fully-funded by 467 backers.