sponsor Vim development Vim logo go to HTTPS page Vim Book Ad

monday : Lets you use ctrl-a and ctrl-x on names of months and weekdays

 script karma  Rating 102/33, Downloaded by 2273    Comments, bugs, improvements  Vim wiki

created by
Stefan Karlsson
script type
Monday.vim extends the normal-mode commands <ctrl-a> and <ctrl-x> so that they can be applied to the names of months and weekdays. For example, if you are standing on the word "July" and presses <ctrl-a>, the word is replaced by "August".

The script tries to preserve the case of the letters, and can handle the following three variants:

(1) All lower-case ("july" becomes "august").
(2) All upper-case ("JULY" becomes "AUGUST").
(3) First letter upper-case, the rest lower-case ("July" becomes "August").


Only English is supported; although it's easy to add any word pairs you want, the script cannot yet handle words that have two or more possible successors/predecessors.  For example, the 4th month is called "April" in both English and Swedish, but its successor is called "May" and "Maj", respectively. So, if you add the Swedish months and then try to increment the word "April", the script won't be able to figure out which word ("May" or "Maj")  it should be replaced with.
install details
Just drop the script in your local plugin directory (e.g. ~/.vim/plugin).

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
monday.vim 0.3 2005-05-06 6.0 Stefan Karlsson Added support for 1st, 2nd, 3rd, etc. (idea by Chris Ottrey). Also fixed some bugs.
monday.vim 0.2 2004-09-01 6.0 Stefan Karlsson Corrected a problem related to the 'ignorecase' option (all changed words became lower-case). Thanks to Anton Berezin  for pointing this out and for providing a patch.
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
SourceForge.net Logo