From 0d23b6e515a01a5782532351821ebfa11f3d6cf2 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 8 Oct 2012 11:44:10 -0500 Subject: Add vim again :) --- vim/plugin/AlignMapsPlugin.vim | 242 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) create mode 100644 vim/plugin/AlignMapsPlugin.vim (limited to 'vim/plugin/AlignMapsPlugin.vim') diff --git a/vim/plugin/AlignMapsPlugin.vim b/vim/plugin/AlignMapsPlugin.vim new file mode 100644 index 0000000..eed0293 --- /dev/null +++ b/vim/plugin/AlignMapsPlugin.vim @@ -0,0 +1,242 @@ +" AlignMapsPlugin: Alignment maps based upon and +" Maintainer: Dr. Charles E. Campbell, Jr. +" Date: Mar 03, 2009 +" +" NOTE: the code herein needs vim 6.0 or later +" needs v6 or later +" needs v5 or later +" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1 +" Permission is hereby granted to use and distribute this code, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" AlignMaps.vim is provided *as is* and comes with no warranty +" of any kind, either expressed or implied. By using this +" plugin, you agree that in no event will the copyright +" holder be liable for any damages resulting from the use +" of this software. +" +" Usage: {{{1 +" Use 'a to mark beginning of to-be-aligned region, Alternative: use V +" move cursor to end of region, and execute map. (linewise visual mode) to +" The maps also set up marks 'y and 'z, and retain mark region, execute same +" 'a at the beginning of region. map. Uses 'a, 'y, and 'z. +" +" The start/end wrappers save and restore marks 'y and 'z. +" +" Although the comments indicate the maps use a leading backslash, +" actually they use (:he mapleader), so the user can +" specify that the maps start how he or she prefers. +" +" Note: these maps all use . +" +" Romans 1:20 For the invisible things of Him since the creation of the {{{1 +" world are clearly seen, being perceived through the things that are +" made, even His everlasting power and divinity; that they may be +" without excuse. + +" --------------------------------------------------------------------- +" Load Once: {{{1 +if &cp || exists("g:loaded_AlignMapsPlugin") + finish +endif +let s:keepcpo = &cpo +let g:loaded_AlignMapsPlugin = "v41" +set cpo&vim + +" ===================================================================== +" Maps: {{{1 + +" --------------------------------------------------------------------- +" WS: wrapper start map (internal) {{{2 +" Produces a blank line above and below, marks with 'y and 'z +if !hasmapto('WrapperStart') + map WS AlignMapsWrapperStart +endif +nmap