My personal Vim setup
Vim script Makefile Python
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
autoload
colors
ftplugin
plugin
syntax
template
tools
utl
.gitignore
Makefile
README.md

README.md

vimrc

The main goal of this configuration is to provide all the tools needed to using Vim both for development and a writing tool, loading only the configuration needed for each file type.

This is the configuration I use at home. Hope it is useful to anyone; hence any feedback is welcome ;)

Installation

git clone https://github.com/diacus/vimrc.git vimrc
cd vimrc
make install

Color schemes

General mappings

Since I am a Spanish native speaker, my personal configuration uses a Latin American ("latam") keyboard and sometimes Spanish layout ("es"), hence I have included the plugin/kb.vim script to perform the following mappings based on the keyboard layout set:

ORIGINAL Spanish (es) Latin American (latam) English
[ and ] ¡ and ç { and }
<leader> , ¿
colon : ñ upper and lower ñ upper and lower semicolon ;

The intention of doing this is to make easier the access to commands like ]s. With this configuration typing }s in "latam" or çs in "es" keyboard layouts will do the same.

In the case of English keyboard layouts, the intention is make quicker the access to command mode, that's why I mapped the semicolon ; key to the colon : character.

Writing mode

When Vim is used for composing a document, some specific features are desired, for instance: keep the text width or enable text spelling, so when a document buffer is loaded, the text width is defined to eighty columns and the editor will insert break lines automatically when the end of the line is reached. Plus other useful runtime macros are enabled, such as the :Justify command.

Writing specific mappings

  • <F2> will toggle the spelling feature.
  • <leader><space> will display the list of possible words to correct the current misspelled text.

Markdown and WordPress

The file type plug-in for markdown sets makeprg option in order to properly compile markdown documents just by running :make or hitting the <F9> in normal mode. To do that, the following tools are included:

  • ftplugin/markdown.vim
  • tools/make/markdown.mk
  • tools/css/markdown.css
  • tools/wp/compiler

3rd party plug ins included

There are some plug ins that are downloaded and installed automatically.

Dependencies

This Vim configuration relies on a few eternal tools to work.

Installer

To install this scripts easily, a Makefile is provided. It assumes that you have the following tools installed on your system:

  • unzip
  • wget
  • rsync

Markdown

Markdown ftplugin includes a helper compiler script written in Perl, that needs pandoc and ImageMagic to be installed in your system in order to generate the .html and .wp files from a markdown source document, as well as a Perl interpreter.

TeX

For compiling TeX documents, latexmk command is assumed to be installed on your system. This program is part of most of the common distributions of texlive.