Configuration: vim
Note: most information below is about vim-6.4. Similar configuration for vim-7.0 require few changes: colorsheme for xterm-256color; internal spellchecker instead of plugin, etc..
Features
List of most significant features in my Vim configuration:
- F1 open man/info/perldoc window for word under cursor
- F6 show menu for recoding file between different russian encodings
- perl scripts automatically checked for errors on saving file
- Tab autocomplete current word
- work with multiple files in full-screen windows, Tab switch between these windows
- Shift+arrows windows-like selecting text, Ctrl+Insert windows-like "copy into clipboard", both into Xwindow clipboard and Vim buffer (this feature require external utility xclip or xcb), Shift+Insert windows-like "paste from clipboard" (work only in XTerm)
- Ctrl+arrows scroll text in windows without changing cursor position
- Alt+arrows moving between "tag"-links (like it work in text browsers lynx and elinks)
- #, Alt+#, Ctrl-C [un]comment current line using commenting rules for current file type
- spell checking on-the-fly, both Russian and English at once
- transparent editing of gpg encrypted files
Configuration files
My ~/.vimrc. It's feature rich and well commented, but most of comments are in Russian.
My ~/.vim/ which contain all needed plugins, syntax files, etc. But you still may need some external scripts, see below.
My configuration for using on remote servers (vim-7.1). Comments in .vimrc are in Russian.
Plugins
- manpageview
-
Viewer for manpages, info pages, perldoc, and php (unix/linux only).
I've applied simple patch for version 14 to make it compatible with my "full screen mode" configured in ~/.vimrc.
- FeralToggleCommentify
-
Comment lines in a program.
I've applied very simple patch for version 1.61 to make # default commenting symbol.
- vimspell
-
ispell or aspell based spell checker with fly-spelling.
I've applied very simple patch for version 1.100 to force vimspell to not spellcheck previous word when user press . or ,. This feature is nice, but only until you try to use it with Russian language (which use buttons with . and , for russian letters).
- foldutil
-
Utility for creating folds (using specified match criteria). This plugin make creating custom fold much ease.
Scripts
- aspell
-
To have spell checking simultaneously for Russian and English you should install my wrapper script somethere in the $PATH, for ex. ~/bin/aspell. Without this wrapper you can spellcheck only one language at once and then switch languages using \sl.
- check_project and check_parsers
-
These two scripts used for checking perl scripts for errors automatically on saving file in vim. There no needs in such helper scripts if you edit simple perl script. But if you work with complex system which consist of numerous perl scripts, and these perl scripts usually executed in some already-prepared environment (with some perl modules loaded, etc.)... then vim's default perl syntax checking script will fail.
So, these check_project and check_parsers scripts used for prepare environment needed to be able to check some perl scripts for errors. These script probably will not be useful for you as-is, I put them on website only as examples how to write similar helper scripts.
- ~/.bashrc
-
To replace console commands man and info by Vim's viewer (which is much better, from my view) you can add to ~/.bashrc these lines:
function man() { vim -c "Man $1 $2"; } function info() { vim -c "Man $1.i"; } - Limbo