cream-0.43/0000755000076400007660000000000011517421112013103 5ustar digitectlocalusercream-0.43/cream-capitalization.vim0000644000076400007660000001706411517300716017736 0ustar digitectlocaluser" " cream-capitalization.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Updated: 2003-12-06, 09:36am " Source: http://vim.sourceforge.net/scripts/script.php?script_id=242 " Author: Steve Hall [ digitect@mindspring.com ] " " Instructions: " o Simply copy this file and paste it into your vimrc. Or you can " drop the entire file into your plugins directory. " o As long as you don't already have keyboard mappings to the F5 key, " these keyboard shortcuts will now be available: " F5 Capitalize selection, title case " Shift+F5 Uppercase selection " Alt+F5 Lowercase selection " Ctrl+F5 Reverse case of selection " " Notes: " o Restoration of selection is usually accurate, but not in some rare " instances where it is shifted one char. " " ChangeLog: " " 2008-01-22 -- 2.4 " o Lowercase articles for Title Case " o Added optional additional lowercasing for Title Case " " 2003-12-06 -- 2.3 " o Fixed errant function name calls. ;) " " 2003-12-06 -- 2.2 " o Added mappings back in script for use outside of Cream. " o Cleaned out obsolete algorithm and embedded new single line from " formerly called function. " o Changed function name for title case to be consistent with " remainder. " " 2003-05-07 -- 2.1 " o Changed algorithm in Title Case to simple substitution. (Benji " Fisher) " " 2002-11-13 -- 2.0 " o Functionalized all mappings. " o Destroyed standalone state with references to Cream libraries. " o Made functions mode sensitive. From insertmode, each function " affects the current word. " " 2002-04-15 -- 1.3 " o Fixed positioning "anomalies" for title case. (Hopefully for good!) " " 2002-03-26 -- 1.2 " o Work around broken Vim paste back behavior at column 1 " " 2002-03-25 -- 1.1 " o Modified title case function to lower case all text before " capitalizing initial characters. " " 2002-03-10 " o Initial Release " " mappings (if not used with Cream) if !exists("$CREAM") " Title Case imap :call Cream_case_title("i") vmap :call Cream_case_title("v") " UPPERCASE imap :call Cream_case_upper("i") vmap :call Cream_case_upper("v") " lowercase imap :call Cream_case_lower("i") vmap :call Cream_case_lower("v") " rEVERSE CASE imap :call Cream_case_reverse("i") vmap :call Cream_case_reverse("v") endif function! Cream_case_title(mode) " Title Case -- uppercase characters following whitespace if a:mode == "v" normal gv " Hack: fix Vim's gv proclivity to add a line when at line end if virtcol(".") == 1 normal '> " line select normal gV " up one line normal k " back to char select normal gV """" back up one char """normal h endif else let mypos = Cream_pos() " select current word normal v normal aw endif " yank normal "xy " lower case entire string let @x = tolower(@x) " capitalize first in series of word chars let @x = substitute(@x, '\w\+', '\u&', 'g') " lowercase a few words we always want lower let @x = substitute(@x, '\', 'a', 'g') let @x = substitute(@x, '\', 'an', 'g') let @x = substitute(@x, '\', 'and', 'g') let @x = substitute(@x, '\', 'in', 'g') let @x = substitute(@x, '\', 'the', 'g') " fix first word again let @x = substitute(@x, '^.', '\u&', 'g') " fix last word again let str = matchstr(@x, '[[:alnum:]]\+[^[:alnum:]]*$') let @x = substitute(@x, str . '$', '\u&', 'g') "" optional lowercase... "let n = confirm( " \ "Lowercase additional conjunctions, adpositions, articles, and forms of \"to be\"?\n" . " \ "\n", "&Ok\n&Cancel", 2, "Info") "if n == 1 " " lowercase conjunctions " let @x = substitute(@x, '\', 'after', 'g') " let @x = substitute(@x, '\', 'although', 'g') " let @x = substitute(@x, '\', 'and', 'g') " let @x = substitute(@x, '\', 'because', 'g') " let @x = substitute(@x, '\', 'both', 'g') " let @x = substitute(@x, '\', 'but', 'g') " let @x = substitute(@x, '\', 'either', 'g') " let @x = substitute(@x, '\', 'for', 'g') " let @x = substitute(@x, '\', 'if', 'g') " let @x = substitute(@x, '\', 'neither', 'g') " let @x = substitute(@x, '\', 'nor', 'g') " let @x = substitute(@x, '\', 'or', 'g') " let @x = substitute(@x, '\', 'so', 'g') " let @x = substitute(@x, '\', 'unless', 'g') " let @x = substitute(@x, '\', 'when', 'g') " let @x = substitute(@x, '\', 'while', 'g') " let @x = substitute(@x, '\', 'yet', 'g') " " lowercase adpositions " let @x = substitute(@x, '\', 'as', 'g') " let @x = substitute(@x, '\', 'at', 'g') " let @x = substitute(@x, '\', 'by', 'g') " let @x = substitute(@x, '\', 'for', 'g') " let @x = substitute(@x, '\', 'from', 'g') " let @x = substitute(@x, '\', 'in', 'g') " let @x = substitute(@x, '\', 'of', 'g') " let @x = substitute(@x, '\', 'on', 'g') " let @x = substitute(@x, '\', 'over', 'g') " let @x = substitute(@x, '\', 'to', 'g') " let @x = substitute(@x, '\', 'with', 'g') " " lowercase articles " let @x = substitute(@x, '\', 'a', 'g') " let @x = substitute(@x, '\', 'an', 'g') " let @x = substitute(@x, '\', 'the', 'g') " " lowercase forms of to be " let @x = substitute(@x, '\', 'be', 'g') " let @x = substitute(@x, '\ \', 'to be', 'g') " let @x = substitute(@x, '\ \', 'to do', 'g') " " lowercase prepositions " " lowercase conjunctions "endif " reselect normal gv " paste over selection (replacing it) normal "xP " return state if a:mode == "v" normal gv else execute mypos endif endfunction function! Cream_case_lower(mode) " accepts "v" or "i" as mode if a:mode == "v" normal gv else let mypos = Cream_pos() " select current word normal v normal aw endif " lower case normal u " return state if a:mode == "v" normal gv else execute mypos endif endfunction function! Cream_case_upper(mode) " accepts "v" or "i" as mode if a:mode == "v" normal gv else let mypos = Cream_pos() " select current word normal v normal aw endif " UPPER CASE normal U " return state if a:mode == "v" normal gv else execute mypos endif endfunction function! Cream_case_reverse(mode) " accepts "v" or "i" as mode if a:mode == "v" normal gv else let mypos = Cream_pos() " select current word normal v normal aw endif " rEVERSE cASE normal ~ " return state if a:mode == "v" normal gv else execute mypos endif endfunction cream-0.43/cream-colors-matrix.vim0000644000076400007660000000747611156572440017540 0ustar digitectlocaluser" vim:set ts=8 sts=2 sw=2 tw=0: " " matrix.vim - MATRIX like colorscheme. " " Maintainer: MURAOKA Taro " Last Change: 10-Jun-2003. set background=dark hi clear if exists("syntax_on") syntax reset endif "let g:colors_name = 'matrix' " the character under the cursor hi Cursor guifg=#226622 guibg=#55ff55 hi lCursor guifg=#226622 guibg=#55ff55 " like Cursor, but used when in IME mode |CursorIM| hi CursorIM guifg=#226622 guibg=#55ff55 " directory names (and other special names in listings) hi Directory guifg=#55ff55 guibg=#000000 " diff mode: Added line |diff.txt| hi DiffAdd guifg=#55ff55 guibg=#226622 gui=none " diff mode: Changed line |diff.txt| hi DiffChange guifg=#55ff55 guibg=#226622 gui=none " diff mode: Deleted line |diff.txt| hi DiffDelete guifg=#113311 guibg=#113311 gui=none " diff mode: Changed text within a changed line |diff.txt| hi DiffText guifg=#55ff55 guibg=#339933 gui=bold " error messages on the command line hi ErrorMsg guifg=#55ff55 guibg=#339933 " the column separating vertically split windows hi VertSplit guifg=#339933 guibg=#339933 " line used for closed folds hi Folded guifg=#44cc44 guibg=#113311 " 'foldcolumn' hi FoldColumn guifg=#44cc44 guibg=#226622 " 'incsearch' highlighting; also used for the text replaced with hi IncSearch guifg=#226622 guibg=#55ff55 gui=none " line number for ":number" and ":#" commands, and when 'number' hi LineNr guifg=#44cc44 guibg=#002200 " 'showmode' message (e.g., "-- INSERT --") hi ModeMsg guifg=#44cc44 guibg=#000000 " |more-prompt| hi MoreMsg guifg=#44cc44 guibg=#000000 " '~' and '@' at the end of the window, characters from hi NonText guifg=#00cc00 guibg=#001100 " normal text hi Normal guifg=#44cc44 guibg=#000000 " |hit-enter| prompt and yes/no questions hi Question guifg=#44cc44 guibg=#000000 " Last search pattern highlighting (see 'hlsearch'). hi Search guifg=#113311 guibg=#44cc44 gui=none "+++ Cream: hi SignColumn guifg=#44cc44 guibg=#003300 "+++ hi SpecialKey guifg=#44cc44 guibg=#000000 " Meta and special keys listed with ":map", also for text used hi SpecialKey guifg=#44cc44 guibg=#000000 " status line of current window hi StatusLine guifg=#55ff55 guibg=#339933 gui=none " status lines of not-current windows hi StatusLineNC guifg=#113311 guibg=#339933 gui=none " titles for output from ":set all", ":autocmd" etc. hi Title guifg=#55ff55 guibg=#113311 gui=bold " Visual mode selection hi Visual guifg=#55ff55 guibg=#339933 gui=none " Visual mode selection when vim is "Not Owning the Selection". hi VisualNOS guifg=#44cc44 guibg=#000000 " warning messages hi WarningMsg guifg=#55ff55 guibg=#000000 " current match in 'wildmenu' completion hi WildMenu guifg=#226622 guibg=#55ff55 hi Comment guifg=#116611 guibg=#000000 hi Constant guifg=#55ff55 guibg=#226622 hi Special guifg=#44cc44 guibg=#226622 hi Identifier guifg=#55ff55 guibg=#000000 hi Statement guifg=#55ff55 guibg=#000000 gui=bold hi PreProc guifg=#339933 guibg=#000000 hi Type guifg=#55ff55 guibg=#000000 gui=bold hi Underlined guifg=#55ff55 guibg=#000000 gui=underline hi Error guifg=#55ff55 guibg=#339933 hi Todo guifg=#113311 guibg=#44cc44 gui=none "+++ Cream: " statusline highlight User1 gui=BOLD guifg=#116611 guibg=#002200 highlight User2 gui=bold guifg=#66aa66 guibg=#002200 highlight User3 gui=bold guifg=#00cc00 guibg=#002200 highlight User4 gui=bold guifg=#ffff00 guibg=#002200 " bookmarks highlight Cream_ShowMarksHL gui=BOLD guifg=#99ff33 guibg=#006600 " spell check highlight SpellBad gui=undercurl guisp=#00ff00 highlight SpellRare gui=undercurl guisp=#779900 highlight SpellLocal gui=undercurl guisp=#009900 highlight SpellCap gui=undercurl guisp=#66cc00 " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#406070 " email highlight EQuote1 guifg=#00aa00 highlight EQuote2 guifg=#009900 highlight EQuote3 guifg=#007700 highlight Sig guifg=#005500 "+++ cream-0.43/genutils.vim0000644000076400007660000011735511156572442015502 0ustar digitectlocaluser" " Useful buffer, file and window related functions. " " Author: Hari Krishna Dara " Last Modified: 03-Dec-2002 @ 13:16 " Requires: Vim-6.0, multvals.vim(2.0.5) " Version: 1.3.0 " Licence: This program is free software; you can redistribute it and/or " modify it under the terms of the GNU General Public License. " See http://www.gnu.org/copyleft/gpl.txt " Download From: " http://vim.sourceforge.net/scripts/script.php?script_id=197 " Description: " - Scriptlets, g:makeArgumentString and g:makeArgumentList, and a function " CreateArgString() to work with and pass variable number of arguments to " other functions. " - Misc. window/buffer related functions, NumberOfWindows(), " FindWindowForBuffer(), FindBufferForName(), MoveCursorToWindow(), " MoveCurLineToWinLine(), SetupScratchBuffer(), MapAppendCascaded() " - Save/Restore all the window height/width settings to be restored later. " - Save/Restore position in the buffer to be restored later. Works like the " built-in marks feature, but has more to it. " - NotifyWindowClose() to get notifications *after* a window with the " specified buffer has been closed or the buffer is unloaded. The built-in " autocommands can only notify you *before* the window is closed. You can " use this with the Save/Restore window settings feature to restore the " user windows, after your window is closed. I have used this utility in " selectbuf.vim to restore window dimensions after the browser window is " closed. To add your function to be notified when a window is closed, use " the function: " " function! AddNotifyWindowClose(windowTitle, functionName) " " There is also a test function called RunNotifyWindowCloseTest() that " demos the usage. " - ShowLinesWithSyntax() function to echo lines with syntax coloring. " - ShiftWordInSpace(), CenterWordInSpace() and " AlignWordWithWordInPreviousLine() utility functions to move words in the " space without changing the width of the field. " - A quick-sort functions QSort() that can sort a buffer contents by range " and QSort2() that can sort any arbitrary data and utility compare " methods. Binary search functions BinSearchForInsert() and " BinSearchForInsert2() to find the location for a newline to be inserted " in an already sorted buffer or arbitrary data. " - A useful ExecMap() function to facilitate recovering from typing errors " in normal mode mappings (see below for examples). Normally when you make " mistakes in typing normal mode commands, vim beeps at you and aborts the " command. But this method allows you to continue typing the command and " even backspace on errors. " - A sample function to extract the scriptId of a script. " - New CommonPath() function to extract the common part of two paths, and " RelPathFromFile() and RelPathFromDir() to find relative paths (useful " HTML href's). A side effect is the CommonString() function to find the " common string of two strings. " - Functions to have persistent data, PutPersistentVar() and " GetPersistentVar(). You don't need to worry about saving in files and " reading them back. To disable, set g:genutilsNoPersist in your vimrc. " " Example: Put the following in a file called t.vim in your plugin " directory and watch the magic. You can set new value using SetVar() and " see that it returns the same value across session when GetVar() is " called. " >>>>t.vim<<<< " au VimEnter * call LoadSettings() " au VimLeavePre * call SaveSettings() " " function! LoadSettings() " let s:tVar = GetPersistentVar("T", "tVar", "defVal") " endfunction " " function! SaveSettings() " call PutPersistentVar("T", "tVar", s:tVar) " endfunction " " function! SetVar(val) " let s:tVar = a:val " endfunction " " function! GetVar() " return s:tVar " endfunction " <<<>>> " " - Place the following in your vimrc if you find them useful: " " command! DiffOff :call CleanDiffOptions() " " command! -nargs=0 -range=% SortByLength ,call QSort( " \ 's:CmpByLengthNname', 1) " command! -nargs=0 -range=% RSortByLength ,call QSort( " \ 's:CmpByLineLengthNname', -1) " command! -nargs=0 -range=% SortJavaImports ,call QSort( " \ 's:CmpJavaImports', 1) " " nnoremap \ :call ExecMap('\') " nnoremap _ :call ExecMap('_') " " nnoremap :call ShiftWordInSpace(1) " nnoremap :call ShiftWordInSpace(-1) " nnoremap \cw :call CenterWordInSpace() " " nnoremap \va :call AlignWordWithWordInPreviousLine() " TODO: " - fnamemodify() on Unix doesn't expand to full name if a name containing " path components is passed in. " if exists("loaded_genutils") finish endif let loaded_genutils = 1 " Execute this following variable in your function to make a string containing " all your arguments. The string can be used to pass the variable number of " arguments received by your script further down into other functions. " Uses __argCounter and __nextArg variables, so make sure you don't have " variables with the same name. " Ex: " fu! s:IF(...) " exec g:makeArgumentString " exec "call Impl(" . argumentString . ")" " endfu let makeArgumentString = " \ let __argCounter = 1\n \ let argumentString = ''\n \ while __argCounter <= a:0\n \ let __nextArg = substitute(a:{__argCounter}, \ \"'\", \"' . \\\"'\\\" . '\", \"g\")\n \ let argumentString = argumentString . \"'\" . __nextArg . \"'\" . \ ((__argCounter == a:0) ? '' : ', ')\n \ let __argCounter = __argCounter + 1\n \ endwhile\n \ unlet __argCounter\n \ silent! exec 'unlet __nextArg'\n \ " " Creates a argumentList string containing all the arguments separated by " commas. You can then pass this string to CreateArgString() function below " to make argumentString which can be used as mentioned above in " "exec g:makeArgumentString". You can also use the scripts that let you " handle arrays to manipulate this string (such as remove/insert args) " before passing it on. " Uses __argCounter and __argSeparator variables, so make sure you don't have " variables with the same name. You set the __argSeparator before executing " this scriptlet to make it use a different separator. let makeArgumentList = " \ let __argCounter = 1\n \ if (! exists('__argSeparator'))\n \ let __argSeparator = ','\n \ endif\n \ let argumentList = ''\n \ while __argCounter <= a:0\n \ let argumentList = argumentList . a:{__argCounter}\n \ if __argCounter != a:0\n \ let argumentList = argumentList . __argSeparator\n \ endif\n \ let __argCounter = __argCounter + 1\n \ endwhile\n \ unlet __argCounter\n \ unlet __argSeparator\n \ " " Useful to collect arguments into a soft-array (see multvals on vim.sf.net) " and then pass them to a function later. " You should make sure that the separator itself doesn't exist in the " arguments. You can use the return value same as the way argumentString " created by the "exec g:makeArgumentString" above is used. " Usage: " let args = 'a b c' " exec "call F(" . CreateArgString(args, ' ') . ")" function! CreateArgString(argList, sep) call MvIterCreate(a:argList, a:sep, 'CreateArgString') let argString = "'" while MvIterHasNext('CreateArgString') let nextArg = MvIterNext('CreateArgString') if a:sep != "'" let nextArg = substitute(nextArg, "'", "' . \"'\" . '", 'g') endif let argString = argString . nextArg . "', '" endwhile let argString = strpart(argString, 0, strlen(argString) - 3) call MvIterDestroy('CreateArgString') return argString endfunction " Useful function to debug passing arguments to functions. See exactly what " you receive on the other side. " Ex: :exec 'call DebugShowArgs('. CreateArgString("a 'b' c", ' ') . ')' function! DebugShowArgs(...) let i = 0 let argString = '' while i < a:0 let argString = argString . a:{i + 1} . ', ' let i = i + 1 endwhile let argString = strpart(argString, 0, strlen(argString) - 2) call input("Args: " . argString) endfunction " " Return the number of windows open currently. " function! NumberOfWindows() let i = 1 while winbufnr(i) != -1 let i = i+1 endwhile return i - 1 endfunction "+++ Cream: We find this broken! Just use: " let mywinnr = bufwinnr(mybufnr) " with the buffer's number, followed by " MoveCursorToWindow(mywinnr) " rather than using name in the function below. " "" "" Find the window number for the buffer passed. If checkUnlisted is non-zero, "" then it searches for the buffer in the unlisted buffers, to work-around "" the vim bug that bufnr() doesn't work for unlisted buffers. It also "" unprotects any extra back-slashes from the bufferName, for the sake of "" comparision with the existing buffer names. "" "function! FindWindowForBuffer(bufferName, checkUnlisted) " let bufno = bufnr('^' . a:bufferName . '$') " " bufnr() will not find unlisted buffers. " if bufno == -1 && a:checkUnlisted " " Iterate over all the open windows for " " The window name could be having extra backslashes to protect certain " " chars, so first expand them. " let bufName = DeEscape(a:bufferName) " let i = 1 " while winbufnr(i) != -1 " if bufname(winbufnr(i)) == bufName " return i; " endif " let i = i + 1 " endwhile " endif " return bufwinnr(bufno) "endfunction "+++ " Returns the buffer number of the given fileName if it is already loaded. " Works around the bug in bufnr(). function! FindBufferForName(fileName) let i = bufnr('^' . a:fileName . '$') if i != -1 return i endif " If bufnr didn't work, the it probably is a hidden buffer, so check the " hidden buffers. let i = 1 while i <= bufnr("$") if bufexists(i) && ! buflisted(i) && (match(bufname(i), a:fileName) != -1) break endif let i = i + 1 endwhile if i <= bufnr("$") return i else return -1 endif endfunction " Given the window number, moves the cursor to that window. function! MoveCursorToWindow(winno) if NumberOfWindows() != 1 execute a:winno . " wincmd w" endif endfunction " Moves the current line such that it is going to be the nth line in the window " without changing the column position. function! MoveCurLineToWinLine(n) normal zt execute "normal " . a:n . "\" endfunction " Turn on some buffer settings that make it suitable to be a scratch buffer. function! SetupScratchBuffer() setlocal noswapfile setlocal nobuflisted setlocal buftype=nofile " Just in case, this will make sure we are always hidden. setlocal bufhidden=delete endfunction " Turns off those options that are set by diff to the current window. " Also removes the 'hor' option from scrollopt (which is a global option). " Better alternative would be to close the window and reopen the buffer in a " new window. function! CleanDiffOptions() setlocal nodiff setlocal noscrollbind setlocal scrollopt-=hor setlocal wrap setlocal foldmethod=manual setlocal foldcolumn=0 endfunction " This function is an alternative to exists() function, for those odd array " index names for which the built-in function fails. The var should be " accessible to this functions, so it should be a global variable. " if ArrayVarExists("array", id) " let val = array{id} " endif function! ArrayVarExists(varName, index) let v:errmsg = "" silent! exec "let test = " . a:varName . "{a:index}" if !exists("test") || v:errmsg != "" let v:errmsg = "" return 0 endif return 1 endfunction " Works like the reverse of the builtin escape() function. De-escapes all the " escaped characters. function! DeEscape(val) let val = substitute(a:val, '"', '\\"', 'g') exec "let val = \"" . val . "\"" return val endfunction " Returns 1 if preview window is open or 0 if not. function! IsPreviewWindowOpen() let v:errmsg = "" silent! exec "wincmd P" if v:errmsg != "" return 0 else wincmd p return 1 endif endfunction " " Saves the heights and widths of the currently open windows for restoring " later. " function! SaveWindowSettings() call SaveWindowSettings2(s:myScriptId, 1) endfunction " " Restores the heights of the windows from the information that is saved by " SaveWindowSettings(). " function! RestoreWindowSettings() call RestoreWindowSettings2(s:myScriptId) endfunction function! ResetWindowSettings() call ResetWindowSettings2(s:myScriptId) endfunction " Same as SaveWindowSettings, but uses the passed in scriptid to create a " private copy for the calling script. Pass in a unique scriptid to avoid " conflicting with other callers. If overwrite is zero and if the settings " are already stored for the passed in sid, it will overwriting previously " saved settings. function! SaveWindowSettings2(sid, overwrite) if ArrayVarExists("s:winSettings", a:sid) && ! a:overwrite return endif let s:winSettings{a:sid} = "" let s:winSettings{a:sid} = MvAddElement(s:winSettings{a:sid}, ",", NumberOfWindows()) let s:winSettings{a:sid} = MvAddElement(s:winSettings{a:sid}, ",", &lines) let s:winSettings{a:sid} = MvAddElement(s:winSettings{a:sid}, ",", &columns) let s:winSettings{a:sid} = MvAddElement(s:winSettings{a:sid}, ",", winnr()) let i = 1 while winbufnr(i) != -1 let s:winSettings{a:sid} = MvAddElement(s:winSettings{a:sid}, ",", winheight(i)) let s:winSettings{a:sid} = MvAddElement(s:winSettings{a:sid}, ",", winwidth(i)) let i = i + 1 endwhile "let g:savedWindowSettings = s:winSettings{a:sid} " Debug. endfunction " Same as RestoreWindowSettings, but uses the passed in scriptid to get the " settings. function! RestoreWindowSettings2(sid) "if ! exists("s:winSettings" . a:sid) if ! ArrayVarExists("s:winSettings", a:sid) return endif call MvIterCreate(s:winSettings{a:sid}, ",", "savedWindowSettings") let nWindows = MvIterNext("savedWindowSettings") if nWindows != NumberOfWindows() unlet s:winSettings{a:sid} call MvIterDestroy("savedWindowSettings") return endif let orgLines = MvIterNext("savedWindowSettings") let orgCols = MvIterNext("savedWindowSettings") let activeWindow = MvIterNext("savedWindowSettings") let winNo = 1 while MvIterHasNext("savedWindowSettings") let height = MvIterNext("savedWindowSettings") let width = MvIterNext("savedWindowSettings") call MoveCursorToWindow(winNo) exec 'resize ' . ((&lines * height + (orgLines / 2)) / orgLines) exec 'vert resize ' . ((&columns * width + (orgCols / 2)) / orgCols) let winNo = winNo + 1 endwhile " Restore the current window. call MoveCursorToWindow(activeWindow) call ResetWindowSettings2(a:sid) "unlet g:savedWindowSettings " Debug. call MvIterDestroy("savedWindowSettings") endfunction function! ResetWindowSettings2(sid) if ! ArrayVarExists("s:winSettings", a:sid) unlet s:winSettings{a:sid} endif endfunction " Cleanup file name such that two *cleaned up* file names are easy to be " compared. This probably works only on windows and unix platforms. function! CleanupFileName(fileName) let fileName = a:fileName " If filename starts with an ~. " The below case takes care of this also. "if match(fileName, '^\~') == 0 " let fileName = substitute(fileName, '^\~', escape($HOME, '\'), '') "endif " Expand relative paths and paths containing relative components. if ! PathIsAbsolute(fileName) let fileName = fnamemodify(fileName, ":p") endif " Remove multiple path separators. if has("win32") let fileName=substitute(fileName, '\\', '/', "g") elseif OnMS() let fileName=substitute(fileName, '\\\{2,}', '\', "g") endif let fileName=substitute(fileName, '/\{2,}', '/', "g") " Remove ending extra path separators. let fileName=substitute(fileName, '/$', '', "") let fileName=substitute(fileName, '\$', '', "") if OnMS() let fileName=substitute(fileName, '^[A-Z]:', '\L&', "") " Add drive letter if missing (just in case). if match(fileName, '^/') == 0 let curDrive = substitute(getcwd(), '^\([a-zA-Z]:\).*$', '\L\1', "") let fileName = curDrive . fileName endif endif return fileName endfunction "echo CleanupFileName('\\a///b/c\') "echo CleanupFileName('C:\a/b/c\d') "echo CleanupFileName('a/b/c\d') "echo CleanupFileName('~/a/b/c\d') "echo CleanupFileName('~/a/b/../c\d') function! OnMS() return has("win32") || has("dos32") || has("win16") || has("dos16") || \ has("win95") endfunction function! PathIsAbsolute(path) let absolute=0 if has("unix") || OnMS() if match(a:path, "^/") == 0 let absolute=1 endif endif if (! absolute) && OnMS() if match(a:path, "^\\") == 0 let absolute=1 endif endif if (! absolute) && OnMS() if match(a:path, "^[A-Za-z]:") == 0 let absolute=1 endif endif return absolute endfunction function! PathIsFileNameOnly(path) return (match(a:path, "\\") < 0) && (match(a:path, "/") < 0) endfunction " Copy this method into your script and rename it to find the script id of the " current script. function! s:SampleScriptIdFunction() map xx xx let s:sid = maparg("xx") unmap xx return substitute(s:sid, "xx$", "", "") endfunction let s:myScriptId = s:SampleScriptIdFunction() "" "" --- START save/restore position. "" " characters that must be escaped for a regular expression let s:escregexp = '/*^$.~\' " This method tries to save the position along with the line context if " possible. This is like the vim builtin marker. Pass in a unique scriptid " to avoid conflicting with other callers. function! SaveSoftPosition(scriptid) let s:startline_{a:scriptid} = getline(".") call SaveHardPosition(a:scriptid) endfunction function! RestoreSoftPosition(scriptid) 0 if search('\m^'.escape(s:startline_{a:scriptid},s:escregexp),'W') <= 0 call RestoreHardPosition(a:scriptid) else execute "normal!" s:col_{a:scriptid} . "|" call MoveCurLineToWinLine(s:winline_{a:scriptid}) endif endfunction function! ResetSoftPosition(scriptid) unlet s:startline_{a:scriptid} endfunction " A synonym for SaveSoftPosition. function! SaveHardPositionWithContext(scriptid) call SaveSoftPosition(a:scriptid) endfunction " A synonym for RestoreSoftPosition. function! RestoreHardPositionWithContext(scriptid) call RestoreSoftPosition(a:scriptid) endfunction " A synonym for ResetSoftPosition. function! ResetHardPositionWithContext(scriptid) call ResetSoftPosition(a:scriptid) endfunction " Useful when you want to go to the exact (line, col), but marking will not " work, or if you simply don't want to disturb the marks. Pass in a unique " scriptid. function! SaveHardPosition(scriptid) let s:col_{a:scriptid} = virtcol(".") let s:lin_{a:scriptid} = line(".") let s:winline_{a:scriptid} = winline() endfunction function! RestoreHardPosition(scriptid) execute s:lin_{a:scriptid} execute "normal!" s:col_{a:scriptid} . "|" call MoveCurLineToWinLine(s:winline_{a:scriptid}) endfunction function! ResetHardPosition(scriptid) unlet s:col_{a:scriptid} unlet s:lin_{a:scriptid} unlet s:winline_{a:scriptid} endfunction function! IsPositionSet(scriptid) return exists('s:col_' . a:scriptid) endfunction "" "" --- END save/restore position. "" "" "" --- START: Notify window close -- "" " " When the window with the title windowTitle is closed, the global function " functionName is called with the title as an argument, and the entries are " removed, so if you are still interested, you need to register again. " function! AddNotifyWindowClose(windowTitle, functionName) " The window name could be having extra backslashes to protect certain " chars, so first expand them. let bufName = DeEscape(a:windowTitle) " Make sure there is only one entry per window title. if exists("s:notifyWindowTitles") && s:notifyWindowTitles != "" call RemoveNotifyWindowClose(bufName) endif if !exists("s:notifyWindowTitles") " Both separated by :. let s:notifyWindowTitles = "" let s:notifyWindowFunctions = "" endif let s:notifyWindowTitles = MvAddElement(s:notifyWindowTitles, ";", bufName) let s:notifyWindowFunctions = MvAddElement(s:notifyWindowFunctions, ";", \ a:functionName) let g:notifyWindowTitles = s:notifyWindowTitles " Debug. let g:notifyWindowFunctions = s:notifyWindowFunctions " Debug. " Start listening to events. aug NotifyWindowClose au! au WinEnter * :call CheckWindowClose() aug END endfunction function! RemoveNotifyWindowClose(windowTitle) " The window name could be having extra backslashes to protect certain " chars, so first expand them. let bufName = DeEscape(a:windowTitle) if !exists("s:notifyWindowTitles") return endif if MvContainsElement(s:notifyWindowTitles, ";", bufName) let index = MvIndexOfElement(s:notifyWindowTitles, ";", bufName) let s:notifyWindowTitles = MvRemoveElementAt(s:notifyWindowTitles, ";", \ index) let s:notifyWindowFunctions = MvRemoveElementAt(s:notifyWindowFunctions, \ ";", index) if s:notifyWindowTitles == "" unlet s:notifyWindowTitles unlet s:notifyWindowFunctions unlet g:notifyWindowTitles " Debug. unlet g:notifyWindowFunctions " Debug. aug NotifyWindowClose au! aug END endif endif endfunction function! CheckWindowClose() if !exists("s:notifyWindowTitles") || s:notifyWindowTitles == "" return endif " First make an array with all the existing window titles. let i = 1 let currentWindows = "" while winbufnr(i) != -1 let bufname = bufname(winbufnr(i)) if bufname != "" " For performance reasons. "let currentWindows = MvAddElement(currentWindows, ";", bufname) let currentWindows = currentWindows . bufname . ";" endif let i = i+1 endwhile "call input("currentWindows: " . currentWindows) " Now iterate over all the registered window titles and see which one's are " closed. let i = 0 " To track the element index. " Take a copy and modify these if needed, as we are not supposed to modify " the main arrays while iterating over them. let processedElements = "" call MvIterCreate(s:notifyWindowTitles, ";", "NotifyWindowClose") while MvIterHasNext("NotifyWindowClose") let nextWin = MvIterNext("NotifyWindowClose") if ! MvContainsElement(currentWindows, ";", nextWin) let funcName = MvElementAt(s:notifyWindowFunctions, ";", i) let cmd = "call " . funcName . "(\"" . nextWin . "\")" "call input("cmd: " . cmd) exec cmd " Remove these entries as these are already processed. let processedElements = MvAddElement(processedElements, ";", nextWin) endif endwhile call MvIterDestroy("NotifyWindowClose") call MvIterCreate(processedElements, ";", "NotifyWindowClose") while MvIterHasNext("NotifyWindowClose") let nextWin = MvIterNext("NotifyWindowClose") call RemoveNotifyWindowClose(nextWin) endwhile call MvIterDestroy("NotifyWindowClose") endfunction "function! NotifyWindowCloseF(title) " call input(a:title . " closed") "endfunction " "function! RunNotifyWindowCloseTest() " split ABC " split XYZ " call AddNotifyWindowClose("ABC", "NotifyWindowCloseF") " call AddNotifyWindowClose("XYZ", "NotifyWindowCloseF") " call input("notifyWindowTitles: " . s:notifyWindowTitles) " call input("notifyWindowFunctions: " . s:notifyWindowFunctions) " au WinEnter " split b " call input("Starting the tests, you should see two notifications:") " quit " quit " quit "endfunction "" "" --- END: Notify window close -- "" " " TODO: For large ranges, the cmd can become too big, so make it one cmd per " line. " Display the given line(s) from the current file in the command area (i.e., " echo), using that line's syntax highlighting (i.e., WYSIWYG). " " If no line number is given, display the current line. " " Originally, " From: Gary Holloway " Date: Wed, 16 Jan 2002 14:31:56 -0800 " function! ShowLinesWithSyntax() range " This makes sure we start (subsequent) echo's on the first line in the " command-line area. " echo '' let cmd = '' let prev_group = ' x ' " Something that won't match any syntax group. let show_line = a:firstline let isMultiLine = ((a:lastline - a:firstline) > 1) while show_line <= a:lastline if (show_line - a:firstline) > 1 let cmd = cmd . '\n' endif let length = strlen(getline(show_line)) let column = 1 while column <= length let group = synIDattr(synID(show_line, column, 1), 'name') if group != prev_group if cmd != '' let cmd = cmd . '"|' endif let cmd = cmd . 'echohl ' . (group == '' ? 'NONE' : group) . '|echon "' let prev_group = group endif let char = strpart(getline(show_line), column - 1, 1) if char == '"' let char = '\"' endif let cmd = cmd . char let column = column + 1 endwhile let show_line = show_line + 1 endwhile let cmd = cmd . '"|echohl NONE' let g:firstone = cmd exe cmd endfunction function! AlignWordWithWordInPreviousLine() "First go to the first col in the word. if getline('.')[col('.') - 1] =~ '\s' normal! w else normal! "_yiw endif let orgVcol = virtcol('.') let prevLnum = prevnonblank(line('.') - 1) if prevLnum == -1 return endif let prevLine = getline(prevLnum) " First get the column to align with. if prevLine[orgVcol - 1] =~ '\s' " column starts from 1 where as index starts from 0. let nonSpaceStrInd = orgVcol " column starts from 1 where as index starts from 0. while prevLine[nonSpaceStrInd] =~ '\s' let nonSpaceStrInd = nonSpaceStrInd + 1 endwhile else if strlen(prevLine) < orgVcol let nonSpaceStrInd = strlen(prevLine) - 1 else let nonSpaceStrInd = orgVcol - 1 endif while prevLine[nonSpaceStrInd - 1] !~ '\s' && nonSpaceStrInd > 0 let nonSpaceStrInd = nonSpaceStrInd - 1 endwhile endif let newVcol = nonSpaceStrInd + 1 " Convert to column number. if orgVcol > newVcol " We need to reduce the spacing. let sub = strpart(getline('.'), newVcol - 1, (orgVcol - newVcol)) if sub =~ '^\s\+$' " Remove the excess space. exec 'normal! ' . newVcol . '|' exec 'normal! ' . (orgVcol - newVcol) . 'x' endif elseif orgVcol < newVcol " We need to insert spacing. exec 'normal! ' . orgVcol . '|' exec 'normal! ' . (newVcol - orgVcol) . 'i ' endif endfunction " This function shifts the word in the space without moving the following words. " Doesn't work for tabs. function! ShiftWordInSpace(dir) if a:dir == 1 " forward. " If currently on ... if getline(".")[col(".") - 1] == " " let move1 = 'wf ' else " If next col is a "if getline(".")[col(".") + 1] let move1 = 'f ' endif let removeCommand = "x" let pasteCommand = "bi " let move2 = 'w' let offset = 0 else " backward. " If currently on ... if getline(".")[col(".") - 1] == " " let move1 = 'w' else let move1 = '"_yiW' endif let removeCommand = "hx" let pasteCommand = 'h"_yiwEa ' let move2 = 'b' let offset = -3 endif let savedCol = col(".") exec "normal" move1 let curCol = col(".") let possible = 0 " Check if there is a space at the end. if col("$") == (curCol + 1) " Works only for forward case, as expected. let possible = 1 elseif getline(".")[curCol + offset] == " " " Remove the space from here. exec "normal" removeCommand let possible = 1 endif " Move back into the word. "exec "normal" savedCol . "|" if possible == 1 exec "normal" pasteCommand exec "normal" move2 else " Move to the original location. exec "normal" savedCol . "|" endif endfunction function! CenterWordInSpace() let line = getline('.') let orgCol = col('.') " If currently on ... if line[orgCol - 1] == " " let matchExpr = ' *\%'. orgCol . 'c *\w\+ \+' else let matchExpr = ' \+\(\w*\%' . orgCol . 'c\w*\) \+' endif let matchInd = match(line, matchExpr) if matchInd == -1 return endif let matchStr = matchstr(line, matchExpr) let nSpaces = strlen(substitute(matchStr, '[^ ]', '', 'g')) let word = substitute(matchStr, ' ', '', 'g') let middle = nSpaces / 2 let left = nSpaces - middle let newStr = '' while middle > 0 let newStr = newStr . ' ' let middle = middle - 1 endwhile let newStr = newStr . word while left > 0 let newStr = newStr . ' ' let left = left - 1 endwhile let newLine = strpart(line, 0, matchInd) let newLine = newLine . newStr let newLine = newLine . strpart (line, matchInd + strlen(matchStr)) call setline(line('.'), newLine) endfunction " Reads a normal mode mapping at the command line and executes it with the " given prefix. Press to correct and to cancel. function! ExecMap(prefix) " Temporarily remove the mapping, otherwise it will interfere with the " mapcheck call below: let myMap = maparg(a:prefix, 'n') exec "nunmap" a:prefix " Generate a line with spaces to clear the previous message. let i = 1 let clearLine = "\r" while i < &columns let clearLine = clearLine . ' ' let i = i + 1 endwhile let mapCmd = a:prefix let foundMap = 0 let breakLoop = 0 let curMatch = '' echon "\rEnter Map: " . mapCmd while !breakLoop let char = getchar() if char !~ '^\d\+$' if char == "\" let mapCmd = strpart(mapCmd, 0, strlen(mapCmd) - 1) endif else " It is the ascii code. let char = nr2char(char) if char == "\" let breakLoop = 1 "elseif char == "\" "let mapCmd = curMatch "let foundMap = 1 "let breakLoop = 1 else let mapCmd = mapCmd . char if maparg(mapCmd, 'n') != "" let foundMap = 1 let breakLoop = 1 else let curMatch = mapcheck(mapCmd, 'n') if curMatch == "" let mapCmd = strpart(mapCmd, 0, strlen(mapCmd) - 1) endif endif endif endif echon clearLine "echon "\rEnter Map: " . substitute(mapCmd, '.', ' ', 'g') . "\t" . curMatch echon "\rEnter Map: " . mapCmd endwhile if foundMap exec "normal" mapCmd endif exec "nnoremap" a:prefix myMap endfunction " If lhs is already mapped, this function makes sure rhs is appended to it " instead of overwriting it. " mapMode is used to prefix to "oremap" and used as the map command. E.g., if " mapMode is 'n', then the function call results in the execution of noremap " command. function! MapAppendCascaded(lhs, rhs, mapMode) " Determine the map mode from the map command. let mapChar = strpart(a:mapMode, 0, 1) " Check if this is already mapped. let oldrhs = maparg(a:lhs, mapChar) if oldrhs != "" let self = oldrhs else let self = a:lhs endif "echomsg a:mapMode . "oremap" . " " . a:lhs . " " . self . a:rhs exec a:mapMode . "oremap" a:lhs self . a:rhs endfunction "" START: Sorting support. {{{ "" " " Comapare functions. " function! s:CmpByLineLengthNname(line1, line2, direction) let cmp = s:CmpByLength(a:line1, a:line2, a:direction) if cmp == 0 let cmp = s:CmpByString(a:line1, a:line2, a:direction) endif return cmp endfunction function! s:CmpByLength(line1, line2, direction) let len1 = strlen(a:line1) let len2 = strlen(a:line2) return a:direction * (len1 - len2) endfunction " Compare first by name and then by length. " Useful for sorting Java imports. function! s:CmpJavaImports(line1, line2, direction) " FIXME: Simplify this. if stridx(a:line1, '.') == -1 let pkg1 = '' let cls1 = substitute(a:line1, '.* \(^[ ]\+\)', '\1', '') else let pkg1 = substitute(a:line1, '^\(.*\.\)[^. ;]\+.*$', '\1', '') let cls1 = substitute(a:line1, '^.*\.\([^. ;]\+\).*$', '\1', '') endif if stridx(a:line2, '.') == -1 let pkg2 = '' let cls2 = substitute(a:line2, '.* \(^[ ]\+\)', '\1', '') else let pkg2 = substitute(a:line2, '^\(.*\.\)[^. ;]\+.*$', '\1', '') let cls2 = substitute(a:line2, '^.*\.\([^. ;]\+\).*$', '\1', '') endif let cmp = s:CmpByString(pkg1, pkg2, a:direction) if cmp == 0 let cmp = s:CmpByLength(cls1, cls2, a:direction) endif return cmp endfunction function! s:CmpByString(line1, line2, direction) if a:line1 < a:line2 return -a:direction elseif a:line1 > a:line2 return a:direction else return 0 endif endfunction function! s:CmpByNumber(line1, line2, direction) let num1 = a:line1 + 0 let num2 = a:line2 + 0 if num1 < num2 return -a:direction elseif num1 > num2 return a:direction else return 0 endif endfunction " " To Sort a range of lines, pass the range to QSort() along with the name of a " function that will compare two lines. " function! QSort(cmp, direction) range call s:QSortR(a:firstline, a:lastline, a:cmp, a:direction, \ 's:BufLineAccessor', 's:BufLineSwapper', '') endfunction " A more generic sort routine, that will let you provide your own accessor and " swapper, so that you can extend the sorting to something beyond the default " buffer lines. function! QSort2(start, end, cmp, direction, accessor, swapper, context) call s:QSortR(a:start, a:end, a:cmp, a:direction, a:accessor, a:swapper, \ a:context) endfunction " The default swapper that swaps lines in the current buffer. function! s:BufLineSwapper(line1, line2, context) let str2 = getline(a:line1) call setline(a:line1, getline(a:line2)) call setline(a:line2, str2) endfunction " The default accessor that returns lines from the current buffer. function! s:BufLineAccessor(line, context) return getline(a:line) endfunction " " Sort lines. QSortR() is called recursively. " function! s:QSortR(start, end, cmp, direction, accessor, swapper, context) if a:end > a:start let low = a:start let high = a:end " Arbitrarily establish partition element at the midpoint of the data. exec "let midStr = " . a:accessor . "(" . ((a:start + a:end) / 2) . \ ", a:context)" " Loop through the data until indices cross. while low <= high " Find the first element that is greater than or equal to the partition " element starting from the left Index. while low < a:end exec "let str = " . a:accessor . "(" . low . ", a:context)" exec "let result = " . a:cmp . "(str, midStr, " . a:direction . ")" if result < 0 let low = low + 1 else break endif endwhile " Find an element that is smaller than or equal to the partition element " starting from the right Index. while high > a:start exec "let str = " . a:accessor . "(" . high . ", a:context)" exec "let result = " . a:cmp . "(str, midStr, " . a:direction . ")" if result > 0 let high = high - 1 else break endif endwhile " If the indexes have not crossed, swap. if low <= high " Swap lines low and high. exec "call " . a:swapper . "(" . high . ", " . low . ", a:context)" let low = low + 1 let high = high - 1 endif endwhile " If the right index has not reached the left side of data must now sort " the left partition. if a:start < high call s:QSortR(a:start, high, a:cmp, a:direction, a:accessor, a:swapper, \ a:context) endif " If the left index has not reached the right side of data must now sort " the right partition. if low < a:end call s:QSortR(low, a:end, a:cmp, a:direction, a:accessor, a:swapper, \ a:context) endif endif endfunction " Return the line number where given line can be inserted in the current " buffer. This can also be interpreted as the line in the current buffer " after which the new line should go. " Assumes that the lines are already sorted in the given direction using the " given comparator. function! BinSearchForInsert(start, end, line, cmp, direction) return BinSearchForInsert2(a:start, a:end, a:line, a:cmp, a:direction, \ 's:BufLineAccessor', '') endfunction " A more generic implementation which doesn't restrict the search to a buffer. function! BinSearchForInsert2(start, end, line, cmp, direction, accessor, \ context) let start = a:start - 1 let end = a:end while start < end let middle = (start + end + 1) / 2 exec "let str = " . a:accessor . "(" . middle . ", a:context)" exec "let result = " . a:cmp . "(str, a:line, " . a:direction . ")" if result < 0 let start = middle else let end = middle - 1 endif endwhile return start endfunction """ END: Sorting support. }}} " Eats character if it matches the given pattern. " " Originally, " From: Benji Fisher " Date: Mon, 25 Mar 2002 15:05:14 -0500 " " Based on Bram's idea of eating a character while type to expand an " abbreviation. This solves the problem with abbreviations, where we are " left with an extra space after the expansion. " Ex: " inoreabbr \stdout\ System.out.println("");=EatChar('\s') function! EatChar(pat) let c = nr2char(getchar()) return (c =~ a:pat) ? '' : c endfun " Convert Roman numerals to decimal. Doesn't detect format errors. " " Originally, " From: "Preben Peppe Guldberg" " Date: Fri, 10 May 2002 14:28:19 +0200 " " START: Roman2Decimal {{{ let s:I = 1 let s:V = 5 let s:X = 10 let s:L = 50 let s:C = 100 let s:D = 500 let s:M = 1000 fun! s:Char2Num(c) " A bit of magic on empty strings if a:c == "" return 0 endif exec 'let n = s:' . toupper(a:c) return n endfun fun! Roman2Decimal(str) if a:str !~? '^[IVXLCDM]\+$' return a:str endif let sum = 0 let i = 0 let n0 = s:Char2Num(a:str[i]) let len = strlen(a:str) while i < len let i = i + 1 let n1 = s:Char2Num(a:str[i]) " Magic: n1=0 when i exceeds len if n1 > n0 let sum = sum - n0 else let sum = sum + n0 endif let n0 = n1 endwhile return sum endfun " END: Roman2Decimal }}} " BEGIN: Relative path {{{ " Find common path component of two filenames, based on the tread, "computing " relative path". " Date: Mon, 29 Jul 2002 21:30:56 +0200 (CEST) function! CommonPath(path1, path2) let path1 = CleanupFileName(a:path1) let path2 = CleanupFileName(a:path2) return CommonString(path1, path2) endfunction function! CommonString(str1, str2) let str1 = CleanupFileName(a:str1) let str2 = CleanupFileName(a:str2) if str1 == str2 return str1 endif let n = 0 while str1[n] == str2[n] let n = n+1 endwhile return strpart(str1, 0, n) endfunction function! RelPathFromFile(srcFile, tgtFile) return RelPathFromDir(fnamemodify(a:srcFile, ':r'), a:tgtFile) endfunction function! RelPathFromDir(srcDir, tgtFile) let cleanDir = CleanupFileName(a:srcDir) let cleanFile = CleanupFileName(a:tgtFile) let cmnPath = CommonPath(cleanDir, cleanFile) let shortDir = strpart(cleanDir, strlen(cmnPath)) let shortFile = strpart(cleanFile, strlen(cmnPath)) let relPath = substitute(substitute(shortDir, '[^/]\+$', '', ''), \ '[^/]\+', '..', 'g') return relPath . shortFile endfunction " END: Relative path }}} " BEGIN: Persistent settings {{{ if ! exists("g:genutilsNoPersist") || ! g:genutilsNoPersist " Make sure the '!' option to store global variables that are upper cased are " stored in viminfo file. Make sure it is the first option, so that it will " not interfere with the 'n' option ("Todd J. Cosgrove" " ). set viminfo^=! " The pluginName and persistentVar have to be unique and are case insensitive. " Should be called from VimLeavePre. This simply creates a global variable which " will be persisted by Vim through viminfo. The variable can be read back in " the next session by the plugin using GetPersistentVar() function. The " pluginName is to provide a name space for different plugins, and avoid " conflicts in using the same persistentVar name. " This feature uses the '!' option of viminfo, to avoid storing all the " temporary and other plugin specific global variables getting saved. function! PutPersistentVar(pluginName, persistentVar, value) let globalVarName = s:PersistentVarName(a:pluginName, a:persistentVar) exec 'let ' . globalVarName . " = '" . a:value . "'" endfunction " Should be called from VimEnter. Simply reads the gloval variable for the " value and returns it. Removed the variable from global space before " returning the value, so should be called only once. function! GetPersistentVar(pluginName, persistentVar, default) let globalVarName = s:PersistentVarName(a:pluginName, a:persistentVar) if (exists(globalVarName)) exec 'let value = ' . globalVarName exec 'unlet ' . globalVarName else let value = a:default endif return value endfunction function! s:PersistentVarName(pluginName, persistentVar) return 'g:GU_' . toupper(a:pluginName) . '_' . toupper(a:persistentVar) endfunction endif " END: Persistent settings }}} " vim6:fdm=marker cream-0.43/cream-find.vim0000644000076400007660000002420711517300720015633 0ustar digitectlocaluser"= " cream-find.vim -- A re-work of the replace command " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * allows non-regexp " * case sensitivity " * up/down option " " override 'ignorcase' if the search pattern contains upper case characters. set nosmartcase " search wraps around end of file. set wrapscan " ********************************************************************** " Note: " This script is cream-replacemulti.vim with parts removed. DON'T edit " here without incorporating changes into that master!!!!!!! " ********************************************************************** " "---------------------------------------------------------------------- function! Cream_find() " Main function " save guioptions environment let myguioptions = &guioptions " do not use a vertical layout for dialog buttons set guioptions-=v " initialize variables if don't exist (however, remember if they do!) if !exists("g:CREAM_FFIND") let g:CREAM_FFIND = 'Find Me!' endif " option: case sensitive? (1=yes, 0=no) if !exists("g:CREAM_FCASE") " initialize off let g:CREAM_FCASE = 0 endif " option: regular expressions? (1=yes, 0=no) if !exists("g:CREAM_FREGEXP") " initialize off let g:CREAM_FREGEXP = 0 endif "*** Unique: initialize with find dialog for more intuitive use call Cream_find_find(g:CREAM_FFIND) "*** " get find, replace info (verifying that Find isn't empty, too) let valid = '0' while valid == '0' " get find, replace and path/filename info let myreturn = Cream_find_request(g:CREAM_FFIND) " if quit code returned if myreturn == '2' break " verify criticals aren't empty (user pressed 'ok') elseif myreturn == '1' let valid = Cream_find_verify() endif endwhile " if not quit code, continue if myreturn != '2' " DO FIND/REPLACE! (Critical file states are verified within.) if valid == '1' call Cream_find_doit() else return endif endif " restore guioptions execute "set guioptions=" . myguioptions endfunction "---------------------------------------------------------------------- function! Cream_find_request(myfind) " Dialog to obtain user information (find, replace, path/filename) " * returns 0 for not finished (so can be recalled) " * rewturns 1 for finished " * returns 2 for quit " escape ampersand with second ampersand in dialog box " * JUST for display " * Just for Windows if has("win32") \|| has("win16") \|| has("win95") \|| has("dos16") \|| has("dos32") let myfind_fixed = substitute(a:myfind, "&", "&&", "g") else let myfind_fixed = a:myfind endif let mychoice = 0 let msg = "INSTRUCTIONS:\n" let msg = msg . "* Enter the literal find text below.\n" let msg = msg . "* Use \"\\n\" to represent new lines and \"\\t\" for tabs.\n" let msg = msg . "* Please read the Vim help to understand regular expressions (:help regexp)\n" let msg = msg . "\n" let msg = msg . "\n" let msg = msg . "FIND: " . myfind_fixed . " \n" let msg = msg . "\n" let msg = msg . "\n" let msg = msg . "OPTIONS:\n" if g:CREAM_FCASE == 1 let msg = msg . " [X] Yes [_] No Case Sensitive\n" else let msg = msg . " [_] Yes [X] No Case Sensitive\n" endif if g:CREAM_FREGEXP == 1 let msg = msg . " [X] Yes [_] No Regular Expressions\n" else let msg = msg . " [_] Yes [X] No Regular Expressions\n" endif let msg = msg . "\n" let mychoice = confirm(msg, "&Find\nOp&tions\n&Ok\n&Cancel", 3, "Info") if mychoice == 0 " quit via Esc, window close, etc. (OS specific) return 2 elseif mychoice == 1 " call dialog to get find string call Cream_find_find(g:CREAM_FFIND) return elseif mychoice == 2 " call dialog to set options. Continue to show until Ok(1) or Cancel(2) let valid = '0' while valid == '0' " let user set options let myreturn = Cream_find_options() " if Ok or Cancel, go back to main dialog if myreturn == '1' || myreturn == '2' let valid = '1' endif endwhile return elseif mychoice == 3 " user thinks ok, return positive for actual verification return 1 elseif mychoice == 4 " quit return 2 endif call confirm("Error in Cream_find_request(). Unexpected result.", "&Ok", "Error") return 2 endfunction " Get input through dialog " * Would be nice to detect Ok or Cancel here. (Cancel returns an empty string.) " * These stupid spaces are to work around a Windows GUI problem: Input is only " allowed to be as long as the actual input box. Therefore, we're widening the " dialog box so the input box is wider. ;) "---------------------------------------------------------------------- function! Cream_find_find(myfind) let myfind = inputdialog("Please enter a string to find... " . \" ", a:myfind) " let's not go overboard with the data entry width " \" " . " \" " . " \" " . " if user cancels, returns empty. Don't allow. if myfind != "" let g:CREAM_FFIND = myfind endif return endfunction "---------------------------------------------------------------------- function! Cream_find_options() let mychoice = 0 let msg = "Options:\n" let msg = msg . "\n" let msg = msg . "\n" if g:CREAM_FCASE == 1 let strcase = "X" else let strcase = "_" endif if g:CREAM_FREGEXP == 1 let strregexp = "X" else let strregexp = "_" endif let msg = msg . " [" . strcase . "] Case Sensitive\n" let msg = msg . " [" . strregexp . "] Regular Expressions\n" let msg = msg . "\n" let mychoice = confirm(msg, "Case\ Sensitive\nRegular\ Expressions\n&Ok", 1, "Info") if mychoice == 0 " quit via Esc, window close, etc. (OS specific) return 2 elseif mychoice == 1 " case sensitive if g:CREAM_FCASE == 1 let g:CREAM_FCASE = 0 else let g:CREAM_FCASE = 1 endif return elseif mychoice == 2 " regular expressions if g:CREAM_FREGEXP == 1 let g:CREAM_FREGEXP = 0 else let g:CREAM_FREGEXP = 1 endif return elseif mychoice == 3 " ok return 1 endif return endfunction "---------------------------------------------------------------------- function! Cream_find_verify() " Verify that Find and Path not empty (although Replace can be) " * Returns '1' when valid if g:CREAM_FFIND == '' call confirm("Find may not be empty.", "&Ok", "Warning") return else return 1 endif endfunction "---------------------------------------------------------------------- function! Cream_find_doit() " Main find/replace function. Also validates files and state "...................................................................... " find/replace in file " capture current magic state let mymagic = &magic " turn off if mymagic == "1" set nomagic endif " strings " * use local variable to maintain global strings " * work around ridiculous differences between {pattern} and {string} let myfind = g:CREAM_FFIND " condition: case-sensitive if g:CREAM_FCASE == 1 let mycase = "I" set noignorecase else let mycase = "i" set ignorecase endif " condition: regular expressions if g:CREAM_FREGEXP == 1 let myregexp = "" set magic else let myregexp = "\\V" set nomagic " escape strings " escape all backslashes " * This effectively eliminates ALL magical special pattern " meanings! Only those patterns "unescaped" at the next step " become effective. (Diehards are gonna kill us for this.) let myfind = substitute(myfind, '\\', '\\\\', 'g') " un-escape desired escapes " * Anything not recovered here is escaped forever ;) let myfind = substitute(myfind, '\\\\n', '\\n', 'g') let myfind = substitute(myfind, '\\\\t', '\\t', 'g') " escape slashes so as not to thwart the :s command below! let myfind = substitute(myfind, '/', '\\/', 'g') endif "...................................................................... " find ( :/{pattern} ) " * {pattern} " \V -- eliminates magic (ALL specials must be escaped, most " of which we thwarted above, MWUHAHAHA!!) let mycmd = ':silent! /' . myregexp . myfind " test if expression exists in file first if search(myregexp . myfind) != 0 " initial find command execute mycmd " Hack: back up to previous find, the replace command goes forward from current pos normal N " turn on search highlighting set hlsearch " loop next/previous let mycontinue = "" while mycontinue != "no" " start visual mode normal v " select word found let i = 0 while i < strlen(myfind) " adjust normal l let i = i + 1 endwhile " refresh selection redraw " continue? if !exists("mypick") let mypick = 1 endif let mypick = confirm("Continue find?", "&Next\n&Previous\n&Cancel", mypick, "Question") if mypick == 1 " terminate visual mode normal v " next normal n elseif mypick == 2 " terminate visual mode normal v " back up our adjustment normal b " previous normal N else " terminate visual mode normal v " quit break endif endwhile " turn off search highlighting set nohlsearch else call confirm("No match found", "&Ok", 1, "Info") endif " return magic state if mymagic == "1" set magic else set nomagic endif unlet mymagic endfunction cream-0.43/cream-settings.vim0000644000076400007660000002606511517300720016557 0ustar digitectlocaluser" " cream-settings.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * basic environmental settings required by most of Cream " * no global variables set here " " General {{{1 " makes Vim "modeless" set insertmode "*** Do NOT use! (Individual options set elsewhere) "behave mswin "*** " write ("nowrite" is a read-only/file viewer) set write " file to use for keyword completion (not spelling!) "set dictionary=/usr/dict/words " hold screen updating while executing macros " * nolazyredraw is slower " * nolazyredraw ensures better accuracy ;) " * lazyredraw still allows "redraw!" to override within a function set nolazyredraw " Just use default "" GTK2 hack: is broken otherwise "if has("gui_gtk2") " set imdisable "endif " Vim plugins {{{1 " the loading of Vim plugins can be controled by the " g:CREAM_NOVIMPLUGINS variable if exists("g:CREAM_NOVIMPLUGINS") if g:CREAM_NOVIMPLUGINS == 1 set noloadplugins endif endif " Paths (misc, critical are set in vimrc) {{{1 " set default search paths for files "set path=.,, "" set current directory equal to location of current buffer "" Source: http://vim.sourceforge.net/tips/tip.php?tip_id=64 "" Author: William Lee, modified by ict@eh.org "function! Cream_cwd() " let mydir = expand("%:p:h") " if mydir !~ '^/tmp' " exec "cd " . mydir " endif " unlet mydir "endfunction " set browse location " TODO: We use getcwd() and g:CREAM_CWD elsewhere to effectively " accomplish the same thing. While this is automatic, Cream uses " a more selective strategy to avoid setting a high latency " directory active. set browsedir=buffer " can't use this, depends on too restrictive features (:help feature-list) "set autochdir " Windows and Buffers {{{1 " confirm certain (verbose) operations to unsaved buffers set noconfirm " * Allow hidden buffers! When a new buffer is opened and then " modified, we do not want to force the user to write it before they " switch to another file/buffer. (We just want it to show up in the " buffer list as modified.) So it should not be abandoned if " unsaved, which is what ":set nohidden" does. set hidden " used to set buffers no longer displayed in a window (empty means " follow global 'set hidden') set bufhidden= " automatically save modifications to files when you use buffer/window " commands. set noautowrite " automatically save modifications to files when you use critical " (rxternal) commands. set noautowriteall " keep window sizes mostly equal set equalalways " height of help window -- zero disables (50%) (default=20) set helpheight=0 " Create new windows below current one set splitbelow " turn off alternate file set cpoptions-=a " Window titling {{{1 " window icon text--use defaults function! Cream_titletext() " verify b:cream_nr call Cream_buffer_nr() " verify buffer name call Cream_buffer_pathfile() " modified if getbufvar(b:cream_nr, "&modified") == 1 let mymod = "*" else let mymod = "" endif " filename let myfile = fnamemodify(b:cream_pathfilename, ":t") if myfile == "" let myfile = "[untitled]" elseif Cream_buffer_isspecial() == 1 if Cream_buffer_ishelp() == 1 let myfile = "Help" elseif myfile == "_opsplorer" let myfile = "File Tree" elseif isdirectory(bufname(b:cream_nr)) let myfile = "File Explorer" elseif myfile == "__Calendar" let myfile = "Calendar" elseif myfile == "__Tag_List__" let myfile = "Tag List" elseif myfile == "-- EasyHtml --" let myfile = "Item List" endif endif let myfile = myfile . " " " path if Cream_buffer_ishelp() == 1 let mypath = "(" . fnamemodify(b:cream_pathfilename, ":h") . ")" " add trailing slash if doesn't exist let mypath = Cream_path_addtrailingslash(mypath) elseif b:cream_pathfilename == "" let mypath = "" elseif Cream_buffer_isspecial() == 1 let mypath = "" else " add trailing slash if doesn't exist let mypath = Cream_path_addtrailingslash(fnamemodify(b:cream_pathfilename, ":h")) let mypath = "(" . mypath . ")" endif "" limit total length (until titlelen gets fixed) "if strlen(mypath . myfile . mymod) > 50 " let mypath = "..." . strpart(mypath, strlen(mypath . myfile . mymod) - 47) "endif return mymod . myfile . mypath endfunction function! Cream_titletext_init() set titlestring=%.999{Cream_titletext()} endfunction " broken set titlelen=0 set title " Editing and Keyboard {{{1 " place two spaces after a period set nojoinspaces " allow cursor positioning where there is no character. (Useful in Visual block " mode.) (Options are 'block', 'insert', 'all'.) set virtualedit=block " use a faster timeout setting set timeout set timeoutlen=300 "set ttimeout "set ttimeoutlen=200 " Menus {{{1 if has("gui_running") " GUI menus " general Vim menu Settings " menubar (initially off to improve loading speed, turned back on " via autocmd after startup) set guioptions-=m " grey menu items when not active (rather than hide them) set guioptions+=g " hide toolbar for faster startup (init will turn on on VimEnter) set guioptions-=T " toolbar (Cream_toolbar_toggle() toggle function in cream-lib.vim) function! Cream_toolbar_init() " initialize if !exists("g:CREAM_TOOLBAR") let g:CREAM_TOOLBAR = 1 endif " set if g:CREAM_TOOLBAR == 1 " toolbar set guioptions+=T else " no toolbar set guioptions-=T endif endfunction " allow tearoff menus set guioptions-=t " allows use of [ALT] key, in combination with others, to access GUI menus. "*** Need to find a way to de-conflict these from language mappings *** set winaltkeys=menu endif " M -- means "Don't source default menu" set guioptions+=M " Console menus set wildmenu set cpoptions-=< set wildcharm= " Selection {{{1 " allow "special" keys to begin select mode. (This option is useful " for enabling "windows-like" text selection. set keymodel=startsel,stopsel " end of line selection behavior set selection=exclusive " starts Select mode instead of Visual mode in the prescribed " conditions. (Options: mouse,cmd,key) "*** Use 'key' to replace selected text with a character! (non-mouse) *** "*** Don't use 'cmd' because we need visual mode for column editing! *** "*** Use 'cmd' because... *** "*** Don't use 'mouse' so that double-click selects can be pasted upon. (Bogus) *** set selectmode=key,mouse " Motion {{{1 " allows backspacing" over indentation, end-of-line, and " start-of-line. set backspace=indent,eol,start " Allow jump commands for left/right motion to wrap to previous/next " line when cursor is on first/last character in the line. set whichwrap+=<,>,h,l,[,] " jump to first character with page commands ('no' keeps the cursor in the current column) "*** doesn't work for me set startofline " append / to fix "*** " Terminal {{{1 "*** Now dynamically set in lib function Cream_errorbells() " t_vb: terminal's visual bell (See also 'visualbell') "set t_vb= "*** " Wrap {{{1 " do not indicate lines that have been wrapped. (Should show on last " column, not on first!) set cpoptions-=n " line break at spaces set linebreak " determine which characters cause a line break (default: set breakat=" ^I!@*-+;:,./?") set breakat=\ - " substitute spaces for a tab character " * Typically off. User can choose AutoWrap and QuickFormat to change. set noexpandtab " Inserts blanks if at the beginning of a line. set nosmarttab " see :help fo-table (notice that we're resetting, not adding!) " * DO NOT ADD "w" option... it completely hoses auto-wrap! "set formatoptions=tcrqn2m set formatoptions=tcrqm " Completion, Incrementing {{{1 set showfulltag set nrformats=alpha " Case sensitivity {{{1 set ignorecase " convert to case of current start set infercase " Mouse {{{1 " window focus follows mouse (when multiple windows present). (Nice if you're an " expert, too confusing otherwise.) set nomousefocus set mousemodel=popup " Scrolling {{{1 " minimum number of screen rows ('lines') to maintain context in " vertical cursor movements. set scrolloff=1 " *** I have found this to screw up 'linebreak' with 'wordwrap', " 'breakat' and 'linebreak' *** "set sidescrolloff=5 " show as much of a non-fitting line as possible set display=lastline " Command Line {{{1 " mode indication on command line set noshowmode " sure do wish I could make these go away to "pop" open when necessary. set cmdheight=1 set cmdwinheight=1 " the char used for "expansion" on the command line. (Default value is .) " * is mapped elsewhere, but for insertmode in the doc (NOT the command line.) set wildchar= " Errors {{{1 " Note: See library and autocommands for errorbell and visualbell " settings " default is "filnxtToO" " * Add 'I' to disable splash screen set shortmess=stOTI " Clipboard {{{1 " use OS clipboard for general register "set clipboard+=unnamed if has("gui_running") " Vim selection to OS clipboard set guioptions-=a " Vim selection to OS clipboard, modeless set guioptions-=A endif " Folding {{{1 "set foldmethod=marker " Filetype {{{1 " turn on filetype plugin on " Backups, swap files, viewoptions, history and mksessions {{{1 " * Move this section below path configuration if $CREAM is ever appended here. " * Location to place backup files. Perhaps we could create a more sophisticated " approach here, such as automating the creation of a ./.bak ? " create backup file on save set backup " create backup before overwriting (erased if successful) set writebackup " set backup file extension (Sometimes prefer ".bak" but tilde is easier to see) set backupext=.~ " use a swapfile (turned off in Cream_singleserver_init() for " single-server mode) set swapfile " * Hmmm... 'slash' is undocumented. " * Don't use 'options', it overwrites Cream initializations set viewoptions=folds,cursor,unix set history=200 " mksession conditioning " * Also available: localoptions,options,sesdir " * Don't save 'options' -- we want auto re-detection of filetype and comment loading. " * "set sessionoptions+=tabpages" done elsewhere set sessionoptions=blank,buffers,curdir,folds,globals,help,resize,slash,unix,winpos,winsize " Bracket matching {{{1 "set matchtime -- set at Cream_bracketmatch_init() let g:loaded_matchparen = 1 " Search {{{1 set incsearch " Diff {{{1 if has("win32") set diffexpr=MyDiff() endif " 1}}} " vim:foldmethod=marker cream-0.43/cream-abbr-fre.vim0000644000076400007660000000324011517300716016372 0ustar digitectlocaluser"==================================================================== " cream-abbr-fre.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Source: " " File: fr-abbr.vim " Author: Luc Hermitte " " Last Update: 21st jul 2002 " Purpose: Abbrviations et corrections automatiques pour documents en " francais. " iabbrev Classifieur Classificateur iabbrev classifieur classificateur iabbrev LA La iabbrev LE Le iabbrev LEs Les iabbrev JE Je iabbrev Permanante Permanente iabbrev permanante permanente iabbrev Plsu Plus iabbrev plsu plus iabbrev traffic trafic if &encoding == "latin1" iabbrev couteu coteu iabbrev facon faon iabbrev ontrole ontrle iabbrev Reseau Rseau iabbrev reseau rseau iabbrev tres trs iabbrev Video Vido iabbrev video vido endif cream-0.43/cream-gui.vim0000644000076400007660000000311511517300720015472 0ustar digitectlocaluser" " cream-gui.vim -- portion of Cream available only to the GUI (gVim) " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " if !has("gui_running") finish endif " initial margin to leave at top of screen when fitting the gui to " accommodate top menu bars set guiheadroom=50 " cursor set guicursor= \n:block-Error/lCursor-blinkwait700-blinkoff50-blinkon800, \c:block-Error/lCursor, \o:hor50-Error, \i-ci-v:ver25-Cursor/lCursor, \r-cr:block-Cursor/lCursor, \sm:block-Cursor " number of pixels inserted between font characters. (default 0, 1 for Win32 GUI) "set linespace= " scrollbars set guioptions+=r " Right hand scroll bar always present set guioptions-=L " Left hand scroll bar always present when vertically split " 1}}} " vim:foldmethod=marker cream-0.43/Rndm.vim0000644000076400007660000000546511156572442014546 0ustar digitectlocaluser" Rndm: " Author: Charles E. Campbell, Jr. " Date: May 28, 2004 " Version: 3 " " Discussion: algorithm developed at MIT " " uses three pseudo-random seed variables " g:rndm_m1 g:rndm_m2 g:rndm_m3 " Each should be on the interval 0 - 100,000,000 " " RndmInit(s1,s2,s3): takes three arguments to set the three seeds (optional) " Rndm() : generates a pseudo-random variate on [0,100000000) " Urndm(a,b) : generates a uniformly distributed pseudo-random variate " on the interval [a,b] " Dice(qty,sides) : emulates a variate from sum of "qty" user-specified " dice, each of which can take on values [1,sides] " --------------------------------------------------------------------- " Randomization Variables: " with a little extra randomized start from localtime() let g:rndm_m1 = 32007779 + (localtime()%100 - 50) let g:rndm_m2 = 23717810 + (localtime()/86400)%100 let g:rndm_m3 = 52636370 + (localtime()/3600)%100 " --------------------------------------------------------------------- " RndmInit: allow user to initialize pseudo-random number generator seeds fun! RndmInit(lm1,lm2,lm3) let g:rndm_m1 = a:lm1 let g:rndm_m2 = a:lm2 let g:rndm_m3 = a:lm3 endfun " --------------------------------------------------------------------- " Rndm: generate pseudo-random variate on [0,100000000) fun! Rndm() let m4= g:rndm_m1 + g:rndm_m2 + g:rndm_m3 if( g:rndm_m2 < 50000000 ) let m4= m4 + 1357 endif if( m4 >= 100000000 ) let m4= m4 - 100000000 endif if( m4 >= 100000000 ) let m4= m4 - 100000000 endif let g:rndm_m1 = g:rndm_m2 let g:rndm_m2 = g:rndm_m3 let g:rndm_m3 = m4 return g:rndm_m3 endfun " --------------------------------------------------------------------- " Urndm: generate uniformly-distributed pseudo-random variate on [a,b] fun! Urndm(a,b) " sanity checks if a:b < a:a return 0 endif if a:b == a:a return a:a endif " Using modulus: rnd%(b-a+1) + a loses high-bit information " and makes for a poor random variate. Following code uses " rejection technique to adjust maximum interval range to " a multiple of (b-a+1) let amb = a:b - a:a + 1 let maxintrvl = 100000000 - ( 100000000 % amb) let isz = maxintrvl / amb let rnd= Rndm() while rnd > maxintrvl let rnd= Rndm() endw return a:a + rnd/isz endfun " --------------------------------------------------------------------- " Dice: assumes one is rolling a qty of dice with "sides" sides. " Example - to roll 5 four-sided dice, call Dice(5,4) fun! Dice(qty,sides) let roll= 0 let sum= 0 while roll < a:qty let sum = sum + Urndm(1,a:sides) let roll= roll + 1 endw return sum endfun " --------------------------------------------------------------------- cream-0.43/cream-server.vim0000644000076400007660000001577511517300720016233 0ustar digitectlocaluser" " cream-server.vim -- Manage multiple sessions " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " We like single sessions of Vim. If second Vim session opened, open " the file in first session, close and move it to forefront function! Cream_singleserver_init() " initialize environment state (default is off) " don't use in terminal! if !has("gui_running") return elseif has("mac") return endif if exists("g:CREAM_SINGLESERVER") if g:CREAM_SINGLESERVER != 1 let g:CREAM_SINGLESERVER = 0 set swapfile else let g:CREAM_SINGLESERVER = 1 "*** disable swapfiles until we resolve this set noswapfile "*** endif else let g:CREAM_SINGLESERVER = 0 set swapfile endif endfunction " Singleserver toggle (called by menu) function! Cream_singleserver_toggle() " don't use in terminal! if !has("gui_running") return elseif has("mac") return endif " should already be initialized, but check anyway if exists("g:CREAM_SINGLESERVER") if g:CREAM_SINGLESERVER == 1 call confirm( \ "\n" . \ "Single-Session Mode off -- multiple Vim sessions allowed.\n" . \ "\n", "&Ok", 1, "Info") let g:CREAM_SINGLESERVER = 0 " save global in viminfo else call confirm( \ "\n" . \ "Single-Session Mode *on* -- multiple files will always\n" . \ "be opened within a single session of Vim.\n" . \ "\n", "&Ok", 1, "Info") let g:CREAM_SINGLESERVER = 1 " save global in viminfo endif " init autocommand group call Cream_singleserver_init() " forget last buffer so future sessions have no memory let g:CREAM_LAST_BUFFER = "" wviminfo! else " error call Cream_error_warning("g:CREAM_SINGLESERVER not initialized in Cream_singleserver_toggle()") endif call Cream_menu_settings_preferences() endfunction function! Cream_singleserver() " merge a second instance of Vim into the first one " don't use in terminal! if !has("gui_running") return elseif has("mac") return endif "" don't use if not initialized "if !exists("g:CREAM_SINGLESERVER") " return "endif "" don't use if off "if g:CREAM_SINGLESERVER != 1 " return "endif " "" don't use if separate server over-ride on (see Cream_session_new() ) "if exists("g:CREAM_SERVER_OVERRIDE") " " reset " unlet g:CREAM_SERVER_OVERRIDE " return "endif "" option 1 (slow) {{{1 "" collect servernames (separated by "\n", should be just one) "let myserverlist = serverlist() "" count "let servercount = MvNumberOfElements(myserverlist, "\n") "" get this server's name "let myserverid = v:servername "if servercount > 1 " " iterate through servernames until reaching one not equal to mine " let i = 0 " while i < servercount " let myserver = MvElementAt(myserverlist, "\n", i) " if v:servername != myserver " let myfile = expand("%:p") " "*** no need to alter, Vim will re-handle " "" windows slash to backslash (if exist, ie ":set shellslash") " "if has("win32") " " let myfile = substitute(myfile,'/','\\','g') " "endif " "*** " if myfile != "" " " escape " let myfile = escape(myfile, " ") " " solve buffer not found errors from second session startup " let g:CREAM_LAST_BUFFER = "" " let mycmd = "\\:edit " . "+" . line(".") . " " . myfile . "\" " else " let mycmd = "\\:call Cream_file_new()\" " endif " call remote_send(myserver, mycmd) " "if has("win32") " "\ has(" " call remote_expr(myserver, "foreground()") " "else " " call foreground() " "endif " call Cream_exit() " " we're toast at this point, but let's keep good form ;) " break " endif " let i = i + 1 " endwhile " ""*** DEBUG: " "call confirm( " " \ "\n" . " " \ " myserverlist = " . myserverlist . "\n" . " " \ " servercount = " . servercount . "\n" . " " \ "\n" . " " \ " myserver = " . myserver . "\n" . " " \ " myfile = " . myfile . "\n" . " " \ " mycmd = " . mycmd . "\n" . " " \ "\n", "&Ok", 1, "Info") " ""*** "endif " 1}}} "" option 2 (do better guessing) {{{1 "if v:servername !=? "GVIM" " " " get opened file name " let myfile = expand("%:p") " " if have file, open it " if myfile != "" " " reverse backslashes " let myfile = substitute(myfile, '\\', '/', 'g') " " escape " let myfile = escape(myfile, ' ') " " solve buffer not found errors from second session startup " let g:CREAM_LAST_BUFFER = "" " " edit current file, maintain this position " let mycmd = ':edit ' . '+' . line('.') . ' ' . myfile . '' " " open new buffer " else " let mycmd = ':call Cream_file_new()' " endif " call remote_send('GVIM', mycmd) " call remote_expr('GVIM', 'foreground()') " call Cream_exit() " "end " 1}}} " option 3 (just become the server) {{{1 if v:servername !=? "CREAM" if !Cream_buffer_isnewunmod() " get opened file name let myfile = expand("%:p") " reverse backslashes let myfile = substitute(myfile, '\\', '/', 'g') " escape let myfile = escape(myfile, ' ') " solve buffer not found errors from second session startup let g:CREAM_LAST_BUFFER = "" ""*** not needed, we're only concerned about variable space "" write the viminfo so it's remembered! "wviminfo! ""*** " edit current file, maintain this position let mycmd = ":edit +" . line('.') . ' ' . myfile . '' " open new buffer else let mycmd = ":call Cream_file_new()" endif call remote_send('CREAM', mycmd) " Fix tabs (last bit clears the line :) let mycmd = ":call Cream_tabpages_refresh():" call remote_send('CREAM', mycmd) call remote_foreground('CREAM') call Cream_exit() call Cream_menu_settings_preferences() end " 1}}} endfunction " vim:foldmethod=marker cream-0.43/cream-playpen.vim0000644000076400007660000005205411517300720016364 0ustar digitectlocaluser" " Filename: cream-playpen.vim " " Description: Experiments, things in flux or unresolved. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " if !exists("g:cream_dev") finish endif " ShortenPath() {{{1 function! ShortenPath(mode) if a:mode != "v" return endif " reselect normal gv " yank normal "xy " convert to 8.3 let @x = fnamemodify(@x, ":p:8") " paste back over normal gv normal "xp endfunction "vmap :call ShortenPath("v") " C:\Program Files\cowsaregreat.butnottoeat " remote read/write " FTP spell check retrieval {{{1 function! Cream_get_ftp_listing(file) " Return a string of FTP files delineated by newlines. " " TODO: " o Depending on platform, Netrw will deliver listings in different " formats. Need to investigate and handle. " " hide Netrw menu let g:netrw_menu = 0 " open list in new buffer call Cream_file_new() execute "edit " . a:file " process into list set modifiable " remove comments silent! %substitute/^".*$//geI " remove dot files silent! %substitute/^\..*$//geI " remove last "yanked" line silent! %substitute/^\d\+ lines yanked$//geI " remove empty lines silent! %substitute/\n\s*\n*$//ge silent! %substitute/^\n\+//ge " yank processed buffer silent! normal gg silent! normal V silent! normal G silent! normal "xy " close buffer bwipeout! return @x endfunction function! Cream_spell_dictlangs() let @x = Cream_get_ftp_listing('ftp://ftp.vim.org/pub/vim/runtime/spell/') " put into new file call Cream_file_new() silent! normal "xP " convert to list of languages " remove READMEs silent! %substitute/^README.*$//geI " remove suggestion files silent! %substitute/^.\+\.sug$//geI "" remove .spl extensions "%substitute/\.spl$//geI " remove everything but language silent! %substitute/^\(..\).\+$/\1/geI " remove empty lines silent! %substitute/\n\s*\n*$//ge silent! %substitute/^\n\+//ge " unique call Uniq(1, line('$')) " remove empty lines silent! %substitute/\n\s*\n*$//ge silent! %substitute/^\n\+//ge endfunction "imap :call Cream_spell_dictlangs() " Cream remote read/write {{{1 " NOTES {{{2 " We have never had success getting Netrw to work, thus this attempt. " Netrw also attempts too much, it confuses basic up/down " functionality with mappings, buffers, browsing, etc. " " Goals: " " o Parse standard URI: " " ftp://anonymous:vim7user@ftp.vim.org/pub/vim/README " " for: " " * protocol (ftp, http) " * username " * password " * hostname " * path " * filename " " Need a "hard" and "soft" version, the first which assumes a " properly formed URI, and the second to remove offending " accommodations like surrounding quotes, brackets, line endings and " embedded whitespace. " " o Be able to store URI components in " * global vars (encoded username and passwords only) " * session vars " * prompt user for temporary use if none found " " o API " * Read remote file " * Get listing of remote path " " " References: " " o http://en.wikipedia.org/wiki/Uniform_Resource_Identifier " o http://www.gbiv.com/protocols/uri/rfc/rfc3986.html " o http://www.zvon.org/tmRFC/RFC2396/Output/chapter12.html " Cream_remote_parse_URI() {{{2 function! Cream_remote_parse_URI(uri) " Return a dictionary of URI components: " " ftp://anonymous:vim7user@ftp.vim.org:port/pub/vim/README#02 " ¯¯¯ ¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯ " 1 2 3 4 5 6 7 8 " " 1. protocol: dict["prot"] (required) " 2. username: dict["user"] " 3. password: dict["pass"] " 4. hostname: dict["host"] (required) " 5. port: dict["port"] " 6. path: dict["path"] " 7. filename: dict["file"] " 8. anchor: dict["anch"] " " Notes: " " o valid field chars: [[:alnum:]-\._~] " " Tests: " " call Cream_remote_parse_URI("ftp://ftp.vim.org") " call Cream_remote_parse_URI("ftp://ftp.vim.org/pub/vim/README") " call Cream_remote_parse_URI("ftp://anonymous:vim7user@ftp.vim.org:port/pub/vim/README") " call Cream_remote_parse_URI("ftp://127.0.0.1") " let uri = a:uri let prot = matchstr(uri, '^[^:/?#]\+\ze:') " temp var to hold user, pass, host, port let uphp = matchstr(uri, '^'.prot.'://'.'\zs[^/?#]\+') let user = matchstr(uphp, '^.*\ze:.*@') let pass = matchstr(uphp, '^.*:\zs.*\ze@') let port = matchstr(uphp, '^'.user.':\='.pass.'@\=.*:\zs.*$') let host = matchstr(uphp, '^'.user.':\='.pass.'@\=\zs[^:]\+\ze:\='.port.'$') " find path begin (watch for paths matching host!) let path = matchstr(uri, host.':\='.port.'\zs/.*$') let anch = matchstr(path, '#\zs[^:/?#]*$') let file = matchstr(path, '/\zs[^:/?#]*\ze#\='.anch.'$') " now trim off file and anchor let path = matchstr(path, '.*\ze'.file.'#\='.anch.'$') " validation if host == "" call confirm( \ "Improperly formed URI: host.\n" . \ "\n", "&Ok", 1, "Info") return endif if prot == "" call confirm( \ "Improperly formed URI: protocol.\n" . \ "\n", "&Ok", 1, "Info") return endif if file == "" && anch != "" call confirm( \ "Improperly formed URI: anchor with no file.\n" . \ "\n", "&Ok", 1, "Info") return endif if user == "" && pass != "" call confirm( \ "Improperly formed URI: password with no username.\n" . \ "\n", "&Ok", 1, "Info") return endif " put into list let dict = { \ "prot": prot, \ "user": user, \ "pass": pass, \ "host": host, \ "port": port, \ "path": path, \ "file": file, \ "anch": anch \ } ""*** DEBUG: "let n = confirm( " \ "DEBUG:" . Cream_str_pad(" ", 150) . " \ "\n" . " \ " prot = \"" . dict["prot"] . "\"\n" . " \ " user = \"" . dict["user"] . "\"\n" . " \ " pass = \"" . dict["pass"] . "\"\n" . " \ " host = \"" . dict["host"] . "\"\n" . " \ " port = \"" . dict["port"] . "\"\n" . " \ " path = \"" . dict["path"] . "\"\n" . " \ " file = \"" . dict["file"] . "\"\n" . " \ " anch = \"" . dict["anch"] . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** return dict endfunction " Cream_remote_parse_URI_test() {{{2 function! Cream_remote_parse_URI_test() let dict = Cream_remote_parse_URI("ftp://anonymous:vim7user@ftp.vim.org:port/pub/vim/README#cow") ""*** DEBUG: "let n = confirm( " \ "DEBUG:" . Cream_str_pad(" ", 150) . " \ "\n" . " \ " prot = \"" . dict.prot . "\"\n" . " \ " user = \"" . dict.user . "\"\n" . " \ " pass = \"" . dict.pass . "\"\n" . " \ " host = \"" . dict.host . "\"\n" . " \ " port = \"" . dict.port . "\"\n" . " \ " path = \"" . dict.path . "\"\n" . " \ " file = \"" . dict.file . "\"\n" . " \ " anch = \"" . dict.anch . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** endfunction " Cream_remote_ftp_down() {{{2 function! Cream_remote_ftp_down() " Download an explicitly named file. let user = "anonymous" let verbose = "-d stdout" let host = "ftp.vim.com" let getfile = "/pub/vim/runtime/spell" let dir = g:cream_user let progressmeter = "-v" let noprgressmeter = "-V" " set directory to download into execute "cd " . dir " do it (prompts for password) execute "!ncftpget " . progressmeter . " -u " . user . " " . verbose . " " . host . " . " . "'" . getfile . "'" endfunction " 2}}} " Color_NavajoNight() {{{2 function! Color_NavajoNight() " Change the current color scheme via accessing a remote script. enew execute 'Nread http://cream.cvs.sourceforge.net/*checkout*/cream/cream/cream-colors-zenburn.vim' execute "saveas " . tempname() source % endfunction " map :call Color_NavajoNight() "imap :call Color_NavajoNight() "vmap :call Color_NavajoNight() " 1}}} " In progress... " password encrypting {{{1 function! Cream_encrypt_input() let pw = inputsecret("Enter string to encrypt: ") if pw != "" let pw = String2Hex(pw) call Inputdialog("", pw) endif endfunction "imap :call Cream_encrypt_input() " 1}}} " TODO: move to add-ons " Draw directory structure or genealogy tree {{{1 function! Cream_DrawTree() let @x = "\n" let @x = @x . "NAME\n" let @x = @x . " +-NAME\n" let @x = @x . " | +-NAME\n" let @x = @x . " | | +-NAME\n" let @x = @x . " | | | +-NAME\n" let @x = @x . " | | | | +-NAME\n" let @x = @x . " | | | |\n" let @x = @x . " | | | +-NAME\n" let @x = @x . " | | |\n" let @x = @x . " | | +-NAME\n" let @x = @x . " | |\n" let @x = @x . " | +-NAME\n" let @x = @x . " |\n" let @x = @x . " +-NAME\n" let @x = @x . "\n" put x endfunction " 1}}} " non-Cream reliant functions " Tabpage naming (non-Cream environment) {{{1 "function! TabpageName(mode) " if a:mode == 1 " return fnamemodify(expand("%"), ":p:h") " elseif a:mode == 2 " let name = fnamemodify(expand("%"), ":p:t") " if name == "" " return "(Untitled)" " endif " return name " endif "endfunction "function! TabpageState() " if &modified != 0 " return '*' " else " return '' " endif "endfunction "set guitablabel=%{TabpageName(2)}%{TabpageState()} " Cream_copy_char_above() {{{1 function! Cream_copy_char_above() " position correction if getline('.') == "" let col = 0 else let col = col('.') endif let str = getline(line('.') - 1) let chr = matchstr(str, '.', col) execute "normal a" . chr endfunction "imap :call Cream_copy_char_above() " :Buffers {{{1 function! Buffers() " same output as :buffers except omits help, directories, and " new unmodified buffers redir @x silent! buffers redir END let @x = @x . "\n" let buf = 1 let str = "" while buf <= bufnr('$') if bufexists(buf) \&& getbufvar(buf, "&buftype") != "help" \&& !isdirectory(bufname(buf)) \&& s:IsNewUnMod(buf) != 1 let pos1 = match(@x, '\n\s\+' . buf . '[ u]') "let pos1str = matchstr(@x, '\n\s\+' . buf . '[ u]') let pos2 = match(@x, '\n', pos1 + 1) "let pos2str = matchstr(@x, '\n', pos1 + 1) let str = str . strpart(@x, pos1, pos2 - pos1) endif let buf = buf + 1 endwhile echo ":Buffers" . str endfunction function! s:IsNewUnMod(buf) if bufname(a:buf) == "" \&& getbufvar(a:buf, "&modified") == 0 \&& bufexists(a:buf) == 1 return 1 endif endfunction command! Buffers call Buffers() " Associate Mime Type With Windows Registry {{{1 " " From: Ben Peterson, Dan Sharp on vim-dev@vim.org list " Date: 2003-01-14, 11:00am " RE: Associating extensions to Vim (was RE: Win32 improvement: ...) " " Description: " " associate/unassociated vim with the extension of the current file " :associate %:e " :noassociate %:e function! s:Associate(ext, remove) " Arguments: " ext extension to associate " remove 1 to associate, 0 to remove " if a:remove silent exec '!assoc ' . a:ext . '=' else silent exec '!assoc ' . a:ext . '=OpenInVim' execute "silent !ftype OpenInVim=" . $VIMRUNTIME . "\\gvim.exe" . "\"$*\"" endif endfunction command! Associate call s:Associate('.' . expand("%:e"), 0) command! DeAssociate call s:Associate('.' . expand("%:e"), 1) command! -nargs=1 AssociateArg call s:Associate('.' . , 0) command! -nargs=1 DeAssociateArg call s:Associate('.' . , 1) " Variably Toggleable Invisibles {{{1 "function! MyInvisibles(which) " " if a:which == 1 " set nolist " return " else " set list " endif " " " reset " set listchars= " execute "set listchars+=precedes:" . nr2char(95) " execute "set listchars+=extends:" . nr2char(95) " " if a:which >= 2 " execute "set listchars+=tab:" . nr2char(187) . '\ ' " else " execute 'set listchars+=tab:\ \ ' " endif " if a:which >= 3 " execute "set listchars+=eol:" . nr2char(182) " endif " if a:which >= 4 " execute "set listchars+=trail:" . nr2char(183) " endif " "endfunction "imap :call MyInvisibles(1) "imap :call MyInvisibles(2) "imap :call MyInvisibles(3) "imap :call MyInvisibles(4) " highlighting attribute removals {{{1 function! Highlight_remove_attr(attr) " remove attribute from current color scheme " see ":help attr-list" for terms accepted if a:attr != "bold" \&& a:attr != "underline" \&& a:attr != "reverse" \&& a:attr != "inverse" \&& a:attr != "italic" \&& a:attr != "standout" echo "Invalid argument to Highlight_remove_attr()." return -1 endif " get current highlight configuration redir @x silent! highlight redir END " open temp buffer new " paste in put x " convert to vim syntax (from Mkcolorscheme.vim, " http://vim.sourceforge.net/scripts/script.php?script_id=85) " delete empty and links lines silent! g/^$\| links /d " remove the xxx's silent! %s/ xxx / / " add highlight commands silent! %s/^/highlight / " protect spaces in some font names silent! %s/font=\(.*\)/font='\1'/ " substitute attribute with "NONE" execute 'silent! %s/' . a:attr . '\([\w,]*\)/NONE\1/geI' " yank entire buffer normal ggVG " copy normal "xy " run execute @x " remove temp buffer bwipeout! endfunction " 1}}} " Cream functionalities (non-default) " Cream_fileformat_unix() {{{1 function! Cream_fileformat_unix() " Ensure buffers are always unix format, even on windows. " get buffer number let mybufnr = bufnr("%") " only if buffer is unnamed and doesn't exist if bufname(mybufnr) == "" \&& bufexists(mybufnr) == 1 " remember unmodified state if getbufvar(mybufnr, "&modified") == 0 let mod = 1 endif set ff=unix " recover unmodifed state if exists("mod") set nomodified endif endif endfunction "" Uncomment to activate "set encoding=utf8 "call Cream_listchars_init() "autocmd VimEnter,BufEnter * call Cream_fileformat_unix() " 1}}} " Examples " Justify selection bug {{{1 "set insertmode "imap :call JustifyRight() "function! JustifyRight() " " remember " let mytextwidth = &textwidth " let myexpandtab = &expandtab " " sets " set textwidth=70 " set expandtab " " select inner paragraph " normal vip " " get range (marks "'<" and "'>" are scoped pre-function call, " " can't use!) " let myfirstline = line(".") " normal o " let mylastline = line(".") " normal o " " put first range value first (necessary?) " if mylastline < myfirstline " let tmp = myfirstline " let myfirstline = mylastline " let mylastline = tmp " endif " " right justify " execute "silent! " . myfirstline . "," . mylastline . "right" " "*** BROKEN: " "startinsert " "normal i " execute "normal \" " "*** " " restore " let &textwidth = mytextwidth " let &expandtab = myexpandtab "endfunction " Why is evil. {{{1 "function! MyFunction() " " "-------- Test area ---------- " "23456789012345678901234567890 " "23456789012345678901234567890 " "23456789012345678901234567890 " "23456789012345678901234567890 " "-------- Test area ---------- " " " insert "Cow" " normal iCow " " back up " normal hh " " scroll screen up one line " execute "normal \" " " move cursor back down one " normal gj "endfunction " incorrect: "nmap :call MyFunction() "imap :call MyFunction() " correct: "nmap :call MyFunction() "imap :call MyFunction() " 1}}} " Tests " Hooks {{{1 function! Cream_hook_open(fname) " tests let match = 0 " TEST 1: extension is "COW" if fnamemodify(a:fname, ':e') =~ "COW" let match = 1 endif " TEST 2: last four chars of filename is "_NEW" " strip extension let str = fnamemodify(a:fname, ':r') " test last four chars if strpart(str, strlen(str) - 4) == "_NEW" let match = 1 endif " OTHER TESTS " no match if match == 0 " quit and continue normal open return 0 endif " match let n = confirm( \ "Restriction match. Open read-only?\n" . \ "\n", "Read-only\n&Cancel", 1, "Info") if n == 1 call Cream_file_open_readonly(a:fname) endif " return -1 to stop normal open process return -1 endfunction " Remaining key maps {{{1 " functional {{{2 " Minus/Equals imap :call TestCow("C--") imap :call TestCow("C-_") imap :call TestCow("M--") " Comma/Period imap :call TestCow("M-\<") imap > :call TestCow("M->") " non-functional {{{2 " These mappings aren't advisable due to keyboard and OS " standardization issues. "" Brackets "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "" Parenthesis "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "" Minus/Equals "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "" Backslash/Bar "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap :call TestCow() "imap | :call TestCow() "imap :call TestCow() "" Enter "inoremap :call TestCow("C-m") "imap :call TestCow("S-Return") "imap :call TestCow("M-Return") "imap :call TestCow("M-S-Return") "imap :call TestCow("C-M-Return") "imap :call TestCow("M-Enter") "imap :call TestCow("M-S-Enter") "imap :call TestCow("C-M-Enter") "imap :call TestCow("M-CR") "imap :call TestCow("M-S-CR") "imap :call TestCow("C-M-CR") "" Space "imap :call TestCow() "imap :call TestCow() "" Letters "imap :call TestCow("C-j") "imap :echo "C-i" "imap =Tab() "function! Tab() " return nr2char(9) "endfunction " 2}}} " What exactly is in [[:punct:]] {{{1 function! Cream_whatis(collection) " see :help /collection " use "call Cream_whatis('[[:punct:]]')" or the like let mycollection = "" let i = 0 while i < 256 if match(nr2char(i), a:collection) == 0 let mycollection = mycollection . i . ": " . nr2char(i) . "\t" endif if i % 10 == 0 let mycollection = mycollection . "\n" endif let i = i + 1 endwhile echo mycollection endfunction " Find the of a specific script {{{1 "function! GetSID(script_name) "" retrieve vim for a specific script "" Source: http://groups.yahoo.com/group/vim/message/34855 "" Author: Sylvain Viart "" Date: 2002-12-01 " let old_reg_r = @r " redir @r " silent scriptnames " redir END " let regex = substitute(a:script_name, '[/\\]', '.', 'g') " let regex = "\\s\\+[0-9]\\+:\\s*[^\n]*" . regex " let l = matchstr(@r, regex) " let sid = matchstr(l, '[0-9]\+') " let @r = old_reg_r " return sid "endfunction "" in the sourced script "function! GetVar(varname) " execute "let v = s:" . a:varname " return v "endfunction "" and then when you want a variable: "let sid = GetSID('golbal/var.vim') "" call the script function with the specified argument "execute "let v = \" . sid . "_Getvar(" . varname . ")" " Progress bar from 1-100% {{{1 function! BarTest() let i = 0 while i < 101 call ProgressBar(i, " Loading files... ", "=", 0) sleep 5m let i = i + 1 endwhile endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-behavior.vim0000644000076400007660000001466211517300716016523 0ustar digitectlocaluser" " cream-behavior -- load Cream, Vim or Vi behaviors " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * These functions control the toggling of Cream/Vim/Vi behavior " " don't try to overwrite on re-load if exists("g:cream_behave") finish endif let g:cream_behave = 1 function! Cream_behave_cream() " (re)initialize default Cream behavior " don't repeat to improve speed if exists("g:CREAM_BEHAVE") if g:CREAM_BEHAVE == "cream" return endif endif " do this before re-init, so viminfo is good let g:CREAM_BEHAVE = "cream" " recall current buffer let g:CREAM_LAST_BUFFER = bufname("%") " get screen position and size if has("gui_running") call Cream_screen_get() endif " write the current setup to viminfo so it's remembered wviminfo! " TODO: why couldn't we just " " :source $VIMRUNTIME/cream/creamrc | doautoall VimEnter " " ? " reload Cream call Cream() call Cream_filetype_reinit() " initialize current buffers doautocmd VimEnter * doautocmd BufEnter * endfunction function! Cream_behave_creamlite() " use Cream behavior sans keystroke mappings " warning if !exists("g:cream_behave_warn") \|| g:cream_behave_warn == 1 let n = confirm( \ "Note:\n" . \ "\n" . \ "Using Vim style key mappings, all other Cream customizations \n" . \ "in effect. (Use g:cream_behave_warn=0 in cream-conf to avoid \n" . \ "future warnings.)\n" . \ "\n" . \ "\n", "&Ok\n&Cancel", 2, "Info") if n != 1 let g:CREAM_BEHAVE = "cream" return else endif endif " restart Cream if coming from vim or vi if exists("g:CREAM_BEHAVE") if g:CREAM_BEHAVE == "vim" \|| g:CREAM_BEHAVE == "vi" call Cream_behave_cream() endif endif let g:CREAM_BEHAVE = "creamlite" " don't use Shift to select "set keymodel& " mappings, clear imapclear vmapclear "nmapclear "omapclear " now put back Ctrl+B remap so menu items work inoremap " let them eat cake! set noinsertmode endfunction function! Cream_behave_vim() " delete customizations and re-initialize default Vim behavior " warning if !exists("g:cream_behave_warn") \|| g:cream_behave_warn != 1 let n = confirm( \ "WARNING!\n" . \ "\n" . \ "Use of the Vim behavior option will change editing to strict \n" . \ "Vim style, including menus, key mappings, toolbars and statusline. \n" . \ "This will cancel all Cream customizations until restarting Vim. \n" . \ "\n" . \ "This option is provided here for illustrative and educational purposes \n" . \ "and shouldn't normally be used unless you are attempting to learn Vim \n" . \ "or are already an experienced Vim user. \n" . \ "\n" . \ "Continue?\n" . \ "\n", "&Yes\n&Cancel", 2, "Warning") if n != 1 return endif endif let g:cream_behave_warn = 1 let g:CREAM_BEHAVE = "vim" " autocommands, clear call Cream_augroup_delete_all() " menus, clear unmenu! * unmenu * " mappings, clear imapclear vmapclear nmapclear omapclear " highlighting, clear highlight clear " menus, load default source $VIMRUNTIME/menu.vim " plugins, load default runtime plugin/*.vim " filetype, re-initialize call Cream_filetype_reinit() " settings, clear set all& " Vim default behavior set nocompatible endfunction function! Cream_behave_vi() " drop all the way back to Vi behavior (bleck!) " warning if !exists("g:cream_behave_warn") \|| g:cream_behave_warn != 1 let n = confirm( \ "WARNING!\n" . \ "\n" . \ "Use of this option will change your current editing behavior to \n" . \ "strict *Vi* style, including menus, key mappings, toolbars and statusline. \n" . \ "This will cancel all Cream customizations until restarting Vim. \n" . \ "\n" . \ "This option is provided here for illustrative and educational purposes \n" . \ "and shouldn't normally be used unless you are attempting to learn Vi \n" . \ "or are already an experienced Vi user and are unable to kick your habit. ;)\n" . \ "(And then what on earth are you doing with Cream's 400Kb+ of configuration?!)\n" . \ "\n" . \ "Continue?\n" . \ "\n", "&Yes\n&Cancel", 2, "Warning") if n != 1 return endif endif let g:cream_behave_warn = 1 call Cream_behave_vim() " do this *after* above call let g:CREAM_BEHAVE = "vi" " be really Vi compatible set compatible endfunction "---------------------------------------------------------------------- " functions function! Cream_filetype_reinit() " re-initialize finicky filetype stuff " filetype reinit if exists("g:did_load_filetypes") unlet g:did_load_filetypes endif runtime filetype.vim endfunction function! Cream_augroup_delete_all() " delete all existing augroups redir @x silent! augroup redir END let mygroups = @x let mygroups = substitute(mygroups, "\\s\\+", "\\n", "g") " Hack: eliminate initial \n if strpart(mygroups, 0, 1) == "\n" let mygroups = strpart(mygroups, 1) endif let i = 0 while i < MvNumberOfElements(mygroups, "\n") " make group current execute "silent! augroup " . MvElementAt(mygroups, "\n", i) " delete group's autocmds execute "silent! autocmd! " . MvElementAt(mygroups, "\n", i) " delete group "execute "silent! augroup! " . MvElementAt(mygroups, "\n", i) let i = i + 1 endwhile " now make default group active silent augroup end " clean out default group's autocommands silent autocmd! endfunction function! Cream_behave_init() " initialize behavior on startup if exists("g:CREAM_BEHAVE") if g:CREAM_BEHAVE == "vim" call Cream_behave_vim() elseif g:CREAM_BEHAVE == "vi" call Cream_behave_vi() elseif g:CREAM_BEHAVE == "creamlite" call Cream_behave_creamlite() endif endif endfunction cream-0.43/cream-menu-tools.vim0000644000076400007660000001513211517300720017012 0ustar digitectlocaluser" " cream-menu-tools.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " Block Commenting vmenu 70.101 &Tools.Block\ Comment\ (selection)F6 :call Cream_commentify("v") vmenu 70.102 &Tools.Block\ Un-Comment\ (selection)Shift+F6 :call Cream_decommentify("v") " Spell check anoremenu 70.120 &Tools.-SEP120- if v:version >= 700 anoremenu 70.121 &Tools.&Spell\ Check.On/Off\ (toggle)F7 :call Cream_spellcheck() anoremenu 70.122 &Tools.&Spell\ Check.Suggest\ AlternativesAlt+F7 :call Cream_spell_altword() else anoremenu 70.121 &Tools.&Spell\ Check.Next\ Spelling\ ErrorF7 :call Cream_spell_next() anoremenu 70.122 &Tools.&Spell\ Check.Previous\ Spelling\ ErrorShift+F7 :call Cream_spell_prev() anoremenu 70.123 &Tools.&Spell\ Check.Show\ Spelling\ Errors\ (toggle)Alt+F7 :call Cream_spellcheck() anoremenu 70.124 &Tools.&Spell\ Check.Add\ Word\ (under\ cursor)\ to\ DictionaryCtrl+F7 :call Cream_spell_saveword() anoremenu 70.150 &Tools.&Spell\ Check.-SEP150- anoremenu 70.151 &Tools.&Spell\ Check.Language\.\.\. :call Cream_spell_lang() anoremenu 70.152 &Tools.&Spell\ Check.Options\.\.\. :call Cream_spell_options() endif " Bookmarking anoremenu 70.200 &Tools.-SEP200- anoremenu 70.201 &Tools.&Bookmarks.Bookmark\ NextF2 :call Cream_WOK_mark_next() anoremenu 70.202 &Tools.&Bookmarks.Bookmark\ PreviousShift+F2 :call Cream_WOK_mark_prev() anoremenu 70.203 &Tools.&Bookmarks.Bookmark\ Set\ (toggle)Alt+F2 :call Cream_WOK_mark_toggle() "anoremenu 70.204 &Tools.&Bookmarks.Show\ Bookmarks\ (toggle)Ctrl+F2 :call Cream_ShowMarksToggle() anoremenu 70.205 &Tools.&Bookmarks.Delete\ All\ BookmarksAlt+Shift+F2 :call Cream_WOK_mark_killall() " Macros anoremenu 70.300 &Tools.-SEP300- imenu 70.301 &Tools.Macro\ PlayF8 @q imenu 70.302 &Tools.Macro\ Record\ (toggle)Shift+F8 :call Cream_macro_record("q") " Diff mode anoremenu 70.350 &Tools.-SEP350- anoremenu 70.350 &Tools.&Diff\ Mode :call Cream_diffmode_toggle() " Folding imenu 70.400 &Tools.-SEP400- imenu 70.401 &Tools.&Folding.&Fold\ Open/CloseF9 :call Cream_fold("down") vmenu 70.402 &Tools.&Folding.&Set\ Fold\ (Selection)F9 :call Cream_fold_set("v") imenu 70.403 &Tools.&Folding.&Fold\ Open/CloseShift+F9 :call Cream_fold("up") anoremenu 70.404 &Tools.&Folding.&Open\ All\ FoldsCtrl+F9 :call Cream_fold_openall() anoremenu 70.405 &Tools.&Folding.&Close\ All\ FoldsCtrl+Shift+F9 :call Cream_fold_closeall() anoremenu 70.406 &Tools.&Folding.&Delete\ Fold\ at\ CursorAlt+F9 :call Cream_fold_delete() anoremenu 70.407 &Tools.&Folding.D&elete\ All\ FoldsAlt+Shift+F9 :call Cream_fold_deleteall() " Completion anoremenu 70.500 &Tools.-SEP500- imenu 70.501 &Tools.&Completion.&Word\ CompletionCtrl+Space =Cream_complete_forward() imenu 70.502 &Tools.&Completion.W&ord\ Completion\ (reverse)Ctrl+Shift+Space =Cream_complete_backward() anoremenu 70.503 &Tools.&Completion.-SEP503- imenu 70.504 &Tools.&Completion.O&mni\ CompletionCtrl+Enter =Cream_complete_omni_forward() imenu 70.505 &Tools.&Completion.Om&ni\ Completion\ (reverse)Ctrl+Shift+Enter =Cream_complete_omni_backward() anoremenu 70.506 &Tools.&Completion.-SEP506- imenu 70.507 &Tools.&Completion.&Template\ CompletionEsc+Space =Cream_template_expand() anoremenu 70.508 &Tools.&Completion.Template\ Listing\.\.\. :call Cream_template_listing() "anoremenu 70.509 &Tools.&Completion.-SEP509- " imenu 70.510 &Tools.&Completion.&Lists\ (HTML\ tags/CSS\ properties) :call Cream_EasyHtml_call() anoremenu 70.511 &Tools.&Completion.-SEP511- " only windows has the :popup feature (for now) if has("win32") imenu 70.512 &Tools.&Completion.Info\ PopAlt+( :call Cream_pop_paren_map() endif anoremenu 70.513 &Tools.&Completion.Info\ Pop\ Options\.\.\. :call Cream_pop_options() " Tag jumping anoremenu 70.600 &Tools.-SEP600- imenu 70.601 &Tools.&Tag\ Navigation.&Jump\ to\ Tag\ (under\ cursor)Alt+Down :call Cream_tag_goto() imenu 70.602 &Tools.&Tag\ Navigation.&Close\ and\ Jump\ BackAlt+Up :call Cream_tag_backclose() imenu 70.603 &Tools.&Tag\ Navigation.&Previous\ TagAlt+Left :call Cream_tag_backward() imenu 70.604 &Tools.&Tag\ Navigation.&Next\ TagAlt+Right :call Cream_tag_forward() imenu 70.605 &Tools.&Tag\ Navigation.&Tag\ List\ (toggle)Ctrl+Alt+Down :call Cream_Tlist_toggle() imenu 70.610 &Tools.File/URL\ Na&vigation.&Open\ File/URL\ (under\ cursor)Ctrl+Enter :call Cream_file_open_undercursor("i") vmenu 70.611 &Tools.File/URL\ Na&vigation.&Open\ File/URL\ (under\ cursor)Ctrl+Enter :call Cream_file_open_undercursor("v") " Add-ons (Note: autolisting begins at 70.910) anoremenu 70.900 &Tools.-Sep900- anoremenu 70.901 &Tools.Add-ons\ E&xplore\ (Map/Unmap) :call Cream_addon_select() cream-0.43/INSTALL.sh0000644000076400007660000002642711326225172014566 0ustar digitectlocaluser#!/bin/sh # we assume this runs at the top of a Cream file structure echo # argument (optional) must be single and a directory if [[ -n $1 && ! -d $1 ]]; then echo "Single (optional) argument '$1' must be a directory" echo "for the installation of Cream. (Default '/usr'.)" exit 1 fi # find $VIMRUNTIME if doesn't exist (no trailing slash) if [ "$VIMRUNTIME" = "" ] || [ -d $VIMRUNTIME ] ; then # warn only if not directory if [ -d $VIMRUNTIME ] ; then echo " Existing \$VIMRUNTIME not a directory." fi echo "Finding \$VIMRUNTIME..." # try with perl if [ `which perl` ] ; then echo " Trying perl method..." # 1. by Luc St-Louis vim --cmd 'echo $VIMRUNTIME' --cmd 'quit' 2> /tmp/creamVRT VRT=`perl -pe 's/\r\n//g' /tmp/creamVRT` rm -f /tmp/creamVRT fi # try with bash if [ ! -n "$VRT" -o "$VRT" = "" ] ; then echo " Trying bash method..." # 2. by Jacob Lerner VRT=`vim -e -T dumb --cmd 'exe "set t_cm=\"|echo $VIMRUNTIME|quit' | tr -d '\015' ` fi else VRT=$VIMRUNTIME fi # validate if [ "$VRT" = "" ] ; then echo " No \$VIMRUNTIME value found, quitting." exit 1 elif [ ! -d $VRT ] ; then echo " \$VIMRUNTIME ($VRT) not a directory, quitting." exit 1 else # value found echo " Found:" echo " $VRT" fi # set $PREFIX (distros that put sys files in own subdirectory --Felix Breuer) if [[ -n $1 && -d $1 ]]; then # first argument (is directory validated above) PREFIX=$1 else PREFIX=/usr/local fi # follow $DESTDIR root if distro requests it (Jeff Woods) if [ "$DESTDIR" != "" ] ; then # test is directory if [ -d $DESTDIR ] ; then echo " \$DESTDIR found, prepending to install locations." VRT=$DESTDIR/$VRT PREFIX=$DESTDIR/$PREFIX else echo " \$DESTDIR ($DESTDIR) not a directory, quitting." exit 1 fi fi # set $HERE (from where we're copying) HERE=`dirname $0` # installation echo echo "Installing to..." echo " $VRT/cream" # verify directories exist echo "Verifying directories exist..." echo " $VRT/cream" mkdir -p $VRT/cream echo " $VRT/cream/addons" mkdir -p $VRT/cream/addons echo " $VRT/cream/bitmaps" mkdir -p $VRT/cream/bitmaps echo " $VRT/cream/docs" mkdir -p $VRT/cream/docs echo " $VRT/cream/docs-html" mkdir -p $VRT/cream/docs-html echo " $VRT/cream/filetypes" mkdir -p $VRT/cream/filetypes echo " $VRT/cream/help" mkdir -p $VRT/cream/help echo " $VRT/cream/lang" mkdir -p $VRT/cream/lang #echo " $VRT/cream/spelldicts" #mkdir -p $VRT/cream/spelldicts # copy runtime files echo "Copying runtime files..." echo " $VRT/cream/creamrc" #cp -uvf $HERE/creamrc $VRT/cream/ install -p -m 644 $HERE/creamrc $VRT/cream/ echo " $VRT/cream/*.vim" #cp -uvf $HERE/*.vim $VRT/cream/ install -p -m 644 $HERE/*.vim $VRT/cream/ ###echo " $VRT/cream/cream.png" ###cp -uvf $HERE/cream.png $VRT/cream/ ###echo " $VRT/cream/cream.svg" ###cp -uvf $HERE/cream.svg $VRT/cream/ ###echo " $VRT/cream/cream.ico" ###cp -uvf $HERE/cream.ico $VRT/cream/ echo " $VRT/cream/addons/*.vim" #cp -uvf $HERE/addons/*.vim $VRT/cream/addons/ install -p -m 644 $HERE/addons/*.vim $VRT/cream/addons/ echo " $VRT/cream/bitmaps/*.xpm" #cp -uvf $HERE/bitmaps/*.xpm $VRT/cream/bitmaps/ install -p -m 644 $HERE/bitmaps/*.xpm $VRT/cream/bitmaps/ ###echo " $VRT/cream/bitmaps/*.bmp" ###cp -uvf $HERE/bitmaps/*.bmp $VRT/cream/bitmaps/ echo " $VRT/cream/docs/*.txt" #cp -uvf $HERE/docs/*.txt $VRT/cream/docs/ install -p -m 644 $HERE/docs/*.txt $VRT/cream/docs/ echo " $VRT/cream/docs-html/*.html" #cp -uvf $HERE/docs-html/*.html $VRT/cream/docs-html/ install -p -m 644 $HERE/docs-html/*.html $VRT/cream/docs-html/ echo " $VRT/cream/docs-html/css.php" #cp -uvf $HERE/docs-html/css.php $VRT/cream/docs-html/ install -p -m 644 $HERE/docs-html/css.php $VRT/cream/docs-html/ echo " $VRT/cream/docs-html/favicon.ico" #cp -uvf $HERE/docs-html/favicon.ico $VRT/cream/docs-html/ install -p -m 644 $HERE/docs-html/favicon.ico $VRT/cream/docs-html/ echo " $VRT/cream/docs-html/*.png" #cp -uvf $HERE/docs-html/*.png $VRT/cream/docs-html/ install -p -m 644 $HERE/docs-html/*.png $VRT/cream/docs-html/ echo " $VRT/cream/docs-html/*.gif" #cp -uvf $HERE/docs-html/*.gif $VRT/cream/docs-html/ install -p -m 644 $HERE/docs-html/*.gif $VRT/cream/docs-html/ echo " $VRT/cream/filetypes/*.vim" #cp -uvf $HERE/filetypes/*.vim $VRT/cream/filetypes/ install -p -m 644 $HERE/filetypes/*.vim $VRT/cream/filetypes/ echo " $VRT/cream/help/*.txt" #cp -uvf $HERE/help/*.txt $VRT/cream/help/ install -p -m 644 $HERE/help/*.txt $VRT/cream/help/ echo " $VRT/cream/lang/*.vim" #cp -uvf $HERE/lang/*.vim $VRT/cream/lang/ ###install -p -m 644 $HERE/lang/*.vim $VRT/cream/lang/ ###echo " $VRT/cream/spelldicts/cream-spell-dict-eng-s*.vim" #cp -uvf $HERE/spelldicts/cream-spell-dict-eng-s*.vim $VRT/cream/spelldicts/ ###install -p -m 644 $HERE/spelldicts/cream-spell-dict-eng-s*.vim $VRT/cream/spelldicts/ ###echo " $VRT/cream/spelldicts/cream-spell-dict.vim" ####cp -uvf $HERE/spelldicts/cream-spell-dict.vim $VRT/cream/spelldicts/ ###install -p -m 644 $HERE/spelldicts/cream-spell-dict.vim $VRT/cream/spelldicts/ # other system files # copy command echo "Copying shell command..." echo " $PREFIX/bin/cream" mkdir -p $PREFIX/bin install -p -m 755 $HERE/cream $PREFIX/bin/ # copy menu entry echo "Copying GNOME menu entry..." echo " $PREFIX/share/applications/cream.desktop" mkdir -p $PREFIX/share/applications install -p -m 755 $HERE/cream.desktop $PREFIX/share/applications/ # copy icons echo "Copying graphic icons..." echo " $PREFIX/share/icons" mkdir -p $PREFIX/share/icons install -p -m 644 $HERE/cream.svg $PREFIX/share/icons/ install -p -m 644 $HERE/cream.png $PREFIX/share/icons/ # cleanup old installations echo "Cleaning up previous versions..." # 0.40 if [ -e "$VRT/cream/EasyHtml.vim" ]; then rm -f $VRT/cream/EasyHtml.vim fi # 0.38 if [ -d "$VRT/cream/spelldicts" ]; then rm -f $VRT/cream/spelldicts/* rmdir $VRT/cream/spelldicts fi if [ -e "$VRT/cream/help/opsplorer.txt" ]; then rm -f $VRT/cream/help/opsplorer.txt fi # 0.37 if [ -e "$VRT/cream/cream-explorer.vim" ]; then rm -f $VRT/cream/cream-explorer.vim fi if [ -e "$VRT/cream/opsplorer.vim" ]; then rm -f $VRT/cream/opsplorer.vim fi # 0.36 if [ -e "$VRT/cream/cream-window-buffer.vim" ]; then rm -f $VRT/cream/cream-window-buffer.vim fi if [ -e "$VRT/cream/docs-html/contribute.html" ]; then rm -f $VRT/cream/docs-html/contribute.html fi if [ -e "$VRT/cream/docs-html/favicon.png" ]; then rm -f $VRT/cream/docs-html/favicon.png fi if [ -e "$VRT/cream/docs-html/license.html" ]; then rm -f $VRT/cream/docs-html/license.html fi if [ -e "$VRT/cream/docs-html/links.html" ]; then rm -f $VRT/cream/docs-html/links.html fi if [ -e "$VRT/cream/docs-html/maillists.html" ]; then rm -f $VRT/cream/docs-html/maillists.html fi if [ -e "$VRT/cream/docs-html/main.css" ]; then rm -f $VRT/cream/docs-html/main.css fi if [ -e "$VRT/cream/docs-html/screenshot4.png" ]; then rm -f $VRT/cream/docs-html/screenshot4.png fi if [ -e "$VRT/cream/docs-html/screenshot4-thumb.png" ]; then rm -f $VRT/cream/docs-html/screenshot4-thumb.png fi if [ -e "$VRT/cream/docs-html/screenshot-popup.png" ]; then rm -f $VRT/cream/docs-html/screenshot-popup.png fi if [ -e "$VRT/cream/docs-html/screenshots1-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots1-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshots2-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots2-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshots3-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots3-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshots4-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots4-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshots.html" ]; then rm -f $VRT/cream/docs-html/screenshots.html fi if [ -e "$VRT/cream/docs-html/spellcheck.html" ]; then rm -f $VRT/cream/docs-html/spellcheck.html fi if [ -e "$VRT/cream/docs-html/statusline-closeup.html" ]; then rm -f $VRT/cream/docs-html/statusline-closeup.html fi # 0.34 if [ -e "$VRT/cream/docs-html/screenshots5-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots5-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshots6-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots6-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshots7-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots7-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshots8-closeup.html" ]; then rm -f $VRT/cream/docs-html/screenshots8-closeup.html fi if [ -e "$VRT/cream/docs-html/screenshot5.png" ]; then rm -f $VRT/cream/docs-html/screenshot5.png fi if [ -e "$VRT/cream/docs-html/screenshot6.png" ]; then rm -f $VRT/cream/docs-html/screenshot6.png fi if [ -e "$VRT/cream/docs-html/screenshot7.png" ]; then rm -f $VRT/cream/docs-html/screenshot7.png fi if [ -e "$VRT/cream/docs-html/screenshot8.png" ]; then rm -f $VRT/cream/docs-html/screenshot8.png fi if [ -e "$VRT/cream/docs-html/screenshot5-thumb.png" ]; then rm -f $VRT/cream/docs-html/screenshot5-thumb.png fi if [ -e "$VRT/cream/docs-html/screenshot6-thumb.png" ]; then rm -f $VRT/cream/docs-html/screenshot6-thumb.png fi if [ -e "$VRT/cream/docs-html/screenshot7-thumb.png" ]; then rm -f $VRT/cream/docs-html/screenshot7-thumb.png fi if [ -e "$VRT/cream/docs-html/screenshot8-thumb.png" ]; then rm -f $VRT/cream/docs-html/screenshot8-thumb.png fi if [ -e "$VRT/cream/docs-html/maillist.html" ]; then rm -f $VRT/cream/docs-html/maillist.html fi if [ -e "$VRT/cream/docs-html/otherfiles.html" ]; then rm -f $VRT/cream/docs-html/otherfiles.html fi # 0.33 if [ -e "/usr/bin/cream" ]; then rm -f /usr/bin/cream fi # 0.31 if [ -e "$VRT/cream/docs-html/love.html" ]; then rm -f $VRT/cream/docs-html/love.html fi if [ -e "$VRT/cream/docs-html/hate.html" ]; then rm -f $VRT/cream/docs-html/hate.html fi if [ -e "$VRT/cream/docs-html/background.html" ]; then rm -f $VRT/cream/docs-html/background.html fi if [ -e "$VRT/cream/docs-html/goals.html" ]; then rm -f $VRT/cream/docs-html/goals.html fi if [ -e "$VRT/cream/docs-html/screenshot-arabic1.png" ]; then rm -f $VRT/cream/docs-html/screenshot-arabic1.png fi if [ -e "$VRT/cream/docs-html/devel.html" ]; then rm -f $VRT/cream/docs-html/devel.html fi if [ -e "$VRT/cream/docs-html/creamlogo.png" ]; then rm -f $VRT/cream/docs-html/creamlogo.png fi # 0.30 if [ -e "$VRT/cream/cream-filetype-c.vim" ]; then rm -f $VRT/cream/cream-filetype-c.vim fi if [ -e "$VRT/cream/cream-filetype-html.vim" ]; then rm -f $VRT/cream/cream-filetype-html.vim fi if [ -e "$VRT/cream/cream-filetype-txt.vim" ]; then rm -f $VRT/cream/cream-filetype-txt.vim fi if [ -e "$VRT/cream/cream-filetype-vim.vim" ]; then rm -f $VRT/cream/cream-filetype-vim.vim fi # earlier (maybe not, but we can't remember :) if [ -e "$VRT/cream/docs-html/todo.html" ]; then rm -f $VRT/cream/docs-html/todo.html fi if [ -e "$VRT/cream/docs-html/changelog.html" ]; then rm -f $VRT/cream/docs-html/changelog.html fi if [ -e "$VRT/cream/docs-html/bugs.html" ]; then rm -f $VRT/cream/docs-html/bugs.html fi if [ -e "$VRT/cream/docs/SPELLDICTS.txt" ]; then rm -f $VRT/cream/docs/SPELLDICTS.txt fi if [ -e "$VRT/cream/docs/SPELLTEST-ENG.txt" ]; then rm -f $VRT/cream/docs/SPELLTEST-ENG.txt fi if [ -e "$VRT/cream/docs/FILELIST.txt" ]; then rm -f $VRT/cream/docs/FILELIST.txt fi if [ -e "$VRT/cream/docs/BUGS.txt" ]; then rm -f $VRT/cream/docs/BUGS.txt fi # Note: This is one char different from 0.36 file! if [ -e "$VRT/cream/docs-html/downloads.html" ]; then rm -f $VRT/cream/docs-html/downloads.html fi # finish echo "Finished." echo cream-0.43/cream-abbr-eng.vim0000644000076400007660000002015011517300716016366 0ustar digitectlocaluser"==================================================================== " cream-abbr-eng.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " List of typographical error abbreviations, originally by Matt Corks " iabbrev accesories accessories iabbrev accomodate accommodate iabbrev acheive achieve iabbrev acheiving achieving iabbrev acn can iabbrev acommodate accommodate iabbrev acomodate accommodate iabbrev acommodated accommodated iabbrev acomodated accommodated iabbrev adn and iabbrev agian again iabbrev ahppen happen iabbrev ahve have iabbrev ahve have iabbrev allready already iabbrev almsot almost iabbrev alos also iabbrev alot a lot iabbrev alreayd already iabbrev alwasy always iabbrev amke make iabbrev anbd and iabbrev andthe and the iabbrev appeares appears iabbrev aplyed applied iabbrev artical article iabbrev aslo also iabbrev audeince audience iabbrev audiance audience iabbrev awya away iabbrev bakc back iabbrev balence balance iabbrev baout about iabbrev bcak back iabbrev beacuse because iabbrev becasue because iabbrev becomeing becoming iabbrev becuase because iabbrev becuse because iabbrev befoer before iabbrev begining beginning iabbrev beleive believe iabbrev bianry binary iabbrev bianries binaries iabbrev boxs boxes iabbrev bve be iabbrev changeing changing iabbrev charachter character iabbrev charcter character iabbrev charcters characters iabbrev charecter character iabbrev charector character iabbrev cheif chief iabbrev circut circuit iabbrev claer clear iabbrev claerly clearly iabbrev cna can iabbrev colection collection iabbrev comany company iabbrev comapny company iabbrev comittee committee iabbrev commitee committee iabbrev committe committee iabbrev committy committee iabbrev compair compare iabbrev compleated completed iabbrev completly completely iabbrev comunicate communicate iabbrev comunity community iabbrev conected connected iabbrev cotten cotton iabbrev coudl could iabbrev cpoy copy iabbrev cxan can iabbrev danceing dancing iabbrev definately definitely iabbrev develope develop iabbrev developement development iabbrev differant different iabbrev differnt different iabbrev diffrent different iabbrev disatisfied dissatisfied iabbrev doese does iabbrev doign doing iabbrev doller dollars iabbrev donig doing iabbrev driveing driving iabbrev drnik drink iabbrev ehr her iabbrev embarass embarrass iabbrev equippment equipment iabbrev esle else iabbrev excitment excitement iabbrev exmaple example iabbrev exmaples examples iabbrev eyt yet iabbrev familar familiar iabbrev feild field iabbrev fianlly finally iabbrev fidn find iabbrev firts first iabbrev follwo follow iabbrev follwoing following iabbrev foriegn foreign iabbrev fro for iabbrev foudn found iabbrev foward forward iabbrev freind friend iabbrev frmo from iabbrev fwe few iabbrev gerat great iabbrev geting getting iabbrev giveing giving iabbrev goign going iabbrev gonig going iabbrev govenment government iabbrev gruop group iabbrev grwo grow iabbrev haev have iabbrev happend happened iabbrev haveing having iabbrev hda had iabbrev helpfull helpful iabbrev herat heart iabbrev hge he iabbrev hismelf himself iabbrev hsa has iabbrev hsi his iabbrev hte the iabbrev htere there iabbrev htey they iabbrev hting thing iabbrev htink think iabbrev htis this iabbrev hvae have iabbrev hvaing having iabbrev idae idea iabbrev idaes ideas iabbrev ihs his iabbrev immediatly immediately iabbrev indecate indicate iabbrev insted intead iabbrev inthe in the iabbrev iwll will iabbrev iwth with iabbrev jsut just iabbrev knwo know iabbrev knwos knows iabbrev konw know iabbrev konws knows iabbrev levle level iabbrev libary library iabbrev librarry library iabbrev librery library iabbrev librarry library iabbrev liek like iabbrev liekd liked iabbrev liev live iabbrev likly likely iabbrev littel little iabbrev liuke like iabbrev liveing living iabbrev loev love iabbrev lonly lonely iabbrev makeing making iabbrev mkae make iabbrev mkaes makes iabbrev mkaing making iabbrev moeny money iabbrev mroe more iabbrev mysefl myself iabbrev myu my iabbrev neccessary necessary iabbrev necesary necessary iabbrev nkow know iabbrev nwe new iabbrev nwo now iabbrev ocasion occasion iabbrev occassion occasion iabbrev occurence occurrence iabbrev occurrance occurrence iabbrev ocur occur iabbrev oging going iabbrev ohter other iabbrev omre more iabbrev onyl only iabbrev optoin option iabbrev optoins options iabbrev opperation operation iabbrev orginized organized iabbrev otehr other iabbrev otu out iabbrev owrk work iabbrev peopel people iabbrev perhasp perhaps iabbrev perhpas perhaps iabbrev pleasent pleasant iabbrev poeple people iabbrev porblem problem iabbrev preceed precede iabbrev preceeded preceded iabbrev probelm problem iabbrev protoge protege iabbrev puting putting iabbrev pwoer power iabbrev quater quarter iabbrev questoin question iabbrev reccomend recommend iabbrev reccommend recommend iabbrev receieve receive iabbrev recieve receive iabbrev recieved received iabbrev recomend recommend iabbrev reconize recognize iabbrev recrod record iabbrev religous religious iabbrev rwite write iabbrev rythm rhythm "iabbrev seh she iabbrev selectoin selection iabbrev sentance sentence iabbrev seperate separate iabbrev shineing shining iabbrev shiped shipped iabbrev shoudl should iabbrev similiar similar iabbrev smae same iabbrev smoe some iabbrev soem some iabbrev sohw show iabbrev soudn sound iabbrev soudns sounds iabbrev statment statement iabbrev stnad stand iabbrev stopry story iabbrev stoyr story iabbrev stpo stop iabbrev strentgh strength iabbrev struggel struggle iabbrev sucess success iabbrev swiming swimming iabbrev tahn than iabbrev taht that iabbrev talekd talked iabbrev tath that iabbrev teh the iabbrev tehy they iabbrev tghe the iabbrev thansk thanks iabbrev themselfs themselves iabbrev theri their iabbrev thgat that iabbrev thge the iabbrev thier their iabbrev thme them iabbrev thna than iabbrev thne then iabbrev thnig thing iabbrev thnigs things iabbrev thsi this iabbrev thsoe those iabbrev thta that iabbrev tihs this iabbrev timne time iabbrev tje the iabbrev tjhe the iabbrev tkae take iabbrev tkaes takes iabbrev tkaing taking iabbrev tlaking talking iabbrev todya today iabbrev tongiht tonight iabbrev tonihgt tonight iabbrev towrad toward iabbrev tpyo typo iabbrev truely truly iabbrev tyhat that iabbrev tyhe the iabbrev useing using iabbrev vacumme vacuum iabbrev veyr very iabbrev vrey very iabbrev waht what iabbrev watn want iabbrev wehn when iabbrev whcih which iabbrev whic which iabbrev whihc which iabbrev whta what iabbrev wief wife iabbrev wierd weird iabbrev wihch which iabbrev wiht with iabbrev windoes windows iabbrev withe with iabbrev wiull will iabbrev wnat want iabbrev wnated wanted iabbrev wnats wants iabbrev woh who iabbrev wohle whole iabbrev wokr work iabbrev woudl would iabbrev wriet write iabbrev wrod word iabbrev wroking working iabbrev wtih with iabbrev wya way iabbrev yera year iabbrev yeras years iabbrev ytou you iabbrev yuo you iabbrev yuor your " Days of weeks iabbrev monday Monday iabbrev tuesday Tuesday iabbrev wednesday Wednesday iabbrev thursday Thursday iabbrev friday Friday iabbrev saturday Saturday iabbrev sunday Sunday " American spellings "*** no need to auto-fix dialectical differences--there's no chance of " native speakers making these mistakes. "iabbrev colour color "iabbrev honour honor cream-0.43/cream-menu-help.vim0000644000076400007660000000771611517300720016613 0ustar digitectlocaluser" " Filename: cream-menu-help.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " imenu 90.010 &Help.Keyboard\ ShortcutsF1 :call Cream_help("keyboardshortcuts.html") vmenu 90.010 &Help.Keyboard\ ShortcutsF1 :call Cream_help("keyboardshortcuts.html") imenu 90.011 &Help.Features :call Cream_help("features.html") vmenu 90.011 &Help.Features :call Cream_help("features.html") imenu 90.012 &Help.FAQ :call Cream_help("faq.html") vmenu 90.012 &Help.FAQ :call Cream_help("faq.html") imenu 90.013 &Help.License :call Cream_file_open_defaultapp("http://www.gnu.org/licenses/gpl.html") vmenu 90.013 &Help.License :call Cream_file_open_defaultapp("http://www.gnu.org/licenses/gpl.html") imenu 90.014 &Help.Contributors :call Cream_help("contributors.html") vmenu 90.014 &Help.Contributors :call Cream_help("contributors.html") imenu 90.800 &Help.-Sep800- imenu 90.810 &Help.&Vim\ Help\ (expert).&Overview :help vmenu 90.810 &Help.&Vim\ Help\ (expert).&Overview :help imenu 90.811 &Help.&Vim\ Help\ (expert).&User\ Manual :help usr_toc vmenu 90.811 &Help.&Vim\ Help\ (expert).&User\ Manual :help usr_toc imenu 90.812 &Help.&Vim\ Help\ (expert).&List\ Help\ Topics\.\.\.Alt+F1 :call Cream_help_listtopics() vmenu 90.812 &Help.&Vim\ Help\ (expert).&List\ Help\ Topics\.\.\.Alt+F1 :call Cream_help_listtopics() imenu 90.813 &Help.&Vim\ Help\ (expert).&Go\ to\ Help\ Topic\.\.\.Ctrl+F1 :call Cream_help_find() vmenu 90.813 &Help.&Vim\ Help\ (expert).&Go\ to\ Help\ Topic\.\.\.Ctrl+F1 :call Cream_help_find() imenu 90.820 &Help.&Vim\ Help\ (expert).-Sep45- imenu 90.821 &Help.&Vim\ Help\ (expert).&How-to\ links :help how-to vmenu 90.821 &Help.&Vim\ Help\ (expert).&How-to\ links :help how-to imenu 90.822 &Help.&Vim\ Help\ (expert).&GUI :help gui vmenu 90.822 &Help.&Vim\ Help\ (expert).&GUI :help gui imenu 90.823 &Help.&Vim\ Help\ (expert).&Credits :help credits vmenu 90.823 &Help.&Vim\ Help\ (expert).&Credits :help credits imenu 90.824 &Help.&Vim\ Help\ (expert).Co&pying :help uganda vmenu 90.824 &Help.&Vim\ Help\ (expert).Co&pying :help uganda imenu 90.825 &Help.&Vim\ Help\ (expert).&Version\.\.\. :version vmenu 90.825 &Help.&Vim\ Help\ (expert).&Version\.\.\. :version imenu 90.826 &Help.&Vim\ Help\ (expert).&About\.\.\. :intro vmenu 90.826 &Help.&Vim\ Help\ (expert).&About\.\.\. :intro imenu 90.900 &Help.-Sep900- imenu 90.910 &Help.&About\ Cream\.\.\. :call Cream_splash() vmenu 90.910 &Help.&About\ Cream\.\.\. :call Cream_splash() cream-0.43/cream-print.vim0000644000076400007660000005065111517300720016051 0ustar digitectlocaluser" " cream-print -- All printing functionalities " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA " 02111-1307, USA. " " Cream_print() {{{1 function! Cream_print(mode) " print and provides option dialog where plausible call Cream_print_init() if Cream_print_dialog() == -1 return endif if a:mode == "v" let n = confirm( \ "Print selection or document?\n" . \ "\n", "&Selection\n&Document\n&Cancel", 1, "Info") if n == 1 normal gv let firstline = line("'<") let lastline = line("'>") execute ":" . firstline . "," . lastline . "hardcopy" elseif n == 2 hardcopy else return endif else hardcopy endif endfunction " Cream_print_dialog() {{{1 function! Cream_print_dialog() " dialog current settings " string values let str = "" let str = str . "Print using these options?\n" let str = str . "\n" let str = str . " Paper size: " . substitute(strpart(g:CREAM_PRINT_PAPERSIZE, 6), '\w\+', '\u&', 'g') . "\n" if match(g:CREAM_PRINT_ORIENTATION, "y$") != -1 let str = str . " Orientation: " . "Portrait" . "\n" else let str = str . " Orientation: " . "Landscape" . "\n" endif let str = str . "\n" let str = str . " " . strpart(g:CREAM_PRINT_MARGIN_TOP, 4) . " (top)\n" let str = str . " Margins: " . strpart(g:CREAM_PRINT_MARGIN_LEFT, 5) . " (left) " . strpart(g:CREAM_PRINT_MARGIN_RIGHT, 6) . " (right)\n" let str = str . " " . strpart(g:CREAM_PRINT_MARGIN_BOTTOM, 7) . " (bottom)\n" let str = str . "\n" let str = str . " Header Height: " . strpart(g:CREAM_PRINT_HEADER, 7) . " lines" . "\n" let str = str . " Header Text: " . "\"" . g:CREAM_PRINT_HEADER_TEXT . "\"" . "\n" let str = str . "\n" if match(g:CREAM_PRINT_SYNTAX, "y$") != -1 let str = str . " Syntax Highlighting: " . "Yes" . "\n" elseif match(g:CREAM_PRINT_SYNTAX, "a$") != -1 let str = str . " Syntax Highlighting: " . "Auto" . "\n" elseif match(g:CREAM_PRINT_SYNTAX, "n$") != -1 let str = str . " Syntax highlighting: " . "No" . "\n" endif if match(g:CREAM_PRINT_NUMBER, "y$") != -1 let str = str . " Line Numbers: " . "Yes" . "\n" else let str = str . " Line Numbers: " . "No" . "\n" endif if match(g:CREAM_PRINT_WRAP, "y$") != -1 let str = str . " Wrap at Margins: " . "Yes" . "\n" else let str = str . " Wrap at Margins: " . "No" . "\n" endif let str = str . " Font: " . g:CREAM_PRINT_FONT_{Cream_getoscode()} . "\n" let str = str . " Encoding: " . g:CREAM_PRINT_ENCODING . "\n" if match(g:CREAM_PRINT_FORMFEED, "y$") != -1 let str = str . " Obey Formfeed Chars: " . "Yes" . "\n" else let str = str . " Obey Formfeed Chars: " . "No" . "\n" endif let str = str . "\n" if match(g:CREAM_PRINT_COLLATE, "y$") != -1 let str = str . " Collate: " . "Yes" . "\n" else let str = str . " Collate: " . "No" . "\n" endif if match(g:CREAM_PRINT_DUPLEX, "off$") != -1 let str = str . " Duplex: " . "Off" . "\n" elseif match(g:CREAM_PRINT_DUPLEX, "long$") != -1 let str = str . " Duplex: " . "Long side bind" . "\n" elseif match(g:CREAM_PRINT_DUPLEX, "short$") != -1 let str = str . " Duplex: " . "Short side bind" . "\n" endif if match(g:CREAM_PRINT_JOBSPLIT, "y$") != -1 let str = str . " Job Split Copies: " . "Yes" . "\n" else let str = str . " Job Split Copies: " . "No" . "\n" endif if g:CREAM_PRINT_DEVICE != "" || g:CREAM_PRINT_EXPR != "" let str = str . "\n" if g:CREAM_PRINT_DEVICE != "" let str = str . " Printer (device):\n\n" . g:CREAM_PRINT_DEVICE . "\n" endif if g:CREAM_PRINT_EXPR != "" let str = str . " Printer expression:\n\n" . g:CREAM_PRINT_EXPR . "\n" endif endif " dialog if Cream_has("ms") let button = "Next..." else let button = "Print" endif let n = confirm(str . "\n", "&" . button . "\n&Cancel", 1, "Question") if n != 1 return -1 endif endfunction " Cream_print_set() {{{1 function! Cream_print_set(mode, feature, ...) " change a printing configuration " {mode} is "i" or "v" " {feature} is one of the accepted cases below " {...} is a user string used to set one of the options below " where accepted if a:mode != "i" && a:mode != "v" call confirm( \ "Error: Invalid mode passed to Cream_print_set()\n" . \ "\n", "&Ok", 1, "Info") endif " &printdevice if a:feature == "device" if a:0 > 0 let g:CREAM_PRINT_DEVICE = a:1 endif " &printencoding elseif a:feature == "encoding" if a:0 > 0 let g:CREAM_PRINT_ENCODING = a:1 endif " &printexpr elseif a:feature == "expr" if a:0 > 0 let g:CREAM_PRINT_EXPR = a:1 endif " &printfont elseif a:feature == "font" if a:0 > 0 let g:CREAM_PRINT_FONT_{Cream_getoscode()} = a:1 endif " &printheader elseif a:feature == "headertext" if a:0 > 0 let g:CREAM_PRINT_HEADER_TEXT = a:1 endif " &printoptions elseif a:feature == "left" if a:0 > 0 let g:CREAM_PRINT_MARGIN_LEFT = a:1 endif elseif a:feature == "right" if a:0 > 0 let g:CREAM_PRINT_MARGIN_RIGHT = a:1 endif elseif a:feature == "top" if a:0 > 0 let g:CREAM_PRINT_MARGIN_TOP = a:1 endif elseif a:feature == "bottom" if a:0 > 0 let g:CREAM_PRINT_MARGIN_BOTTOM = a:1 endif elseif a:feature == "headerlines" if a:0 > 0 let g:CREAM_PRINT_HEADER = a:1 endif elseif a:feature == "syntax:n" \|| a:feature == "syntax:y" \|| a:feature == "syntax:a" let g:CREAM_PRINT_SYNTAX = a:feature elseif a:feature == "number:y" \|| a:feature == "number:n" let g:CREAM_PRINT_NUMBER = a:feature elseif a:feature == "wrap:y" \|| a:feature == "wrap:n" let g:CREAM_PRINT_WRAP = a:feature elseif a:feature == "duplex:off" \|| a:feature == "duplex:long" \|| a:feature == "duplex:short" let g:CREAM_PRINT_DUPLEX = a:feature elseif a:feature == "collate:y" \|| a:feature == "collate:n" let g:CREAM_PRINT_COLLATE = a:feature elseif a:feature == "jobsplit:y" \|| a:feature == "jobsplit:n" let g:CREAM_PRINT_JOBSPLIT = a:feature elseif a:feature == "portrait:y" \|| a:feature == "portrait:n" let g:CREAM_PRINT_ORIENTATION = a:feature elseif a:feature == "paper:letter" \|| a:feature == "paper:legal" \|| a:feature == "paper:ledger" \|| a:feature == "paper:statement" \|| a:feature == "paper:A3" \|| a:feature == "paper:A4" \|| a:feature == "paper:A5" \|| a:feature == "paper:B4" \|| a:feature == "paper:B5" let g:CREAM_PRINT_PAPERSIZE = a:feature elseif a:feature == "formfeed:y" \|| a:feature == "formfeed:n" let g:CREAM_PRINT_FORMFEED = a:feature endif if a:mode == "v" normal gv endif endfunction " Set, &printdevice {{{1 function! Cream_print_set_device(mode) let mystr = Inputdialog("Please enter a string for your printer.", &printdevice) if mystr == "{cancel}" return endif call Cream_print_set(a:mode, "device", mystr) endfunction " Set, &printexpr {{{1 function! Cream_print_set_expr(mode) let mystr = Inputdialog("Please enter a string for your printer expression.", &printexpr) if mystr == "{cancel}" return endif call Cream_print_set(a:mode, "expr", mystr) endfunction " Set, &printfont {{{1 function! Cream_print_set_font(mode) " hack... we have to use the return of "set guifont=*" to select a " print font in order to use a dialog. if !has("gui_running") return -1 endif " save environment execute 'let myguifont = "' . escape(&guifont, " ") . '"' let myos = Cream_getoscode() " save screen pos " HACK: set guifont=* moves screen on WinXP call Cream_screen_get() silent! set guifont=* " if still empty or a "*", user may have cancelled; do nothing if &guifont == "*" || &guifont == "" " do nothing else let &printfont = &guifont let g:CREAM_PRINT_FONT_{myos} = &printfont ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " &guifont = \"" . &guifont . "\"\n" . " \ " g:CREAM_FONT_{myos} = \"" . g:CREAM_FONT_{myos} . "\"\n" . " \ " &printfont = \"" . &printfont . "\"\n" . " \ " g:CREAM_PRINT_FONT_{myos} = \"" . g:CREAM_PRINT_FONT_{myos} . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** endif " restore &guifont let &guifont = myguifont " restore screen pos call Cream_screen_init() if a:mode == "v" normal gv endif endfunction " Set, &printheader {{{1 function! Cream_print_set_headertext(mode) let mystr = Inputdialog( \ "Please enter a string for your printer expression.\n" . \ "Allowable strings conform to Vim's statusline options:\n" . \ "\n" . \ " %N Page number\n" . \ " %F Full path\n" . \ " %t File name\n" . \ " %L Total number of lines\n" . \ " %m Modified status\n" . \ " %r Readonly status\n" . \ " %y File type\n" . \ " %< Where to truncate line if too long\n" . \ " %= Point between left- and right-aligned items\n" . \ "\n" . \ "Example:\n" . \ "\n" . \ " %<%F%t% %L Lines Total=Page %N\n" . \ "\n" . \ "would produce a header that looks like:\n" . \ "\n" . \ " C:\\Docs\\File.txt 195 Lines Total Page 3\n" . \ "\n" . \ "\n", g:CREAM_PRINT_HEADER_TEXT) if mystr == "{cancel}" return endif call Cream_print_set(a:mode, "headertext", mystr) endfunction " Set, &printoptions, margins {{{1 " margin:left function! Cream_print_set_margin_left(mode) let mystr = Cream_print_set_margin_dialog(g:CREAM_PRINT_MARGIN_LEFT) if mystr == "{cancel}" return endif call Cream_print_set(a:mode, "left", mystr) endfunction " margin:right function! Cream_print_set_margin_right(mode) let mystr = Cream_print_set_margin_dialog(g:CREAM_PRINT_MARGIN_RIGHT) if mystr == "{cancel}" return endif call Cream_print_set(a:mode, "right", mystr) endfunction " margin:top function! Cream_print_set_margin_top(mode) let mystr = Cream_print_set_margin_dialog(g:CREAM_PRINT_MARGIN_TOP) if mystr == "{cancel}" return endif call Cream_print_set(a:mode, "top", mystr) endfunction " margin:bottom function! Cream_print_set_margin_bottom(mode) let mystr = Cream_print_set_margin_dialog(g:CREAM_PRINT_MARGIN_BOTTOM) if mystr == "{cancel}" return endif call Cream_print_set(a:mode, "bottom", mystr) endfunction function! Cream_print_set_margin_dialog(existing) " dialog for margin settings let side = matchstr(a:existing, '^.\+:\@=') " we allow a period character optionally in front of a number but " not trailing one let size = matchstr(a:existing, '\d*\.\=\d\+') let unit = matchstr(a:existing, '..$') let mystr = Inputdialog( \ "Please enter your " . side . " margin width and unit as \n" . \ "shown in these four examples:\n" . \ "\n" . \ " \"0.5in\" (inches)\n" . \ " \"5mm\" (millimeters)\n" . \ " \"5pc\" (percentage of paper width)\n" . \ " \"5pt\" (points equal 1/72 of an inch)\n" . \ "\n" . \ "(Fractions required in decimal form.)\n" . \ "\n", size . unit) if mystr == "{cancel}" return mystr endif " remove spaces let mystr = substitute(mystr, ' ', '', 'g') " lower case let mystr = tolower(mystr) " validate let unitnew = matchstr(mystr, '..$') if unitnew != "in" \&& unitnew != "mm" \&& unitnew != "pc" \&& unitnew != "pt" call confirm( \ "Invalid unit specified.\n" . \ "\n", "&Ok", 1, "Error") return "{cancel}" endif let sizenew = matchstr(mystr, '\d*\.\=\d\+') " Vim doesn't allow leading decimal--pad with 0 if match(sizenew, '\.') == 0 let sizenew = "0" . sizenew endif if sizenew == "" call confirm( \ "Invalid size specified.\n" . \ "\n", "&Ok", 1, "Error") return "{cancel}" endif ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " side = \"" . side . "\"\n" . " \ " size = \"" . size . "\"\n" . " \ " unit = \"" . unit . "\"\n" . " \ " mystr = \"" . mystr . "\"\n" . " \ " unitnew = \"" . unitnew . "\"\n" . " \ " sizenew = \"" . sizenew . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "{cancel}" "endif ""*** return side . ":" . sizenew . unitnew endfunction " Set, &printoptions, header {{{1 function! Cream_print_set_header(mode) let mystr = Inputdialog("Please enter the header height in number of lines.", matchstr(g:CREAM_PRINT_HEADER, '\d\+$')) if mystr == "{cancel}" return endif " error if we find any char other than 0-9 if match(mystr, '[^0-9]') != -1 call confirm( \ "Only numbers are allowed.\n" . \ "\n", "&Ok", 1, "Error") return endif call Cream_print_set(a:mode, "header", mystr) endfunction " Set, &printoptions, syntax {{{1 function! Cream_print_set_syntax(mode) if g:CREAM_PRINT_SYNTAX == "syntax:y" let button = 1 elseif g:CREAM_PRINT_SYNTAX == "syntax:a" let button = 3 else let button = 2 endif let n = confirm( \ "Print syntax highlighting?\n" . \ "(Auto tries if printer appears able to print color or grey.)\n" . \ "\n", "&Yes\n&No\n&Auto\n&Cancel", button, "Question") if n == 1 call Cream_print_set(a:mode, "syntax:y") elseif n == 2 call Cream_print_set(a:mode, "syntax:n") elseif n == 3 call Cream_print_set(a:mode, "syntax:a") endif endfunction " Set, &printoptions, number {{{1 function! Cream_print_set_number(mode) if g:CREAM_PRINT_NUMBER == "number:y" let button = 1 else let button = 2 endif let n = confirm( \ "Print line numbers?\n" . \ "\n", "&Yes\n&No\n&Cancel", button, "Question") if n == 1 call Cream_print_set(a:mode, "number:y") elseif n == 2 call Cream_print_set(a:mode, "number:n") endif endfunction " Set, &printoptions, wrap {{{1 function! Cream_print_set_wrap(mode) if g:CREAM_PRINT_WRAP == "wrap:y" let button = 1 else let button = 2 endif let n = confirm( \ "Wrap words at page margin?\n" . \ "\n", "&Yes\n&No\n&Cancel", button, "Question") if n == 1 call Cream_print_set(a:mode, "wrap:y") elseif n == 2 call Cream_print_set(a:mode, "wrap:n") endif endfunction " Set, &printoptions, duplex {{{1 function! Cream_print_set_duplex(mode) if g:CREAM_PRINT_DUPLEX == "duplex:long" let button = 2 elseif g:CREAM_PRINT_DUPLEX == "duplex:short" let button = 3 else let button = 1 endif let n = confirm( \ "Duplex?\n" . \ "\n", "&Off\n&Long\ Side\n&Short\ Side\n&Cancel", button, "Question") if n == 1 call Cream_print_set(a:mode, "duplex:off") elseif n == 2 call Cream_print_set(a:mode, "duplex:long") elseif n == 3 call Cream_print_set(a:mode, "duplex:short") endif endfunction " Set, &printoptions, collate {{{1 function! Cream_print_set_collate(mode) if g:CREAM_PRINT_COLLATE == "collate:y" let button = 1 else let button = 2 endif let n = confirm( \ "Collate?\n" . \ "\n", "&Yes\n&No\n&Cancel", button, "Question") if n == 1 call Cream_print_set(a:mode, "collate:y") elseif n == 2 call Cream_print_set(a:mode, "collate:n") endif endfunction " Set, &printoptions, jobsplit {{{1 function! Cream_print_set_jobsplit(mode) if g:CREAM_PRINT_JOBSPLIT == "jobsplit:y" let button = 1 else let button = 2 endif let n = confirm( \ "Print each copy as its own print job?\n" . \ "\n", "&Yes\n&No\n&Cancel", button, "Question") if n == 1 call Cream_print_set(a:mode, "jobsplit:y") elseif n == 2 call Cream_print_set(a:mode, "jobsplit:n") endif endfunction " Set, &printoptions, formfeed {{{1 function! Cream_print_set_formfeed(mode) if g:CREAM_PRINT_FORMFEED == "formfeed:y" let button = 1 else let button = 2 endif let n = confirm( \ "Obey or ignore formfeed characters?\n" . \ "(Obeying means a decimal 12 character will force\n" . \ "the beginning of a new page whenever encountered.)\n" . \ "\n", "&Obey\n&Ignore\n&Cancel", button, "Question") if n == 1 call Cream_print_set(a:mode, "formfeed:y") elseif n == 2 call Cream_print_set(a:mode, "formfeed:n") endif endfunction " Cream_print_setup() {{{1 function! Cream_print_setup() " set all Vim options related to printing " (based on globals initialized elsewhere) execute "set printdevice=" . escape(g:CREAM_PRINT_DEVICE, ' ') if version >= 602 execute "set printencoding=" . g:CREAM_PRINT_ENCODING endif execute "set printexpr=" . escape(g:CREAM_PRINT_EXPR, ' ') execute "set printfont=" . escape(g:CREAM_PRINT_FONT_{Cream_getoscode()}, ' ') execute "set printheader=" . escape(g:CREAM_PRINT_HEADER_TEXT, ' ') if version >= 602 execute "set printoptions=" . \ g:CREAM_PRINT_MARGIN_LEFT . "," . \ g:CREAM_PRINT_MARGIN_RIGHT . "," . \ g:CREAM_PRINT_MARGIN_TOP . "," . \ g:CREAM_PRINT_MARGIN_BOTTOM . "," . \ g:CREAM_PRINT_HEADER . "," . \ g:CREAM_PRINT_SYNTAX . "," . \ g:CREAM_PRINT_NUMBER . "," . \ g:CREAM_PRINT_WRAP . "," . \ g:CREAM_PRINT_DUPLEX . "," . \ g:CREAM_PRINT_COLLATE . "," . \ g:CREAM_PRINT_JOBSPLIT . "," . \ g:CREAM_PRINT_ORIENTATION . "," . \ g:CREAM_PRINT_PAPERSIZE . "," . \ g:CREAM_PRINT_FORMFEED . "," . \ "" endif endfunction " Cream_print_init() {{{1 function! Cream_print_init() " initialize print configuration based on defaults or globals " *** reset (comment to void) -- DEVEL ONLY "let reset = 1 " &printdevice if !exists("g:CREAM_PRINT_DEVICE") || exists("reset") let g:CREAM_PRINT_DEVICE = &printdevice endif " &printencoding if !exists("g:CREAM_PRINT_ENCODING") || exists("reset") let g:CREAM_PRINT_ENCODING = &encoding endif " &printexpr if !exists("g:CREAM_PRINT_EXPR") || exists("reset") let g:CREAM_PRINT_EXPR = &printexpr endif " &printfont " default print font is same as GUI font if !exists("g:CREAM_PRINT_FONT_{Cream_getoscode()}") if exists("g:CREAM_FONT_{Cream_getoscode()}") let g:CREAM_PRINT_FONT_{Cream_getoscode()} = g:CREAM_FONT_{Cream_getoscode()} else let g:CREAM_PRINT_FONT_{Cream_getoscode()} = &guifont endif endif " &printheader if !exists("g:CREAM_PRINT_HEADER_TEXT") || exists("reset") let g:CREAM_PRINT_HEADER_TEXT = &printheader endif " &printoptions if !exists("g:CREAM_PRINT_MARGIN_LEFT") || exists("reset") let g:CREAM_PRINT_MARGIN_LEFT = "left:10pc" endif if !exists("g:CREAM_PRINT_MARGIN_RIGHT") || exists("reset") let g:CREAM_PRINT_MARGIN_RIGHT = "right:5pc" endif if !exists("g:CREAM_PRINT_MARGIN_TOP") || exists("reset") let g:CREAM_PRINT_MARGIN_TOP = "top:5pc" endif if !exists("g:CREAM_PRINT_MARGIN_BOTTOM") || exists("reset") let g:CREAM_PRINT_MARGIN_BOTTOM = "bottom:5pc" endif if !exists("g:CREAM_PRINT_HEADER") || exists("reset") let g:CREAM_PRINT_HEADER = "header:2" endif if !exists("g:CREAM_PRINT_SYNTAX") || exists("reset") let g:CREAM_PRINT_SYNTAX = "syntax:a" endif if !exists("g:CREAM_PRINT_NUMBER") || exists("reset") let g:CREAM_PRINT_NUMBER = "number:n" endif if !exists("g:CREAM_PRINT_WRAP") || exists("reset") let g:CREAM_PRINT_WRAP = "wrap:y" endif if !exists("g:CREAM_PRINT_DUPLEX") || exists("reset") " varies from Vim default let g:CREAM_PRINT_DUPLEX = "duplex:off" endif if !exists("g:CREAM_PRINT_COLLATE") || exists("reset") let g:CREAM_PRINT_COLLATE = "collate:y" endif if !exists("g:CREAM_PRINT_JOBSPLIT") || exists("reset") let g:CREAM_PRINT_JOBSPLIT = "jobsplit:n" endif " we use a different name if !exists("g:CREAM_PRINT_ORIENTATION") || exists("reset") \|| g:CREAM_PRINT_ORIENTATION == "" let g:CREAM_PRINT_ORIENTATION = "portrait:y" endif if !exists("g:CREAM_PRINT_PAPERSIZE") || exists("reset") \|| g:CREAM_PRINT_PAPERSIZE == "" let g:CREAM_PRINT_PAPERSIZE = "paper:letter" endif if !exists("g:CREAM_PRINT_FORMFEED") || exists("reset") " we use a different default let g:CREAM_PRINT_FORMFEED = "formfeed:y" endif " now activate Vim's various options call Cream_print_setup() endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-abbr.vim0000644000076400007660000000317211517300716015624 0ustar digitectlocaluser" " Filename: cream-abbr.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Load spelling auto-corrections (Vim abbreviations) based on language. " " called via autocmd on startup and on spell check language change function! Cream_autocorrect_init() " clear all existing iabclear " if un-initialized if !exists("g:CREAM_SPELL_LANG") call Cream_source($CREAM . "cream-abbr-eng.vim") return endif " if empty if g:CREAM_SPELL_LANG == "" call Cream_source($CREAM . "cream-abbr-eng.vim") return endif " now check each (for multiple) " English if match(g:CREAM_SPELL_LANG, "eng") > -1 call Cream_source($CREAM . "cream-abbr-eng.vim") endif " French if match(g:CREAM_SPELL_LANG, "fre") > -1 call Cream_source($CREAM . "cream-abbr-fre.vim") endif endfunction cream-0.43/lang/0000755000076400007660000000000011517421112014024 5ustar digitectlocalusercream-0.43/lang/menu_korean_kr.949.vim0000644000076400007660000003375111156572442020111 0ustar digitectlocaluser" Menu Translations: Korean (Windows) " Translated By: Hanjo Kim " Last Change: Wed Oct 25 10:04:52 KST 2006 " translations for vimcream (http://cream.sourceforge.net) " Quit when menu translations have already been done. if exists("did_menu_trans") finish endif let did_menu_trans = 1 scriptencoding cp949 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " File menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &File (&F) menutrans &NewCtrl+N \ (&N)Ctrl+N menutrans &Open\.\.\. (&O)\.\.\. menutrans &Open\ (selection)Ctrl+Enter \ \ Ctrl+Enter menutrans &Open\ (Read-Only)\.\.\. б\ \ \.\.\. menutrans &Close\ File ݱ menutrans C&lose\ All\ Files \ ݱ menutrans &SaveCtrl+S (&S)Ctrl+S menutrans Save\ &As\.\.\. \ ̸ (&A)\.\.\. menutrans Sa&ve\ All\.\.\. \ (&v)\.\.\. menutrans &Print\.\.\. μ(&P)\.\.\. menutrans Prin&t\ Setup μ\ menutrans Save\ All\ and\ &Exit \ ϰ\ menutrans E&xitCtrl+F4 (&X)Ctrl+F4 menutrans &Recent\ Files,\ Options ֱ,\ ɼ menutrans Set\ Menu\ Size ޴\ ũ\ menutrans Remove\ Invalid ߸\ ׸\ menutrans Clear\ List \ " Print Setup menutrans Paper\ Size \ ũ menutrans Paper\ Orientation \ menutrans Margins menutrans Header Ӹ menutrans Syntax\ Highlighting\.\.\. \ menutrans Line\ Numbering\.\.\. ٹȣ\.\.\. menutrans Wrap\ at\ Margins\.\.\. 鿡\ 鿩\.\.\. menutrans &Encoding ڵ(&E) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Edit menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Edit (&E) menutrans &UndoCtrl+Z ǵ(&U)Ctrl+Z menutrans &RedoCtrl+Y ٽϱ(&R)Ctrl+Y menutrans Cu&tCtrl+X ߶󳻱(&T)Ctrl+X menutrans &CopyCtrl+C (&C)Ctrl+C menutrans &PasteCtrl+V ٿֱ(&P)Ctrl+V menutrans &Select\ AllCtrl+A \ (&S)Ctrl+A menutrans &Go\ To\.\.\.Ctrl+G ̵(&G)\.\.\.Ctrl+G menutrans &Find\.\.\.Ctrl+F ã(&F)\.\.\.Ctrl+F menutrans &Replace\.\.\.Ctrl+H ٲٱ(&R)\.\.\.Ctrl+H menutrans &Find/ ã(&F)/ menutrans Find\ and\ Rep&lace:%s ã\ ٲٱ(&l):%s menutrans Multi-file\ Replace\.\.\. \ Ͽ\ ٲٱ\.\.\. menutrans Fi&nd\ Under\ Cursor Ŀ\ ġ\ ã menutrans &Find\ Under\ CursorF3 ãF3 menutrans &Find\ Under\ Cursor\ (&Reverse)Shift+F3 \ ãShift+F3 menutrans &Find\ Under\ Cursor\ (&Case-sensitive)Alt+F3 ҹ\ Ͽ\ ãAlt+F3 menutrans &Find\ Under\ Cursor\ (Cas&e-sensitive,\ Reverse)Alt+Shift+F3 ҹ\ Ͽ\ ãAlt+Shift+F3 menutrans Count\ &Word\.\.\. ܾ\ \ (&W)\.\.\. menutrans Cou&nt\ Total\ Words\.\.\. ü\ ܾ\ \ (&n)\.\.\. menutrans Column\ SelectAlt+Shift+(motion) ÷\ Alt+Shift+() """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Insert menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Insert (&I) menutrans Character\ Line\.\.\.Shift+F4 \ \.\.\.Shift+F4 menutrans Character\ Line\ (length\ of\ line\ above)\.\.\.Shift+F4\ (x2) \ \ (\ \ ̷)\.\.\.Shift+F4\ (x2) menutrans Date/Time\.\.\.F11 ¥/ð\.\.\.F11 menutrans Date/Time\ (Last\ Used)F11\ (2x) ¥/ð\ ()F11\ (2x) menutrans Character\ by\ ValueAlt+, ڸ\ Alt+, menutrans List\ Characters\ Available\.\.\.Alt+,\ (x2) Է\ \ \.\.\.Alt+,\ (x2) menutrans List\ Character\ Values\ Under\ CursorAlt+\. Ŀ\ ġ\ ڰAlt+\. "menutrans Character\ by\ Dialog\.\.\. ȭâ\ \ \.\.\. menutrans Character\ by\ DigraphCtrl+K Ctrl+K menutrans List\ Digraphs\ Available\.\.\.Ctrl+K\ (x2) \ \.\.\.Ctrl+K\ (x2) menutrans Text\ Filler\.\.\. \ ä "menutrans ASCII\ Table ƽŰ\ ǥ "menutrans ASCII\ Table,\ List ƽŰ\ ǥ,\ Ʈ menutrans Line\ Numbers\.\.\.\ (selection) ٹȣ() """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Format menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans Fo&rmat (&r) menutrans &Quick\ Wrap\ (selection\ or\ current\ paragraph)Ctrl+Q ڵ\ ٹٲCtrl+Q menutrans Quick\ &Un-Wrap\ (selection\ or\ current\ paragraph)Alt+Q,\ Q ɾڵ\ ٹٲ\ Alt+Q,\ Q menutrans Capitalize,\ Title\ CaseF5 ҹȯ,\ ù\ ڸ\ 빮ڷ(&T)F5 menutrans Capitalize,\ UPPERCASEShift+F5 ҹȯ,\ \ 빮ڷ(&U)Shift+F5 menutrans Capitalize,\ lowercaseAlt+F5 ҹȯ,\ \ ҹڷ(&l)Alt+F5 menutrans Capitalize,\ rEVERSECtrl+F5 ҹȯ,\ ù\ ڸ\ ҹڷ(&I)Ctrl+F5 menutrans Justify,\ Left ,\ (&L) menutrans Justify,\ Center ,\ (&C) menutrans Justify,\ Right ,\ (&R) menutrans Justify,\ Full ,\ (&F) menutrans &Remove\ Trailing\ Whitespace ɾ\ \ \ (&R) menutrans Remove\ &Leading\ Whitespace ɾ\ ó\ \ (&L) menutrans &Collapse\ All\ Empty\ Lines\ to\ One ɾ\ \ \ \ \ ٷ(&C) menutrans &Delete\ All\ Empty\ Lines ɾ\ \ \ (&D) menutrans &Join\ Lines\ (selection) \ ġ(&J) menutrans Con&vert\ Tabs\ To\ Spaces \ menutrans &File\ Format\.\.\. \ (&F)\.\.\. menutrans File\ &Encoding \ ڵ(&E) menutrans Asian ƽþƾ menutrans Unicode ڵ menutrans Western\ European menutrans Eastern\ European menutrans East\ Asian ƽþƾ menutrans Middle\ Eastern ߾Ӿƽþƾ menutrans SE\ and\ SW\ Asian /ƽþƾ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Settings menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Settings (&S) menutrans &Show/Hide\ Invisibles\ (toggle)F4 ̱/߱(&S)\ (toggle)F4 menutrans Line\ &Numbers\ (toggle) ٹȣ(&N)\ (toggle) menutrans &Word\ WrapCtrl+W ٹٲCtrl+W menutrans A&uto\ WrapCtrl+E ڵ\ ٹٲCtrl+E menutrans &Set\ Wrap\ Width\.\.\. ٹٲ\ \ (&S)\.\.\. menutrans &Highlight\ Wrap\ Width\ (toggle) ٹٲ\ \ ̱(&H) menutrans &Tabstop\ Width\.\.\. \ \.\.\. menutrans Tab\ &Expansion\ (toggle)Ctrl+T \ Ȯ(&E)Ctrl+T menutrans &Auto-indent\ (toggle) ڵ\ 鿩(&A) menutrans Syntax\ Highlighting\ (toggle) \ menutrans Highlight\ Find\ (toggle) ˻\ \ menutrans Highlight\ Current\ Line\ (toggle) \ \ menutrans &Filetype \ menutrans &Color\ Themes \ Ŵ(&C) menutrans Selection menutrans P&references (&r) menutrans Font\.\.\. ۲\.\.\. menutrans Toolbar\ (toggle) menutrans Last\ File\ Restore\ Off \ \ \ menutrans Last\ File\ Restore\ On \ \ \ menutrans &Middle-Mouse\ Disabled 콺\ \ ư\ menutrans &Middle-Mouse\ Pastes 콺\ \ ư\ ٿֱ menutrans Bracket\ Flashing\ Off ȣ\ \ menutrans Bracket\ Flashing\ On ȣ\ \ ѱ menutrans Info\ Pop\ Options\.\.\. \ ɼ\ \.\.\. menutrans &Expert\ Mode\.\.\. \ (&E)\.\.\. menutrans &Behavior (&B) """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Tools menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Tools (&T) menutrans &Spell\ Check \ ˻ menutrans Next\ Spelling\ ErrorF7 \ \ F7 menutrans Previous\ Spelling\ ErrorShift+F7 \ \ Shift+F7 menutrans Show\ Spelling\ Errors\ (toggle)Alt+F7 \ \ ̱Alt+F7 menutrans Add\ Word\ (under\ cursor)\ to\ DictionaryCtrl+F7 \ ܾ\ \ ֱCtrl+F7 menutrans Language\.\.\. \.\.\. menutrans Options\.\.\. ɼ\.\.\. menutrans &Bookmarks ϸũ(&B) menutrans Bookmark\ NextF2 \ ϸũF2 menutrans Bookmark\ PreviousShift+F2 \ ϸũShift+F2 menutrans Bookmark\ Set\ (toggle)Alt+F2 ϸũ\ Alt+F2 menutrans Delete\ All\ BookmarksAlt+Shift+F2 ɾ\ ϸũ\ Alt+Shift+F2 menutrans Block\ Comment\ (selection)F6 ÿ\ ڸƮF6 menutrans Block\ Un-Comment\ (selection)Shift+F6 ɾÿ\ ڸƮ\ ǮShift+F6 menutrans Macro\ PlayF8 ũ\ F8 menutrans Macro\ Record\ (toggle)Shift+F8 ũ\ Shift+F8 menutrans &Diff\ Mode \ (&D) menutrans &Folding (&F) menutrans &Fold\ Open/CloseF9 \ /ݱF9 menutrans &Fold\ Open/CloseShift+F9 \ /ݱShift+F9 menutrans &Set\ Fold\ (Selection)F9 \ menutrans &Open\ All\ FoldsCtrl+F9 \ \ Ctrl+F9 menutrans &Close\ All\ FoldsCtrl+Shift+F9 \ \ ݱCtrl+Shift+F9 menutrans &Delete\ Fold\ at\ CursorAlt+F9 ɾĿ\ ġ\ \ Alt+F9 menutrans D&elete\ All\ FoldsAlt+Shift+F9 ɾ\ \ Alt+Shift+F9 menutrans &Completion ڵϼ(&C) menutrans &Tag\ Navigation \ ̵ menutrans &Jump\ to\ Tag\ (under\ cursor)Alt+Down ±׷\ ̵Alt+Down menutrans &Close\ and\ Jump\ BackAlt+Up ݰ\ ڷ\ ̵Alt+Up menutrans &Previous\ TagAlt+Left \ ±Alt+Left menutrans &Next\ TagAlt+Right \ ±Alt+Right menutrans &Tag\ Listing\.\.\.Ctrl+Alt+Down ±\ Ʈ\.\.\.Ctrl+Alt+Down menutrans Add-ons\ E&xplore\ (Map/Unmap) ߰\ Ž(&x) " Add-ons menutrans &Add-ons Ÿ menutrans Color\ Invert \ menutrans Convert ȯ menutrans Cream\ Config\ Info ũ\ \ menutrans Cream\ Devel ũ\ menutrans Fold\ Vim\ Functions Vim\ Լ\ menutrans Ctags\ Generate Ctags\ menutrans Daily\ Read \ б menutrans De-binary ̳ʸ\ menutrans &Email\ Prettyfier ̸\ ٹ̱ menutrans Sort menutrans Encrypt ȣȭ menutrans Highlight\ Control\ Characters \ ̶Ʈ menutrans Highlight\ Multibyte ƼƮ\ ̶Ʈ menutrans Stamp\ Time ð\ ǥ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Window menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Window â(&W) menutrans Maximize\ (&Single) ִȭ(&S) menutrans Minimize\ (Hi&de) ּȭ(&d) menutrans Tile\ &Vertical η\ menutrans Tile\ Hori&zontal η\ menutrans Sizes\ E&qual \ ũ(&q) menutrans Height\ Max\ &= ִ(&=) menutrans Height\ Min\ &- ּҳ(&-) menutrans &Width\ Max ִ(&W) menutrans Widt&h\ Min ּҳ(&h) menutrans Split\ New\ Pane\ Vertical \ â\ η\ menutrans Split\ New\ Pane\ Horizontal \ â\ η\ menutrans Split\ Existing\ Vertically \ â\ η\ menutrans Split\ Existing\ Horizontally \ â\ η\ menutrans Start\ New\ Cream\ Ins&tance ũ\ \ (&t) menutrans File\ Tr&ee \ Ʈ menutrans Open\ File\ E&xplorer \ Ž(&x) menutrans Open\ File\ in\ Default\ &Application ⺻\ α׷\ \ menutrans &Calendar\ (toggle)Ctrl+F11 ޷Ctrl+F11 """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Help menu """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Help (&H) menutrans Keyboard\ ShortcutsF1 ŰF1 menutrans Features Ư¡ menutrans FAQ \ \ menutrans License ̼ menutrans Contributors \ е menutrans &Vim\ Help\ (expert) VIM\ \ () menutrans &Overview (&O) menutrans &User\ Manual \ Ŵ(&U) menutrans &GUI \ ̽(&G) menutrans &How-to\ links HOWTO\ ũ\.\.\.(&H) menutrans &Credits ۱(&C) menutrans Co&pying (&P) menutrans &Version\.\.\. (&V)\.\.\. menutrans &About\.\.\. Vim\ (&A) menutrans &List\ Help\ Topics\.\.\.Alt+F1 \ ׸\ ƮAlt+F1 menutrans &Go\ to\ Help\ Topic\.\.\.Ctrl+F1 \ ׸\ ̵\.\.\.Ctrl+F1 menutrans &About\ Cream\.\.\. Cream\ \.\.\. " Popup menu menutrans Select\ &All \ (&A) menutrans Cu&t ڸ(&t) menutrans &Copy (&C) menutrans &Paste ٿֱ(&P) menutrans &Delete (&D) " Toolbar #FIXME: not work? menutrans New\ File \ menutrans Open menutrans Save menutrans Save\ As ٸ\ ̸\ menutrans Close ݱ menutrans Exit\ Vim Vim\ menutrans Print μ menutrans Undo menutrans Redo ٽý menutrans Cut\ (to\ Clipboard) Ŭ\ ڸ menutrans Copy\ (to\ Clipboard) Ŭ\ menutrans Paste\ (from\ Clipboard) Ŭ忡\ ٿֱ " The GUI toolbar if has("toolbar") if exists("*Do_toolbar_tmenu") delfun Do_toolbar_tmenu endif fun Do_toolbar_tmenu() tmenu ToolBar.new tmenu ToolBar.Open tmenu ToolBar.Save tmenu ToolBar.SaveAll tmenu ToolBar.Print μ tmenu ToolBar.Undo tmenu ToolBar.Redo ٽý tmenu ToolBar.Cut ߶󳻱 tmenu ToolBar.Copy tmenu ToolBar.Paste ٿֱ tmenu ToolBar.Find ã... tmenu ToolBar.FindNext ã tmenu ToolBar.FindPrev ã tmenu ToolBar.Replace ٲٱ... tmenu ToolBar.LoadSesn Ǻҷ tmenu ToolBar.SaveSesn tmenu ToolBar.RunScript ũƮ tmenu ToolBar.Make Make tmenu ToolBar.Shell tmenu ToolBar.RunCtags ctags tmenu ToolBar.TagJump ±̵ tmenu ToolBar.Help tmenu ToolBar.FindHelp ã endfun endif cream-0.43/lang/menu_en_us.utf-8.vim0000644000076400007660000000260511156572442017657 0ustar digitectlocaluser " NOTE: This is all test code. " File menu "menutrans &File Hooba(&F) " The GUI toolbar "imenu icon=new 200.05 ToolBar.new {rhs} "vmenu icon=new 200.06 ToolBar.new {rhs} "tmenu ToolBar.new New File "menutrans New\ File Cows "menutrans ToolBar\.new Cowss "menutrans new Cowsss "menutrans 200\.05 Cowssss "menutrans New\\\ File Cowsss "if has("toolbar") " if exists("*Do_toolbar_tmenu") " delfun Do_toolbar_tmenu " endif " fun Do_toolbar_tmenu() " tmenu ToolBar.new ½ļ " tmenu ToolBar.Open ļ " tmenu ToolBar.Save 浱ǰļ " tmenu ToolBar.SaveAll ȫļ " tmenu ToolBar.Print ӡ " tmenu ToolBar.Undo ϴ޸ " tmenu ToolBar.Redo ϴγĶ " tmenu ToolBar.Cut " tmenu ToolBar.Copy Ƶ " tmenu ToolBar.Paste ɼճ " tmenu ToolBar.Find ... " tmenu ToolBar.FindNext һ " tmenu ToolBar.FindPrev һ " tmenu ToolBar.Replace 滻... " tmenu ToolBar.LoadSesn ػỰ " tmenu ToolBar.SaveSesn 浱ǰĻỰ " tmenu ToolBar.RunScript Vimű " tmenu ToolBar.Make ִ Make " tmenu ToolBar.Shell һ " tmenu ToolBar.RunCtags ִ ctags " tmenu ToolBar.TagJump ǰλõıǩ " tmenu ToolBar.Help Vim " tmenu ToolBar.FindHelp Vim " endfun "endif " " cream-0.43/lang/menu_fr_fr.latin1.vim0000644000076400007660000006052511156572442020076 0ustar digitectlocaluser" Language: French " Maintainer: Thomas de Grenier de Latour (TGL) " Last Change: 20041114 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Main menu titles """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &File &Fichier menutrans &Edit &Edition menutrans I&nsert &Insrer menutrans Fo&rmat Fo&rmat menutrans &Settings &Prfrences menutrans &Tools &Outils menutrans &Window Fe&ntre menutrans &Help &Aide """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Encodings """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans Middle\ Eastern Moyen-Orient menutrans Western\ European Europe\ de\ l'Ouest menutrans Eastern\ European Europe\ de\ l'Est menutrans East\ Asian Asie\ de\ l'Est menutrans SE\ and\ SW\ Asian Asie\ du\ Sud-Est\ et\ du\ Sud-Ouest "menutrans Arabic\ (ISO-8859-6)[iso-8859-6\ --\ ISO_8859\ variant] " \ \ (ISO-8859-6)[iso-8859-6\ --\ ISO_8859\ variant] "menutrans Arabic\ (Windows-1256)[8bit-cp1256\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1256)[8bit-cp1256\ --\ MS-Windows\ double-byte\ codepage] "menutrans Baltic\ (ISO-8859-13)[iso-8859-13\ --\ ISO_8859\ variant] " \ \ (ISO-8859-13)[iso-8859-13\ --\ ISO_8859\ variant] "menutrans Baltic\ (ISO-8859-4)[iso-8859-4\ --\ ISO_8859\ variant] " \ \ (ISO-8859-4)[iso-8859-4\ --\ ISO_8859\ variant] "menutrans Baltic\ (Windows-1257)[8bit-cp1257\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1257)[8bit-cp1257\ --\ MS-Windows\ double-byte\ codepage] "menutrans Celtic\ (ISO-8859-14)[iso-8859-14\ --\ ISO_8859\ variant] " \ \ (ISO-8859-14)[iso-8859-14\ --\ ISO_8859\ variant] "menutrans Central\ European\ (Windows-1250)[8bit-cp1250\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1250)[8bit-cp1250\ --\ MS-Windows\ double-byte\ codepage] "menutrans Chinese\ Traditional\ (Big5)[big5\ --\ traditional\ Chinese] " \ \ (Big5)[big5\ --\ traditional\ Chinese] "menutrans Chinese\ Traditional\ (EUC-TW)[taiwan\ --\ on\ Unix\ "euc-tw",\ on\ MS-Windows\ cp950] " \ \ (EUC-TW)[taiwan\ --\ on\ Unix\ "euc-tw",\ on\ MS-Windows\ cp950] "menutrans Cyrillic\ (ISO-8859-5)[iso-8859-5\ --\ ISO_8859\ variant] " \ \ (ISO-8859-5)[iso-8859-5\ --\ ISO_8859\ variant] "menutrans Cyrillic\ (KO18-R)[koi8-r\ --\ Russian] " \ \ (KO18-R)[koi8-r\ --\ Russian] "menutrans Cyrillic/Ukrainian\ (KO18-U)[koi8-u\ --\ Ukrainian] " \ \ (KO18-U)[koi8-u\ --\ Ukrainian] "menutrans Cyrillic\ (Windows-1251)[8bit-cp1251\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1251)[8bit-cp1251\ --\ MS-Windows\ double-byte\ codepage] "menutrans Greek\ (ISO-8859-7)[iso-8859-7\ --\ ISO_8859\ variant] " \ \ (ISO-8859-7)[iso-8859-7\ --\ ISO_8859\ variant] "menutrans Greek\ (Windows-1253)[8bit-cp1253\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1253)[8bit-cp1253\ --\ MS-Windows\ double-byte\ codepage] "menutrans Greek\ (Windows-1253)[8bit-cp1253\ --\ MS-Windows\ double-byte\ codepage]Nordic\ (ISO-8859-10)[iso-8859-10\ --\ ISO_8859\ variant] " \ \ (Windows-1253)[8bit-cp1253\ --\ MS-Windows\ double-byte\ codepage]Nordic\ (ISO-8859-10)[iso-8859-10\ --\ ISO_8859\ variant] "menutrans Hebrew\ Visual\ (ISO-8859-8)[iso-8859-8\ --\ ISO_8859\ variant] " \ \ (ISO-8859-8)[iso-8859-8\ --\ ISO_8859\ variant] "menutrans Hebrew\ (Windows-1255)[8bit-cp1255\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1255)[8bit-cp1255\ --\ MS-Windows\ double-byte\ codepage] "menutrans Japanese[japan\ --\ on\ Unix\ "euc-jp",\ on\ MS-Windows\ cp932] " \ [japan\ --\ on\ Unix\ "euc-jp",\ on\ MS-Windows\ cp932] "menutrans Korean[korea\ --\ on\ Unix\ "euc-kr",\ on\ MS-Windows\ cp949] " \ [korea\ --\ on\ Unix\ "euc-kr",\ on\ MS-Windows\ cp949] "menutrans Nordic\ (ISO-8859-10)[iso-8859-10\ --\ ISO_8859\ variant] " \ \ (ISO-8859-10)[iso-8859-10\ --\ ISO_8859\ variant] "menutrans Romanian\ (ISO-8859-16)[iso-8859-16\ --\ ISO_8859\ variant] " \ \ (ISO-8859-16)[iso-8859-16\ --\ ISO_8859\ variant] "menutrans Simplified\ Chinese\ (ISO-2022-CN)[chinese\ --\ simplified\ Chinese:\ on\ Unix\ "euc-cn",\ on\ MS-Windows\ cp936] " \ \ (ISO-2022-CN)[chinese\ --\ simplified\ Chinese:\ on\ Unix\ "euc-cn",\ on\ MS-Windows\ cp936] "menutrans South\ European\ (ISO-8859-3)[iso-8859-3\ --\ ISO_8859\ variant] " \ \ (ISO-8859-3)[iso-8859-3\ --\ ISO_8859\ variant] "menutrans Turkish\ (ISO-8859-9)[iso-8859-6\ --\ ISO_8859\ variant] " \ \ (ISO-8859-9)[iso-8859-6\ --\ ISO_8859\ variant] "menutrans Turkish\ (Windows-1254)[8bit-cp1254\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1254)[8bit-cp1254\ --\ MS-Windows\ double-byte\ codepage] "menutrans Unicode\ (UCS-2le)[ucs-2le\ --\ like\ ucs-2,\ little\ endian] " \ Unicode\ (UCS-2le)[ucs-2le\ --\ like\ ucs-2,\ little\ endian] "menutrans Unicode\ (UCS-2)[ucs-2\ --\ 16\ bit\ UCS-2\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] " \ Unicode\ (UCS-2)[ucs-2\ --\ 16\ bit\ UCS-2\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] "menutrans Unicode\ (UCS-4le)[ucs-4le\ --\ like\ ucs-4,\ little\ endian] " \ Unicode\ (UCS-4le)[ucs-4le\ --\ like\ ucs-4,\ little\ endian] "menutrans Unicode\ (UCS-4)[ucs-4\ --\ 32\ bit\ UCS-4\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] " \ Unicode\ (UCS-4)[ucs-4\ --\ 32\ bit\ UCS-4\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] "menutrans Unicode\ (UTF-16le)[utf-16le\ --\ like\ UTF-16,\ little\ endian] " \ Unicode\ (UTF-16le)[utf-16le\ --\ like\ UTF-16,\ little\ endian] "menutrans Unicode\ (UTF-16)[utf-16\ --\ UCS-2\ extended\ with\ double-words\ for\ more\ characters] " \ Unicode\ (UTF-16)[utf-16\ --\ UCS-2\ extended\ with\ double-words\ for\ more\ characters] "menutrans Unicode\ (UTF-8)[utf-8\ --\ 32\ bit\ UTF-8\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] " \ Unicode\ (Windows-1258)[8bit-cp1258\ --\ MS-Windows\ double-byte\ codepage] "menutrans Vietnamese\ (Windows-1258)[8bit-cp1258\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1258)[8bit-cp1258\ --\ MS-Windows\ double-byte\ codepage] "menutrans Western\ (ISO-8859-15)[iso-8859-15\ --\ ISO_8859\ variant] " \ \ (ISO-8859-15)[iso-8859-15\ --\ ISO_8859\ variant] "menutrans Western\ (ISO-8859-1)[latin1/ANSI\ --\ 8-bit\ characters] " \ \ (ISO-8859-1)[latin1/ANSI\ --\ 8-bit\ characters] "menutrans Western\ (Windows-1252)[8bit-cp1252\ --\ MS-Windows\ double-byte\ codepage] " \ \ (Windows-1252)[8bit-cp1252\ --\ MS-Windows\ double-byte\ codepage] """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Color Themes """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans Reverse\ Black\ (default) Noir\ invers\ (dfaut) menutrans Reverse\ Blue Bleu\ invers menutrans Navajo-Night Navajo-Nuit menutrans Night Nuit menutrans (experimental\ below) (experimentaux\ ci-dessous) menutrans Lt\.\ Magenta Magenta\ clair menutrans Dk\.\ Magenta Magenta\ sombre menutrans Blue Bleu menutrans Green Vert menutrans Gold Dor menutrans Purple Violet menutrans Wheat Froment menutrans Cream\ (default) Cream\ (dfaut) menutrans Black\ and\ White Noir\ et\ Blanc menutrans Chocolate\ Liquor Liqueur\ de\ Chocolat menutrans Dawn Aurore menutrans Ocean\ Deep Ocan\ Profond menutrans Terminal\ (reverse) Terminal (invers) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " File menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &NewCtrl+N &NouveauCtrl+N menutrans &Open\.\.\. &Ouvrir\.\.\. menutrans &Open\ (selection)Ctrl+Enter &Ouvrir (selection)Ctrl+Enter menutrans &Close &Fermer menutrans C&lose\ All Fe&rmer tout menutrans &SaveCtrl+S &EnregistrerCtrl+S menutrans Save\ &As\.\.\. Enregistrer\ &sous\.\.\. menutrans Sa&ve\ All\.\.\. &Tout\ enregistrer menutrans Split\ &Diff\ with\.\.\. Diffrencier\ avec\.\.\. menutrans Split\ Patched\ &By\.\.\. Diffrencier\ avec\ une\ version\ patche\.\.\. menutrans &Print\.\.\. &Imprimer\.\.\. menutrans Prin&t\ Setup\.\.\. &Configuration\ de\ l'impression\.\.\. menutrans Paper\ Size Taille\ du\ papier "menutrans &Statement\ (5-1/2\ x\ 8-1/2) "menutrans &Letter\ (8-1/2\ x\ 11) "menutrans &Legal\ (11\ x\ 14) "menutrans &Ledger\ (17\ x\ 11) menutrans Paper\ Orientation Orientation\ du\ papier menutrans &Portrait &Portrait menutrans &Landscape Pa&ysage menutrans Margins Marges menutrans &Top\.\.\. &Haut\.\.\. menutrans &Left\.\.\. &Gauche\.\.\. menutrans &Right\.\.\. &Droite\.\.\. menutrans &Bottom\.\.\. &Bas\.\.\. menutrans Header En-tte menutrans Height\.\.\. Hauteur\.\.\. menutrans Text\.\.\. Texte\.\.\. menutrans Syntax\ Highlighting\.\.\. Coloration\ syntaxique\.\.\. menutrans Line\ Numbering\.\.\. Numrotation\ des\ lignes\.\.\. menutrans Wrap\ at\ Margins\.\.\. Retour\ \ la\ ligne\ sur\ les\ marges\.\.\. menutrans Font\.\.\. Police de caractres\.\.\. menutrans &Encoding Encodage menutrans Obey\ Formfeeds\.\.\. Interprter\ les\ sauts\ de\ page\.\.\. menutrans Collate\.\.\. Assembler\.\.\. menutrans Duplex\.\.\. Recto-verso\.\.\. menutrans Job\ Split\ Copies\.\.\. Sparer\ les\ copies\ en\ tches\.\.\. menutrans Device\.\.\. Priphrique\.\.\. menutrans Printer\ Expression\.\.\. Expression\ de\ la\ commande\ d'impression\.\.\. menutrans E&xitCtrl+F4 &QuitterCtrl+F4 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Edit menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &UndoCtrl+Z &AnnulerCtrl+Z menutrans &RedoCtrl+Y &RefaireCtrl+Y menutrans Cu&tCtrl+X Co&uperCtrl+X menutrans &CopyCtrl+C &CopierCtrl+C menutrans &PasteCtrl+V C&ollerCtrl+V menutrans &Select\ AllCtrl+A &Tout slctionnerCtrl+A menutrans &Go\ To\.\.\.Ctrl+G A&ller\ \.\.\.Ctrl+G menutrans &Find\.\.\.Ctrl+F Rec&hercher\.\.\.Ctrl+F menutrans &Replace\.\.\.Ctrl+H Rem&placer\.\.\.Ctrl+H menutrans Multi-file\ Replace\.\.\. Remplacement\ multi-fichiers\.\.\. menutrans &Find/ Rec&hercher/ menutrans Find\ and\ Rep&lace:%s Rechercher\ et\ Rem&placer:%s menutrans Fi&nd\ Under\ Cursor Rechercher\ le\ mot\ &sous\ le\ curseur menutrans &Find\ Under\ CursorF3 Rechercher\ le\ mot\ &sous\ le\ curseurF3 menutrans &Find\ Under\ Cursor\ (&Reverse)Shift+F3 Rechercher\ le\ mot\ sous\ le\ curseur\ (en\ &arrire)Shift+F3 menutrans &Find\ Under\ Cursor\ (&Case-sensitive)Alt+F3 Rechercher\ le\ mot\ sous\ le\ curseur\ (respecter\ la\ &casse)Alt+F3 menutrans &Find\ Under\ Cursor\ (Cas&e-sensitive,\ Reverse)Alt+Shift+F3 Rechercher\ le\ mot\ sous\ le\ curseur\ (en\ arrire,\ &respecter\ la\ casse)Alt+Shift+F3 menutrans Count\ &Word\.\.\. Co&mpter\ les\ occurrences\ d'un\ mot\.\.\. menutrans Cou&nt\ Total\ Words\.\.\. Nom&bre\ total\ de\ mots\.\.\. menutrans Column\ SelectAlt+Shift+(motion) Slction\ en\ colonneAlt+Shift+(dplacement) menutrans Set\ Column\ Font\.\.\. Changer\ la\ police\ de\ la\ colonne\.\.\. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Insert menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans Character\ Line\.\.\.Shift+F4 Ligne\ de\ caractres\.\.\.Shift+F4 menutrans Character\ Line\ (length\ of\ line\ above)\.\.\.Shift+F4\ (x2) Ligne\ de\ caractres\ (longueur\ de\ la\ ligne\ prcdente)\.\.\.Shift+F4\ (x2) menutrans Date/Time Date\ et\ heure menutrans Character\ by\ Decimal\ ValueAlt+, Caractre\ (par\ code\ ASCII)Alt+, menutrans Character\ by\ Dialog\.\.\. Caractre\.\.\. menutrans DigraphCtrl+K Caractre\ compos\ (digraph)Ctrl+K menutrans Digraphs,\ List Lister\ les\ caractres\ composs menutrans ASCII\ Table Insrer\ une\ table\ ASCII menutrans ASCII\ Table,\ List Afficher\ une\ table\ ASCII menutrans Line\ Numbers\ (selection) Numros\ de\ ligne\ (slction) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Format menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Quick\ Wrap\ (selection\ or\ current\ paragraph)Ctrl+Q C&ouper\ les\ lignes\ (slction\ ou\ paragraphe\ courant)Ctrl+Q menutrans Quick\ &Un-Wrap\ (selection\ or\ current\ paragraph)Alt+Q,\ Q R&assembler\ les\ lignes\ (slction\ ou\ paragraphe\ courant)Alt+Q,\ Q menutrans Capitalize,\ Title\ CaseF5 Changer\ la\ casse,\ TitreF5 menutrans Capitalize,\ UPPERCASEShift+F5 Changer\ la\ casse,\ MAJUSCULEShift+F5 menutrans Capitalize,\ lowercaseAlt+F5 Changer\ la\ casse,\ minusculeAlt+F5 menutrans Capitalize,\ rEVERSECtrl+F5 Changer\ la\ casse,\ iNVERSECtrl+F5 menutrans Justify,\ Left Aligner\ \ gauche menutrans Justify,\ Center Centrer menutrans Justify,\ Right Aligner\ \ droite menutrans Justify,\ Full Justifier menutrans &Remove\ Trailing\ Whitespace &Supprimer\ les\ espaces\ en\ fin\ de\ ligne menutrans Remove\ &Leading\ Whitespace Supprimer\ les\ espaces\ en\ &dbut\ de\ ligne menutrans &Collapse\ All\ Empty\ Lines\ to\ One Fusionner\ les\ &lignes\ vides menutrans &Delete\ All\ Empty\ Lines Supprimer\ les\ lignes\ &vides menutrans &Join\ Lines\ (selection) &Fusionner\ des\ lignes\ (slction) menutrans Con&vert\ Tabs\ To\ Spaces &Convertir\ les\ tabulations\ en\ espaces menutrans &File\ Format\.\.\. &Format\ du\ fichier\.\.\. menutrans File\ &Encoding &Encodage\ du\ fichier """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Settings menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Show/Hide\ InvisiblesF4 &Afficher/Cacher\ les\ caractres\ invisiblesF4 menutrans Line\ &Numbers\ (toggle) &Numros\ de\ ligne\ (on/off) menutrans &Word\ Wrap\ (toggle)Ctrl+W &Coupure\ des\ lignes\ (on/off)Ctrl+W menutrans A&uto\ Wrap\ (toggle)Ctrl+E &Retours\ chariot\ automatiques\ (on/off)Ctrl+E menutrans &Set\ Wrap\ Width\.\.\. &Dfinir\ la\ longueur\ des\ lignes\.\.\. menutrans &Highlight\ Wrap\ Width\ (toggle) &Surligner\ les\ dpassements\ de\ ligne\ (on/off) menutrans &Tabstop\ Width Largeur\ des\ &tabulations\.\.\. menutrans Tab\ &Expansion\ (toggle)Ctrl+T &Expansion\ des\ tabulations\ (on/off)Ctrl+T menutrans &Auto-indent\ (toggle) Indentation\ automatique\ (on/off) menutrans Syntax\ Highlighting\ (toggle) Coloration\ syntaxique\ (on/off) menutrans Highlight\ Find\ (toggle) Surligner\ les\ recherches\ (on/off) menutrans Highlight\ Current\ Line\ (toggle) Surligner\ la\ ligne\ courante\ (on/off) menutrans &Filetype Type\ de\ &fichier menutrans &Color\ Themes Thme\ de\ &couleurs menutrans Selection Slction menutrans gVim\ themes\ (non-Cream): Thmes\ de\ GVim\ (hors\ Cream)\ : menutrans P&references P&rfrences menutrans Font\.\.\. Police\.\.\. menutrans Toolbar\ (toggle) Barre\ d'outils\ (on/off) menutrans Last\ File\ Restore\ Off Restaurer\ le\ dernier\ fichier\ (off) menutrans Last\ File\ Restore\ On Restaurer\ le\ dernier\ fichier\ (on) menutrans &Single-Session\ Mode\ Off Mode\ &session\ unique\ (off) menutrans &Single-Session\ Mode\ On Mode\ &session\ unique\ (on) menutrans &Middle-Mouse\ Disabled Clic\ milieu\ dsactiv menutrans &Middle-Mouse\ Pastes Clic\ milieu\ pour\ coller menutrans Bracket\ Flashing\ Off Flash\ pour\ les\ parenthses\ (off) menutrans Bracket\ Flashing\ On Flash\ pour\ les\ parenthses\ (on) menutrans Info\ Pop\ Options\.\.\. Options\ des\ popups\ d'information\.\.\. menutrans &Behavior &Comportement menutrans &Expert\ Mode\.\.\. Mode\ &Expert\.\.\. menutrans &Cream\ (default) Mode\ &Cream\ (dfaut) menutrans &Cream\ Lite\.\.\. Mode\ Cream\ &Allg\.\.\. menutrans &Vim\.\.\. Mode\ &Vim\.\.\. menutrans &Vi\.\.\. Mode\ V&i\.\.\. menutrans &GUI\ Language Lan&gue\ de\ l'interface menutrans English(no\ i18n) Anglais(pas\ d'i18n) menutrans Automatic(from\ locales) Automatique(depuis\ les\ locales) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Tools menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Spell\ Check &Correction\ orthographique menutrans Next\ Spelling\ ErrorF7 Faute\ suivanteF7 menutrans Previous\ Spelling\ ErrorShift+F7 Faute\ prcdenteShift+F7 menutrans Show\ Spelling\ Errors\ (toggle)Alt+F7 Montrer\ les\ fautes\ (on/off)Alt+F7 menutrans Add\ Word\ (under\ cursor)\ to\ DictionaryCtrl+F7 Ajouter\ le\ mot\ sous\ le\ curseur\ au\ dictionnaireCtrl+F7 menutrans Language\.\.\. Langue\.\.\. menutrans Options\.\.\. Options\.\.\. menutrans &Bookmarks &Signets menutrans Bookmark\ NextF2 Signet\ suivantF2 menutrans Bookmark\ PreviousShift+F2 Signet\ prcdentShift+F2 menutrans Bookmark\ Set\ (toggle)Alt+F2 Mettre\ un\ signet\ (on/off)Alt+F2 menutrans Show\ Bookmarks\ (toggle)Ctrl+F2 Afficher\ les\ signets\ (on/off)Ctrl+F2 menutrans Delete\ All\ BookmarksAlt+Shift+F2 Supprimer\ tous\ les\ signetsAlt+Shift+F2 menutrans Block\ Comment\ (selection)F6 Commenter\ un\ blocF6 menutrans Block\ Un-Comment\ (selection)Shift+F6 Dcommenter\ un\ blocShift+F6 menutrans Macro\ PlayF8 Jouer\ une\ macroF8 menutrans Macro\ Record\ (toggle)Shift+F8 Enregistrer\ une\ macro\ (on/off)Shift+F8 menutrans &Diff\ Mode Mode\ &diff menutrans &Folding &Pliage menutrans &Fold\ Open/CloseF9 Dpl&ier/replierF9 menutrans &Set\ Fold\ (Selection)F9 &Marquer\ pour\ pliage\ (slction)F9 menutrans &Fold\ Open/CloseShift+F9 Dpl&ier/replierShift+F9 menutrans &Open\ All\ FoldsCtrl+F9 Tout\ &dplierCtrl+F9 menutrans &Close\ All\ FoldsCtrl+Shift+F9 Tout\ &replierCtrl+Shift+F9 menutrans &Delete\ Fold\ at\ CursorAlt+F9 &Supprimer\ la\ marque\ de\ pliage\ sous\ le\ curseurAlt+F9 menutrans D&elete\ All\ FoldsAlt+Shift+F9 S&upprimer\ toutes\ les\ marques\ de\ pliageAlt+Shift+F9 menutrans &Completion &Compltion menutrans &Word\ CompletionCtrl+Space Compltion\ d'un\ &motCtrl+Space menutrans W&ord\ Completion\ (reverse)Ctrl+Shift+Space Compltion\ d'un\ m&ot\ (\ l'envers)Ctrl+Shift+Space menutrans &Template\ CompletionShift+Space\ (x2) Compltion\ par\ &patronShift+Space\ (x2) menutrans Template\ Listing\.\.\. Lister\ les\ patrons\ de\ compltion\.\.\. menutrans &Lists\ (HTML\ tags/CSS\ properties) &Listes\ (tags\ HTML\ /\ proprits\ CSS) menutrans Info\ PopAlt+( Popup\ d'informationAlt+( "Ahem... fix syntax highlighting: )) menutrans Info\ Pop\ Options\.\.\. Options\ des\ popup\ d'information\.\.\. menutrans &Tag\ Navigation Navigation\ par\ &tag menutrans &Jump\ to\ Tag\ (under\ cursor)Alt+Down Sau&ter\ \ un\ tag\ (sous\ le\ curseur)Alt+Down menutrans &Close\ and\ Jump\ BackAlt+Up &Fermer\ et\ revenir\ en\ arrireAlt+Up menutrans &Previous\ TagAlt+Left Tag\ &prcdentAlt+Left menutrans &Next\ TagAlt+Right Tag\ &suivantAlt+Right menutrans &Tag\ Listing\.\.\.Ctrl+Alt+Down &Lister\ les\ tags\.\.\.Ctrl+Alt+Down menutrans Add-ons\ E&xplore\ (Map/Unmap) &Greffons\ (assigner\ des\ raccourcis) menutrans &Add-ons &Greffons " FIXME: add-ons names should also be translated... """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Windows menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans Maximize\ (&Single) M&aximiser menutrans Minimize\ (Hi&de) M&inimiser menutrans Tile\ &Vertical Tout\ montrer\ (hori&zontalement) menutrans Tile\ Hori&zontal Tout\ montrer\ (&verticalement) menutrans Sizes\ E&qual Ega&liser\ les\ tailles menutrans Height\ Max\ &= Hauteur\ maxi\ &= menutrans Height\ Min\ &- Hauteur\ mini\ &- menutrans &Width\ Max Largeur\ ma&xi menutrans Widt&h\ Min Largeur\ mi&ni menutrans Move\ To\ &Top Mettre\ en\ &haut menutrans Move\ To\ &Bottom Mettre\ en\ &bas menutrans Move\ To\ &Left\ side Mettre\ \ &gauche menutrans Move\ To\ &Right\ side Mettre\ \ &droite menutrans Rotate\ &Up &Rotation\ (vers\ le\ haut) menutrans Rotate\ &Down R&otation\ (vers\ le\ bas) menutrans Split\ New\ Pane\ Vertical Nouvelle\ sous-fentre\ verticale menutrans Split\ New\ Pane\ Horizontal Nouveau\ sous-fentre\ horizontale menutrans Split\ Existing\ Vertically Diviser\ horizontalement menutrans Split\ Existing\ Horizontally Diviser\ verticalement menutrans Start\ New\ Vim\ Ins&tance Dmarrer\ une\ nouvelle\ instance menutrans File\ Tr&ee\ Arbre\ des\ &fichiers menutrans File\ E&xplorer\ (obsolete) &Explorateur\ de\ fichiers\ (obsolte) menutrans &Calendar\ (toggle)Ctrl+F11 &Calendrier\ (on/off)Ctrl+F11 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Help menu """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Vim\ Help Aide\ de\ &Vim menutrans &OverviewF1 &SommaireF1 menutrans &User\ Manual &Manuel\ utilisateur menutrans &List\ Help\ Topics\.\.\.Alt+F1 &Lister\ les\ thmes\.\.\.Alt+F1 menutrans &Go\ to\ Help\ Topic\.\.\.Ctrl+F1 &Consulter\ un\ thme\.\.\.Ctrl+F1 menutrans &How-to\ links Liens\ vers\ les\ &How-To menutrans &GUI &Interface graphique menutrans &Credits &Crdits menutrans Co&pying &Licence menutrans &Version\.\.\. &Version\.\.\. menutrans &About\.\.\. A\ &propos\.\.\. menutrans &About\ Cream\.\.\. A\ &propos\ de\ Cream\.\.\. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Toolbar tips """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " call Cream_i18n_trans("ToolBar_new", "Nouveau fichier") menutrans ToolBar_new Nouveau fichier menutrans ToolBar_open Ouvrir menutrans ToolBar_save Enregistrer menutrans ToolBar_save_as Enregistrer sous menutrans ToolBar_save_all Tout enregistrer menutrans ToolBar_broken_image Fermer menutrans ToolBar_exit Quitter Vim menutrans ToolBar_print Imprimer menutrans ToolBar_undo Annuler menutrans ToolBar_redo Refaire menutrans ToolBar_cut_alt Couper (vers le presse-papier) menutrans ToolBar_copy_alt Copier (vers le presse-papier) menutrans ToolBar_paste Coller (depuis le presse-papier) menutrans ToolBar_text_align_left Aligner gauche menutrans ToolBar_text_align_center Centrer menutrans ToolBar_text_align_right Aligner droite menutrans ToolBar_text_align_justify Justifier menutrans ToolBar_search Chercher menutrans ToolBar_search_and_replace Chercher et remplacer menutrans ToolBar_spellcheck Vrification orthographique menutrans ToolBar_book Thme de l'aide menutrans ToolBar_help Aide """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Popups """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" menutrans &Undo &Annuler menutrans Cu&t Co&uper menutrans &Copy Cop&ier menutrans &Paste C&oller menutrans &Delete &Effacer menutrans Select\ &All Slectionner\ &tout " vim:fileencoding=latin1:encoding=latin1 cream-0.43/lang/menu_zh.cp936.vim0000644000076400007660000000014211156572442017062 0ustar digitectlocaluser" Menu Translations: Simplified Chinese (for Windows) source :p:h/menu_chinese_gb.936.vim cream-0.43/lang/menu_zh_cn.gbk.vim0000644000076400007660000000012211156572442017437 0ustar digitectlocaluser" Menu Translations: Simplified Chinese source :p:h/menu_zh_cn.gb2312.vim cream-0.43/lang/menu_zh_cn.gb2312.vim0000644000076400007660000002634711156572442017615 0ustar digitectlocaluser" Menu Translations: Simplified Chinese (UNIX) " Translated By: Ralgh Young " Last Change: Thir Dec 2 11:26:52 CST 2004 " translations for vimcream (http://cream.sourceforge.net) " Quit when menu translations have already been done. if exists("did_menu_trans") finish endif let did_menu_trans = 1 scriptencoding gb2312 " File menu menutrans &File ļ(&F) menutrans &NewCtrl+N ½(&N)Ctrl+N menutrans &Open\.\.\. (&O)\.\.\. menutrans &Open\ (selection)Ctrl+Enter 򿪹ļCtrl+Enter menutrans &Close ر(&C) menutrans C&lose\ All ȫر(&l) menutrans &SaveCtrl+S (&S)Ctrl+S menutrans Save\ &As\.\.\. Ϊ(&A)\.\.\. menutrans Sa&ve\ All\.\.\. ȫ(&v)\.\.\. menutrans &Print\.\.\. ӡ(&P)\.\.\. menutrans Prin&t\ Setup ӡ menutrans E&xitCtrl+F4 ˳(&X)Ctrl+F4 menutrans &Recent\ Files,\ Options 򿪵ļ,\ menutrans Set\ Menu\ Size ʷ¼ menutrans Remove\ Invalid ɾЧ menutrans Clear\ List б " Print Setup menutrans Paper\ Size ֽŴС menutrans Paper\ Orientation ҳ淽 menutrans Margins ߿ menutrans Header menutrans Syntax\ Highlighting\.\.\. ﷨ menutrans Line\ Numbering\.\.\. к\.\.\. menutrans Wrap\ at\ Margins\.\.\. Զ\.\.\. menutrans &Encoding (&E) " Edit menu menutrans &Edit ༭(&E) menutrans &UndoCtrl+Z ָ(&U)Ctrl+Z menutrans &RedoCtrl+Y (&R)Ctrl+Y menutrans Cu&tCtrl+X (&T)Ctrl+X menutrans &CopyCtrl+C (&C)Ctrl+C menutrans &PasteCtrl+V ճ(&P)Ctrl+V menutrans &Select\ AllCtrl+A ȫѡ(&S)Ctrl+A menutrans &Go\ To\.\.\.Ctrl+G ָ(&G)\.\.\.Ctrl+G menutrans &Find\.\.\.Ctrl+F (&F)\.\.\.Ctrl+F menutrans &Replace\.\.\.Ctrl+H 滻(&R)\.\.\.Ctrl+H menutrans &Find/ (&F)/ menutrans Find\ and\ Rep&lace:%s Ҳ滻(&l):%s menutrans Multi-file\ Replace\.\.\. ļ/滻\.\.\. menutrans Fi&nd\ Under\ Cursor ҹ±ʶ menutrans &Find\ Under\ CursorF3 F3 menutrans &Find\ Under\ Cursor\ (&Reverse)Shift+F3 Shift+F3 menutrans &Find\ Under\ Cursor\ (&Case-sensitive)Alt+F3 СдAlt+F3 menutrans &Find\ Under\ Cursor\ (Cas&e-sensitive,\ Reverse)Alt+Shift+F3 Сд,Alt+Shift+F3 menutrans Count\ &Word\.\.\. ͳ(&W)\.\.\. menutrans Cou&nt\ Total\ Words\.\.\. ͳȫ(&n)\.\.\. menutrans Column\ SelectAlt+Shift+(motion) ѡAlt+Shift+() " Insert menu menutrans &Insert (&I) menutrans Character\ Line\.\.\.Shift+F4 ַ\.\.\.Shift+F4 menutrans Character\ Line\ (length\ of\ line\ above)\.\.\.Shift+F4\ (x2) ַ,ǰһͬ\.\.\.Shift+F4\ (x2) menutrans Date/Time /ʱ "menutrans Character\ by\ Decimal\ ValueAlt+, ַAlt+, "menutrans I&nsert.Character\ by\ Dialog\.\.\. ѡַ\.\.\. "menutrans DigraphCtrl+K "menutrans Digraphs,\ List "menutrans ASCII\ Table "menutrans ASCII\ Table,\ List menutrans Line\ Numbers\ (selection) к(ѡв) " Format menu menutrans Fo&rmat ʽ(&r) menutrans &Quick\ Wrap\ (selection\ or\ current\ paragraph)Ctrl+Q Ctrl+Q menutrans Quick\ &Un-Wrap\ (selection\ or\ current\ paragraph)Alt+Q,\ Q ɾ(ǰ)Alt+Q,\ Q menutrans Capitalize,\ Title\ CaseF5 ĸд(&T)F5 menutrans Capitalize,\ UPPERCASEShift+F5 ȫд(&U)Shift+F5 menutrans Capitalize,\ lowercaseAlt+F5 ȫСд(&l)Alt+F5 menutrans Capitalize,\ rEVERSECtrl+F5 Сдת(&I)Ctrl+F5 menutrans Justify,\ Left (&L) menutrans Justify,\ Center м(&C) menutrans Justify,\ Right Ҷ(&R) menutrans Justify,\ Full Ҿ(&F) menutrans &Remove\ Trailing\ Whitespace ɾβո(&R) menutrans Remove\ &Leading\ Whitespace ɾ׿ո(&L) menutrans &Collapse\ All\ Empty\ Lines\ to\ One ɾ(&C) menutrans &Delete\ All\ Empty\ Lines ɾп(&D) menutrans &Join\ Lines\ (selection) ϲѡ(&J) menutrans Con&vert\ Tabs\ To\ Spaces TabתΪո menutrans &File\ Format\.\.\. ļʽ(&F)\.\.\. menutrans File\ &Encoding ļ(&E) menutrans Western\ European ŷ menutrans Eastern\ European ŷ menutrans East\ Asian menutrans Middle\ Eastern ж menutrans SE\ and\ SW\ Asian / menutrans Simplified\ Chinese\ (ISO-2022-CN)[chinese\ --\ simplified\ Chinese:\ on\ Unix\ "euc-cn",\ on\ MS-Windows\ cp936] (ISO-2022-CN)[Unix:\ "euc-cn",\ Windows:\ cp936] menutrans Chinese\ Traditional\ (Big5)[big5\ --\ traditional\ Chinese] ()[Big5] menutrans Chinese\ Traditional\ (EUC-TW)[taiwan\ --\ on\ Unix\ "euc-tw",\ on\ MS-Windows\ cp950] (EUC-TW)[Unix:\ "euc-tw",\ Windows:\ cp950] " Settings menu menutrans &Settings (&S) menutrans &Show/Hide\ InvisiblesF4 ʾ/زɼַ(&S)F4 menutrans Line\ &Numbers\ (toggle) ʾ/к(&N) menutrans &Word\ Wrap\ (toggle)Ctrl+W ʾCtrl+W menutrans A&uto\ Wrap\ (toggle)Ctrl+E ԶCtrl+E menutrans &Set\ Wrap\ Width\.\.\. Զλ(&S)\.\.\. menutrans &Highlight\ Wrap\ Width\ (toggle) ʾԶλ(&H) menutrans &Tabstop\ Width\.\.\. &Tab\.\.\. menutrans Tab\ &Expansion\ (toggle)Ctrl+T TabԶչΪո(&E)Ctrl+T menutrans &Auto-indent\ (toggle) Զ(&A) menutrans Syntax\ Highlighting\ (toggle) ﷨ʾ menutrans Highlight\ Find\ (toggle) ʾҽ menutrans Highlight\ Current\ Line\ (toggle) ʾǰ menutrans &Filetype menutrans &Color\ Themes ɫ(&C) menutrans Selection ѡ menutrans P&references ƫ(&r) menutrans Font\.\.\. \.\.\. menutrans Toolbar\ (toggle) ʾ/ع "menutrans Last\ File\ Restore\ Off "menutrans Last\ File\ Restore\ On menutrans &Middle-Mouse\ Disabled м:\ ѽ menutrans &Middle-Mouse\ Pastes м:\ ճ menutrans Bracket\ Flashing\ Off ƥ˸:\ ر menutrans Bracket\ Flashing\ On ƥ˸:\ menutrans Info\ Pop\ Options\.\.\. Զʾ\.\.\. menutrans &Expert\ Mode\.\.\. רģʽ(&E)\.\.\. menutrans &Behavior Ϊģʽ(&B) " Tools menu menutrans &Tools (&T) menutrans &Spell\ Check ƴд menutrans Next\ Spelling\ ErrorF7 һF7 menutrans Previous\ Spelling\ ErrorShift+F7 һShift+F7 menutrans Show\ Spelling\ Errors\ (toggle)Alt+F7 ʾȫƴдAlt+F7 menutrans Add\ Word\ (under\ cursor)\ to\ DictionaryCtrl+F7 ǰʼʵCtrl+F7 menutrans Language\.\.\. \.\.\. menutrans Options\.\.\. ѡ\.\.\. menutrans &Bookmarks ǩ(&B) menutrans Bookmark\ NextF2 һǩF2 menutrans Bookmark\ PreviousShift+F2 һǩShift+F2 menutrans Bookmark\ Set\ (toggle)Alt+F2 ǩAlt+F2 menutrans Delete\ All\ BookmarksAlt+Shift+F2 ɾǩAlt+Shift+F2 menutrans Block\ Comment\ (selection)F6 עF6 menutrans Block\ Un-Comment\ (selection)Shift+F6 ɾעShift+F6 menutrans Macro\ PlayF8 طźF8 menutrans Macro\ Record\ (toggle)Shift+F8 ʼ/ֹͣ¼ƺShift+F8 menutrans &Diff\ Mode ļȽģʽ(&D) menutrans &Folding ۵(&F) menutrans &Fold\ Open/CloseF9 ۵/F9 menutrans &Fold\ Open/CloseShift+F9 ۵/Shift+F9 "menutrans &Set\ Fold\ (Selection)F9 menutrans &Open\ All\ FoldsCtrl+F9 ۵Ctrl+F9 menutrans &Close\ All\ FoldsCtrl+Shift+F9 ر۵Ctrl+Shift+F9 menutrans &Delete\ Fold\ at\ CursorAlt+F9 ɾ괦۵Alt+F9 menutrans D&elete\ All\ FoldsAlt+Shift+F9 ɾ۵Alt+Shift+F9 menutrans &Completion Զ(&C) menutrans &Tag\ Navigation &Tag menutrans &Jump\ to\ Tag\ (under\ cursor)Alt+Down ת˱Alt+Down menutrans &Close\ and\ Jump\ BackAlt+Up رղصǰһλAlt+Up menutrans &Previous\ TagAlt+Left ǰһAlt+Left menutrans &Next\ TagAlt+Right һAlt+Right menutrans &Tag\ Listing\.\.\.Ctrl+Alt+Down гб\.\.\.Ctrl+Alt+Down menutrans Add-ons\ E&xplore\ (Map/Unmap) /ݼӳ(&x) " Add-ons menutrans Color\ Invert תHTMLɫֵ menutrans Convert ת menutrans Sort menutrans Encrypt menutrans Highlight\ Control\ Characters ʾַ menutrans Highlight\ Multibyte ʾַֽ menutrans Stamp\ Time ʱ " Window menu menutrans &Window (&W) menutrans Maximize\ (&Single) (&S) menutrans Minimize\ (Hi&de) С/(&d) menutrans Tile\ &Vertical ֱƽ menutrans Tile\ Hori&zontal ˮƽƽ menutrans Sizes\ E&qual ͬС(&q) menutrans Height\ Max\ &= ߶(&=) menutrans Height\ Min\ &- С߶(&-) menutrans &Width\ Max (&W) menutrans Widt&h\ Min С(&h) menutrans Split\ New\ Pane\ Vertical ָ´ menutrans Split\ New\ Pane\ Horizontal ָ´ menutrans Split\ Existing\ Vertically ָǰ menutrans Split\ Existing\ Horizontally ָǰ menutrans Start\ New\ Vim\ Ins&tance ʵ(&t) menutrans File\ Tr&ee Ŀ¼(&e) menutrans File\ E&xplorer\ (obsolete) ļ(&x) menutrans &Calendar\ (toggle)Ctrl+F11 ʾ/Ctrl+F11 " Help menu menutrans &Help (&H) menutrans &Vim\ Help VIM menutrans &OverviewF1 (&O)F1 menutrans &User\ Manual ûֲ(&U) menutrans &GUI ͼν(&G) menutrans &How-to\ links HOWTOĵ\.\.\.(&H) menutrans &Credits (&C) menutrans Co&pying Ȩ(&P) menutrans &Version\.\.\. 汾(&V)\.\.\. menutrans &About\.\.\. \ Vim(&A) menutrans &About\ Cream\.\.\. \ Cream\.\.\. " Popup menu menutrans Select\ &All ȫѡ(&A) menutrans Cu&t (&t) menutrans &Copy (&C) menutrans &Paste ճ(&P) menutrans &Delete ɾ(&D) " Toolbar #FIXME: not work? menutrans New\ File ½ļ menutrans Open menutrans Save menutrans Save\ As Ϊ menutrans Close ر menutrans Exit\ Vim ˳Vim menutrans Print ӡ menutrans Undo ָ menutrans Redo menutrans Cut\ (to\ Clipboard) е menutrans Copy\ (to\ Clipboard) menutrans Paste\ (from\ Clipboard) Ӽճ " The GUI toolbar if has("toolbar") if exists("*Do_toolbar_tmenu") delfun Do_toolbar_tmenu endif fun Do_toolbar_tmenu() tmenu ToolBar.new ½ļ tmenu ToolBar.Open ļ tmenu ToolBar.Save 浱ǰļ tmenu ToolBar.SaveAll ȫļ tmenu ToolBar.Print ӡ tmenu ToolBar.Undo ϴ޸ tmenu ToolBar.Redo ϴγĶ tmenu ToolBar.Cut tmenu ToolBar.Copy Ƶ tmenu ToolBar.Paste ɼճ tmenu ToolBar.Find ... tmenu ToolBar.FindNext һ tmenu ToolBar.FindPrev һ tmenu ToolBar.Replace 滻... tmenu ToolBar.LoadSesn ػỰ tmenu ToolBar.SaveSesn 浱ǰĻỰ tmenu ToolBar.RunScript Vimű tmenu ToolBar.Make ִ Make tmenu ToolBar.Shell һ tmenu ToolBar.RunCtags ִ ctags tmenu ToolBar.TagJump ǰλõıǩ tmenu ToolBar.Help Vim tmenu ToolBar.FindHelp Vim endfun endif cream-0.43/lang/menu_chinese_gb.936.vim0000644000076400007660000003215311156572442020213 0ustar digitectlocaluser" Menu Translations: Simplified Chinese (Windows) " Translated By: Ralgh Young " Last Change: Thir Dec 2 11:26:52 CST 2004 " translations for vimcream (http://cream.sourceforge.net) " Quit when menu translations have already been done. if exists("did_menu_trans") finish endif let did_menu_trans = 1 scriptencoding cp936 " File menu menutrans &File Îļþ(&F) menutrans &NewCtrl+N н¨(&N)Ctrl+N menutrans &Open\.\.\. ´ò¿ª(&O)\.\.\. menutrans &Open\ (selection)Ctrl+Enter ´ò¿ª¹â±êÏÂÎļþCtrl+Enter menutrans &Close ¹Ø±Õ(&C) menutrans C&lose\ All È«²¿¹Ø±Õ(&l) menutrans &SaveCtrl+S ±£´æ(&S)Ctrl+S menutrans Save\ &As\.\.\. Áí´æÎª(&A)\.\.\. menutrans Sa&ve\ All\.\.\. È«²¿±£´æ(&v)\.\.\. menutrans &Print\.\.\. ´òÓ¡(&P)\.\.\. menutrans Prin&t\ Setup ´òÓ¡ÉèÖà menutrans E&xitCtrl+F4 Í˳ö(&X)Ctrl+F4 menutrans &Recent\ Files,\ Options ×î½ü´ò¿ªµÄÎļþ,\ ÉèÖà menutrans Set\ Menu\ Size ÉèÖÃÀúÊ·¼Ç¼Êý menutrans Remove\ Invalid ɾ³ýÎÞЧÏî menutrans Clear\ List Çå³ýÁбí " Print Setup menutrans Paper\ Size Ö½ÕÅ´óС menutrans Paper\ Orientation Ò³Ãæ·½Ïò menutrans Margins ±ß¿Õ menutrans Header ±êÌâ menutrans Syntax\ Highlighting\.\.\. Óï·¨¸ßÁÁ menutrans Line\ Numbering\.\.\. ÐкÅ\.\.\. menutrans Wrap\ at\ Margins\.\.\. ×Ô¶¯»»ÐÐ\.\.\. menutrans &Encoding ±àÂë(&E) " Edit menu menutrans &Edit ±à¼­(&E) menutrans &UndoCtrl+Z »Ö¸´(&U)Ctrl+Z menutrans &RedoCtrl+Y ÖØ×ö(&R)Ctrl+Y menutrans Cu&tCtrl+X ¼ôÇÐ(&T)Ctrl+X menutrans &CopyCtrl+C ¸´ÖÆ(&C)Ctrl+C menutrans &PasteCtrl+V Õ³Ìû(&P)Ctrl+V menutrans &Select\ AllCtrl+A ȫѡ(&S)Ctrl+A menutrans &Go\ To\.\.\.Ctrl+G Ìøµ½Ö¸¶¨ÐÐ(&G)\.\.\.Ctrl+G menutrans &Find\.\.\.Ctrl+F ²éÕÒ(&F)\.\.\.Ctrl+F menutrans &Replace\.\.\.Ctrl+H Ìæ»»(&R)\.\.\.Ctrl+H menutrans &Find/ ²éÕÒ(&F)/ menutrans Find\ and\ Rep&lace:%s ²éÕÒ²¢Ìæ»»(&l):%s menutrans Multi-file\ Replace\.\.\. ¶àÎļþ²éÕÒ/Ìæ»»\.\.\. menutrans Fi&nd\ Under\ Cursor ²éÕÒ¹â±êϱêʶ·û menutrans &Find\ Under\ CursorF3 ²éÕÒF3 menutrans &Find\ Under\ Cursor\ (&Reverse)Shift+F3 ·´Ïò²éÕÒShift+F3 menutrans &Find\ Under\ Cursor\ (&Case-sensitive)Alt+F3 ´óСдÃô¸ÐAlt+F3 menutrans &Find\ Under\ Cursor\ (Cas&e-sensitive,\ Reverse)Alt+Shift+F3 ´óСдÃô¸Ð,·´Ïò²éÕÒAlt+Shift+F3 menutrans Count\ &Word\.\.\. ͳ¼Æ×ÖÊý(&W)\.\.\. menutrans Cou&nt\ Total\ Words\.\.\. ͳ¼ÆÈ«²¿×ÖÊý(&n)\.\.\. menutrans Column\ SelectAlt+Shift+(motion) ÁÐÑ¡ÔñAlt+Shift+(¹â±ê) " Insert menu menutrans &Insert ²åÈë(&I) menutrans Character\ Line\.\.\.Shift+F4 ÕûÐÐÓÃ×Ö·ûÌî³ä\.\.\.Shift+F4 menutrans Character\ Line\ (length\ of\ line\ above)\.\.\.Shift+F4\ (x2) ÕûÐÐÓÃ×Ö·ûÌî³ä,ÓëǰһÐÐͬ¿í\.\.\.Shift+F4\ (x2) menutrans Date/Time ÈÕÆÚ/ʱ¼ä "menutrans Character\ by\ Decimal\ ValueAlt+, ÌØÊâ×Ö·ûAlt+, "menutrans I&nsert.Character\ by\ Dialog\.\.\. Ñ¡ÔñÌØÊâ×Ö·û\.\.\. "menutrans DigraphCtrl+K "menutrans Digraphs,\ List "menutrans ASCII\ Table "menutrans ASCII\ Table,\ List menutrans Line\ Numbers\ (selection) ÐкÅ(Ñ¡Öв¿·Ö) " Format menu menutrans Fo&rmat ¸ñʽ(&r) menutrans &Quick\ Wrap\ (selection\ or\ current\ paragraph)Ctrl+Q ¶ÎÂäÖØÅÅCtrl+Q menutrans Quick\ &Un-Wrap\ (selection\ or\ current\ paragraph)Alt+Q,\ Q ɾ³ý»»ÐÐ(µ±Ç°¶Î)Alt+Q,\ Q menutrans Capitalize,\ Title\ CaseF5 Ê××Öĸ´óд(&T)F5 menutrans Capitalize,\ UPPERCASEShift+F5 È«²¿´óд(&U)Shift+F5 menutrans Capitalize,\ lowercaseAlt+F5 È«²¿Ð¡Ð´(&l)Alt+F5 menutrans Capitalize,\ rEVERSECtrl+F5 ´óСд·´×ª(&I)Ctrl+F5 menutrans Justify,\ Left ×ó¶ÔÆë(&L) menutrans Justify,\ Center Öмä¶ÔÆë(&C) menutrans Justify,\ Right ÓÒ¶ÔÆë(&R) menutrans Justify,\ Full ×óÓÒ¾ù¶ÔÆë(&F) menutrans &Remove\ Trailing\ Whitespace ɾ³ýÐÐβ¿Õ¸ñ(&R) menutrans Remove\ &Leading\ Whitespace ɾ³ýÐÐÊ׿ոñ(&L) menutrans &Collapse\ All\ Empty\ Lines\ to\ One ɾ³ý¶àÓà¿ÕÐÐ(&C) menutrans &Delete\ All\ Empty\ Lines ɾ³ýËùÓпÕÐÐ(&D) menutrans &Join\ Lines\ (selection) ºÏ²¢Ñ¡ÖÐÐÐ(&J) menutrans Con&vert\ Tabs\ To\ Spaces ½«Tabת»¯Îª¿Õ¸ñ menutrans &File\ Format\.\.\. Îļþ¸ñʽ(&F)\.\.\. menutrans File\ &Encoding Îļþ±àÂë(&E) menutrans Western\ European Î÷Å· menutrans Eastern\ European ¶«Å· menutrans East\ Asian ¶«ÑÇ menutrans Middle\ Eastern Öж« menutrans SE\ and\ SW\ Asian ¶«ÄÏÑÇ/Î÷ÑÇ menutrans Simplified\ Chinese\ (ISO-2022-CN)[chinese\ --\ simplified\ Chinese:\ on\ Unix\ "euc-cn",\ on\ MS-Windows\ cp936] ¼òÌåÖÐÎÄ(ISO-2022-CN)[Unix:\ "euc-cn",\ Windows:\ cp936] menutrans Chinese\ Traditional\ (Big5)[big5\ --\ traditional\ Chinese] ·±ÌåÖÐÎÄ(´óÎåÂë)[Big5] menutrans Chinese\ Traditional\ (EUC-TW)[taiwan\ --\ on\ Unix\ "euc-tw",\ on\ MS-Windows\ cp950] ·±ÌåÖÐÎÄ(EUC-TW)[Unix:\ "euc-tw",\ Windows:\ cp950] " Settings menu menutrans &Settings ÉèÖÃ(&S) menutrans &Show/Hide\ InvisiblesF4 ÏÔʾ/Òþ²Ø²»¿É¼û×Ö·û(&S)F4 menutrans Line\ &Numbers\ (toggle) ÏÔʾ/Òþ²ØÐкÅ(&N) menutrans &Word\ Wrap\ (toggle)Ctrl+W ÕÛÐÐÏÔʾCtrl+W menutrans A&uto\ Wrap\ (toggle)Ctrl+E ×Ô¶¯»»ÐÐCtrl+E menutrans &Set\ Wrap\ Width\.\.\. ÉèÖÃ×Ô¶¯»»ÐÐλÖÃ(&S)\.\.\. menutrans &Highlight\ Wrap\ Width\ (toggle) ¸ßÁÁÏÔʾ×Ô¶¯»»ÐÐλÖÃ(&H) menutrans &Tabstop\ Width\.\.\. &Tab¿í¶È\.\.\. menutrans Tab\ &Expansion\ (toggle)Ctrl+T Tab×Ô¶¯À©Õ¹Îª¿Õ¸ñ(&E)Ctrl+T menutrans &Auto-indent\ (toggle) ×Ô¶¯Ëõ½ø(&A) menutrans Syntax\ Highlighting\ (toggle) Óï·¨¸ßÁÁÏÔʾ menutrans Highlight\ Find\ (toggle) ¸ßÁÁÏÔʾ²éÕÒ½á¹û menutrans Highlight\ Current\ Line\ (toggle) ¸ßÁÁÏÔʾµ±Ç°ÐÐ menutrans &Filetype ÓïÑÔÀàÐÍ menutrans &Color\ Themes É«²ÊÖ÷Ìâ(&C) menutrans Selection Ñ¡ÖÐÎÄ×Ö menutrans P&references Æ«ºÃ(&r) menutrans Font\.\.\. ×ÖÌå\.\.\. menutrans Toolbar\ (toggle) ÏÔʾ/Òþ²Ø¹¤¾ßÌõ "menutrans Last\ File\ Restore\ Off "menutrans Last\ File\ Restore\ On menutrans &Middle-Mouse\ Disabled Êó±êÖмü:\ ÒѽûÓà menutrans &Middle-Mouse\ Pastes Êó±êÖмü:\ Õ³Ìù menutrans Bracket\ Flashing\ Off À¨ºÅÆ¥ÅäÉÁ˸:\ ¹Ø±Õ menutrans Bracket\ Flashing\ On À¨ºÅÆ¥ÅäÉÁ˸:\ ´ò¿ª menutrans Info\ Pop\ Options\.\.\. ×Ô¶¯Íê³ÉÌáʾÉèÖÃ\.\.\. menutrans &Expert\ Mode\.\.\. ר¼Òģʽ(&E)\.\.\. menutrans &Behavior ÐÐΪģʽ(&B) " Tools menu menutrans &Tools ¹¤¾ß(&T) menutrans &Spell\ Check ƴд¼ì²é menutrans Next\ Spelling\ ErrorF7 ÏÂÒ»¸ö´íÎóF7 menutrans Previous\ Spelling\ ErrorShift+F7 ÉÏÒ»¸ö´íÎóShift+F7 menutrans Show\ Spelling\ Errors\ (toggle)Alt+F7 ÏÔʾȫ²¿Æ´Ð´´íÎóAlt+F7 menutrans Add\ Word\ (under\ cursor)\ to\ DictionaryCtrl+F7 ½«µ±Ç°µ¥´Ê¼ÓÈë´ÊµäCtrl+F7 menutrans Language\.\.\. ÓïÑÔ\.\.\. menutrans Options\.\.\. Ñ¡Ïî\.\.\. menutrans &Bookmarks ÊéÇ©(&B) menutrans Bookmark\ NextF2 ÏÂÒ»¸öÊéÇ©F2 menutrans Bookmark\ PreviousShift+F2 ÉÏÒ»¸öÊéÇ©Shift+F2 menutrans Bookmark\ Set\ (toggle)Alt+F2 ÉèÖÃÊéÇ©Alt+F2 menutrans Delete\ All\ BookmarksAlt+Shift+F2 ɾ³ýËùÓÐÊéÇ©Alt+Shift+F2 menutrans Block\ Comment\ (selection)F6 Ìí¼Ó×¢ÊÍF6 menutrans Block\ Un-Comment\ (selection)Shift+F6 ɾ³ý×¢ÊÍShift+F6 menutrans Macro\ PlayF8 »Ø·ÅºêF8 menutrans Macro\ Record\ (toggle)Shift+F8 ¿ªÊ¼/Í£Ö¹Â¼ÖÆºêShift+F8 menutrans &Diff\ Mode Îļþ±È½Ïģʽ(&D) menutrans &Folding ´úÂëÕÛµþ(&F) menutrans &Fold\ Open/CloseF9 ÕÛµþ/´ò¿ªF9 menutrans &Fold\ Open/CloseShift+F9 ÕÛµþ/´ò¿ªShift+F9 "menutrans &Set\ Fold\ (Selection)F9 menutrans &Open\ All\ FoldsCtrl+F9 ´ò¿ªËùÓÐÕÛµþCtrl+F9 menutrans &Close\ All\ FoldsCtrl+Shift+F9 ¹Ø±ÕËùÓÐÕÛµþCtrl+Shift+F9 menutrans &Delete\ Fold\ at\ CursorAlt+F9 ɾ³ý¹â±ê´¦ÕÛµþAlt+F9 menutrans D&elete\ All\ FoldsAlt+Shift+F9 ɾ³ýËùÓÐÕÛµþAlt+Shift+F9 menutrans &Completion ×Ô¶¯Íê³É(&C) menutrans &Tag\ Navigation &Tagµ¼º½ menutrans &Jump\ to\ Tag\ (under\ cursor)Alt+Down Ìø×ªµ½´Ë±ê¼ÇAlt+Down menutrans &Close\ and\ Jump\ BackAlt+Up ¹Ø±Õ²¢»Øµ½Ç°Ò»Î»ÖÃAlt+Up menutrans &Previous\ TagAlt+Left ǰһ±ê¼ÇAlt+Left menutrans &Next\ TagAlt+Right ºóÒ»±ê¼ÇAlt+Right menutrans &Tag\ Listing\.\.\.Ctrl+Alt+Down ÁгöËùÓбê¼Ç\.\.\.Ctrl+Alt+Down menutrans Add-ons\ E&xplore\ (Map/Unmap) ²å¼þ¹ÜÀí/¿ì½Ý¼üÓ³Éä(&x) " Add-ons menutrans Color\ Invert ·´×ªHTMLÑÕɫֵ menutrans Convert ת»» menutrans Sort ÅÅÐò menutrans Encrypt ¼ÓÃÜ menutrans Highlight\ Control\ Characters ¸ßÁÁÏÔʾ¿ØÖÆ×Ö·û menutrans Highlight\ Multibyte ¸ßÁÁÏÔʾ¶à×Ö½Ú×Ö·û menutrans Stamp\ Time ²åÈëʱ¼ä´Á " Window menu menutrans &Window ´°¿Ú(&W) menutrans Maximize\ (&Single) ×î´ó»¯(&S) menutrans Minimize\ (Hi&de) ×îС»¯/Òþ²Ø(&d) menutrans Tile\ &Vertical ´¹Ö±Æ½ÆÌ menutrans Tile\ Hori&zontal ˮƽƽÆÌ menutrans Sizes\ E&qual Ïàͬ´óС(&q) menutrans Height\ Max\ &= ×î´ó¸ß¶È(&=) menutrans Height\ Min\ &- ×îС¸ß¶È(&-) menutrans &Width\ Max ×î´ó¿í¶È(&W) menutrans Widt&h\ Min ×îС¿í¶È(&h) menutrans Split\ New\ Pane\ Vertical ×ÝÏò·Ö¸îд°¿Ú menutrans Split\ New\ Pane\ Horizontal ºáÏò·Ö¸îд°¿Ú menutrans Split\ Existing\ Vertically ×ÝÏò·Ö¸îµ±Ç°´°¿Ú menutrans Split\ Existing\ Horizontally ºáÏò·Ö¸îµ±Ç°´°¿Ú menutrans Start\ New\ Vim\ Ins&tance ¿ªÆôÐÂʵÀý(&t) menutrans File\ Tr&ee Ŀ¼Ê÷(&e) menutrans File\ E&xplorer\ (obsolete) Îļþä¯ÀÀÆ÷(&x) menutrans &Calendar\ (toggle)Ctrl+F11 ÏÔʾ/Òþ²ØÈÕÀúCtrl+F11 " Help menu menutrans &Help °ïÖú(&H) menutrans &Vim\ Help VIM°ïÖú menutrans &OverviewF1 ×ÜÀÀ(&O)F1 menutrans &User\ Manual Óû§ÊÖ²á(&U) menutrans &GUI ͼÐνçÃæ(&G) menutrans &How-to\ links HOWTOÎĵµ\.\.\.(&H) menutrans &Credits ×÷Õß(&C) menutrans Co&pying °æÈ¨(&P) menutrans &Version\.\.\. °æ±¾(&V)\.\.\. menutrans &About\.\.\. ¹ØÓÚ\ Vim(&A) menutrans &About\ Cream\.\.\. ¹ØÓÚ\ Cream\.\.\. " Popup menu menutrans Select\ &All ȫѡ(&A) menutrans Cu&t ¼ôÇÐ(&t) menutrans &Copy ¿½±´(&C) menutrans &Paste Õ³Ìù(&P) menutrans &Delete ɾ³ý(&D) " Toolbar #FIXME: not work? menutrans New\ File н¨Îļþ menutrans Open ´ò¿ª menutrans Save ±£´æ menutrans Save\ As Áí´æÎª menutrans Close ¹Ø±Õ menutrans Exit\ Vim Í˳öVim menutrans Print ´òÓ¡ menutrans Undo »Ö¸´ menutrans Redo ÖØ×ö menutrans Cut\ (to\ Clipboard) ¼ôÇе½¼ôÌù°å menutrans Copy\ (to\ Clipboard) ¿½±´µ½¼ôÌù°å menutrans Paste\ (from\ Clipboard) ´Ó¼ôÌù°åÕ³Ìù " The GUI toolbar if has("toolbar") if exists("*Do_toolbar_tmenu") delfun Do_toolbar_tmenu endif fun Do_toolbar_tmenu() tmenu ToolBar.new н¨Îļþ tmenu ToolBar.Open ´ò¿ªÎļþ tmenu ToolBar.Save ±£´æµ±Ç°Îļþ tmenu ToolBar.SaveAll ±£´æÈ«²¿Îļþ tmenu ToolBar.Print ´òÓ¡ tmenu ToolBar.Undo ³·ÏúÉÏ´ÎÐÞ¸Ä tmenu ToolBar.Redo ÖØ×öÉϴγ·ÏúµÄ¶¯×÷ tmenu ToolBar.Cut ¼ôÇÐÖÁ¼ôÌù°å tmenu ToolBar.Copy ¸´ÖƵ½¼ôÌù°å tmenu ToolBar.Paste ÓɼôÌù°åÕ³Ìû tmenu ToolBar.Find ²éÕÒ... tmenu ToolBar.FindNext ²éÕÒÏÂÒ»¸ö tmenu ToolBar.FindPrev ²éÕÒÉÏÒ»¸ö tmenu ToolBar.Replace Ìæ»»... tmenu ToolBar.LoadSesn ¼ÓÔØ»á»° tmenu ToolBar.SaveSesn ±£´æµ±Ç°µÄ»á»° tmenu ToolBar.RunScript ÔËÐÐVim½Å±¾ tmenu ToolBar.Make Ö´ÐÐ Make tmenu ToolBar.Shell ´ò¿ªÒ»¸öÃüÁî´°¿Ú tmenu ToolBar.RunCtags Ö´ÐÐ ctags tmenu ToolBar.TagJump Ìøµ½µ±Ç°¹â±êλÖõıêÇ© tmenu ToolBar.Help Vim °ïÖú tmenu ToolBar.FindHelp ²éÕÒ Vim °ïÖú endfun endif " vim:fileencoding=cp936:encoding=cp936 cream-0.43/lang/menu_zh.cp950.vim0000644000076400007660000000013111156572442017054 0ustar digitectlocaluser" Menu Translations: Traditional Chinese source :p:h/menu_chinese_taiwan.950.vim cream-0.43/lang/menu_zh.gb2312.vim0000644000076400007660000000014011156572442017114 0ustar digitectlocaluser" Menu Translations: Simplified Chinese (for Windows) source :p:h/menu_zh_cn.gb2312.vim cream-0.43/lang/menu_zh_cn.cp936.vim0000644000076400007660000000014211156572442017542 0ustar digitectlocaluser" Menu Translations: Simplified Chinese (for Windows) source :p:h/menu_chinese_gb.936.vim cream-0.43/lang/menu_zh_cn.18030.vim0000644000076400007660000000012211156572442017347 0ustar digitectlocaluser" Menu Translations: Simplified Chinese source :p:h/menu_zh_cn.gb2312.vim cream-0.43/lang/menu_zh_cn.utf-8.vim0000644000076400007660000002752211156572442017654 0ustar digitectlocaluser" Menu Translations: Simplified Chinese (UTF-8) " Translated By: Ralgh Young " Last Change: Thir Dec 2 11:26:52 CST 2004 " translations for vimcream (http://cream.sourceforge.net) " Quit when menu translations have already been done. if exists("did_menu_trans") finish endif let did_menu_trans = 1 scriptencoding utf-8 " File menu menutrans &File 文件(&F) menutrans &NewCtrl+N 新建(&N)Ctrl+N menutrans &Open\.\.\. 打开(&O)\.\.\. menutrans &Open\ (selection)Ctrl+Enter 打开光标下文件Ctrl+Enter menutrans &Close 关闭(&C) menutrans C&lose\ All 全部关闭(&l) menutrans &SaveCtrl+S 保存(&S)Ctrl+S menutrans Save\ &As\.\.\. 另存为(&A)\.\.\. menutrans Sa&ve\ All\.\.\. 全部保存(&v)\.\.\. menutrans &Print\.\.\. 打印(&P)\.\.\. menutrans Prin&t\ Setup 打印设置 menutrans E&xitCtrl+F4 退出(&X)Ctrl+F4 menutrans &Recent\ Files,\ Options 最近打开的文件,\ 设置 menutrans Set\ Menu\ Size 设置历史记录数 menutrans Remove\ Invalid 删除无效项 menutrans Clear\ List 清除列表 " Print Setup menutrans Paper\ Size 纸张大小 menutrans Paper\ Orientation 页面方向 menutrans Margins 边空 menutrans Header 标题 menutrans Syntax\ Highlighting\.\.\. 语法高亮 menutrans Line\ Numbering\.\.\. 行号\.\.\. menutrans Wrap\ at\ Margins\.\.\. 自动换行\.\.\. menutrans &Encoding 编码(&E) " Edit menu menutrans &Edit 编辑(&E) menutrans &UndoCtrl+Z 恢复(&U)Ctrl+Z menutrans &RedoCtrl+Y 重做(&R)Ctrl+Y menutrans Cu&tCtrl+X 剪切(&T)Ctrl+X menutrans &CopyCtrl+C 复制(&C)Ctrl+C menutrans &PasteCtrl+V 粘帖(&P)Ctrl+V menutrans &Select\ AllCtrl+A 全选(&S)Ctrl+A menutrans &Go\ To\.\.\.Ctrl+G 跳到指定行(&G)\.\.\.Ctrl+G menutrans &Find\.\.\.Ctrl+F 查找(&F)\.\.\.Ctrl+F menutrans &Replace\.\.\.Ctrl+H 替换(&R)\.\.\.Ctrl+H menutrans &Find/ 查找(&F)/ menutrans Find\ and\ Rep&lace:%s 查找并替换(&l):%s menutrans Multi-file\ Replace\.\.\. 多文件查找/替换\.\.\. menutrans Fi&nd\ Under\ Cursor 查找光标下标识符 menutrans &Find\ Under\ CursorF3 查找F3 menutrans &Find\ Under\ Cursor\ (&Reverse)Shift+F3 反向查找Shift+F3 menutrans &Find\ Under\ Cursor\ (&Case-sensitive)Alt+F3 大小写敏感Alt+F3 menutrans &Find\ Under\ Cursor\ (Cas&e-sensitive,\ Reverse)Alt+Shift+F3 大小写敏感,反向查找Alt+Shift+F3 menutrans Count\ &Word\.\.\. 统计字数(&W)\.\.\. menutrans Cou&nt\ Total\ Words\.\.\. 统计全部字数(&n)\.\.\. menutrans Column\ SelectAlt+Shift+(motion) 列选择Alt+Shift+(光标) " Insert menu menutrans &Insert 插入(&I) menutrans Character\ Line\.\.\.Shift+F4 整行用字符填充\.\.\.Shift+F4 menutrans Character\ Line\ (length\ of\ line\ above)\.\.\.Shift+F4\ (x2) 整行用字符填充,与前一行同宽\.\.\.Shift+F4\ (x2) menutrans Date/Time 日期/时间 "menutrans Character\ by\ Decimal\ ValueAlt+, 特殊字符Alt+, "menutrans I&nsert.Character\ by\ Dialog\.\.\. 选择特殊字符\.\.\. "menutrans DigraphCtrl+K "menutrans Digraphs,\ List "menutrans ASCII\ Table "menutrans ASCII\ Table,\ List menutrans Line\ Numbers\ (selection) 行号(选中部分) " Format menu menutrans Fo&rmat 格式(&r) menutrans &Quick\ Wrap\ (selection\ or\ current\ paragraph)Ctrl+Q 段落重排Ctrl+Q menutrans Quick\ &Un-Wrap\ (selection\ or\ current\ paragraph)Alt+Q,\ Q 删除换行(当前段)Alt+Q,\ Q menutrans Capitalize,\ Title\ CaseF5 首字母大写(&T)F5 menutrans Capitalize,\ UPPERCASEShift+F5 全部大写(&U)Shift+F5 menutrans Capitalize,\ lowercaseAlt+F5 全部小写(&l)Alt+F5 menutrans Capitalize,\ rEVERSECtrl+F5 大小写反转(&I)Ctrl+F5 menutrans Justify,\ Left 左对齐(&L) menutrans Justify,\ Center 中间对齐(&C) menutrans Justify,\ Right 右对齐(&R) menutrans Justify,\ Full 左右均对齐(&F) menutrans &Remove\ Trailing\ Whitespace 删除行尾空格(&R) menutrans Remove\ &Leading\ Whitespace 删除行首空格(&L) menutrans &Collapse\ All\ Empty\ Lines\ to\ One 删除多余空行(&C) menutrans &Delete\ All\ Empty\ Lines 删除所有空行(&D) menutrans &Join\ Lines\ (selection) 合并选中行(&J) menutrans Con&vert\ Tabs\ To\ Spaces 将Tab转化为空格 menutrans &File\ Format\.\.\. 文件格式(&F)\.\.\. menutrans File\ &Encoding 文件编码(&E) menutrans Western\ European 西欧 menutrans Eastern\ European 东欧 menutrans East\ Asian 东亚 menutrans Middle\ Eastern 中东 menutrans SE\ and\ SW\ Asian 东南亚/西亚 menutrans Simplified\ Chinese\ (ISO-2022-CN)[chinese\ --\ simplified\ Chinese:\ on\ Unix\ "euc-cn",\ on\ MS-Windows\ cp936] 简体中文(ISO-2022-CN)[Unix:\ "euc-cn",\ Windows:\ cp936] menutrans Chinese\ Traditional\ (Big5)[big5\ --\ traditional\ Chinese] 繁体中文(大五码)[Big5] menutrans Chinese\ Traditional\ (EUC-TW)[taiwan\ --\ on\ Unix\ "euc-tw",\ on\ MS-Windows\ cp950] 繁体中文(EUC-TW)[Unix:\ "euc-tw",\ Windows:\ cp950] " Settings menu menutrans &Settings 设置(&S) menutrans &Show/Hide\ InvisiblesF4 显示/隐藏不可见字符(&S)F4 menutrans Line\ &Numbers\ (toggle) 显示/隐藏行号(&N) menutrans &Word\ Wrap\ (toggle)Ctrl+W 折行显示Ctrl+W menutrans A&uto\ Wrap\ (toggle)Ctrl+E 自动换行Ctrl+E menutrans &Set\ Wrap\ Width\.\.\. 设置自动换行位置(&S)\.\.\. menutrans &Highlight\ Wrap\ Width\ (toggle) 高亮显示自动换行位置(&H) menutrans &Tabstop\ Width\.\.\. &Tab宽度\.\.\. menutrans Tab\ &Expansion\ (toggle)Ctrl+T Tab自动扩展为空格(&E)Ctrl+T menutrans &Auto-indent\ (toggle) 自动缩进(&A) menutrans Syntax\ Highlighting\ (toggle) 语法高亮显示 menutrans Highlight\ Find\ (toggle) 高亮显示查找结果 menutrans Highlight\ Current\ Line\ (toggle) 高亮显示当前行 menutrans &Filetype 语言类型 menutrans &Color\ Themes 色彩主题(&C) menutrans Selection 选中文字 menutrans P&references 偏好(&r) menutrans Font\.\.\. 字体\.\.\. menutrans Toolbar\ (toggle) 显示/隐藏工具条 "menutrans Last\ File\ Restore\ Off "menutrans Last\ File\ Restore\ On menutrans &Middle-Mouse\ Disabled 鼠标中键:\ 已禁用 menutrans &Middle-Mouse\ Pastes 鼠标中键:\ 粘贴 menutrans Bracket\ Flashing\ Off 括号匹配闪烁:\ 关闭 menutrans Bracket\ Flashing\ On 括号匹配闪烁:\ 打开 menutrans Info\ Pop\ Options\.\.\. 自动完成提示设置\.\.\. menutrans &Expert\ Mode\.\.\. 专家模式(&E)\.\.\. menutrans &Behavior 行为模式(&B) " Tools menu menutrans &Tools 工具(&T) menutrans &Spell\ Check 拼写检查 menutrans Next\ Spelling\ ErrorF7 下一个错误F7 menutrans Previous\ Spelling\ ErrorShift+F7 上一个错误Shift+F7 menutrans Show\ Spelling\ Errors\ (toggle)Alt+F7 显示全部拼写错误Alt+F7 menutrans Add\ Word\ (under\ cursor)\ to\ DictionaryCtrl+F7 将当前单词加入词典Ctrl+F7 menutrans Language\.\.\. 语言\.\.\. menutrans Options\.\.\. 选项\.\.\. menutrans &Bookmarks 书签(&B) menutrans Bookmark\ NextF2 下一个书签F2 menutrans Bookmark\ PreviousShift+F2 上一个书签Shift+F2 menutrans Bookmark\ Set\ (toggle)Alt+F2 设置书签Alt+F2 menutrans Delete\ All\ BookmarksAlt+Shift+F2 删除所有书签Alt+Shift+F2 menutrans Block\ Comment\ (selection)F6 添加注释F6 menutrans Block\ Un-Comment\ (selection)Shift+F6 删除注释Shift+F6 menutrans Macro\ PlayF8 回放宏F8 menutrans Macro\ Record\ (toggle)Shift+F8 开始/停止录制宏Shift+F8 menutrans &Diff\ Mode 文件比较模式(&D) menutrans &Folding 代码折叠(&F) menutrans &Fold\ Open/CloseF9 折叠/打开F9 "menutrans &Set\ Fold\ (Selection)F9 menutrans &Open\ All\ FoldsCtrl+F9 打开所有折叠Ctrl+F9 menutrans &Close\ All\ FoldsCtrl+Shift+F9 关闭所有折叠Ctrl+Shift+F9 menutrans &Delete\ Fold\ at\ CursorAlt+F9 删除光标处折叠Alt+F9 menutrans D&elete\ All\ FoldsAlt+Shift+F9 删除所有折叠Alt+Shift+F9 menutrans &Completion 自动完成(&C) menutrans &Tag\ Navigation &Tag导航 menutrans &Jump\ to\ Tag\ (under\ cursor)Alt+Down 跳转到此标记Alt+Down menutrans &Close\ and\ Jump\ BackAlt+Up 关闭并回到前一位置Alt+Up menutrans &Previous\ TagAlt+Left 前一标记Alt+Left menutrans &Next\ TagAlt+Right 后一标记Alt+Right menutrans &Tag\ Listing\.\.\.Ctrl+Alt+Down 列出所有标记\.\.\.Ctrl+Alt+Down "menutrans Add-ons\ E&xplore\ (Map/Unmap) " Add-ons menutrans Color\ Invert 反转HTML颜色值 menutrans Convert 转换 menutrans Sort 排序 " Window menu menutrans &Window 窗口(&W) "menutrans Maximize\ (&Single) "menutrans Maximize\ (&Single) menutrans Tile\ &Vertical 垂直平铺 menutrans Tile\ Hori&zontal 水平平铺 menutrans Sizes\ E&qual 相同大小(&q) menutrans Height\ Max\ &= 最大高度(&=) menutrans Height\ Min\ &- 最小高度(&-) menutrans &Width\ Max 最大宽度(&W) menutrans Widt&h\ Min 最小宽度(&h) menutrans Split\ New\ Pane\ Vertical 纵向分割新窗口 menutrans Split\ New\ Pane\ Horizontal 横向分割新窗口 menutrans Split\ Existing\ Vertically 纵向分割当前窗口 menutrans Split\ Existing\ Horizontally 横向分割当前窗口 menutrans Start\ New\ Vim\ Ins&tance 开启新示例(&t) menutrans File\ Tr&ee 文件系统树(&e) menutrans File\ E&xplorer\ (obsolete) 文件浏览器(&x) menutrans &Calendar\ (toggle)Ctrl+F11 显示/隐藏日历Ctrl+F11 " Help menu menutrans &Help 帮助(&H) menutrans &Vim\ Help VIM帮助 menutrans &OverviewF1 总览(&O)F1 menutrans &User\ Manual 用户手册(&U) menutrans &GUI 图形界面(&G) menutrans &How-to\ links HOWTO文档\.\.\.(&H) menutrans &Credits 作者(&C) menutrans Co&pying 版权(&P) menutrans &Version\.\.\. 版本(&V)\.\.\. menutrans &About\.\.\. 关于\ Vim(&A) menutrans &About\ Cream\.\.\. 关于\ Cream\.\.\. " Popup menu menutrans Select\ &All 全选(&A) menutrans Cu&t 剪切(&t) menutrans &Copy 拷贝(&C) menutrans &Paste 粘贴(&P) menutrans &Delete 删除(&D) " Toolbar #FIXME: not work? menutrans New\ File 新建文件 menutrans Open 打开 menutrans Save 保存 menutrans Save\ As 另存为 menutrans Close 关闭 menutrans Exit\ Vim 退出Vim menutrans Print 打印 menutrans Undo 恢复 menutrans Redo 重做 menutrans Cut\ (to\ Clipboard) 剪切到剪贴板 menutrans Copy\ (to\ Clipboard) 拷贝到剪贴板 menutrans Paste\ (from\ Clipboard) 从剪贴板粘贴 " The GUI toolbar if has("toolbar") if exists("*Do_toolbar_tmenu") delfun Do_toolbar_tmenu endif fun Do_toolbar_tmenu() tmenu ToolBar.new 新建文件 tmenu ToolBar.Open 打开文件 tmenu ToolBar.Save 保存当前文件 tmenu ToolBar.SaveAll 保存全部文件 tmenu ToolBar.Print 打印 tmenu ToolBar.Undo 撤销上次修改 tmenu ToolBar.Redo 重做上次撤销的动作 tmenu ToolBar.Cut 剪切至剪贴板 tmenu ToolBar.Copy 复制到剪贴板 tmenu ToolBar.Paste 由剪贴板粘帖 tmenu ToolBar.Find 查找... tmenu ToolBar.FindNext 查找下一个 tmenu ToolBar.FindPrev 查找上一个 tmenu ToolBar.Replace 替换... tmenu ToolBar.LoadSesn 加载会话 tmenu ToolBar.SaveSesn 保存当前的会话 tmenu ToolBar.RunScript 运行Vim脚本 tmenu ToolBar.Make 执行 Make tmenu ToolBar.Shell 打开一个命令窗口 tmenu ToolBar.RunCtags 执行 ctags tmenu ToolBar.TagJump 跳到当前光标位置的标签 tmenu ToolBar.Help Vim 帮助 tmenu ToolBar.FindHelp 查找 Vim 帮助 endfun endif cream-0.43/lang/menu_ko.cp949.vim0000644000076400007660000000012511156572442017057 0ustar digitectlocaluser" Menu Translations: Korean (for Windows) source :p:h/menu_korean_kr.949.vim cream-0.43/lang/strings_en_us.utf-8.vim0000644000076400007660000000570211517301060020370 0ustar digitectlocaluser" " Filename: strings_en_us.utf-8.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Test 1 (obsolete) {{{1 " NOTES: " o This file is automatically generated via a routine that greps " the extracted strings file. " " TODO: " o Need to figure out how to handle converting utf-8 code strings to " whatever encoding a translated file needs to be in. function! Cream_translate(id, dstr, ...) " o Returns a translated string corresponding to {id}. " o Returns {dstr} if none found. " o {optional} arguments are values passed from calling function used " "as is". " set optional argument strings to avoid "var not found" errors let i = 1 while i < 20 if exists("a:{i}") | let str{i} = a:{i} | else | let str{i} = "" | endif let i = i + 1 endwhile " find id " Note: Var "dstr" below should match a:dstr, it is provided only " to ease translation. if 1 == 2 elseif a:id == 1 let dstr = "default string" let tstr = "translated string 1 is " . str{1} elseif a:id == 2 let dstr = "default string" let tstr = "translated string 2 is " . str{2} elseif a:id == 3 let dstr = "default string" let tstr = "translated string 3 is " . str{3} elseif a:id == 4 let dstr = "default string" let tstr = "translated string 4 is " . str{4} elseif a:id == 5 let dstr = "default string" let tstr = "translated string 5 is " . str{5} elseif a:id == 6 let dstr = "default string" let tstr = "translated string 6 is " . str{6} elseif a:id == "strings_en_us.utf-8.vim_68" let dstr = "default string" let tstr = "translated string 6 is " . str{6} endif " return if exists("tstr") return tstr else return a:dstr endif endfunction let s:test = Cream_i18n("strings_en_us.utf-8.vim_68", "This would be great!") " 1}}} function! Cream_str_en_us_0000001() return "Ok" endfunction function! Cream_str_en_us_0000002() return "Cancel" endfunction function! Cream_str_en_us_0000003() return "Quitting..." endfunction function! Cream_str_en_us_0000004() return "Select directory" endfunction function! Cream_str_en_us_0000005() return "Progress" endfunction " vim:foldmethod=marker cream-0.43/creamrc0000644000076400007660000005145511517301204014453 0ustar digitectlocaluser" " Filename: creamrc " Updated: 2006-10-27 07:14:16EDT " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License " GNU General Public License (GPL) {{{1 " " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. [ " http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA " 02111-1307, USA. " " 1}}} " " CRITICAL SETTINGS: (Don't use fold markers yet!) " nocompatible (behave like Vim, not Vi) set nocompatible " cpoptions (exclude characters from literal mappings) set cpoptions-=< " shellslash (use a common path separator across all platforms) " convert all backslashes to forward slashes on expanding filenames. " Enables consistancy in Cream between Windows and Linux platforms, " but BE CAREFUL! Windows file operations require backslashes--any " paths determined manually (not by Vim) need to be reversed. set shellslash " TODO: version check if v:version < 700 echo "Cream now supports only Vim 7.0 and above. Please use Cream 0.38 for older Vim versions." finish endif let s:debug = "\n INITIALIZATION:\n\n" " Cream_checkdir() {{{1 function! Cream_checkdir(dir) " if directory doesn't exist, try to make it let s:debug = s:debug . "Cream_checkdir(): {dir} == \"" . a:dir . "\"\n" if !isdirectory(a:dir) let tmp = a:dir " system call prep if has("win32") " remove trailing slash (Win95) let tmp = substitute(tmp, '\(\\\|/\)$', '', 'g') " remove escaped spaces let tmp = substitute(tmp, '\ ', ' ', 'g') " convert slashes to backslashes let tmp = substitute(tmp, '/', '\', 'g') let s:debug = s:debug . "Cream_checkdir(): has(win32)\n" endif " mkdir (quote, regardless of spaces) set noshellslash let s:debug = s:debug . "Cream_checkdir(): mkdir \"" . tmp . "\"\n" call system("mkdir " . '"' . tmp . '"') let s:debug = s:debug . "Cream_checkdir(): mkdir v:shell_error == \"" . v:shell_error . "\"\n" set shellslash " retest if !isdirectory(tmp) return -1 endif endif return 1 endfunction " path initializations " Cream_init() ($CREAM) $VIMRUNTIME/cream {{{1 function! Cream_init() " establish $CREAM " o Valid value is writable: " * $HOME/.cream in Linux " * $VIMRUNTIME/cream/ in Windows " o $HOME on Windows is trouble " * Doesn't exist for Win95/98/ME " * May not be multi-user on WinNT/2K/XP and Cygwin setups " o We don't escape the value of $CREAM, since its value might be used " in a shell call " use $CREAM if present if exists("$CREAM") " accept as is let s:debug = s:debug . "Cream_init(): $CREAM exists: \n $CREAM = " . $CREAM . "\n" " use $VIMINIT fragment if present elseif exists("$VIMINIT") let s:debug = s:debug . "Cream_init(): $VIMINIT exists.\n" " set $CREAM to a subdirectory below *this* file " remove initial 'source ' let $CREAM = strpart($VIMINIT, 7) " if first 7 chars don't equal "source ", quit if strpart($VIMINIT, 0, 7) !=? "source " echo "---------------------------------------------------------------------" echo " WARNING! First 7 chars of $VIMINIT isn't \"source \"" echo " $VIMINIT = " . $VIMINIT echo " $CREAM = " . $CREAM echo "---------------------------------------------------------------------" let $CREAM = "" let s:debug = s:debug . "Cream_init(): $VIMINIT first seven chars don't match.\n" return -1 endif " expand full path, minus filename head "let $CREAM = fnamemodify(expand($VIMINIT), ":p:h") let $CREAM = fnamemodify(expand($CREAM), ":p:h") " add cream sub-directory if filewritable($CREAM . "/cream") == 2 let $CREAM = $CREAM . "/cream/" elseif filewritable($CREAM . "/.cream") == 2 let $CREAM = $CREAM . "/.cream/" else " error? endif let s:debug = s:debug . "Cream_init(): $CREAM: " . $CREAM . "\n" " defaults else " convert all backslashes to forward slashes on Windows if has("win32") let $CREAM = $VIMRUNTIME . "/cream/" " get rid of path spaces if v:version >= 602 let $CREAM = fnamemodify($CREAM, ":8") endif " change backslashes to slashes let $CREAM = substitute($CREAM, '\', '/', "g") " fix UNC servername let $CREAM = substitute($CREAM, '^//', '\\', "g") ""*** DEBUG: fallback "if filewritable($CREAM) != 2 " let $CREAM = $VIMRUNTIME . "/cream/" "endif ""*** let s:debug = s:debug . "Cream_init(): (no envvars): has(win32):\n $CREAM = " . $CREAM . "\n" else let $CREAM = $VIMRUNTIME . "/cream/" let s:debug = s:debug . "Cream_init(): (no envvars): !has(win32): \n $CREAM = " . $CREAM . "\n" endif endif " return error if $CREAM doesn't exist if !exists("$CREAM") let s:debug = s:debug . "Cream_init(): no $CREAM discovered.\n" return -1 endif " ensure trailing slash if $CREAM !~ '/$' && $CREAM !~ '\$' if has("win32") || has("dos32") || has("win16") || has("dos16") || has("win95") let $CREAM = $CREAM . '\' else let $CREAM = $CREAM . '/' endif endif endfunction " Cream_init_userdir() ~/.cream {{{1 function! Cream_init_userdir() " Set g:cream_user by finding or creating a location for user files. let mydir = "" let s:debug = s:debug . "Cream_init_userdir(): begin...\n" " environment var if exists("$CREAM_USER") if s:Cream_init_userdir_try($CREAM_USER) let s:debug = s:debug . "Cream_init_userdir(): using $CREAM_USER.\n" else echo " $CREAM_USER not a valid pathfor user files failed, trying defaults..." endif endif if has("win32") " <0.38 migration: We test if $HOMEDRIVE$HOMEPATH exists " BEFORE attempting to create it. If it does NOT exist, we try " $USERPROFILE before coming back to try it again. " if s:Cream_init_userdir_try(fnamemodify($HOMEDRIVE . $HOMEPATH, ":p")) let mydir = fnamemodify($HOMEDRIVE . $HOMEPATH, ":p") . "/.cream" if isdirectory(mydir) \ && filewritable(mydir) == 2 \ && s:Cream_init_userdir_try(fnamemodify($HOMEDRIVE . $HOMEPATH, ":p")) let s:debug = s:debug . "Cream_init_userdir(): has(win32): $HOMEDRIVE and $HOMEPATH used.\n" elseif s:Cream_init_userdir_try(fnamemodify($USERPROFILE, ":p")) let s:debug = s:debug . "Cream_init_userdir(): has(win32): $USERPROFILE used.\n" elseif s:Cream_init_userdir_try(fnamemodify($HOMEDRIVE . $HOMEPATH, ":p")) let s:debug = s:debug . "Cream_init_userdir(): has(win32): $HOMEDRIVE and $HOMEPATH used.\n" " Vim always discovers $HOME, even on Win95 without one declared!! elseif s:Cream_init_userdir_try(fnamemodify($HOME, ":p")) let s:debug = s:debug . "Cream_init_userdir(): has(win32): $HOME used.\n" " fallback (Win95) elseif s:Cream_init_userdir_try(fnamemodify($CREAM, ":p")) let s:debug = s:debug . "Cream_init_userdir(): has(win32): $CREAM used.\n" else " fails by here endif else call s:Cream_init_userdir_try($HOME) let s:debug = s:debug . "Cream_init_userdir(): !has(win32): $HOME used.\n" endif " verify if !exists("g:cream_user") let s:debug = s:debug . "ERROR: Cream_init_userdir(): g:cream_user not found.\n\n" return -1 elseif filewritable(g:cream_user) != 2 let s:debug = s:debug . "ERROR: Cream_init_userdir(): g:cream_user (\"" . g:cream_user . "\") path not writable.\n\n" return -1 else let s:debug = s:debug . "Cream_init_userdir(): g:cream_user == \"" . g:cream_user . "\"\n" endif endfunction " s:Cream_init_userdir_try() {{{1 function! s:Cream_init_userdir_try(path) " Test {path} exists, process, create/use /.cream/ sub if so. " stop if already defined if exists("g:cream_user") let s:debug = s:debug . " s:Cream_init_userdir_try(): g:cream_user already exists, skipping \"" . a:path . "\".\n" return endif " test root path if filewritable(a:path) == 2 let s:debug = s:debug . " s:Cream_init_userdir_try(): tested \"" . a:path . "\" exists and writable.\n" elseif isdirectory(a:path) let s:debug = s:debug . " s:Cream_init_userdir_try(): tested \"" . a:path . "\" exists, but not writable.\n" return else let s:debug = s:debug . " s:Cream_init_userdir_try(): tested \"" . a:path . "\" doesn't exist.\n" return endif let mydir = a:path " process " simplify if possible if has("win32") if v:version >= 602 let mydir = fnamemodify(mydir, ":8") let s:debug = s:debug . " s:Cream_init_userdir_try(): has(win32): fnamemodify(mydir, \":8\") == \"" . mydir . "\"\n" endif endif " remove trailing slash (such as Win95 "C:\") let mydir = substitute(mydir, '\(\\\|/\)$', '', 'g') " add .cream/ and try to make it let mydir = mydir . '/.cream/' if !Cream_checkdir(mydir) let s:debug = s:debug . " s:Cream_init_userdir_try(): processed and \"/.cream/\" appended path \"" . mydir . "\" not made.\n" return endif " process g:cream_user to Vim format let g:cream_user = mydir if has("win32") " convert backslashes to slashes let g:cream_user = escape(substitute(g:cream_user, '\', '/', 'g'), ' \') " escape any spaces or backslashes remaining let g:cream_user = escape(g:cream_user, ' \') endif let s:debug = s:debug . " s:Cream_init_userdir_try(): g:cream_user set to \"" . g:cream_user . "\"\n" return 1 endfunction " Cream_init_viewdir() ~/.cream/views {{{1 function! Cream_init_viewdir() " file view retainage if exists("$CREAM_VIEW") \&& filewritable($CREAM_VIEW) == 2 execute "set viewdir=" . escape($CREAM_VIEW, ' \') let s:debug = s:debug . "Cream_init_viewdir(): good $CREAM_VIEW found: &viewdir: " . &viewdir . "\n" " default else " (remember, g:cream_user is simplified and escaped) let mydir = g:cream_user . "views" let s:debug = s:debug . "Cream_init_viewdir(): no $CREAM_VIEW found: mydir: " . mydir . "\n" " if directory doesn't exist, try to make it call Cream_checkdir(mydir) if filewritable(mydir) == 2 " we set a script global, only so viminfo (following) can " use it let s:cream_views = mydir execute "set viewdir=" . mydir let s:debug = s:debug . "Cream_init_viewdir(): no $CREAM_VIEW found: &viewdir: " . &viewdir . "\n" else " failure let s:debug = s:debug . "Cream_init_viewdir(): no $CREAM_VIEW found: mydir not writable.\n" return -1 endif endif endfunction " Cream_init_viminfo() ~/.cream/views {{{1 function! Cream_init_viminfo() " setting/history/etc. file location " execute statement (everything but path) " \"100 escaped twice: once for itself, once for the quote let myviminfo = "set viminfo='500,\\\"100,%,!,h,n" " $CREAM_VIEW if exists("$CREAM_VIEW") \&& filewritable($CREAM_VIEW) == 2 execute myviminfo . escape($CREAM_VIEW, ' \') . "/.viminfo" " default else execute myviminfo . s:cream_views . "/.viminfo" endif " must exist (directory has already been tested and is writable) endfunction " Cream_init_spelldicts() ~/.cream/spelldicts {{{1 function! Cream_init_spelldicts() " backup file location " (remember, g:cream_user is simplified and escaped) let mydir = g:cream_user . "spelldicts" " if directory doesn't exist, try to make it call Cream_checkdir(mydir) if filewritable(mydir) != 2 let s:debug = s:debug . "Cream_init_spelldicts(): directory not made: mydir: " . mydir . "\n" return -1 endif endfunction " Cream_init_backupdir() ~/.cream/tmp {{{1 function! Cream_init_backupdir() " backup file location let prior = "" " $CREAM_BAK (environmental variable) if exists("$CREAM_BAK") \&& filewritable($CREAM_BAK) == 2 let prior = $CREAM_BAK let s:debug = s:debug . "Cream_init_backupdir(): good $CREAM_BAK: prior: " . prior . "\n" " default else " (remember, g:cream_user is simplified and escaped) let mydir = g:cream_user . "tmp" let s:debug = s:debug . "Cream_init_backupdir(): no $CREAM_BAK: mydir: " . mydir . "\n" " if directory doesn't exist, try to make it call Cream_checkdir(mydir) if filewritable(mydir) != 2 let s:debug = s:debug . "Cream_init_backupdir(): mydir not writable: mydir: " . mydir . "\n" return -1 else let prior = mydir endif endif " append comma to default if non-empty if prior != "" let prior = prior . "," endif " set execute "set backupdir=" . prior . "./bak,." endfunction " Cream_init_directory() ./ (swap files) {{{1 function! Cream_init_directory() " swap file location " (Always with file to avoid overwritten by second user) if exists("$CREAM_SWP") \&& filewritable($CREAM_SWP) == 2 " use variable execute "set directory=" . $CREAM_SWP . ",." let s:debug = s:debug . "Cream_init_directory(): $CREAM_SWP found: &directory: " . &directory . "\n" else execute "set directory=." let s:debug = s:debug . "Cream_init_directory(): no $CREAM_SWP: &directory: " . &directory . "\n" endif endfunction " 1}}} " loader " Cream() {{{1 function! Cream() " load the project " * return 1 on load, -1 on fatal error, 2 on terminal abort " initialize (once--note behave module may try again ;) if !exists("g:cream_init") " $CREAM let init = Cream_init() let s:debug = s:debug . "Cream(): Cream_init(): init: " . init . "\n\n" if init == -1 echo "\n Error: Unable to find Cream installation.\n" return -1 endif "" vi behavior should stop here (but still can't read globals) "if exists("g:CREAM_BEHAVE") " if g:CREAM_BEHAVE ==? "vi" " return 1 " endif "endif " g:cream_user let init = Cream_init_userdir() let s:debug = s:debug . "Cream(): Cream_init_userdir() == " . init . "\n\n" if init == -1 echo "\n Error: Unable to find a location for user files.\n" return -1 endif " &viewdir let init = Cream_init_viewdir() let s:debug = s:debug . "Cream(): Cream_init_viewdir(): init: " . init . "\n\n" if init == -1 echo "\n Error: Unable to find a location for view files.\n" return -1 endif " spelldicts let init = Cream_init_spelldicts() let s:debug = s:debug . "Cream(): Cream_init_spelldicts(): init: " . init . "\n\n" if init == -1 echo "\n Error: Unable to find a location for spell dictionaries.\n" return -1 endif " these are automatic call Cream_init_viminfo() call Cream_init_backupdir() call Cream_init_directory() let g:cream_init = 1 endif ""*** BROKEN: vim behavior should stop here, but still can't read "" globals so it doesn't. "if exists("g:CREAM_BEHAVE") " if g:CREAM_BEHAVE ==? "vim" " return 1 " endif "endif ""*** ""*** DEBUG: "" as loading... "echo "---------------------------------------------------------------------" "echo " DEBUG: " "echo " $VIMINIT = " . $VIMINIT "echo " $CREAM = " . $CREAM "echo " &viewdir = " . &viewdir "echo " &viminfo = " . &viminfo "echo " &backupdir = " . &backupdir "echo " &directory = " . &directory "echo "---------------------------------------------------------------------" " "" one line paste-in "echo "\n $CREAM = " . $CREAM . "\n &viewdir = " . &viewdir . "\n &viminfo = " . &viminfo . "\n &backupdir = " . &backupdir . "\n &directory = " . &directory . "\n" " ""*** let s:debug = s:debug . "Cream():\n" let s:debug = s:debug . " $VIMINIT = " . $VIMINIT . "\n" let s:debug = s:debug . " $CREAM = " . $CREAM . "\n" let s:debug = s:debug . " &viewdir = " . &viewdir . "\n" let s:debug = s:debug . " &viminfo = " . &viminfo . "\n" let s:debug = s:debug . " &backupdir = " . &backupdir . "\n" let s:debug = s:debug . " &directory = " . &directory . "\n" " load the loader " *** Note: Uncomment this line to abort loading *** "finish if filereadable($CREAM . "cream.vim") > 0 let s:debug = s:debug . "Cream(): loader found.\n" execute "source " . $CREAM . "cream.vim" else let s:debug = s:debug . "Cream(): loader not found.\n" echo "\n Error: Unable to find Cream loader.\n" return -1 endif return 1 endfunction " 1}}} " debugging " Cream_debug_info_local() {{{1 function! Cream_debug_info_local() " modularize Cream debug info return s:debug endfunction " Cream_debug_info() {{{1 function! Cream_debug_info() " Return system, Vim and Cream info. call confirm( \ "Debugging Cream startup. This may take a few seconds...\n" . \ "\n", "&Ok", 1, "Info") " utility functions function! CheckDir(n) if isdirectory(a:n) echo 'directory "' . a:n . '" exists' else echo 'directory "' . a:n . '" does NOT exist' endif endfunction function! CheckFile(n) if filereadable(a:n) echo '"' . a:n . '" is readable' else echo '"' . a:n . '" is NOT readable' endif endfunction " collect initialization debugging info, too. let tmp = Cream_debug_info_local() let tmp = tmp . "\n POST INITIALIZATION:\n" " Cream debug info on @x (silent call this to avoid echo) silent call s:Cream_debug_info_get() let tmp = tmp . @x let @x = "" delfunction CheckDir delfunction CheckFile return tmp endfunction " s:Cream_debug_info_get() {{{1 function! s:Cream_debug_info_get() " Place Cream debug info into @x. " Note: This value is placed in register rather than returned " so that it isn't echoed by the calling function. let @x = "" redir @x let mymore = &more set nomore echo "Report generated: " . strftime("%Y-%m-%dT%H:%M:%S") " system info echo "\nSystem Info ----------------------------------------------------- {{" . nr2char(123) . "1\n" if has("unix") echo system("uname -a") endif let myshellslash = &shellslash set noshellslash silent! echo system("set") let &shellslash = myshellslash " vim version info echo "\nVersion --------------------------------------------------------- {{" . nr2char(123) . "1\n" version " current session arguments echo "\nArguments ------------------------------------------------------- {{" . nr2char(123) . "1\n" args " paths, files and directories echo "\nDirectories and Files ------------------------------------------- {{" . nr2char(123) . "1\n" echo '$VIM = "' . $VIM . '"' call CheckDir($VIM) echo '$VIMRUNTIME = "' . $VIMRUNTIME . '"' call CheckDir($VIMRUNTIME) call CheckFile(&helpfile) call CheckFile(fnamemodify(&helpfile, ":h") . "/tags") call CheckFile($VIMRUNTIME . "/menu.vim") call CheckFile($VIMRUNTIME . "/filetype.vim") call CheckFile($VIMRUNTIME . "/syntax/synload.vim") " settings echo "\nSettings -------------------------------------------------------- {{" . nr2char(123) . "1\n" set all set termcap " autocommands if has("autocmd") echo "\nAutocommands ------------------------------------------------ {{" . nr2char(123) . "1\n" autocmd endif " mappings echo "\nMappings -------------------------------------------------------- {{" . nr2char(123) . "1\n" echo "\nNormal mode mappings -------------------------------------------- {{" . nr2char(123) . "2\n" nmap echo "\nVisual mode mappings -------------------------------------------- {{" . nr2char(123) . "2\n" vmap echo "\nInsert mode mappings -------------------------------------------- {{" . nr2char(123) . "2\n" imap echo "\nCommand-line mode mappings -------------------------------------- {{" . nr2char(123) . "2\n" cmap echo "\n 2}}" . nr2char(125) . "\n" " abbreviations echo "\nAbbreviations --------------------------------------------------- {{" . nr2char(123) . "1\n" abbreviate " highlighting echo "\nHighlighting ---------------------------------------------------- {{" . nr2char(123) . "1\n" highlight " variables echo "\nVariables ------------------------------------------------------- {{" . nr2char(123) . "1\n" let " Cream info echo "\nCream ----------------------------------------------------------- {{" . nr2char(123) . "1\n" if exists("g:cream_version") | echo "g:cream_version = " . g:cream_version | else | echo "no g:cream_version" | endif if exists("g:cream_version_str") | echo "g:cream_version_str = " . g:cream_version_str | else | echo "no g:cream_version_str" | endif if exists("g:cream_updated") | echo "g:cream_updated = " . g:cream_updated | else | echo "no g:cream_updated" | endif if exists("g:cream_dev") | echo "g:cream_dev = " . g:cream_dev | else | echo "no g:cream_dev" | endif if exists("g:cream_mail") | echo "g:cream_mail = " . g:cream_mail | else | echo "no g:cream_mail" | endif echo "\n$VIM/*" echo globpath($VIM, "*") echo "\n$VIMRUNTIME/*" echo globpath($VIMRUNTIME, "*") echo "\n$CREAM/*" echo globpath($CREAM, "*") echo "\n$CREAM/addons/*" echo globpath($CREAM, "addons/*") echo "\n$CREAM/bitmaps/*" echo globpath($CREAM, "bitmaps/*") echo "\n 1}}" . nr2char(125) . "\n" echo "\n vim:foldmethod=marker\n" redir END let &more = mymore " Note: @x contains this function's return value info at this " point. (See header note for explanation.) endfunction " 1}}} call Cream() " vim:filetype=vim:foldmethod=marker cream-0.43/cream-showinvisibles.vim0000644000076400007660000001756011517300720017767 0ustar digitectlocaluser"= " cream-showinvisibles.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " " Toggle view of invisible characters such as tabs, trailing spaces " and hard returns. The script includes intuitive presets for these " characters, a global environmental variable (g:LIST) that is " retained and initialized across sessions if you use a viminfo, and a " familiar (to some of us) keyboard shortcut mapping to F4. " " This configuration includes characters as beautiful as your specific " setup will allow, determined by hardware, operating system and Vim " version. (Vim version 6.1.469 supports multi-byte characters, used " with UTF-8 encoding.) " " This is one of the many custom utilities and functions for gVim from " the Cream project (http://cream.sourceforge.net), a configuration of " Vim for those of us familiar with Apple and Windows software. " " Updated: 2004 March 20 " Version: 3.01 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=363 " Author: Steve Hall [ digitect@mindspring.com ] " License: GPL (http://www.gnu.org/licenses/gpl.html) " " Instructions: " " o Simply copy this file and paste it into your vimrc. Or you can " drop the entire file into your plugins directory. " o As long as you don't already have keyboard mappings to the F4 key, " it will toggle invisible characters. " " Notes: " " For more information see Vim's ":help 'list", ":help 'listchars", " and ":help viminfo". " " ChangeLog: " " 2004-03-20 -- v.3.01 " o Fixed typos in trail multi-byte test and extends definitions. " " 2004-03-20 -- v.3.0 " o We no longer guess at encodings. Instead we choose characters on " the basis of whether they are printable or not. " " 2003-12-13 -- v.2.1 " o Repair of utf-8 chars for Vim versions >= 6.2. " o Addition of mappings and autocmd for use outside of Cream. " o Renamed functions: " * List_init() => Cream_list_init() " * List_toggle() => Cream_list_toggle() " " 2003-04-17 -- v.2.0 " o New multi-byte sets, contingent upon Vim version 6.1.469+. Note " that your particular OS and Font capabilities impact the display " of multi-byte characters, your usage may vary. " o Abstracted multi-byte characters to decimal values so the current " editing session doesn't affect them. " " 2002-10-06 -- v.1.2 " o Modified state variable types from string to numbers " o Extracted autocommand and mappings for the sake of the project. ;) " " 2002-08-03 -- v.1.1 " o New normal mode mapping and slightly saner visual and insert mode " mappings. " " 2002-08-03 -- v.1.0 " o Initial Release " " don't load mappings or autocmd if used with Cream (elsewhere) if !exists("$CREAM") " mappings imap :call Cream_list_toggle("i") vmap :call Cream_list_toggle("v") nmap :call Cream_list_toggle("n") " initialize on Buffer enter/new autocmd BufNewFile,BufEnter * call Cream_list_init() endif " initialize characters used to represent invisibles (global) function! Cream_listchars_init() " Sets &listchars to sophisticated extended characters as possible. " Gracefully falls back to 7-bit ASCII per character if one is not " printable. " " WARNING: " Do not try to enter multi-byte characters below, use decimal " abstractions only! It's the only way to guarantee that all encodings " can edit this file. set listchars= " tab if v:version < 603 " greaterthan, followed by space execute "set listchars+=tab:" . nr2char(62) . '\ ' elseif strlen(substitute(strtrans(nr2char(187)), ".", "x", "g")) == 1 " right angle quote, guillemotright followed by space (digraph >>) execute "set listchars+=tab:" . nr2char(187) . '\ ' else " greaterthan, followed by space execute "set listchars+=tab:" . nr2char(62) . '\ ' endif " eol if v:version < 603 " dollar sign execute "set listchars+=eol:" . nr2char(36) elseif strlen(substitute(strtrans(nr2char(182)), ".", "x", "g")) == 1 " paragrah symbol (digraph PI) execute "set listchars+=eol:" . nr2char(182) else " dollar sign execute "set listchars+=eol:" . nr2char(36) endif " trail if v:version < 603 " period execute "set listchars+=trail:" . nr2char(46) elseif strlen(substitute(strtrans(nr2char(183)), ".", "x", "g")) == 1 " others digraphs: 0U 0M/M0 sB .M 0m/m0 RO " middle dot (digraph .M) execute "set listchars+=trail:" . nr2char(183) else " period execute "set listchars+=trail:" . nr2char(46) endif " precedes if v:version < 603 " underscore execute "set listchars+=precedes:" . nr2char(95) elseif Cream_has("ms") && &encoding == "utf-8" " underscore execute "set listchars+=precedes:" . nr2char(95) elseif strlen(substitute(strtrans(nr2char(133)), ".", "x", "g")) == 1 " ellipses execute "set listchars+=precedes:" . nr2char(133) elseif strlen(substitute(strtrans(nr2char(8230)), ".", "x", "g")) == 1 " ellipses (2nd try) execute "set listchars+=precedes:" . nr2char(8230) elseif strlen(substitute(strtrans(nr2char(8249)), ".", "x", "g")) == 1 \&& v:lang != "C" " mathematical lessthan (digraph <1) execute "set listchars+=precedes:" . nr2char(8249) elseif strlen(substitute(strtrans(nr2char(8592)), ".", "x", "g")) == 1 " left arrow (digraph <-) execute "set listchars+=precedes:" . nr2char(8592) else " underscore execute "set listchars+=precedes:" . nr2char(95) endif " extends if v:version < 603 " underscore execute "set listchars+=extends:" . nr2char(95) elseif Cream_has("ms") && &encoding == "utf-8" " underscore execute "set listchars+=extends:" . nr2char(95) elseif strlen(substitute(strtrans(nr2char(133)), ".", "x", "g")) == 1 " ellipses execute "set listchars+=extends:" . nr2char(133) elseif strlen(substitute(strtrans(nr2char(8230)), ".", "x", "g")) == 1 " ellipses (2nd try) execute "set listchars+=extends:" . nr2char(8230) elseif strlen(substitute(strtrans(nr2char(8250)), ".", "x", "g")) == 1 \&& v:lang != "C" " mathematical greaterthan (digraph >1) execute "set listchars+=extends:" . nr2char(8250) elseif strlen(substitute(strtrans(nr2char(8594)), ".", "x", "g")) == 1 " right arrow (digraph ->) execute "set listchars+=extends:" . nr2char(8594) else " underscore execute "set listchars+=extends:" . nr2char(95) endif endfunction call Cream_listchars_init() " initialize environment on BufEnter (local) function! Cream_list_init() if !exists("g:LIST") " initially off set nolist let g:LIST = 0 else if g:LIST == 1 set list else set nolist endif endif endfunction " toggle on/off function! Cream_list_toggle(mode) if exists("g:LIST") if g:LIST == 0 set list let g:LIST = 1 elseif g:LIST == 1 set nolist let g:LIST = 0 endif call Cream_menu_settings_invisibles() else call confirm( \"Error: global uninitialized in Cream_list_toggle()", "&Ok", 1, "Error") endif if a:mode == "v" normal gv endif endfunction "--------------------------------------------------------------------- " Note: we put this here so our beautiful little character " representations aren't affected by encoding changes. ;) " " vim:fileencoding=utf-8 cream-0.43/cream-ascii.vim0000644000076400007660000003360711517300716016014 0ustar digitectlocaluser"= " cream-ascii.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Updated: 2003-12-20 02:36:58EST " Source: http://vim.sourceforge.net/scripts/script.php?script_id=247 " Author: Steve Hall [ digitect@mindspring.com ] " " Description: " Insert an ASCII character from a dialog box. See the screenshot at " http://cream.sourceforge.net/ss-ascii.png . " " One of the many custom utilities and functions for gVim from the " Cream project ( http://cream.sourceforge.net ), a configuration of " Vim in the vein of Apple and Windows software you already know. " " Installation: " Just copy this file and paste it into your vimrc. Or you can drop " the entire file into your plugins directory. " " Two cream ASCII menu items attempt to load into the bottom of the " default Tools menu. (If you have customized your menus and Tools has " been removed or altered, this could fail, obviously.) " " If you choose not to use the menus, you can also call the " Cream_ascii() function directly from the command line. Options are " as follows: " " :call Cream_ascii() -- No argument inserts a complete " ASCII table into the current " document " " :call Cream_ascii("dialog") -- The argument "dialog" calls the " dialog version of the program " " :call Cream_ascii([32-255]) -- You can also use a number 32-255 " to insert that decimal character " with Vim's nr2char() " " Example Insert Dialog: " " A "paging" dialog box, with a row of characters indicated on the " screen with a single "hot" character in the middle, like this: " +--------------------------------------------------------------------+ " | | " | ...EFGHIJKLMNOPQRST [ U ] VWXYZ[\]^_`abcdefghijklm... | " | | " | [<<-40] [<<-10] [<-1] [insert 85] [+1>] [+10>>] [+40>>>] [cancel] | " | | " +--------------------------------------------------------------------+ " As the (bottom row) buttons are pressed, the characters scroll " correspondingly. " " " Example ASCII Table: " " +----------------------- ASCII TABLE --------------------------------+ " | Notes: | " | * Characters 0-31 are non-printable (32 is a space) | " | * Character 127 is the non-printable DEL character | " | * Characters above 127 are inconsistant or redundant and dependent | " | on operating system, font and encoding. Your milage will vary! | " | | " | 001 033 ! 065 A 097 a 129 161 193 225 | " | 002 034 " 066 B 098 b 130 162 194 226 | " | 003 035 # 067 C 099 c 131 163 195 227 | " | 004 036 $ 068 D 100 d 132 164 196 228 | " | 005 037 % 069 E 101 e 133 165 197 229 | " | 006 038 & 070 F 102 f 134 166 198 230 | " | 007 039 ' 071 G 103 g 135 167 199 231 | " | 008 040 ( 072 H 104 h 136 168 200 232 | " | 009 041 ) 073 I 105 i 137 169 201 233 | " | 010 042 * 074 J 106 j 138 170 202 234 | " | 011 043 + 075 K 107 k 139 171 203 235 | " | 012 044 , 076 L 108 l 140 172 204 236 | " | 013 045 - 077 M 109 m 141 173 205 237 | " | 014 046 . 078 N 110 n 142 174 206 238 | " | 015 047 / 079 O 111 o 143 175 207 239 | " | 016 048 0 080 P 112 p 144 176 208 240 | " | 017 049 1 081 Q 113 q 145 177 209 241 | " | 018 050 2 082 R 114 r 146 178 210 242 | " | 019 051 3 083 S 115 s 147 179 211 243 | " | 020 052 4 084 T 116 t 148 180 212 244 | " | 021 053 5 085 U 117 u 149 181 213 245 | " | 022 054 6 086 V 118 v 150 182 214 246 | " | 023 055 7 087 W 119 w 151 183 215 247 | " | 024 056 8 088 X 120 x 152 184 216 248 | " | 025 057 9 089 Y 121 y 153 185 217 249 | " | 026 058 : 090 Z 122 z 154 186 218 250 | " | 027 059 ; 091 [ 123 { 155 187 219 251 | " | 028 060 < 092 \ 124 | 156 188 220 252 | " | 029 061 = 093 ] 125 } 157 189 221 253 | " | 030 062 > 094 ^ 126 ~ 158 190 222 254 | " | 031 063 ? 095 _ 127  159 191 223 255 | " | 032 064 @ 096 ` 128 160 192 224 | " | | " +--------------------------------------------------------------------+ " "" menu loading "if has("gui_running") " \ && has("menu") " \ && stridx(&guioptions, "m") != -1 " if exists("$CREAM") " " if using the Cream configuration (http://cream.sourceforge.net) " anoremenu 40.200.1 &Insert.Insert\ ASCII\ Character\ (dialog) :call Cream_ascii("dialog") " anoremenu 40.200.2 &Insert.Insert\ ASCII\ Table :call Cream_ascii() " else " " otherwise " anoremenu 40.999 &Tools.-Sep99- " anoremenu 40.999.1 &Tools.Cream\ Insert\ ASCII\ Character\ (dialog) :call Cream_ascii("dialog") " anoremenu 40.999.2 &Tools.Cream\ Insert\ ASCII\ Table :call Cream_ascii() " endif "endif function! Cream_ascii(...) " main function " * If no argument, inserts entire ASCII table " * If argument "dialog", use dialog insert " * Otherwise, insert ASCII character of decimal value passed if exists("a:1") if a:1 == 'dialog' " call ASCII dialog call Cream_ascii_dialog() else " insert ASCII character call Cream_ascii_insert(a:1) endif else " insert ASCII table call Cream_ascii_table() endif endfunction function! Cream_ascii_dialog() if exists("g:Cream_ascii_char") let i = g:Cream_ascii_char else let i = 33 endif while i != '' let i = Cream_ascii_dialog_prompt(i) " force wrap above 254 if i > 254 let i = 32 " force wrap below 32 elseif i < 32 && i > 0 let i = 254 elseif i == 0 " quit endif endwhile endfunction function! Cream_ascii_dialog_prompt(mychar) let i = a:mychar " calculate dialog scroll text let scrollstrpre = '' let scrollstr = '' let scrollstrpost = '' " scrollstrpre let j = 1 while j < 20 let temp = i - j if temp < 32 let temp = temp + 254 - 32 + 1 endif let scrollstrpre = nr2char(temp) . scrollstrpre let j = j + 1 endwhile " add some white space preceeding let scrollstrpre = " " . scrollstrpre " append "character marker" and whitespace let scrollstrpre = scrollstrpre . ' [ ' " scrollstr let scrollstr = nr2char(i) " scrollstrpost let j = 1 while j < 20 let temp = i + j if temp > 254 let temp = temp - 254 + 32 - 1 endif let scrollstrpost = scrollstrpost . nr2char(temp) let j = j + 1 endwhile " prepend "character marker" and whitespace let scrollstrpost = ' ] ' . scrollstrpost " escape ampersand with second ampersand (Windows only) if has("win32") let scrollstrpre = substitute(scrollstrpre , '&', '&&', 'g') let scrollstr = substitute(scrollstr , '&', '&&', 'g') let scrollstrpost = substitute(scrollstrpost, '&', '&&', 'g') endif " if character is a space if i == 32 let scrollstr = "(SPACE)" endif " if character is a delete if i == 127 let scrollstr = "(DEL)" endif "*** DEBUG: "call confirm(" i = " . i . "\n temp = " . temp, "&Ok", 1) "*** let myreturn = confirm( \ " (Note: Some characters may not appear correctly below.)\n" . \ "\n" . \ scrollstrpre . scrollstr . scrollstrpost . "\n", \ "<<<\ \ \-40\n<<\ \ \-10\n<\ \ \-1\n&Insert\ ASCII\ " . i . "\n+1\ \ >\n+10\ \ >>\n+40\ \ >>>\n&Cancel", \ 3) " Windows button string "\ "<<<\ -40\n<<\ -10\n<\ -1\n&Insert\ ASCII\ " . i . "\n+1\ >\n+10\ >>\n+40\ >>>\n&Cancel", if myreturn == 0 " user quit, pressed or otherwise terminated " remember last char let g:Cream_ascii_char = i return elseif myreturn == 1 let i = i - 40 return i elseif myreturn == 2 let i = i - 10 return i elseif myreturn == 3 let i = i - 1 return i elseif myreturn == 4 " insert character call Cream_ascii_insert(i) " remember last char let g:Cream_ascii_char = i return elseif myreturn == 5 let i = i + 1 return i elseif myreturn == 6 let i = i + 10 return i elseif myreturn == 7 let i = i + 40 return i elseif myreturn == 8 " remember last char let g:Cream_ascii_char = i return endif " error if here! endfunction function! Cream_ascii_insert(mychar) " insert ASCII character " puny attempt to foil non-legitimate values, fix later if strlen(a:mychar) > 3 call confirm("String longer than 3 chars in Cream_ascii_insert(). ( a:mychar = " . a:mychar, "&Ok", 1) else let temp = nr2char(a:mychar) execute "normal i" . temp endif endfunction function! Cream_ascii_table_list() echo Cream_ascii_table() "echo @x endfunction function! Cream_ascii_table_insert() let @x = Cream_ascii_table() normal "xp endfunction function! Cream_ascii_table() " return string of an dec255 table let str = "" " header let str = str . "\n" let str = str . " The first 255 characters available on this computer are shown below by \n" let str = str . " DECIMAL VALUE. 0-31 are non-printable (32 is a space) and 127+ are \n" let str = str . " dependant on font and encoding.\n" let str = str . "\n" " assemble body " 1-31 let i = 0 while i < 32 " 0, 32, 64, 96, 128, 160, 192, 224, 256 let j = 0 while j < 255 " prepend "0" if only two characters if (i + j) < 100 " prepend "0" if only one character (theoretical) if (i + j) < 10 let mydecimal = "00" . (i + j) else let mydecimal = "0" . (i + j) endif else let mydecimal = (i + j) endif let mycell = "" " left spacing column if j == 0 let mydecimal = " " . mydecimal endif " create string of decimal number and actual value if i < 32 && j == 0 if i == 0 | let mycell = mycell . mydecimal . " NUL " elseif i == 1 | let mycell = mycell . mydecimal . " SOH " elseif i == 2 | let mycell = mycell . mydecimal . " STX " elseif i == 3 | let mycell = mycell . mydecimal . " ETX " elseif i == 4 | let mycell = mycell . mydecimal . " EOT " elseif i == 5 | let mycell = mycell . mydecimal . " ENQ " elseif i == 6 | let mycell = mycell . mydecimal . " ACK " elseif i == 7 | let mycell = mycell . mydecimal . " BEL " elseif i == 8 | let mycell = mycell . mydecimal . " BS " elseif i == 9 | let mycell = mycell . mydecimal . " TAB " elseif i == 10 | let mycell = mycell . mydecimal . " LF " elseif i == 11 | let mycell = mycell . mydecimal . " VT " elseif i == 12 | let mycell = mycell . mydecimal . " FF " elseif i == 13 | let mycell = mycell . mydecimal . " CR " elseif i == 14 | let mycell = mycell . mydecimal . " SO " elseif i == 15 | let mycell = mycell . mydecimal . " SI " elseif i == 16 | let mycell = mycell . mydecimal . " DLE " elseif i == 17 | let mycell = mycell . mydecimal . " DC1 " elseif i == 18 | let mycell = mycell . mydecimal . " DC2 " elseif i == 19 | let mycell = mycell . mydecimal . " DC3 " elseif i == 20 | let mycell = mycell . mydecimal . " DC4 " elseif i == 21 | let mycell = mycell . mydecimal . " NAK " elseif i == 22 | let mycell = mycell . mydecimal . " SYN " elseif i == 23 | let mycell = mycell . mydecimal . " ETB " elseif i == 24 | let mycell = mycell . mydecimal . " CAN " elseif i == 25 | let mycell = mycell . mydecimal . " EM " elseif i == 26 | let mycell = mycell . mydecimal . " SUB " elseif i == 27 | let mycell = mycell . mydecimal . " ESC " elseif i == 28 | let mycell = mycell . mydecimal . " FS " elseif i == 29 | let mycell = mycell . mydecimal . " GS " elseif i == 30 | let mycell = mycell . mydecimal . " RS " elseif i == 31 | let mycell = mycell . mydecimal . " US " endif else " write "ESC" for 127 if i + j == 127 let mycell = mycell . mydecimal . " DEL" else let mycell = mycell . mydecimal . " " . nr2char(i + j) . " " endif endif " every 5 characters, new line, otherwise space between if (i + j) > 223 let mycell = mycell . "\n" elseif (i + j) == 127 let mycell = mycell . " " else let mycell = mycell . " " endif let str = str . mycell let j = j + 32 endwhile let i = i + 1 endwhile " assemble footer let str = str . "\n" " return "let @x = str return str endfunction cream-0.43/cream-colors-zenburn.vim0000644000076400007660000001475611517300720017705 0ustar digitectlocaluser"= " cream-colors-zenburn.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " "+++ Cream: Use Zenburn's built-in Cream adjuster ;) let g:zenburn_alternate_Visual = 1 "+++ "---------------------------------------------------------------------- " Vim color file " Maintainer: Jani Nurminen " Last Change: $Id: cream-colors-zenburn.vim,v 1.10 2009/08/01 04:58:14 digitect Exp $ " URL: Not yet... " License: GPL " " Nothing too fancy, just some alien fruit salad to keep you in the zone. " This syntax file was designed to be used with dark environments and " low light situations. Of course, if it works during a daybright office, go " ahead :) " " Owes heavily to other Vim color files! With special mentions " to "BlackDust", "Camo" and "Desert". " " To install, copy to ~/.vim/colors directory. Then :colorscheme zenburn. " See also :help syntax " " CONFIGURABLE PARAMETERS: " " You can use the default (don't set any parameters), or you can " set some parameters to tweak the Zenlook colours. " " * To get more contrast to the Visual selection, use " " let g:zenburn_alternate_Visual = 1 " " * To use alternate colouring for Error message, use " " let g:zenburn_alternate_Error = 1 " " * The new default for Include is a duller orang.e To use the original " colouring for Include, use " " let g:zenburn_alternate_Include = 1 " " * To turn the parameter(s) back to defaults, use unlet. " " That's it, enjoy! " " TODO " - IME colouring (CursorIM) " - obscure syntax groups: check and colourize " - add more groups if necessary set background=dark hi clear if exists("syntax_on") syntax reset endif "+++ Cream: "let g:colors_name="zenburn" "+++ hi Boolean guifg=#dca3a3 hi Character guifg=#dca3a3 gui=bold hi Comment guifg=#7f9f7f hi Conditional guifg=#f0dfaf gui=bold hi Constant guifg=#dca3a3 gui=bold "+++ Cream: "hi Cursor guifg=#000d18 guibg=#8faf9f gui=bold highlight Cursor gui=NONE guifg=#ffffff guibg=#ff9020 "+++ hi Debug guifg=#dca3a3 gui=bold hi Define guifg=#ffcfaf gui=bold hi Delimiter guifg=#8f8f8f hi DiffAdd guifg=#709080 guibg=#313c36 gui=bold hi DiffChange guibg=#333333 hi DiffDelete guifg=#333333 guibg=#464646 hi DiffText guifg=#ecbcbc guibg=#41363c gui=bold hi Directory guifg=#dcdccc gui=bold hi ErrorMsg guifg=#60b48a guibg=#3f3f3f gui=bold hi Exception guifg=#c3bf9f gui=bold hi Float guifg=#c0bed1 hi FoldColumn guifg=#93b3a3 guibg=#3f4040 "+++ Cream: "hi Folded guifg=#93b3a3 guibg=#3f4040 hi Folded guifg=#93b3a3 guibg=#505050 "+++ hi Function guifg=#efef8f hi Identifier guifg=#efdcbc hi IncSearch guibg=#f8f893 guifg=#385f38 hi Keyword guifg=#f0dfaf gui=bold hi Label guifg=#dfcfaf gui=underline hi LineNr guifg=#7f8f8f guibg=#464646 hi Macro guifg=#ffcfaf gui=bold hi ModeMsg guifg=#ffcfaf gui=none hi MoreMsg guifg=#ffffff gui=bold hi Normal guifg=#dcdccc guibg=#3f3f3f hi Number guifg=#8cd0d3 hi Operator guifg=#f0efd0 hi PreCondit guifg=#dfaf8f gui=bold hi PreProc guifg=#ffcfaf gui=bold hi Question guifg=#ffffff gui=bold hi Repeat guifg=#ffd7a7 gui=bold hi Search guifg=#ffffe0 guibg=#385f38 hi SpecialChar guifg=#dca3a3 gui=bold hi SpecialComment guifg=#82a282 gui=bold hi Special guifg=#cfbfaf "+++ Cream: hi NonText guifg=#777733 guibg=#333333 gui=none hi SpecialKey guifg=#777733 guibg=#333333 gui=none "+++ hi Statement guifg=#e3ceab guibg=#3f3f3f gui=none hi StatusLine guifg=#1e2320 guibg=#acbc90 hi StatusLineNC guifg=#2e3330 guibg=#88b090 hi StorageClass guifg=#c3bf9f gui=bold hi String guifg=#cc9393 hi Structure guifg=#efefaf gui=bold hi Tag guifg=#dca3a3 gui=bold hi Title guifg=#efefef guibg=#3f3f3f gui=bold hi Todo guifg=#7faf8f guibg=#3f3f3f gui=bold hi Typedef guifg=#dfe4cf gui=bold hi Type guifg=#dfdfbf gui=bold hi Underlined guifg=#dcdccc guibg=#3f3f3f gui=underline hi VertSplit guifg=#303030 guibg=#688060 hi VisualNOS guifg=#333333 guibg=#f18c96 gui=bold,underline hi WarningMsg guifg=#ffffff guibg=#333333 gui=bold hi WildMenu guibg=#2c302d guifg=#cbecd0 gui=underline if exists("g:zenburn_alternate_Visual") " Visual with more contrast, thanks to Steve Hall & Cream posse hi Visual guifg=#000000 guibg=#71d3b4 else " use default visual hi Visual guifg=#233323 guibg=#71d3b4 endif if exists("g:zenburn_alternate_Error") " use a bit different Error hi Error guifg=#ef9f9f guibg=#201010 gui=bold else " default hi Error guifg=#e37170 guibg=#332323 gui=none endif if exists("g:zenburn_alternate_Include") " original setting hi Include guifg=#ffcfaf gui=bold else " new, less contrasted one hi Include guifg=#dfaf8f gui=bold endif " TODO check every syntax group that they're ok "+++ Cream: " statusline highlight User1 gui=bold guibg=#8c9c70 guifg=#606060 highlight User2 gui=bold guibg=#8c9c70 guifg=#000000 highlight User3 gui=bold guibg=#8c9c70 guifg=#ffff66 highlight User4 gui=bold guibg=#8c9c70 guifg=#ff9933 " bookmarks highlight Cream_ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold guifg=Black guibg=#aacc77 gui=bold " spell check highlight BadWord ctermfg=black ctermbg=lightblue gui=bold guibg=#774f3f " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#5f5f5f " email highlight EQuote1 guifg=#8cd0d3 highlight EQuote2 guifg=#83afaf highlight EQuote3 guifg=#669999 highlight Sig guifg=#7f8f8f "+++ cream-0.43/cream-menu-window.vim0000644000076400007660000001041211517300720017155 0ustar digitectlocaluser" " cream-menu-window.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " function! Cream_menu_window() "anoremenu 80.100 &Window.-SEP100- anoremenu 80.101 &Window.Maximize\ (&Single) :call Cream_window_setup_maximize() anoremenu 80.102 &Window.Minimize\ (Hi&de) :call Cream_window_setup_minimize() anoremenu 80.103 &Window.Tile\ &Vertical :call Cream_window_setup_tile("vertical") anoremenu 80.104 &Window.Tile\ Hori&zontal :call Cream_window_setup_tile("horizontal") anoremenu 80.200 &Window.-SEP200- anoremenu 80.201 &Window.Sizes\ E&qual :call Cream_window_equal() anoremenu 80.202 &Window.Height\ Max\ &= :call Cream_window_height_max() anoremenu 80.203 &Window.Height\ Min\ &- :call Cream_window_height_min() anoremenu 80.204 &Window.&Width\ Max :call Cream_window_width_max() anoremenu 80.205 &Window.Widt&h\ Min :call Cream_window_width_min() "anoremenu 80.300 &Window.-SEP300- "anoremenu 80.302 &Window.Move\ To\ &Top K "anoremenu 80.303 &Window.Move\ To\ &Bottom J "anoremenu 80.304 &Window.Move\ To\ &Left\ side H "anoremenu 80.305 &Window.Move\ To\ &Right\ side L "anoremenu 80.350 &Window.-SEP350- "anoremenu 80.351 &Window.Rotate\ &Up R "anoremenu 80.352 &Window.Rotate\ &Down r anoremenu 80.400 &Window.-SEP400- anoremenu 80.401 &Window.Split\ New\ Pane\ Vertical :call Cream_window_new_ver() anoremenu 80.402 &Window.Split\ New\ Pane\ Horizontal :call Cream_window_new_hor() anoremenu 80.403 &Window.Split\ Existing\ Vertically :call Cream_window_split_exist_ver() anoremenu 80.404 &Window.Split\ Existing\ Horizontally :call Cream_window_split_exist_hor() " add tab handling functions to the menu anoremenu 80.450 &Window.-SEP450- anoremenu 80.451 &Window.&Tabs.Make\ Tab\ &First :call Cream_tab_move_first() anoremenu 80.452 &Window.&Tabs.Move\ Tab\ &Left :call Cream_tab_move_left() anoremenu 80.453 &Window.&Tabs.Move\ Tab\ &Right :call Cream_tab_move_right() anoremenu 80.454 &Window.&Tabs.Make\ Tab\ Las&t :call Cream_tab_move_last() anoremenu 80.455 &Window.&Tabs.-SEP455- anoremenu 80.460 &Window.&Tabs.R&efresh\ tabs :call Cream_tabpages_refresh() ":call Cream_tabpages_refresh() " OBSOLETE "anoremenu 80.500 &Window.-SEP500- "anoremenu 80.501 &Window.Start\ New\ Cream\ Instance :call Cream_session_new() "anoremenu 80.550 &Window.-SEP80550- anoremenu 80.551 &Window.Open\ File\ in\ Default\ &Application :call Cream_file_open_defaultapp() imenu 80.570 &Window.Open\ File\ E&xplorer :call Cream_open_fileexplorer() vmenu 80.571 &Window.Open\ File\ E&xplorer :call Cream_open_fileexplorer() anoremenu 80.700 &Window.-SEP700- anoremenu 80.701 &Window.&Calendar\ (toggle)Ctrl+F11 :call Cream_calendar() anoremenu 80.900 &Window.-SEP900- " buffers added here (elsewhere) endfunction call Cream_menu_window() cream-0.43/cream-addon.vim0000644000076400007660000007153411517300716016012 0ustar digitectlocaluser"= " cream-addon.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " README {{{1 " Description: " " A Cream add-on is simply a Vim script written to add functionality " not provided in the standard Cream distribution. Through these " add-ons, a wide range of functionality can be made available to the " user through both menus and key mappings. " " o See Cream_addon_list() for how to register an add-on. " " o Automatically loaded from the cream/addons/ subdirectory. " " o Placed into a submenu in the Tools menu. " " o Each add-on must provide a single functionality in the form of " a function call made through either the menu or the optional key " mapping if the user opts to map it. " " o 6 variations of F12 key are available for the user to map: F12, " Shift+F12, Ctl+F12, Alt+F12, Ctrl+Shift+F12 and Alt+Shift+F12. " (Ctrl+Alt+F12 unused due to typical GNU/Linux window manager " restrictions). " " Notes: " " o Should we check to ensure there are no duplicate functions? " " o This is a pretty simple scheme. Someone with even moderate " knowledge of the Vim scripting language can theoretically do most " anything with it since we automatically load the script, put it in " the menu and execute the call statement. Much the same way Vim " plugins are flexible and powerful, so are add-ons. " " o Functionality may depend on the available Cream environment. But " we suggest you supply your own functions unless you keep us up to " speed on what you're depending on. " " o Obviously, each function should act as if called from a standing " normal mode. You should never use within Vim script because " it has different implications depending on whether insertmode has " been set or not. *Always select your intended mode, never assume " a user is in a particular one.* " " o It would be trivial to devise a massively intertwined set of " libraries with multiple files to create a whole suite of " functions. Talk to us if you're so inclined, that's crazy. ;) " " o All functions should be script-scoped (s:) except for the one " called. " " o Developers should use keys intuitively " " o Developers can provide extensively more flexibility through dialog " choices, not key mappings. " " o Some existing Cream tools should probably be here: " * Capitalize? " * Whitespace handling? " * Cream_debug() " * Backup " " Cream_addon_loadall() {{{1 function! Cream_addon_loadall() " Default: call s:Cream_addon_loader($CREAM . 'addons/*.vim') " User: (only if exist) if exists("g:cream_user") call s:Cream_addon_loader(g:cream_user . 'addons/*.vim') endif endfunction function! s:Cream_addon_loader(path) " load add-ons " get file list let myaddons = glob(a:path) if strlen(myaddons) > 0 let myaddons = myaddons . "\n" else " none found, quit return endif " source each item (destroys array in process) let i = 0 let max = MvNumberOfElements(myaddons, "\n") while i < max let idx = stridx(myaddons, "\n") let myaddon = strpart(myaddons, 0, idx) call Cream_source(myaddon) let myaddons = strpart(myaddons, idx + 1) " *** we're not establishing g:cream_addons here! Each add-on " loads itself!! *** let i = i + 1 endwhile endfunction " Cream_addon_register() {{{1 function! Cream_addon_register(name, tag, summary, menu, icall, ...) " called by each add-on to register: " " call Cream_addon_list("{name}","{tag}","{summary}","{menu}","{icall}","{vcall}") " " o Name " o Tag is a brief one-line, 40-character descripter " o Summary should briefly describe usage. " o Menu name as it should apear in the menu (no accelerator) " o Insert mode function call or execute statement that Cream will " run on menu select or key press. " * Optional: Use '' to eliminate insertmode call/map. " Requires valid visual mode call then. " o Visual mode (optional) functon call if the function behaves " differently from Insert and Visual modes. If not provided, " no visual call is made available. '' also excepted. " " This call loads the array into a global structure of add-ons, and " also manages and retains the user-defined key mappings. " " visual call specified if a:0 == 1 let myvcall = a:1 else let myvcall = '' endif " validate " cannot have empty values if a:name == "" call confirm( \ "Error: Required \"name\" missing to list add-on--not loaded.\n" . \ "\n", "&Ok", 1, "Info") return -1 elseif a:tag == "" call confirm( \ "Error: Required parameter \"tag\" missing to list add-on \"" . a:name . "\"--not loaded.\n" . \ "\n", "&Ok", 1, "Info") return -1 elseif a:summary == "" call confirm( \ "Error: Required parameter \"summary\" missing to list add-on \"" . a:name . "\"--not loaded.\n" . \ "\n", "&Ok", 1, "Info") return -1 elseif a:menu == "" call confirm( \ "Error: Required parameter \"menu\" missing to list add-on \"" . a:name . "\"--not loaded.\n" . \ "\n", "&Ok", 1, "Info") return -1 elseif a:icall == "" call confirm( \ "Error: Required parameter \"icall\" missing to list add-on \"" . a:name . "\"--not loaded.\n" . \ "\n", "&Ok", 1, "Info") return -1 endif "---------------------------------------------------------------------- " escape dis-allowed characters " (nah, let them eat cake for now) "" validate "let myname = substitute(a:name, "[\n\t\r]", '', 'g') "let mytag = substitute(a:tag, "[\n\t\r]", '', 'g') "let mysummary = a:summary ""let mysummary = substitute(mysummary, "[\r]", "\n", 'g') ""let mysummary = substitute(mysummary, "\\[!nt]", "\\\\", 'g') "" escape "let mysummary = substitute(mysummary, '\\', '\\\\', 'g') "" un-escape desired escapes "" * Anything not recovered here is escaped forever ;) "let mysummary = substitute(mysummary, '\\\\n', '\\n', 'g') "let mysummary = substitute(mysummary, '\\\\r', '\\n', 'g') "let mysummary = substitute(mysummary, '\\\\t', '\\t', 'g') " "" escape slashes (thwarts substitute!) "let mysummary = substitute(mysummary, '/', '\\/', 'g') "---------------------------------------------------------------------- " compose this add-on's sub-array "let myitem = a:name . "\t" . a:tag . "\t" . a:summary . "\t" . a:menu . "\t" . a:icall . "\t" . myvcall . "\t" if !exists("g:cream_addons{0}") let g:cream_addons{0} = 1 else let g:cream_addons{0} = g:cream_addons{0} + 1 endif let g:cream_addons{g:cream_addons{0}}_{1} = a:name let g:cream_addons{g:cream_addons{0}}_{2} = a:tag let g:cream_addons{g:cream_addons{0}}_{3} = a:summary let g:cream_addons{g:cream_addons{0}}_{4} = a:menu let g:cream_addons{g:cream_addons{0}}_{5} = a:icall let g:cream_addons{g:cream_addons{0}}_{6} = myvcall endfunction function! Cream_addon_sort() "*** BROKEN: too much memory, crash "let g:cream_addons = MvQSortElements(g:cream_addons, '\n', 'CmpAddonMenu', 1) "*** endfunction function! CmpAddonMenu(item1, item2, direction) " compares menu components of two addon registries " get menu item (4th, index 3) of each let mymenu1 = MvElementAt(a:item1, "\t", 3) + 0 let mymenu2 = MvElementAt(a:item2, "\t", 3) + 0 ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " mymenu1 = \"" . mymenu1 . "\"\n" . " \ " mymenu2 = \"" . mymenu2 . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** if mymenu1 < mymenu2 return -a:direction elseif mymenu1 > mymenu2 return a:direction else return 0 endif endfunction function! Cream_addon_menu() let i = 0 while i < g:cream_addons{0} let i = i + 1 let mymenu = g:cream_addons{i}_{4} let myicall = g:cream_addons{i}_{5} let myvcall = g:cream_addons{i}_{6} "................................................................... " menu priority number according to it's name, first two chars: " decimal value of char 1 * 26^3 " + decimal value of char 2 * 26^2 " Notes: " o This is base26 (26^2 * [1-26] is the largest value we can " fit in Vim's self-imposed 32000 (16-bit) priority menu " limit) " o No sorting happens below submenus " let charcnt = 2 let menupriority = 1 " we might destroy the name in prioritizing (e.g., removing " ampersands) let mymenumunge = mymenu let j = 1 let max = charcnt if strlen(mymenumunge) < charcnt let max = strlen(mymenumunge) endif " get each char while j <= max " get 26 * j let power = 1 let h = charcnt let charval = 0 while h > j let power = power * 26 let h = h - 1 endwhile " validate char (keep removing them till one falls in " range) let valid = 0 while valid == 0 let mycharval = char2nr(mymenumunge[j-1]) " A-Z if mycharval >= 65 \ && mycharval <= 90 break " period elseif mycharval == 46 break " a-z elseif mycharval >= 97 \ && mycharval <= 122 break else " remove the offending characters let mymenumunge = strpart(mymenumunge, 0, j-1) . strpart(mymenumunge, j) endif endwhile " get value " Note: we're converting A-Z to 1-26 if char2nr(mymenumunge[j-1]) == 32 " space (highest, makes broken word first) let charval = 27 elseif char2nr(mymenumunge[j-1]) == 46 " period (quit) break else " else (whatever passed through filter above) let charval = (toupper(char2nr(mymenumunge[j-1]))-64) endif let value = charval * power let menupriority = menupriority + value ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " mymenu = \"" . mymenu . "\"\n" . " \ " mymenumunge = \"" . mymenumunge . "\"\n" . " \ " i = \"" . i . "\"\n" . " \ " j = \"" . j . "\"\n" . " \ " h = \"" . h . "\"\n" . " \ " mymenumunge[j-1] = \"" . mymenumunge[j - 1] . "\"\n" . " \ " char2nr(mymenumunge[j - 1]) = \"" . char2nr(mymenumunge[j - 1]) . "\"\n" . " \ " toupper(char2nr(mymenumunge[j -1])) = \"" . toupper(char2nr(mymenumunge[j - 1])) . "\"\n" . " \ " (toupper(char2nr(mymenumunge[j-1]))-64) = \"" . (toupper(char2nr(mymenumunge[j-1]))-64) . "\"\n" . " \ " charval = \"" . charval . "\"\n" . " \ " power = \"" . power . "\"\n" . " \ " value = \"" . value . "\"\n" . " \ " menupriority = \"" . menupriority . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** let j = j + 1 endwhile "................................................................... " make sure spaces and slashes in name are escaped let mymenu = escape(mymenu, ' \') " add menus " (a:icall cannot be empty, validated above) " both '', skip if myicall ==? '' && myvcall ==? '' return " icall live (vcall dead menu) elseif myvcall ==? '' execute 'imenu 70.910.' . menupriority . ' &Tools.&Add-ons.' . mymenu . ' :' . myicall . '' execute 'vmenu 70.910.' . menupriority . ' &Tools.&Add-ons.' . mymenu . " :\call confirm(\"Option not available with selection.\", \"&Ok\", 1, \"Info\")\" " vcall live (icall dead menu) (could show inactive without selection?) elseif myicall ==? '' execute 'imenu 70.910.' . menupriority . ' &Tools.&Add-ons.' . mymenu . " \:call confirm(\"Option not available without selection.\", \"&Ok\", 1, \"Info\")\" execute 'vmenu 70.910.' . menupriority . ' &Tools.&Add-ons.' . mymenu . ' :' . myvcall . '' " both live else execute 'imenu 70.910.' . menupriority . ' &Tools.&Add-ons.' . mymenu . ' :' . myicall . '' " Note: myvcall must be complete mapping. Remember that " a should be passed if range is not desired. execute 'vmenu 70.910.' . menupriority . ' &Tools.&Add-ons.' . mymenu . ' :' . myvcall . '' endif endwhile endfunction " Cream_addon_select() {{{1 function! Cream_addon_select() " * Compose elements to be posted in s:Cream_addon_map_dialog() " condition maximum displayed let max = 7 let addoncount = g:cream_addons{0} if addoncount < max " if less than max let max = addoncount endif " current item begins in the middle of the height let current = max / 2 " set maximum line length let maxline = 70 " display dialog let quit = 0 while quit == 0 "---------------------------------------------------------------------- " compose dialog " compose selection and description areas let selection = "" let description = "" " wrap at beginning if current < 0 let current = addoncount - 1 " wrap at end elseif current > addoncount - 1 let current = 0 endif "" First Item Displayed Is Half The Diplay Height Before Current "let Addon = Current - ( Max / 2 ) "" Catch Error When Current <= 1/4 Max To List Start "if Current <= ( ( Max / 2 ) / 2 ) " Let Addon = Addoncount - ( Max / 2 ) + Current "endif " first item displayed is half the diplay height before current let addon = current - ( max / 2 ) " catch error when current <= 1/4 max to list start if addon < 0 let addon = addon + addoncount endif " compose each add-on let i = 0 while i < max " wrap starting item if addon < 0 let addon = addoncount - 1 elseif addon > addoncount - 1 let addon = 0 endif " get specific elements of item let myaddonname = g:cream_addons{addon+1}_{1} let myaddontag = g:cream_addons{addon+1}_{2} let myaddonsummary = g:cream_addons{addon+1}_{3} "let myaddonmenu = g:cream_addons{addon+1}_{4} "let myaddonicall = g:cream_addons{addon+1}_{5} "let myaddonvcall = g:cream_addons{addon+1}_{6} " truncate name and tag so we fit consistently let myname = myaddonname if strlen(myname) > 25 let myname = strpart(myname, 0, 22) . "..." endif let mytag = myaddontag if strlen(myname . mytag) > maxline - 3 let mytag = strpart(mytag, 0, maxline - strlen(myname)) . "..." endif " beef each up slightly for nicer margins while strlen(myname . mytag) < maxline + 10 let mytag = mytag . " " endwhile " truncate summary so we fit in the box consistently let mysummary = myaddonsummary if strlen(mysummary) > maxline * 9 let mysummary = strpart(mysummary, 0, maxline * 9 - 3) . "..." endif " insert newlines to paragraph summary let remaining = mysummary let mynewstr = "" while strlen(remaining) > maxline " truncate at a space let j = 0 " find space while strpart(remaining, maxline - j, 1) != " " let j = j + 1 " hmm... didn't find a space, just slash at maxline if j == maxline let j = 0 break endif endwhile " now section there and add newline (add 1 to keep the space outboard) let mynewstr = mynewstr . strpart(remaining, 0, maxline - j + 1) . "\n" " remaining is from there beyond let remaining = strpart(remaining, maxline - j + 1) endwhile " get remainder let mysummary = mynewstr . strpart(remaining, 0) . "\n" " make sure each summary has the same number of lines for good looks ;) " (this is an abuse of this function, but it works!) while MvNumberOfElements(mysummary, "\n") < 4 let mysummary = mysummary . "\n" endwhile " add selection indicators for current if addon == current let selection = selection . ">> " . myname . " -- " . mytag . "\n" " title with current add-on's name let description = "Description: " . myaddonname . "\n" . mysummary else let selection = selection . " " . myname . " -- " . mytag . "\n" endif let addon = addon + 1 let i = i + 1 endwhile " remove iterations above let addon = addon - max "---------------------------------------------------------------------- " post dialog accounting let n = s:Cream_addon_map_dialog(selection, description) if n == "prev" let current = current - 1 let addon = addon - 1 continue elseif n == "next" let current = current + 1 let addon = addon + 1 continue elseif n == "map" " get map key let mykey = s:Cream_addon_getkey() " if none selected, drop back to select dialog again if mykey == -1 continue endif " get mapping sub-elements let icall = g:cream_addons{current+1}_{5} let vcall = g:cream_addons{current+1}_{6} " map let n = s:Cream_addon_maps(mykey, icall, vcall) " retain across sessions if valid if n == 1 " if key matches, stick into right array position so " we never have to sort if mykey == '' let mykeyno = 1 elseif mykey == '' let mykeyno = 2 elseif mykey == '' let mykeyno = 3 elseif mykey == '' let mykeyno = 4 elseif mykey == '' let mykeyno = 5 elseif mykey == '' let mykeyno = 6 elseif mykey == '' let mykeyno = 7 elseif mykey == '' let mykeyno = 8 endif if exists("mykeyno") let g:CREAM_ADDON_MAPS{mykeyno}_{1} = mykey let g:CREAM_ADDON_MAPS{mykeyno}_{2} = icall let g:CREAM_ADDON_MAPS{mykeyno}_{3} = vcall unlet mykeyno endif endif elseif n == "unmap" " go to unmap routine let quit = Cream_addon_unmap_select() elseif n == -1 " quit let quit = 1 endif endwhile return 1 endfunction " Cream_addon_map_dialog() {{{1 function! s:Cream_addon_map_dialog(selections, description) " * Prompt user to select an addon through dialog " * Return key " " +------------------------------------------------------+ " | Item 1 -- Encrypt. | " | > Item 2 -- Color everything green. < | " | Item 3 -- Color everything blue. | " | ----------------------------------------------- | " | | " | Simply select whatever you wish to highlight | " | green, and press Ok! | " | | " | | " | +--------+ +--------+ +-------+ +-------+ +--------+ | " | | Up | | Down | | Map | | UnMap | | Cancel | | " | +--------+ +--------+ +-------+ +-------+ +--------+ | " +------------------------------------------------------+ let sav_go = &guioptions set guioptions+=v " remember focus if !exists("s:focus_map") let s:focus_map = 2 endif let key = "" let n = confirm( \ a:selections . "\n" . \ "\---------------------------------------------------------------------------------------------------------------------------- \n" . \ a:description . "\n" . \ "\n", "&Up\n&Down\n&Map\nU&nMap...\n&Quit", s:focus_map, "Info") if n == 1 let myreturn = "prev" let s:focus_map = 1 elseif n == 2 let myreturn = "next" let s:focus_map = 2 elseif n == 3 let myreturn = "map" let s:focus_map = 2 elseif n == 4 let myreturn = "unmap" let s:focus_map = 2 else let myreturn = -1 let s:focus_map = 2 endif " restore and return let &guioptions = sav_go return myreturn endfunction " Cream_addon_getkey() {{{1 function! s:Cream_addon_getkey() " Return requested mapping " " +---------------------------------------------------------------------------------+ " | | " | Select key (or combination) to map add-on to... | " | | " | | " | ......... ......... ......... ......... .............. ............. .......... | " | : F12 : : +Shft : : +Ctrl : : +Alt : : +Shft+Ctrl : : +Shft+Alt : : Cancel : | " | :.......: :.......: :.......: :.......: :............: :...........: :........: | " +---------------------------------------------------------------------------------+ " let sav_go = &guioptions set guioptions+=v let n = confirm( \ "Select key (or combination) to map add-on to...\n" . \ "\n", "&F12\nShift+F12\nCtrl+F12\nAlt+F12\nCtrl+Shift+F12\nAlt+Shift+F12\nCtrl+Alt+F12\nCtrl+Alt+Shift+F12\n&Cancel", 1, "Info") if n == 1 let myreturn = '' elseif n == 2 let myreturn = '' elseif n == 3 let myreturn = '' elseif n == 4 let myreturn = '' elseif n == 5 let myreturn = '' elseif n == 6 let myreturn = '' elseif n == 7 let myreturn = '' elseif n == 8 let myreturn = '' else let myreturn = -1 endif " restore and return let &guioptions = sav_go return myreturn endfunction " Cream_addon_unmap_select() {{{1 function! Cream_addon_unmap_select() " * Compose elements to be posted in s:Cream_addon_unmap_dialog() " initialize to first item (0-based) let current = 0 " list of mappings to display let mapdisplay = "" " main event loop let quit = 0 while quit == 0 " wrap at beginning if current < 0 let current = 7 " wrap at end elseif current > 7 let current = 0 endif " compose let mapdisplay = "UNMAP:\n\n\n" " Note: keys are 1-based! let i = 0 while i < 8 "if exists("g:CREAM_ADDON_MAPS{i + 1}_{1}") " let mykey = g:CREAM_ADDON_MAPS{i + 1}_{1} "endif if exists("g:CREAM_ADDON_MAPS{i + 1}_{2}") let myicall = g:CREAM_ADDON_MAPS{i + 1}_{2} endif if exists("g:CREAM_ADDON_MAPS{i + 1}_{3}") let myvcall = g:CREAM_ADDON_MAPS{i + 1}_{3} endif " display each key, even if unmapped if i == 0 let tmpkey = ': ' elseif i == 1 let tmpkey = ': ' elseif i == 2 let tmpkey = ': ' elseif i == 3 let tmpkey = ': ' elseif i == 4 let tmpkey = ': ' elseif i == 5 let tmpkey = ': ' elseif i == 6 let tmpkey = ': ' elseif i == 7 let tmpkey = ': ' endif " convert key mapping to human-readable form just for " dialog let tmpkey = substitute(tmpkey, '[<>]', '', 'g') let tmpkey = substitute(tmpkey, 'C-', 'Ctrl + ', 'g') let tmpkey = substitute(tmpkey, 'M-', 'Alt + ', 'g') let tmpkey = substitute(tmpkey, 'S-', 'Shift + ', 'g') " highlight first line if i == current let mapdisplay = mapdisplay . " >> " . tmpkey else let mapdisplay = mapdisplay . " " . tmpkey endif " info lines for mapping explaining current calls if myicall ==? '' let mapdisplay = mapdisplay . myvcall . "\n" else let mapdisplay = mapdisplay . myicall . "\n" endif let i = i + 1 endwhile " pad bottom of text to even map dialog while MvNumberOfElements(mapdisplay, "\n") < 11 let mapdisplay = mapdisplay . "\n" endwhile " post dialog accounting let n = s:Cream_addon_unmap_dialog(mapdisplay) if n == "prev" let current = current - 1 continue elseif n == "next" let current = current + 1 continue elseif n == "unmap" " get element's key let mykey = g:CREAM_ADDON_MAPS{current + 1}_{1} " if already empty, just go back to select dialog if mykey == -1 continue endif " unmap both insert and visual modes execute "silent! iunmap " . mykey . '' execute "silent! vunmap " . mykey . '' " drop from global let g:CREAM_ADDON_MAPS{current + 1}_{1} = "" let g:CREAM_ADDON_MAPS{current + 1}_{2} = "" let g:CREAM_ADDON_MAPS{current + 1}_{3} = "" elseif n == "map" " go to unmap routine let quit = Cream_addon_select() elseif n == -1 " quit let quit = 1 endif endwhile return 1 endfunction " Cream_addon_unmap_dialog() {{{1 function! s:Cream_addon_unmap_dialog(selections) " * Prompt user to select an addon through dialog " * Return key let sav_go = &guioptions set guioptions+=v " remember focus if !exists("s:focus_unmap") let s:focus_unmap = 2 endif let key = "" let n = confirm( \ a:selections . \ "\n\n\n\n\---------------------------------------------------------------------------------------------------------------------------- " . \ "\n", "&Up\n&Down\nU&nMap\n&Map...\n&Quit", s:focus_unmap, "Info") if n == 1 let myreturn = "prev" let s:focus_unmap = 1 elseif n == 2 let myreturn = "next" let s:focus_unmap = 2 elseif n == 3 let myreturn = "unmap" let s:focus_unmap = 2 elseif n == 4 let myreturn = "map" let s:focus_unmap = 2 else let myreturn = -1 let s:focus_unmap = 2 endif " restore and return let &guioptions = sav_go return myreturn endfunction " Cream_addon_maps() {{{1 function! s:Cream_addon_maps(key, icall, vcall) " map keys for add-ons " * return 1 if successful, -1 if either are bad " both "" if a:icall ==? '' && a:vcall ==? '' " do nothing return 1 endif " icall if a:icall ==? '' " dead key execute 'imap ' . a:key . ' ' else " validate prior to mapping if s:Cream_addon_function_check(a:icall) == 1 execute 'imap ' . a:key . ' :' . a:icall . '' else return -1 endif endif " vcall if a:vcall ==? '' " dead key execute 'vmap ' . a:key . ' ' else " validate function existance if s:Cream_addon_function_check(a:vcall) == 1 " map execute 'vmap ' . a:key . ' :' . a:vcall . '' else " unmap icall execute 'iunmap ' . a:key . '' return -1 endif endif " valid functions return 1 "" if vcall passed "if a:0 == 1 " let vcall = a:1 "endif " "" if visual call distinguished "if exists("vcall") " let vcall = a:1 " " if icall live " if a:icall !=? '' " if s:Cream_addon_function_check(a:icall) == 1 " execute 'imap ' . a:key . ' :' . a:icall . '' " else " " invalid " return -1 " endif " else " " map key dead in insert mode " execute 'imap ' . a:key . ' ' " endif " if s:Cream_addon_function_check(vcall) == 1 " execute 'vmap ' . a:key . ' :' . a:1 . '' " else " execute 'iunmap ' . a:key . '' " " invalid (vcall) " return -1 " endif "else " " map key dead in visual mode " execute 'vmap ' . a:key . ' ' " if s:Cream_addon_function_check(a:icall) == 1 " execute 'imap ' . a:key . ' :' . a:icall . '' " else " " unmap vcall " execute 'vunmap ' . a:key . '' " " invalid " return -1 " endif "endif " "" valid functions "return 1 endfunction " Cream_addon_function_check() {{{1 function! s:Cream_addon_function_check(call) " * verifies specified add-on call belongs to an existing function " * returns 1 on success, -1 on error " * warns that a particular function is not available and that mapping " will be skipped. " empty returns success if a:call == "" return 1 endif " strip preceding "*call " off function ("*" includes "", et,al.) let myfunction = substitute(a:call, '.*call\s*', '', 'g') " test exists if !exists("*" . myfunction) call confirm( \ "Warning: Referenced function \"" . myfunction . "\" not available to map. Skipping...\n" . \ "\n", "&Ok", 1, "Info") return -1 endif return 1 endfunction " Cream_addon_maps_init() {{{1 function! Cream_addon_maps_init() " initialize a previous add-on map at session beginning " * add-on maps stored in global g:CREAM_ADDON_MAPS as array " * called by autocmd (thus, not s: script-local scope) "if !exists("g:CREAM_ADDON_MAPS{0}") " let g:CREAM_ADDON_MAPS{0} = 0 " return "endif " iterate through array, assigning maps let i = 1 while i <= 8 " test exists and not empty if !exists("g:CREAM_ADDON_MAPS{i}_{1}") \ || g:CREAM_ADDON_MAPS{i}_{1} == "" let i = i + 1 continue endif " map (validated here, too) let n = s:Cream_addon_maps(g:CREAM_ADDON_MAPS{i}_{1}, g:CREAM_ADDON_MAPS{i}_{2}, g:CREAM_ADDON_MAPS{i}_{3}) " if failed, remove from string if n == -1 unlet g:CREAM_ADDON_MAPS{i}_{1} unlet g:CREAM_ADDON_MAPS{i}_{2} unlet g:CREAM_ADDON_MAPS{i}_{3} " don't increment continue endif let i = i + 1 endwhile endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-colors-night.vim0000644000076400007660000001115211517300716017323 0ustar digitectlocaluser"= " cream-colors-night.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " "---------------------------------------------------------------------- " Vim color file " Maintainer: tiza " Last Change: 2002/02/22 Fri 18:56. " version: 1.1 " GUI only " This color scheme uses a dark background. set background=dark highlight clear if exists("syntax_on") syntax reset endif "let g:colors_name = "cream-night" highlight Normal guifg=#ffffff guibg=#303040 highlight IncSearch gui=UNDERLINE,BOLD guifg=#ffffff guibg=#d000d0 highlight Search gui=BOLD guifg=#ffd0ff guibg=#c000c0 highlight ErrorMsg gui=BOLD guifg=#ffffff guibg=#ff0088 highlight WarningMsg gui=BOLD guifg=#ffffff guibg=#ff0088 highlight ModeMsg gui=BOLD guifg=#00e0ff guibg=NONE highlight MoreMsg gui=BOLD guifg=#00ffdd guibg=NONE highlight Question gui=BOLD guifg=#ff90ff guibg=NONE "+++ Cream: set elsewhere "highlight StatusLine gui=BOLD guifg=#ffffff guibg=#7700ff "highlight StatusLineNC gui=BOLD guifg=#c0b0ff guibg=#7700ff "+++ highlight VertSplit gui=NONE guifg=#ffffff guibg=#7700ff highlight WildMenu gui=BOLD guifg=#ffffff guibg=#d08020 "+++ Cream: prefer bold (set elsewhere, too) "highlight Visual gui=NONE guifg=#ffffff guibg=#7070c0 highlight Visual gui=bold guifg=#ffffff guibg=#7070c0 "+++ highlight DiffText gui=NONE guifg=#ffffff guibg=#40a060 highlight DiffChange gui=NONE guifg=#ffffff guibg=#007070 highlight DiffDelete gui=BOLD guifg=#ffffff guibg=#40a0c0 highlight DiffAdd gui=NONE guifg=#ffffff guibg=#40a0c0 highlight Cursor gui=NONE guifg=#ffffff guibg=#ff9020 highlight lCursor gui=NONE guifg=#ffffff guibg=#ff00d0 highlight CursorIM gui=NONE guifg=#ffffff guibg=#ff00d0 highlight Folded gui=BOLD guifg=#e8e8f0 guibg=#606078 highlight FoldColumn gui=NONE guifg=#a0a0b0 guibg=#404050 highlight Directory gui=NONE guifg=#00ffff guibg=NONE highlight Title gui=BOLD guifg=#ffffff guibg=#8000d0 highlight LineNr gui=NONE guifg=#808098 guibg=NONE highlight NonText gui=BOLD guifg=#8040ff guibg=#383848 highlight SpecialKey gui=BOLD guifg=#60a0ff guibg=NONE " Groups for syntax highlighting highlight Comment gui=BOLD guifg=#ff60ff guibg=NONE highlight Constant gui=NONE guifg=#ffffff guibg=#4822bb highlight Special gui=NONE guifg=#44ffff guibg=#4822bb highlight Identifier gui=NONE guifg=#90d0ff guibg=NONE highlight Statement gui=BOLD guifg=#00ccbb guibg=NONE highlight PreProc gui=NONE guifg=#40ffa0 guibg=NONE highlight Type gui=BOLD guifg=#bb99ff guibg=NONE highlight Todo gui=BOLD guifg=#ffffff guibg=#ff0088 highlight Ignore gui=NONE guifg=#303040 guibg=NONE highlight Error gui=BOLD guifg=#ffffff guibg=#ff0088 " HTML highlight htmlLink gui=UNDERLINE highlight htmlBoldUnderline gui=BOLD highlight htmlBoldItalic gui=BOLD highlight htmlBold gui=BOLD highlight htmlBoldUnderlineItalic gui=BOLD highlight htmlUnderlineItalic gui=UNDERLINE highlight htmlUnderline gui=UNDERLINE highlight htmlItalic gui=italic "+++ Cream: " statusline highlight User1 gui=BOLD guifg=#303040 guibg=#7777c0 highlight User2 gui=bold guifg=#ffffff guibg=#7777c0 highlight User3 gui=bold guifg=#ff99ff guibg=#7777c0 highlight User4 gui=bold guifg=#ff6699 guibg=#7777c0 " bookmarks highlight Cream_ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold gui=BOLD guifg=#ff60ff guibg=#383848 " spell check highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=White guibg=#aa3366 " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#585868 " email highlight EQuote1 guifg=#ccccff highlight EQuote2 guifg=#9999ff highlight EQuote3 guifg=#3333ff highlight Sig guifg=#999999 "+++ cream-0.43/cream-colors-default.vim0000644000076400007660000000427211517300716017643 0ustar digitectlocaluser" " Filename: cream-colors-default.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " set background=light highlight clear if exists("syntax_on") syntax reset endif "let g:colors_name = "cream-default" highlight LineNr gui=NONE guifg=#999999 guibg=#e8e8e8 cterm=NONE ctermfg=DarkGray ctermbg=LightGray "+++ Cream: " invisible characters highlight NonText guifg=#88ddff gui=none highlight SpecialKey guifg=#88ddff gui=none " statusline highlight User1 gui=bold guifg=#aaaaaa guibg=#f3f3f3 highlight User2 gui=bold guifg=#000000 guibg=#f3f3f3 highlight User3 gui=bold guifg=#0000ff guibg=#f3f3f3 highlight User4 gui=bold guifg=#ff0000 guibg=#f3f3f3 " bookmarks highlight Cream_ShowMarksHL gui=bold guifg=blue guibg=lightblue ctermfg=blue ctermbg=lightblue cterm=bold " spell check highlight BadWord gui=bold guifg=DarkBlue guibg=#ffdddd ctermfg=black ctermbg=lightblue highlight DoubleWord gui=bold guifg=DarkBlue guibg=#ffeecc ctermfg=black ctermbg=lightblue " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#ffffcc highlight CursorLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#ffffcc highlight CursorColumn term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#ffeedd " email highlight EQuote1 guifg=#0000cc highlight EQuote2 guifg=#6666cc highlight EQuote3 guifg=#9999cc highlight Sig guifg=#999999 "+++ cream-0.43/cream-menu-edit.vim0000644000076400007660000001002411517300720016572 0ustar digitectlocaluser" " cream-menu-edit.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " undo/redo imenu 20.310 &Edit.&UndoCtrl+Z :call Cream_undo("i") vmenu 20.310 &Edit.&UndoCtrl+Z :call Cream_undo("v") imenu 20.320 &Edit.&RedoCtrl+Y :call Cream_redo("i") vmenu 20.320 &Edit.&RedoCtrl+Y :call Cream_redo("v") anoremenu 20.335 &Edit.-Sep20335- " cut imenu 20.340 &Edit.Cu&tCtrl+X vmenu 20.340 &Edit.Cu&tCtrl+X :call Cream_cut("v") " copy imenu 20.350 &Edit.&CopyCtrl+C :call Cream_copy("i") vmenu 20.350 &Edit.&CopyCtrl+C :call Cream_copy("v") " paste imenu 20.360 &Edit.&PasteCtrl+V :call Cream_paste("i") vmenu 20.361 &Edit.&PasteCtrl+V :call Cream_paste("v") anoremenu 20.395 &Edit.-SEP395- anoremenu 20.400 &Edit.&Select\ AllCtrl+A :call Cream_select_all() " goto anoremenu 20.401 &Edit.-Sep20401- anoremenu 20.402 &Edit.&Go\ To\.\.\.Ctrl+G :call Cream_goto() " find/replace anoremenu 20.405 &Edit.-Sep20405- if has("gui_running") "anoremenu 20.410 &Edit.&Find\.\.\.Ctrl+F :call Cream_find() "anoremenu 20.420 &Edit.&Replace\.\.\.Ctrl+H :call Cream_replace() anoremenu 20.410 &Edit.&Find\.\.\.Ctrl+F :promptfind anoremenu 20.420 &Edit.&Replace\.\.\.Ctrl+H :promptrepl anoremenu 20.440 &Edit.Multi-file\ Replace\.\.\. :call Cream_replacemulti() else anoremenu 20.410 &Edit.&Find/ / anoremenu 20.420 &Edit.Find\ and\ Rep&lace:%s :%s/ vunmenu &Edit.Find\ and\ Rep&lace:%s vmenu &Edit.Find\ and\ Rep&lace:s :s/ endif anoremenu 20.450 &Edit.-Sep20450- anoremenu 20.451 &Edit.Fi&nd\ Under\ Cursor.&Find\ Under\ CursorF3 :call Cream_findunder() anoremenu 20.452 &Edit.Fi&nd\ Under\ Cursor.&Find\ Under\ Cursor\ (&Reverse)Shift+F3 :call Cream_findunder_reverse() anoremenu 20.453 &Edit.Fi&nd\ Under\ Cursor.&Find\ Under\ Cursor\ (&Case-sensitive)Alt+F3 :call Cream_findunder_case() anoremenu 20.454 &Edit.Fi&nd\ Under\ Cursor.&Find\ Under\ Cursor\ (Cas&e-sensitive,\ Reverse)Alt+Shift+F3 :call Cream_findunder_case_reverse() " Word Count anoremenu 20.500 &Edit.-Sep20500- imenu 20.501 &Edit.Count\ &Word\.\.\. :call Cream_count_word("i") vmenu 20.502 &Edit.Count\ &Word\.\.\. :call Cream_count_word("v") imenu 20.503 &Edit.Cou&nt\ Total\ Words\.\.\. :call Cream_count_words("i") vmenu 20.504 &Edit.Cou&nt\ Total\ Words\.\.\. :call Cream_count_words("v") " Columns imenu 20.600 &Edit.-Sep20600- imenu 20.601 &Edit.Column\ SelectAlt+Shift+(motion) :call Cream_columns() "*** BROKEN: " imenu 20.603 &Edit.Set\ Column\ Font\.\.\. :call Cream_fontinit_columns() cream-0.43/cream-menu-mru.vim0000644000076400007660000004645311517300720016467 0ustar digitectlocaluser" " cream-menu-mru.vim -- Most Recent Used (MRU) file list menu " as modified for the Cream project (http://cream.sourceforge.net) " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Origin: http://vim.sourceforge.net/scripts/script.php?script_id=207 " Notes: " * Cream modifications are bracketed by '+++' comments " * Menu renamed and prioritized to accommodate loading at the bottom " of the File menu rather than in a separate menu. (Requires " that the remainder of the menu is able to be loaded by a function " call.) " * Made all menu loads and unloads silent. " * Renamed "Options" menu to "Recent Files, Options" and made it " precede the file list rather than follow it. (Makes a more " intuitive looking and informative header.) " * Changed item numbering from 0-9 to 1-10 " * Commented options to rename the menu or to edit it directly from " the Options menu. " * Ampersand doubling restricted to Microsoft platforms. " * Menu items aligned. " " ChangeLog: " " 2003-05-16 " o Synced with 6.0.3. " " 2003-02-07 " o Abstracted separator character so we can test various encodings " quickly. " " 2002-03-27 " o Got help file exclusions working. Depends both on correct " filtering statement AND removal of redundant autocmd events which " errantly checked filetypes without subject buffer being current. " o Fixed handling of files containing tildes. This was a problem " when matching against the entire buffer list in MRURefreshMenu(). " "...................................................................... """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Purpose: Create a menu with most recently used files " Author: Rajesh Kallingal " Original Author: ??? " Version: 6.0.3 " Last Modified: Thu May 15 16:29:52 2003 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Description: " This plugin will create a MRU menu to keep track of most recently visited " buffers. You can customize Menu Label, menu size and whether to show " numbered or non-numbered menu " " Global Variables Used: " Make sure you have added '!' in 'viminfo' option to save global valiables " MRU_BUFFERS - keeps the lsit of recent buffers, usedto build the menu " MRU_MENUSIZE - maximum entries to keep in the list " MRU_HOTKEYS - whether to have a hot key of 0-9, A-Z in the menu " MRU_LABEL - menu name to use, default is 'M&RU' " " Excludes: " help files (not working) " " Installation: " Just drop it this file in your plugin folder/directory. " " TODO: " - handle buffers to exclude (unlisted buffers, help files) " - handle menu size of more than 35 " - help document " " vim ts=4 : sw=4 : tw=0 """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Do not load, if already been loaded if exists("g:loaded_mrumenu") finish endif let g:loaded_mrumenu = 1 " Line continuation used here let s:cpo_save = &cpo set cpo&vim "+++ Cream: abstract separator character (from "\377") let s:sep = "]" "let s:sep = "\377" "+++ """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Variables """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " following are the default values for the script variables used to control " the script behaviour. The value will be remembered for the future sessions " store file name to use in the menu let s:script_file = expand (':p') "+++ Cream " The menu label to be used, default value "let s:mru_label = 'M&RU' let s:file_prio = "10" let s:mru_prio = "900" let s:mru_label = '&File' "+++ " default value let s:mru_menusize = 10 " set this to 1 if you want to have 0-9, A-Z as the hotkeys in the mru list, set to 0 for the default file name "+++ Cream: default to 1 rather than 0 let s:mru_hotkeys = 1 "+++ """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Functions """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" function! MRUInitialize() call MRUInitializeGlobals () call MRURefreshMenu () endfunction function! MRUInitializeGlobals() " Initialize the global variables with defaults if they are not stored in " viminfo. " Do not intialize, if already been intialized if exists("s:initialized_globals") return endif let s:initialized_globals=1 if exists('g:MRU_LABEL') "name of the menu "+++ Cream: do not assign to global value "let s:mru_label = g:MRU_LABEL let s:file_prio = "10" let s:mru_prio = "900" let s:mru_label = "&File" "+++ unlet g:MRU_LABEL endif if exists('g:MRU_MENUSIZE') " maximum number of entries to remember let s:mru_menusize = g:MRU_MENUSIZE unlet g:MRU_MENUSIZE endif if exists('g:MRU_HOTKEYS') " whether or not to use hot keys 0-9, A-Z for menu items let s:mru_hotkeys = g:MRU_HOTKEYS unlet g:MRU_HOTKEYS endif if exists('g:MRU_BUFFERS') " list of recent buffers let s:mru_buffers = g:MRU_BUFFERS " echo strlen (s:mru_buffers) unlet g:MRU_BUFFERS else let s:mru_buffers = "" endif " This is not required as vim handles really long global variables " if !exists('g:MRU_BUFFERS') " call MRUJoinBufList () " endif " let s:mru_count = 0 endfunction function! MRURefreshMenu() " This function will recreate the menu entries from s:mru_buffers variable " remove the MRU Menu execute 'anoremenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.x x' execute 'silent! aunmenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label " use this variable to keep the list of entries in the menu so far let menu_list = '' "+++ Cream: " recall rest of File menu first call Cream_menu_load_file() " put options at the top call MRUAddOptionMenu () "+++ let list = s:mru_buffers let s:mru_count = 0 while list != "" && s:mru_count < s:mru_menusize " put a separator after every 10 entries if s:mru_count % 10 == 0 && s:mru_count / 10 > 0 "+++ Cream: no need to be single digit, conflicts with others above "execute 'anoremenu ' . s:mru_prio . " " . s:mru_label . '.-sep' . s:mru_count / 10 . '- ' let myprio = s:mru_prio + s:mru_count execute 'anoremenu ' . s:file_prio . "." . myprio . " " . s:mru_label . '.-sep' . s:mru_count . '- ' "+++ endif let entry_length = match(list, s:sep) if entry_length >= 0 let fullpath = strpart(list, 0, entry_length) let list = strpart(list, entry_length + 1, strlen(list)) else let fullpath = list let list = "" endif if fullpath != "" let filename = fnamemodify(fullpath, ':t') "+++ Cream: handle file names with tilde characters in matching through list let filename = escape(filename, "~") "+++ " append a space to the filename to enable multiple entries in menu " which has the same filename but different path while (match(menu_list, '\<' . filename . "\/") >= 0) let filename = filename . ' ' endwhile let menu_list = menu_list . filename . "\/" "+++ Cream: un-escape tilde characters back so menu shows correctly let filename = substitute(filename, '\\\~', '\~', 'g') "+++ let s:mru_count = s:mru_count + 1 call MRUAddToMenu (fullpath, filename) endif endwhile "+++ Cream: put options at the top "call MRUAddOptionMenu () "+++ endfunction function! MRUAddToMenu (fullpath, filename) " Add the entry to the menu let menu_entry = a:filename . "\t" . fnamemodify(a:fullpath,':h') let menu_entry = escape(menu_entry, '\\. |\~') "let editfilename = escape(a:fullpath, '\\. |\~') "incase there is an & in the filename if OnMS() let menu_entry = substitute (menu_entry, '&', '&&', 'g') let menu_entry = substitute (menu_entry, '/', '\\\\', 'g') "let editfilename = substitute (editfilename, '&', '&&', 'g') endif "+++ Cream: " o escape spaces, backslashes, apostrophes " o use Cream_file_open() rather than simple :edit "let menu_command = ' :call MRUEditFile("' . editfilename . '")' "let tmenu_text = 'Edit File ' . a:fullpath "let myfile = escape(a:fullpath, " \'") let myfile = Cream_path_fullsystem(a:fullpath) "if bufloaded (a:fullpath) " "let menu_command = ' :buffer ' . myfile . '' " let menu_command_i = ' :buffer ' . myfile . '' " let menu_command_v = ' :buffer ' . myfile . '' " let tmenu_text = 'Goto Buffer ' . myfile "else "let menu_command = " :call Cream_file_open(\"" . myfile . "\")" "let menu_command = " :call Cream_file_open('" . myfile . "')" " don't specify mode, it's not necessary "let menu_command_i = " \:call Cream_file_open_mru('" . myfile . "')" "let menu_command_v = " :\call Cream_file_open_mru('" . myfile . "')" let menu_command = " :call Cream_file_open_mru('" . myfile . "')" let tmenu_text = 'Edit File ' . myfile "endif "+++ "if exists("s:mru_hotkeys") && s:mru_hotkeys == 1 " use hot keys 0-9 if s:mru_count <= 10 "+++ Cream: count from 1-10, not from 0-9 "let alt_key = s:mru_count - 1 let alt_key = s:mru_count "+++ "+++ Cream: " o underline the first 10 (numbered) entries, no letters " so as not to conflict with other menu items " o precede single digits with two spaces for beauty ;) if s:mru_count < 10 " single digits let alt_key = "\\ \\ &" . alt_key elseif s:mru_count == 10 " 10 is special (alt_key should equal "10") let alt_key = "1&0" endif "+++ " use hot keys A-Z else let alt_key = nr2char(s:mru_count + 54) " start with A at 65 "+++ Cream: append spaces before letters to justify with numbers let alt_key = "\\ \\ " . alt_key "+++ endif " menu priority " Trick: We're doubling the count so we can add space between " for visual mode menu items. let myprio = s:mru_prio + s:mru_count "execute 'anoremenu ' . myprio . " " . s:mru_label . '.' . alt_key . '\.\ ' . menu_entry . menu_command " don't specify mode, it's not necessary "execute 'imenu ' . s:file_prio . "." . myprio . " " . s:mru_label . '.' . alt_key . '\.\ ' . menu_entry . menu_command_i "execute 'vmenu ' . s:file_prio . "." . myprio . " " . s:mru_label . '.' . alt_key . '\.\ ' . menu_entry . menu_command_v execute 'anoremenu ' . s:file_prio . "." . myprio . " " . s:mru_label . '.' . alt_key . '\.\ ' . menu_entry . menu_command "execute 'tmenu ' . myprio . "." . s:mru_count . " " . s:mru_label . '.' . alt_key . '\.\ ' . substitute (escape (a:filename, '\\. |\~'), '&', '&&', 'g') . ' ' . tmenu_text "else " "execute 'anoremenu ' . s:mru_prio . " " . s:mru_label . '.' . menu_entry . menu_command " execute 'imenu ' . s:mru_prio . "." . s:mru_count . " " . s:mru_label . '.' . menu_entry . menu_command_i " execute 'vmenu ' . s:mru_prio . "." . s:mru_count . ".1 " . s:mru_label . '.' . menu_entry . menu_command_v " "execute 'tmenu ' . s:mru_prio . "." . s:mru_count . " " . s:mru_label . '.' . substitute (escape (a:filename, '\\. |\~'), '&', '&&', 'g') . ' ' . tmenu_text "endif endfunction "function! MRUEditFile(filename) " " edit or go to the buffer " " if bufloaded (a:filename) " silent execute 'buffer ' . a:filename " else " silent execute 'edit ' . a:filename " endif "endfunction function! MRUAddOptionMenu() " Add the Option menu entries execute 'anoremenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.-sep0- ' "+++ Cream: do not allow list numbers to be removed "if exists ("s:mru_hotkeys") && s:mru_hotkeys == 1 " execute 'anoremenu ' . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Non\ Numbered\ Menu :call MRUToggleHotKey()' " execute 'tmenu ' . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Non\ Numbered\ Menu Remove sequential number/alphabet from the menu entry' "else " execute 'anoremenu ' . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Numbered\ Menu :call MRUToggleHotKey()' " execute 'tmenu ' . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Numbered\ Menu Add a sequential number/alphabet to the menu entry (0-9/A-Z)' "endif "+++ execute 'anoremenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Set\ Menu\ Size :call MRUSetMenuSize()' execute 'tmenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Set\ Menu\ Size Allows you to change the number of entries in menu.' "+++ Cream: do not allow renaming of the menu "execute 'anoremenu ' . s:mru_label . '.&Recent\ Files,\ Options.Rename\ Menu :call MRUSetMenuLabel()' "execute 'tmenu ' . s:mru_label . '.&Recent\ Files,\ Options.Rename\ Menu Allows you to rename the Top Menu Name' "+++ execute 'anoremenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.-sep0- ' execute 'anoremenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Remove\ Invalid :call MRURemoveInvalid()' execute 'tmenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Remove\ Invalid Removes files no longer exists from the list' execute 'anoremenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Clear\ List :call MRUClearList()' execute 'tmenu ' . s:file_prio . "." . s:mru_prio . " " . s:mru_label . '.&Recent\ Files,\ Options.Clear\ List Removes all the entries from this menu.' endfunction function! MRUAddToList() " add current buffer to list of recent travellers. Remove oldest if " bigger than MRU_MENUSIZE " incase vim is started with drag & drop call MRUInitializeGlobals() "let filename = expand(":p") let filename = fnamemodify(expand("%"), ":p") "+++ Cream: fix exclusion of help files " Exclude following files/types/folders if getbufvar(filename, "&filetype") == "help" return endif "+++ " if exists("g:spooldir") && filename =~ g:spooldir " " do not add spooled files to the list " return " endif "if filename != '' && filereadable (expand ("")) "if filename != '' && filereadable(filename) if filereadable(filename) " Remove the current file entry from MRU_BUFFERS let s:mru_buffers = substitute(s:mru_buffers, escape(filename,'\\~'). s:sep, '', 'g') " Add current file as the first in MRU_BUFFERS list let s:mru_buffers = filename . s:sep . s:mru_buffers " Remove oldest entry if > MRU_MENUSIZE if s:mru_count > s:mru_menusize let trash = substitute(s:mru_buffers, s:sep, "^^", "g") let trash = matchstr(trash, '\([^^^]*^^\)\{'.s:mru_menusize.'\}') let s:mru_buffers = substitute(trash, "^^", s:sep, "g") endif call MRURefreshMenu() endif endfunction " Customizing Options function! MRUClearList() " Clear the MRU List let choice = confirm("Are you sure you want to clear the list?", "&Yes\n&No", 2, "Question") if choice != 1 return endif let s:mru_buffers = '' let s:mru_count = 0 call MRURefreshMenu () endfunction "function! MRUToggleHotKey() " if s:mru_hotkeys == 1 " let s:mru_hotkeys = 0 " else " let s:mru_hotkeys = 1 " endif " call MRURefreshMenu () "" call MRUDisplayMenu () "endfunction "function! MRUSetMenuLabel() " execute 'let menu_label = input ("Enter Menu Label [' . s:mru_label . ']: ")' " " if menu_label != "" " " remove current MRU Menu " execute 'anoremenu ' . s:mru_label . '.x x' " execute 'silent! aunmenu ' . s:mru_label " " let s:mru_label = menu_label " call MRURefreshMenu () " endif "endfunction function! MRUSetMenuSize() execute 'let menu_size = inputdialog("Enter number of recently used\n files to list (maximum 30):", ' . s:mru_menusize . ')' if menu_size != "" if menu_size > 30 let menu_size = 30 endif let s:mru_menusize = menu_size call MRURefreshMenu () endif " call MRUDisplayMenu () endfunction function! MRURemoveInvalid(...) " Remove non existing files from the menu (not automatic, an option) " o Optional argument "silent" prevents display of count removed. let i = 0 let list = s:mru_buffers let buf_list = "" let buf_count = 0 while list != "" let entry_length = match(list, s:sep) if entry_length >= 0 let fullpath = strpart(list, 0, entry_length) let list = strpart(list, entry_length+1, strlen(list)) else let fullpath = list let list = "" endif if filereadable(fullpath) if buf_count == 0 let buf_list = fullpath else let buf_list = buf_list . s:sep . fullpath endif let buf_count = buf_count + 1 else let i = i + 1 endif endwhile let s:mru_buffers = buf_list let s:mru_count = buf_count call MRURefreshMenu() if a:0 == 0 || a:1 != "silent" call confirm( \ "Non-existing files removed: " . i . "\n" . \ "\n", "&Ok", 1, "Info") endif endfunction function! MRUVimLeavePre() "+++ Cream: do not save global variable for name "let g:MRU_LABEL = s:mru_label "+++ let g:MRU_MENUSIZE = s:mru_menusize "+++ Cream: do not save global variable for hot keys "let g:MRU_HOTKEYS = s:mru_hotkeys "+++ "+++ Cream: handle remote server errors "let g:MRU_BUFFERS = s:mru_buffers if exists("s:mru_buffers") let g:MRU_BUFFERS = s:mru_buffers endif "+++ endfunction "+++ Cream function! Cream_file_open_mru(filename) " wrapper for the File.MostRecentlyUsed menu items " if file doesn't exist, refresh MRU, abort if !filereadable(a:filename) call confirm( \ "File no longer exists!\n" . \ "\n", "&Ok", 1, "Info") call MRURemoveInvalid("silent") return endif " open, buffer if bufexists(a:filename) if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 let cnt = tabpagenr("$") let i = 1 while i <= cnt " quit if current if bufnr("%") == bufnr(a:filename) continue endif if i == bufnr(a:filename) continue endif tabnext let i = i + 1 endwhile else execute "buffer " . bufnr(a:filename) endif return " open, file else call Cream_file_open(a:filename) endif endfunction "+++ "+++ Cream: moved to autocmds "augroup MRU " autocmd! " autocmd VimEnter * call MRUInitialize() " "autocmd GUIEnter * call MRUInitialize() " "+++ Cream: remove redundant events (When buffer not current, " " filetype is not able to be determined and excluded " " based on type.) " "autocmd BufDelete,BufEnter,BufWritePost,FileWritePost * call MRUAddToList () " autocmd BufEnter * call MRUAddToList() " "+++ " "+++ Cream: call relocated to Cream_exit() " "autocmd VimLeavePre * nested call MRUVimLeavePre() " "+++ "augroup END "+++ " restore 'cpo' let &cpo = s:cpo_save unlet s:cpo_save cream-0.43/cream-menu-developer.vim0000644000076400007660000001433011517300720017636 0ustar digitectlocaluser" " Filename: cream-menu-developer.vim " Updated: 2004-12-26 21:28:12-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " if !exists("g:cream_dev") finish endif " Cream_menu_devel() {{{1 function! Cream_menu_devel() " load the developer menu " Notes: " o This is now dynamic: whatever files exist in g:cream_cvs " are put in the menu. " o All subdirectories of g:cream_cvs are included (but no " farther). " o This is called via VimEnter autocmd so multvals functions are available. " drop back to $CREAM if not set manually (will cause error on " open on systems with permissions on these files) if !exists("g:cream_cvs") let g:cream_cvs = $CREAM else " verify has trailing slash let test = matchstr(g:cream_cvs, '.$') if test != '/' && test != '\' let g:cream_cvs = g:cream_cvs . '/' endif endif " main menu priority let g:cream_menu_dyn_prio = 9999 " submenu priority let g:cream_menu_dyn_subprio = 1 " main menu name let g:cream_menu_dyn_menustr = 'Cream\ &Developer' " maximum items in menu let g:cream_menu_dyn_maxitems = 40 " remove existing menu execute "silent! aunmenu \ " . g:cream_menu_dyn_menustr " main file set call Cream_menu_dyn_files(g:cream_cvs, ".cream") " subdirectory files call Cream_menu_dyn_dirs(g:cream_cvs, ".cream") " seperator call Cream_menu_dyn_sep() " g:cream_user files call Cream_menu_dyn_files(g:cream_user, ".user") " seperator call Cream_menu_dyn_sep() " make run INSTALL.sh entry if Cream_has("ms") let installer = 'INSTALL\.bat' else let installer = 'INSTALL\.sh' endif execute "anoremenu " . g:cream_menu_dyn_prio . "." . g:cream_menu_dyn_subprio . " " . g:cream_menu_dyn_menustr . '.run\ ' . installer . ' :call Cream_install()' endfunction " Cream_install() {{{1 function! Cream_install() " save cwd let mycwd = getcwd() let mycmdheight = &cmdheight set cmdheight=2 " change current directory to that of install bat execute ":silent cd " . Cream_path_fullsystem(g:cream_cvs) if Cream_has("ms") execute '!' . Cream_path_fullsystem(g:cream_cvs) . '\INSTALL.bat' else " echo relative path to installer echo '' echo ' After entering root password, run this command:' echo '' echo ' sh INSTALL.sh' echo '' execute ':!su' endif let &cmdheight = mycmdheight " restore cwd execute ":silent cd " . mycwd endfunction " Cream_menu_dyn_dirs() {{{1 function! Cream_menu_dyn_dirs(path, submenu) " Menu all the files found in the subdirectories of {path}. " TODO: This is now a prototype--use it! let mydirs = Cream_getfilelist(a:path . "*/") let i = 0 let cnt = MvNumberOfElements(mydirs, "\n") while i < cnt " find first let mypos = stridx(mydirs, "\n") let mydir = strpart(mydirs, 0, mypos) if mydir != "" " trim to remaining let mydirs = strpart(mydirs, mypos + 1) " strip path let mydir = fnamemodify(mydir, ":p:h:t") . '/' let submenu = a:submenu . '/' . mydir call Cream_menu_dyn_files(a:path . mydir, submenu) endif let i = i + 1 endwhile endfunction " Cream_menu_dyn_files() {{{1 function! Cream_menu_dyn_files(path, submenu) " Menus all files found in {path} into {submenu} of g:cream_menu_dyn_menustr. " TODO: This is now a prototype--use it! let path = a:path " ensure trailing slash let path = Cream_path_addtrailingslash(path) " get root files let myfiles = Cream_getfilelist(path . "*") " menu each file let subdir = "" let ctr = 0 let i = 0 let cnt = MvNumberOfElements(myfiles, "\n") while i < cnt " find first let mypos = stridx(myfiles, "\n") let myfile = strpart(myfiles, 0, mypos) " remove double slashes let myfile = substitute(myfile, '//\+', '/', 'g') if myfile != "" " trim to remaining let myfiles = strpart(myfiles, mypos + 1) " skip if directory if isdirectory(myfile) let i = i + 1 continue endif " strip path let myfilename = substitute(myfile, '.*[/\\:]\([^/\\:]*\)', '\1', '') " collect into subgroups if total count is higher then max if cnt >= g:cream_menu_dyn_maxitems " bump index to multiple of 15 so first menu has 15 items if ctr == 0 let g:cream_menu_dyn_subprio = ((g:cream_menu_dyn_subprio) + g:cream_menu_dyn_maxitems - ((g:cream_menu_dyn_subprio + g:cream_menu_dyn_maxitems) % g:cream_menu_dyn_maxitems)) endif " if index is divisable by 0 increment counter if (g:cream_menu_dyn_subprio % g:cream_menu_dyn_maxitems) == 0 let ctr = ctr + 1 endif " string is menu seperator and count let subdir = "." . "[" . ((ctr - 1) * g:cream_menu_dyn_maxitems) . "-" . ((ctr * g:cream_menu_dyn_maxitems) - 1) . "]" endif " convert idx to string and pad let index = g:cream_menu_dyn_subprio while strlen(index) < 3 let index = "0" . index endwhile let cmdstr = \ "anoremenu \" . \ " " . g:cream_menu_dyn_prio . "." . index . \ " " . g:cream_menu_dyn_menustr . a:submenu . subdir . "." . escape(myfilename, ' .-') . \ " " . ":call Cream_file_open(\"" . myfile . "\")\" execute cmdstr let g:cream_menu_dyn_subprio = g:cream_menu_dyn_subprio + 1 endif let i = i + 1 endwhile endfunction " Cream_menu_dyn_sep() {{{1 function! Cream_menu_dyn_sep() " Add a line seperator at the current priority index. execute "anoremenu \ " . g:cream_menu_dyn_prio . "." . g:cream_menu_dyn_subprio . " " . g:cream_menu_dyn_menustr . ".-SEP" . g:cream_menu_dyn_subprio . "- \" endfunction " 1}}} " vim:foldmethod=marker cream-0.43/docs/0000755000076400007660000000000011517421112014033 5ustar digitectlocalusercream-0.43/docs/TODO.txt0000644000076400007660000007703211317563066015367 0ustar digitectlocaluser Filename: TODO.txt Updated: 2010-01-02, 01:22am The Features listed below aren't features yet! (But the bugs are. ;) _____________________________________________________________________ Major Features Still Missing {{{1 o Slightly more sophisticated dialogs with radio buttons, checkboxes, list boxes, and input boxes to simplify option selection flow. o A real widget (not text area) statusbar. o Proportional fonts. o Print preview and page manipulation. o Hidden command line (but able to pop open). o Apple platform support. (Need a tester, probably works.) o Project file management. * => Vim 7 o Live/real-time remote editing (FTP/HTTP/SSH). * => Vim 7 o Hex editing * => Now available, but undocumented. o Smoother handling of ultra-large files. * => Minor fixes to turn off syntax highlighting. _____________________________________________________________________ Short Term {{{1 o BUG: Alt+Down to a function in same file stays in the same tab (good), but it hides the local Tag List pane (bad). And Alt+Up seems to only return to the original place if the new file is in the same directory as the old. (Mark Gardner) o Tab/window conflicts {{{2 * BUG: When opening too many files from the command line (10+), Vim complains that there is "not enough room" when using tabs (Elias Pschernig) * => BUG: Multi-window logic still needed. - Eg, diff split can't switch between. - Eg, window logic broken for single-sessions. - Eg, window logic broken for externally passed arguments. (File managers.) - What should happen? + => Nothing? Provide "tab all" option? Maximize should probably clean up tabs--we don't want one buffer hidden and another shown twice. + => Dis-allow tabs with window options? (When used, hide tabs.) * BUG: Fix tab right-click menu (Cream-ify). - => Vim bug, this menu is hard-coded. }}}2 o Spell check features {{{2 * => Need to add languages - Option to select languages based on existing dictionaries, or available. - Option to retrieve additional dictionaries from ftp://ftp.vim.org/pub/vim/runtime/spell. - Option to "turn off" dictionaries? - Move them to a stash location - Mod and retain &spelllang - (If not adding the above.) Add Vim7 spell check FAQ item on how to add dictionaries, and set spelllang. * BUG: reconcile Cream global with Vim buffer-local state. * Ctrl+F7: add word to user's dictionary * Create an "edit user dictionary" option? Scroll through words one by one. * Option: Specify that all words that begin with a capital letter are spelled correctly. (Peter Heslin) * Create an auto-correct (mis-spelling abbreviations) for each language that has a dictionary. 2}}} o Add option for &autosave. o BUG: Turn off last file restore if Cream detects arguments (argc() > 0). o BUG: Wrap width highlighting is buffer-specific, and non-retained across sessions. (And the menu doesn't make this clear.) (Mark Gardner) ______________________________________________________________________ Longer Term {{{1 o Move from CVS to SVN. o Add setting for Windows keyboard shortcut via shortcut maker (now in lib-os). * Can we do this for Gnome? o Build RPM based on Jeff Woods contribution. o Hooks for Save and SaveAs. (Ben Armstrong) * => Will involve re-working the browse confirm with a more parsing browse(). o BUG: BufEnter autocmds do not respect modelines. * => Fixed by securemodelines? o Move sorting to use internal :sort o Convert remaining menus from anoremenu form to i/vmenu form so they are properly handled in column mode. o Add Insert [filename] (:read). [Frank, 2005-11-14] o Run MRU paths through Cream_path_fullsystem() to avoid duplicates (on Windows only?). (Frank) o Prototype popup should insert current function name. * Re-vamped completion based on new Vim7 feature. o Explore motion correcting new key: CTRL-\ CTRL-O. o Insert mode CursorHold autocmd event: * More granular undo, such as character by character inserted rather than an entire line. (I type too fast, I guess. ;) * Autosaves o Unfolded fold indicator. (With bookmarks? With autocmd &foldcolumn=2?) (Wolfgang Hommel) o Templates {{{2 * :read into var! - => Vim7. * Templates need better press * Template structure should be located on-demand, not loaded as vars - Read literally + no escaping issues + Fixes botched listings (e.g., "html" et.al.) - Organized by filetype name directories. - Handle completions without line endings via NL trim. 2}}} o Find/Replace {{{2 * Use new internal grep to search files before opening them. - => Vim7. * More precise control over :promptfind and :promptrepl. As it stands, the commands are carried out by the master without our filtering. The input and settings are also unreturnable. - => TGL wrote patches, tracking above. * Fix Feature doc statement about regexp. * Change to treat '\' literally. (No hope to use regexp.) (?!) * Make it recursive down a directory. * BUG: Find's repeat dialog Previous button broken in some instances. 2}}} o :promptfind and :promptrepl bug tracking {{{2 * => Some of these look to end up in Vim7. * Documentation of usage of '\V' for both. * Need checkbox for regexp. (TGL) * Replace treats '\r' as literal, but ReplaceAll sees it as return. * Windows: Dialog looses focus. (Verify with direct call.) * Windows: Replace portion isn't remembered. * Windows: Esc doesn't close dialog. 2}}} o Large file handler {{{2 * lazyredraw, swapfile, backup, autocmds, highlighting * autocmd wrapper (Ben Armstrong): - let myeventignore = &eventignore - set eventignore=BufEnter - " open in current window } command - execute "edit " . myfile } - let &eventignore = myeventignore - doautocmd BufEnter * 2}}} o Performance issues {{{2 * Methods - new :profile command! - set verbose=9+ (:help 'verbose) * Load on-demand, and buffer-local: - Contributors - => Need Cream_return_file(file) to return the contents of a file. (To avoid loading it as a script or var.) * Speed. Opening many files is too slow. Re-think array system for some cases. - => Menuing is the single most expensive task on startup, generally the more, the slower. (Filetypes are the largest and therefore the biggest culprit...now cached. The Developer menu (usually off) is the second largest.) - Explore: autocmds + => Menuing autocmds are half of startup time. + No improvements by clustering. - Explore: EasyHtml MvQSort call. - Add-ons + => Review completed. - Explore: Optioning of window/font positioning + => Review completed. + Vim positioning o default for winpos *is* off o ":set sessionoptions+=resize" is for panes, not window (no help) + Pane organization does not contribute to slowness. + Font does not contribute to slowness. 2}}} o Use a different char for LF($), CR/LF(¶), CR(«, §, ⁋)? Change on BufEnter depending on fileformat. * => Has to be ASCII for full platform support. o BUG: When opening a file from the command line ($cream file) with an instance already existing, sometimes the file is not opened or a closed is not closed--buffer confusion. (Kamadev Bhanuprasad) o Use browsedir() where useful. o Project manager (Matt Wilkie, et.al.) {{{2 * Use lists to manage associated vars. - => Vim7. * Menus - Menuization of all project files. - Dynamic menu mechanism has now been refactored and already in use for Cream Developer menu. * Retainage of project preferences, paths, settings - Explore :mksession options 1, 2, 4, 7, and 10 (*x.vim). - Session file stored with the files themselves (multi-user). (Verify no personal information stored.) - Paths stored in session file with relative pathing. - Vim variables and script. (E.g., Timestamp style.) * Multiple projects available in a single session. * Simple modification and adjustment (read/write) of project file. 2}}} o Vimgrep files for expression. (Ben Armstrong) o Remote editing (FTP, HTTP, SCP). o Move Convert Hex2ASCII add-on to View menu. o Add :set display+=uhex (?) o Option to open Recent File list items Read Only. (Ben Armstrong) o Full Justification * Fix trailing spaces bug. (Xavier Nodet) * Should strip leading whitespace (such as when right justified). (Michael Marquart) o String translation scheme. (TGL) {{{2 * => Need help writing software that can extract and process strings out of the code. - In a nutshell, the problem is 1. Enabling code to call messages for the proper language. 2. A update notification system so translators know when to translate new messages. - The simplest strategy would be to: 1. Use a numbered message system, each call for a string references the language's file containing the strings. 2. Make them numerical and never edit existing strings so the last number indicates the last line translated. * New functions that manage i18n: - Functions: + Cream_i18n_confirm() + Cream_i18n_echo() + Cream_i18n_input() - New i18n functions must manage standard arguments, but also: + file_line code + default string - Closing parenthesis of call must end line. (No trailing space.) * String extractor - Generates a "strings" file from the code by extracting select functions. - Use function returning string by number. - Regexp extraction on existing strings. + mg (multiline grep: http://www.srekcah.org/~utashiro/perl/scripts/mg/) mg -c 0 -eQ 'confirm\([\w\W]*?\)\s*\n' *.vim + Above just needs to capture everything from line beginning. * String translator - Handles call from string functions and returns translated string or default. * String diff - Tool to diff existing translations against updated code. + Re-uses existing translated strings + Indicates updated/new strings that need to be (re)translated 2}}} o Enhance lib-os: cp, mkdir, permissions, rootcmd, rm/rmdir o BUG: Encrypt algorithmic is botched. * => Works on GNU/Linux, Windows bug only? o ctags: * BUG: Update Cream ctags with silent appears to fail. - => Fixed in 0.33? * BUG: ctag generation hosed cross platform with paths that have a space. * Test and stablize Ctag Generate addon. o Expert mode {{{2 * BUG: isn't being retained across sessions (or multiple windows). (Java TrashBin) - => Now fixed? * If in Expert Mode, start a session in Normal mode. (Eugene/eyv) * Warning is a bit flagrant and doesn't explain that it can be simply toggled off. (Michael Marquart) * Should Esc in Expert Mode always drop to normal and not toggle between normal and insert? (Julien Goodwin) 2}}} o Swap files * Use of single-session with swapfiles causes warning at each new instance. Swapfiles are disabled with the single-session setting and upon starting a new instance from an existing one. - => Improved design here would be to pass only the relevant info via a session file, not the viminfo. (Variables are not passed between sessions as best we can tell.) o Approaches to HTML tag wrapping: {{{2 * function! My_li() " expects user to be in visual mode when started " re-select normal gv " cut normal "xx " insert start tag normal i
  • " paste normal "xpl " close tag normal i
  • endfunction * func! My_li() normal `> normal a normal `< normal i
  • normal `> normal f> endfunc * func! My_li() let @x="
  • " normal gv"Xx let @X="
  • " normal "xp endfunc 2}}} o Use command line progress readout (a la third party script) for replacemulti. (Any other routines that could benefit?) o Update all input dialogs to use custom Inputdialog(). o TeX issues * BUG: Spell check shows ". \a" as an error in Tex. (Wolfgang Hommel) * BUG: Treats a number followed by a TeX size keyword as something special. (Wolfgang Hommel, 28 Jan 2005) o ADDON: Finish touch typing tutor! (Giraffe/Tetris-like) o Option multiple presses of a mapped keystroke for "power key" (F12). Example: is timestamp, is filename stamp. o Printing * Basic (optional?) CUPS printexpr for gui_gtk2. * Improve usability of print setup menus. * Fix default print header. * See if print header can be evaluated in dialog prior to printing. o Install a KDE icon for Cream. (John Culleton) o text=>html, text-link, wiki-ish features. A project is postable as a set of web pages, complete with relative links to non-html files. o Explore DOS shells that don't leave open via Tip #642. o Make Vim/Cream a "known app" Win32 registry additions: {{{2 * (2003-11-05, by Giuseppe "Oblomov" Bilotta): ............................................................ REGEDIT4 [HKEY_CLASSES_ROOT\Applications\gvim.exe] [HKEY_CLASSES_ROOT\Applications\gvim.exe\shell] [HKEY_CLASSES_ROOT\Applications\gvim.exe\shell\edit] [HKEY_CLASSES_ROOT\Applications\gvim.exe\shell\edit\command] @="c:\\vim\\vim63\\gvim.exe \"%1\"" [HKEY_CLASSES_ROOT\.htm\OpenWithList\gvim.exe] ............................................................ * Adds gvim.exe to the list of "known apps" to appear in the "Open With ..." list. * Adds the above mentioned "known app" to the list of HTML editors for IE. * Win98+ (untested on Win95, WinNT-XP) 2}}} o Timestamp Add-on: try to guess the format based on existing. (Else default to last.) o Explore entire feature set of externally called commands via K command and &keywordprg. o Explore title case capitalization without particles * Just substitute lower cased particles in the finished string. * Make that list multi-language. o Modify $CREAM to not have a trailing slash. o BUG: Multiple help windows opened aren't closed. (Opened via tag nav?) o File type: * Foldmarker: Check out "set foldmarker=begin_fold,end_fold" for HTML. (Colby Jon) o Diff * Diff (patch) creation - New buffer - Same file format as that patched, or always UNIX? * -u vs. -c o Find, Replace, Replace Multi-File {{{2 * Find and Replace shortcuts (Ctrl+F, Ctrl+H) do not behave properly with selections (from visual mode). Pass selection to dialog. (Sven Vahar) * Find (not multifile) - Allow wildcard "*" in Find field. Use "\*" to imply a real asterisk. - Match whole word only * Replace (not multifile) - Allow wildcard "*" in Find field. Use "\*" to imply a real asterisk. - Option replace in selection. - Match whole word only * Replace Multifile: - Clean up multi-replace using Cream_cmd_on_paths() - Allow wildcard "*" in Find field. Use "\*" to imply a real asterisk. (use globpath() over glob()) - Option path browse, start at current. - Option list only. List filenames containing Find (rather than change them). - Match whole word only - Search subdirectories * Make call of find or find/replace with selection use that selection as the default find. * Find/Replace (builtin) :promptfind and :promptrepl. Could we go back to using these? Known problems: - Loss of focus means the mouse must be used to repeat the search. 2}}} o Taglist * Eliminate some header info * Put all help info in header o Help, Cream * What's New dialog/splash. (Matthias Kopfermann) * Add additional version information into Help > About dialog. o Synchronize non-Cream scripts * ShowMarks (Anthony Kruize) - http://www.vim.org/scripts/script.php?script_id=152> * calendar * mru * buffer menu o Reduce general function scopes (via s:). o Marketing (*cough*) * "Powered by" icon. * Start an Easy Contributions/Help Wanted list to post to the website. o Open current file's folder in Windows: http://vim.sourceforge.net/tip_view.php?tip_id=311 o QuickMark -- Eliminate Ctrl+F2 mapping for show marks (they should always show if they exist) and use Ctrl+F2+[digit] for QuickMarks. If at a QuickMark, it's eliminated, if not jumps to it. (Wolfgang Hommel) o Rename Wrap, AutoWrap and QuickWrap more intuitively. Suggestions include "WordWrap", "Re-Format", "Re-Wrap". (Wolfgang Hommel) Also, "Wrap-As-You-Type". o Spaces-to-tab function * => :help retab Accomlished with noexpandtabs and :retab! * Remove spaces before tabs (calculate based on &tabstop, if {spaces} < ts, replace with tab ) - :%s/\t[ \1,{x}]\t/\t\t/ge (where {x} is tabstop - 1) - :%s/\t[ \{y}]\t/\t[\t\{y}]\t/ge (where {y} is tabstop^1...n) Also can just select all, indent then unindent. (Must make sure re-wrap tendancies are turned off!) o Windows Installer {{{2 * Installer license "Accept" button is blank with Dutch language. (Bram Moolenaar) (Apparently also German, others.) - => This is NSIS language stuff, only partially fixed by 2.0 * cream+vim: - no _vimrc.orig backup gets created - Cream's vimrc install should backup the existing vimrc as "_vimrc.vim"(?) * Some items from install.exe still not supported. * Make Vim-branded splash graphic 2}}} o Toolbar icon upload {{{2 * Read :help toolbar-icon. (Most of these tricks and subtlties are now described below.) * Using icons is bulletproof if you address these concerns: - "icon=" is broken + Direct pathing works unreliably. Instead ammend a parent path of the icon subdirectory to &runtimepath: o A subfolder "bitmaps" must exist below some path on &runtimepath. All referenced icons must be here. o Spaces in &runtimepath path must be escaped. + Extensions can get in the way o Don't specify the file extension in your icon= parameter. o Use .bmp for Windows and .xpm for GTK. + Menu priority must come after the icon argument (must precede everything else other than ""). - Icon specifics + Size is 18px x 18px. + Windows: Icons must be 16 colors (4-bit), using the default Windows palatte (Lt. Gray is transparent). + GTK: Up to 24-bit icons w/ single bit transparency are supported. (Multi-bit maybe now too, although the file sizes will start to get a bit large.) 2}}} o Buffer/Window management {{{2 (We know there are still a few minor issues left here but can't generate the interest to finish.) * Tiling should retain open windows, even when multiple windows are focused on a single buffer. This implies that positioning within each window/file should also be retained. (Benji Fisher) * MAKE OPTIONAL! * EVENTS Open/New: [x] File open via File menu, map, toolbar -- Cream_file_open() [x] File open via MRU menu -- Cream_file_open() [x] File open via Opsplorer [x] File New -- Cream_file_new() [-] File SaveAs -- Cream_file_saveas() [x] Help [x] Special: Calendar via map and Window menu -- Cream_calendar() [x] Special: Opsplorer open via Window menu -- Opsplorer() [-] Special: File Explorer open via Window menu -- Cream_explorer() [x] Special: TagList startup [x] Special: EasyHtml startup [ ] Single session: when in special/etc. Window Tiling: [x] Maximize (Single) [x] Minimize (Hide) [ ] Splits, new buffer, Vertical or Horizontal [ ] Splits, existing buffer, Vertical or Horizontal [ ] Diffs [?] Tile -- Future [-] Modes -- No, this is unnecessary. Future at best. Change: [x] Change buffer via buffer menu [-] Change window via mouse [x] Change window/buffer via map -- Cream_next[prev]window() [-] Window sizes and count -- (various) Restart: [x] Specials not initialized: Opsplorer, Taglist, EasyHtml Close: [x] File close via File menu, map and toolbar -- Cream_close() [x] Special: Opsplorer close via "X" option -- Cream_close() [x] Special: File Explorer open via Window menu -- Cream_explorer() [x] Special: File Explorer close via File menu -- Cream_close() [x] Special: Calendar via map and Window menu -- Cream_calendar() [x] Special: TagList via File menu -- Cream_close() [x] Special: EasyHtml via File menu -- Cream_close() Exit: [x] Exit via File menu -- Cream_exit() [x] Exit via window manager -- Cream_exit() (autocmd) [x] Exit via mouse (window X) -- Cream_exit() (autocmd) * CONDITIONS ("Test Suite") - No buffers open, unnamed is unmodified - Named and Unnamed buffers - Modified and Unmodified buffers - Windowed and Hidden buffers - Multiple and Single buffers - Multi-Windowed buffer (one buffer in two windows) - Special buffers: + &buftype=help -- will always open in an existing help window + "__Calendar" + "__opsplorer" + isdirectory() -- File Explorer window + "__Tag_List__" + "-- EasyHtml --" - Diff mode buffers + limited to four (non-special) windows + restricted from specials * GOALS - Specials: Keep file explorer, opsplorer, taglist, lists, etc. to left and unaffected by *any* other window operations. Assume they are concrete. - Help (and select (future) info windows): pop from the bottom. Should be inside left specials but below all other windows. - Remainder: Vertical tile, Horizontal tile, Tile, Single/alone. - Option Ctrl+Tab to cycle through non-special windows - Stack current file list by most recently accessed so we can Ctrl+Tab per Wolfgang Hommel, and so we can drop into the previous buffer when the current is closed. (Ctrl-^) * MENU - &equalalways preference? - &scrollbind preference? - Functionalize window menu o Explorer {{{2 o File Tree: * BUG: PageUp erases the contents. (Felix Breuer) * Key/menu for File Tree should toggle. (Felix Breuer) o Overhaul * explorer.vim * http://vim.sourceforge.net/scripts/script.php?script_id=192 * http://vim.sourceforge.net/scripts/script.php?script_id=184 * libtree -- Method for drawing heirachical trees such as directory structures, book/chapter/verse, etc. - Applications: + directory structures + book-chapter-verse + country codes (continent-country) + tag-attribute-value + domain codes + US state two letter codes + telephone area codes - Features: + Abstracts display from actual contents so that the method can have multiple applications + Need to compose two tables: one actual, one display. . This helps us calculate on the raw before re-displaying. Destroying the raw in the making of the display won't do. . Actual must always contain root and below. Display might not indicate upper portions. + atom id: {0,6,2,4,26} (count at depth) + open/close nodes - vars: + root + current + indent/level/depth + multiple open consecutively + top shows root v. active node - functions: + get_table() + make_display() + get_item() + MvQSortElements({array}, {sep}, "s:CmpByString", 1) - setline([sum of atom ids], "myitem") == current 2}}} o ADDON: Book (Bible) reading stuff: * Based on treelib * HTML2NIV script(s) o ADDON: TEXT2HTML converter: add encoding headers: exe "normal a\n exe "normal a" . expand("%:p:~") . "\n\e" exe "normal a\n\e" exe "normal a\n" o ADDON: Email munger: add option to triple separators (user@@@doman...com) o ADDON: Create a ctag directory(s) option. Retain directories in global o ADDON: Double space after sentence period remover/adder. o ADDON: Find duplicate lines. o ADDON: HMTL tag stripper. o ADDON: Arithmatic columns. o ADDON: Calculator. o ADDON: Count chars, lines, sentences, paragraphs (selection, document). o ADDON: Draw (box character thingy). o ADDON: Geek code/decoder. (Something like the printer options script.) o Syntax highlighting: * http/ftp syn match INUrl +\(www\.\|http://\)\S*\w\+\/*+ - => Needs to "act like a duck if it looks like one." (Thomas Baxter) o Add directory diff/merge utility. (http://vim.sourceforge.net/script.php?script_id=102) o Versioned backups. (See http://vim.sourceforge.net/script.php?script_id=89) o Single-server optimizations (still a little slow) o User-defined command set(s). (Matthias Kopfermann) o Add number incrementer/deincrementer (normal mode: Ctrl+A/Ctrl+X) o Info and error logging. Global variable, a file or both? * Variable required to react to situations where file reading for settings might be too much overhead (to surpress a particular warning after the first time). * Variable that maintains various states could chew up considerable memory, especially if we maintain find/replace file names and other string-based events. * Log file is useful for many other things, such as variable/file migration/upgrades, error logging, file actions (find/replace), etc. * Log file is slow. (But too slow?) * Log file is no place for settings. * Both is extra overhead. * Both would mean coordination between the two if they ever held the same info. * Both might mean difficulties if there are platform-specific errors and settings and Cream is being used on multiple platforms. * The current VIMINFO scheme actually writes all globals to file. Maintain our own cream-state file? Could be read whenever a variable is changed or needed, but starts sounding like a registry to me, file format? * Confusing settings with one-time logged events? o Bookmarks: * Expert mode uses named bookmarks. (Show "a>" rather than ">>".) o winaltkeys setting toggle so that i18n users can switch between Alt+letter binding functions and characters. o Column mode * Speed. - => Needs selection-specific :redraw! * Option to hold until user specifically drops it. (Wolfgang Hommel) o Macros: * Custom (and multiple) registers * Remember which custom register currently in use * Edit macros [:let @a = substitute(@a, '-', '_', 'g')] o Multiple clipboards * Last used should always be made global? o Option buffer-level setting control of wrap and autowrap. * => Better as multiple session. o Bullets * Functionalize and option bullet choices. Allow four or five and perhaps determine nesting order. * Re-bulleter to fix bullets on indent/unindent. o Right-click * External applications via popup menu ( to file explorer, web browser, zip file, etc.). * Open related under cursor (open corresponding .h file from .c and vice-versa) - Open file (Shift+Enter) - Close and return(?) (Ctrl+Shift+Enter) o Calendar: Option for start with Monday/Sunday. o Full "macro" recording capability, with export and listed recall of recorded macros. ______________________________________________________________________ Console {{{1 o CONSOLE: Cream in terminals is generally hosed because: * Alt key support is so unpredictable from terminal to terminal. * Console menus are activated as if from normal mode. * Other keystrokes (Ctrl+Arrows) are regularly mis-handled. * Absence of dialog presentation for info confusing. o CONSOLE: Keystrokes * Document what keystrokes will work, in what terminal. o CONSOLE: Menus * Option console key spoofing. Coordinate strategy with F12? * Terminal F12 menus (Christoffer Sawicki "qerub"/70899): - A mode change or something occurs... All new text is, kind of, inserted like in "INSERT (REPLACE)" mode. - Can't bring the F12 menus to foreground. Hitting ESC and/or INSERT repeatly fixes it. * Provide Alt+menu letter emenu tricks? (:help :simalt) imap :emenu File. * Console menus * Provide "standby" [Alt] mappings for menus in terminals. o CONSOLE: Cygwin adjustments (from vim list): * set grepprg=grep\ -nH * set shell=sh " Use the sh shell * set shellslash " Use the forward slash for expansion. * set shellcmdflag=-c " Use the forward slash for expansion. * set shellxquote=\" " Use the forward slash for expansion. * set shellpipe=\|\ tee * http://vim.sourceforge.net/tip_view.php?tip_id=381 o CONSOLE: Create Cream_confirm() (or similar): * Handle both GUI and console messages * Shortcut version 6.0's requirement for a button text. o CONSOLE: Replicate dialog, confirm, browse calls with Cream functions that handle GUI v. terminal. o CONSOLE: Search: obtain user input, finds, but then returns to insert mode. ______________________________________________________________________ CANTFIX {{{1 o BUG: NSIS installer languages still broken. (Sometimes selects non-English.) o Vince Negri's Conceal/ownsyntax/cursorbind patch: - => Refused in Vim7. - (Broken: http://www.angelfire.com/vt2/conceal/) o Build binary with static libraries (Python, Ruby, Perl, TCL, etc.) (Ben Armstrong) * => Vim builds do not support as yet. o BUG: Win32: Extreme weirdities when %HOME% is already defined. * => Fixed in 0.31beta, 2004-08-20? o BUG: set guifont=* still causes window positioning problems on first time usage. * => Vim bug now resolved? o Condition mapping load at start up on Cream behavior, and remove mappings only on switch from Cream to Cream Lite behavior. (Preserves user mappings on startup with Cream Lite mode.) (William McKee) * => Current workaround is to call cream-lite, then autocmd cream-user... is this a final solution? o Templates * Dialog user-defined additions ({word}, {completion}, {filetype}) o A real widget statusbar with proportional fonts, icon/graphic symbol support, and relieved groupings. o Hide the command line. It should pop up only when in use and go away when not (optionally). (Partial solution explored 2002-12 with 'ruler'.) o Vim splash screen (feature.h) doesn't handle our hard returns o Consider revising various popup/template/info stuff to use MS keystrokes: * Ctrl+I: Info pop (Impossible: Vim is identical to ) * Ctrl+J: List insert (Impossible: Vim is identical to ) o Re-map of Ctrl+[ (Impossible: Vim is identical to ) o Multifile Replace likely doesn't handle Apple CR/NL issues correctly. Need to verify DOS/Linux platform files in cross-platform conditions. (Help! We need an Apple tester!) o Multiple toolbars. o Show intermediate spaces (not trailing) as invisible characters. o Status bar indicator for Caps Lock. o Ctrl+Shift+Z should be redo. (Conflicts with , due to case.) o Better and controlable GUI dialogs!! o Better and controlable console dialogs. * Multiline text boxes * Check boxes: [X] [ ] * Radio buttons: (O) ( ) * Multiple/arrayed returns. WONTFIX {{{1 o Explore set syntax=ON/OFF as a means of buffer-specific highlighting control. [Too confusing.] o Pesky Vim 6.0 bug insertion of an "i" character on BufEnter. (Fixed in Vim 6.1.) o File Explorer * => Generally the explorer is a hack, the whole thing needs to be re-done, spot fixing is not worth the time. * seems to be broken immediately after starting Cream/VIM. Similar to the calendar, the file explorer seems to show up as empty menu item in the Window menu. However, compared to the calendar, I can switch to it and the file explorer is there again, just its "Window" menu entry has no name. (Wolfgang Hommel) * Cream_explorer() doesn't function correctly in an empty buffer. * Problems opening paths with spaces * Close is broken in GNU/Linux, occasionally W2k 1}}} vim:foldmethod=marker cream-0.43/docs/COPYING.txt0000644000076400007660000010451511156572440015724 0ustar digitectlocaluser GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . cream-0.43/docs/PressRelease.txt0000644000076400007660000000125611517300312017173 0ustar digitectlocaluser Cream (for Vim) Version 0.43 Released Cream (http://cream.sourceforge.net) has released the latest version of an easy-to-use configuration for Vim. Cream configures the famous and free Vim text editor so that it is simple to use for those of us familiar with Apple or Windows platform software. Through intuitive menus, keyboard shortcuts, and extensive editing functions, Cream makes Vim approachable for new users and adds powerful features for experienced users on both Windows and Linux. RELEASE SUMMARY This is only a minor bug-fix release, no new features have been added since the previous release. More information is available at http://cream.sourceforge.net. cream-0.43/docs/KEYBOARD.txt0000644000076400007660000000743311156572442016017 0ustar digitectlocaluser Cream for Vim Quick Reference Card Updated: 2008-01-30 21:09:39EST Print the table and photo-reduce it until the function keys line up with those on your keyboard. Then just tape it down above them! ___________________________________________________________________________________________________________________________________________________________________________________________________________________ | Cream for Vim (http://cream.sourceforge.net) | | | | HELP BOOKMARKS FIND CAPITALIZE COMMENT SPELL CHECK MACROS FOLDING (RESERVED) DATE INSERT (ADD-ONS) | |============= ================================================================= ================================================================= ===============================================================| | Ctrl+Shift -- -- -- -- -- -- -- -- Close All -- -- -- | | Ctrl+Alt -- -- -- -- -- -- -- -- -- -- -- -- | | Ctrl Goto Topic -- -- Close File rEVERSE cASE -- Add Word -- Open All -- Calendar -- | |============= ================================================================= ================================================================= ===============================================================| | Alt+Shift -- Del Prev (case) -- -- -- -- -- Delete All -- -- -- | | Alt List Related Set/Unset Next (case) Exit Program lower case -- Suggest Word -- Delete Current -- -- -- | |============= ================================================================= ================================================================= ===============================================================| | Shift -- Goto Prev Goto Prev Ins Line (x1,x2) UPPER CASE Uncomment -- Record -- -- -- -- | | [key] Index Goto Next Goto Next Show Invis. Title Case Comment On/Off Play Fold Selection -- Insert (x2 -- | | Open/Close last format) | | F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 | |___________________________________________________________________________________________________________________________________________________________________________________________________________________| vim:nowrap cream-0.43/docs/CHANGELOG.txt0000644000076400007660000042774411406301162016104 0ustar digitectlocaluser Filename: CHANGELOG.txt Updated: 2010-06-16, 11:03pm -- version 0.43 ----------------------------------------------------------- 2010-06-16 o Removed donations link from website. 2010-01-21 o Moved GNOME menu entry from Programming (obsolete) to Accessories. 2010-01-18 o Fixed cut/copy/paste bug in column mode where wrong register was being used in cut/paste. 2010-01-05 o Updated EnhancedCommentify from 2.2 to 2.3. (by Meikel Brandmeyer) 2010-01-01 o Fixed some SaveAs buffer/tab/recent menu refresh issues. o Fixed Help > About version info for non-consecutive patches. 2009-10-22 o More effort to fix a few niggling last file restore issues. 2009-11-09 o Tiny tweek of text filler gibberish word size. -- version 0.42 ----------------------------------------------------------- 2009-07-31 o Finished fix of buffer handling issue and testing. o Updated copyright references. 2009-07-30 o Begin fix the SaveAs issue where unnamed files where mishandled by fixing SaveAs, Close, and Tab Refresh. 2009-07-18 o Updated copyright date on web pages. o Refresh the Windows build scripts in CVS. 2009-07-15 o Add FAQ item on using Vim color themes. 2009-07-01 o Multi-file replace fix to save file only if modified by substitution. 2009-03-25 o Minor improvements for the Windows install command prompt script. 2009-03-24 o Removed errant debug dialog ("yo!") in EnhancedCommentify. o Updated html docs to reference new SF.net logo, link preference. 2009-03-22 o Finished testing buffer issues with SaveAs. (Likely one or two more bugs, but I don't see any.) 2008-07-19 o Fixed some obsolete references to Ctrl+O in the FAQ. 2008-07-04 o Add "<" to additional chars escaped in Cream_file_open(). 2008-07-03 o Added "#%" as additional characters escaped in permitted filenames for Cream_file_open(). (Ralph Hempel) 2008-05-31 o Minor HTML doc updates. 2008-05-20 o Warn on tag navigation if no tagsfile or tag found. (Mark Gardner) o Removed version 7.0 tests except at beginning. 2008-05-15 o Fixes in tag navigation Cream_tag_backclose(). (Mark Gardner) o Fix of tab management when navigating tabs. (Mark Gardner) 2008-05-14 o Fix inoremap statements to imap in taglist.vim. (Mark Gardner) 2008-05-13 o Re-enable Ctrl+B remap for Cream Lite. (Gherald) 2008-05-10 o Clean up SaveAs mishandling of untitled buffers. (Ronald Fischer) 2008-05-08 o Fix Ctrl+O mapping (was inserting literal C-b). (Andrew Wu) 2008-04-29 o Updates of download webpage. 2008-04-20 o Updated download webpage. o Updated INSTALL files to remove obsolete EasyHtml.vim. -- version 0.41 ----------------------------------------------------------- 2008-04-18 o Make the website pages 100px wider. o Made the website pages 100px narrower again (but keep the additional lengths so that we're almost squares). o Fixed wrapping bug in Open File Explorer. 2008-04-16 o Added clarification dialog for column mode that cut/copy require re-entering mode first. 2008-04-15 o Made column mode statusline indicator more obvious. 2008-04-14 o Added matrix color scheme. 2008-04-13 o Implemented Vim's omni-completion feature, Ctrl+Enter. (Rob) o Revised open file under cursor key to Shift+Enter. o Stripped old (<7.0) Vim current line highlighting. o Removed now obsolete EasyHtml.vim. 2008-04-04 o Updated oceandeep color scheme. (by Tom Regner) 2008-02-21 o Text filetype update to include "=>" highlight after numbered item/bullet, too. 2008-02-19 o Text filetype update to underline urls 2008-02-13 o Typing tutor first beta. o Updated COPYING to GPL3 2008-02-12 o More GPG. 2008-02-11 o More work on GPG encryption. o Added setting to turn off alternate file. 2008-02-08 o Fix more copyright dates. o Typing tutor updates. 2008-02-07 o Fix web site footers. 2008-02-06 o Add highlight match for URL and email address. o Improvements to open in default app on Windows. o Tampering with GPG encrypting. o Fixed some copyright dates. 2008-02-05 o Open URL in selection or under cursor in browser. o Add Tool menu item for open file/URL under cursor. -- version 0.40 ----------------------------------------------------------- 2008-01-29 o Simplified Title Case lowercasing to fewer articles and without prompt. 2008-01-24 o Updates to capitalization Title Case, lowercase a few articles. 2008-01-11 o Email formatter improvements: Simplify indention groupings, added Priority/Importance, replace multiple whitespace following headings with a space o Fixed missing endif from recent cream-keys Mac fix. 2008-01-07 o Fix Cream_open_fileexplorer() on Windows XP. 2008-01-06 o cream-keys fixes for Apple/Mac. (by Vance Briggs) 2008-01-04 o Updated French menu translation. (by Philippe Hammes) o Skip server checking on Mac. (by Vance Briggs) 2007-12-26 o Fixed the Ctrl+O mapping to be silent. 2007-12-22 o Add test for uninitialized variable in statusline textwrap function, likely only seen in non-default test conditions. (Vance Briggs) 2007-12-13 o Fixed errant mapping in cream-server. 2007-12-12 o Finally fixed Windows installer to work silently with command line option to install the context-sensitive menu. (Gregory Orange) o Fixed errant legacy mapping in cream-templates. o Added expert mode menu item state indicator. 2007-12-11 o Changed instances of with to fix small issue with expert mode remapping. (Tobbe Lundberg) 2007-12-07 o Fixes for remaining Ctrl+O remap change (functions for keys Home, PageUp and PageDown). o Fix for Insert key problem, too. 2007-12-06 o Experimentation with string translatation. 2007-12-04 o Experimentation with remapping Ctrl+O to File Open, and using Ctrl+B in its place as Vim's standard one key drop to normal mode. o Change File Close map to Ctrl+F4 and Cream Exit to Alt+F4 2007-08-29 o FAQ re-fix. (Kai Borgolte) o Removed leftover single-session setting menu item. 2007-08-26 o FAQ fix. (Kai Borgolte) 2007-08-24 o Made saveas() do better path handling when passed argument on Windows. 2007-08-23 o Fix of Cream_touch() to avoid issues with Vim's saveas buffer confusion. 2007-07-10 o Update email formatter add-on to dialog options. o Update to GPL version 3. 2007-07-04 o Added navigation bar to each slide in slide generator add-on. 2007-06-04 o Initial thoughts about slide generator improvements. 2007-06-03 o Updated addon copyright dates. o Removed charlines at all file beginnings. -- version 0.39 ----------------------------------------------------------- 2007-05-26 o Final release prep 2007-05-20 o Updated copyright date on web pages. 2007-05-18 o Update version number. o Add back readonly check at statusline indicator. (by TGL) o Add and update securemodelines. (by Ciaran McCreesh) o Add securemodeline call autocmd. 2007-05-16 o Removed multi-session capability. All sessions now point to "CREAM" server. o Updated copyright date. 2007-05-12 o Made statusline reflect actual vim settings instead of Cream variables, in case of modelines or user overrides. 2007-05-08 o Tweaked color of invisibles in default color scheme. 2007-03-21 o Wrote FAQ item on beginning single-mode function strategy. 2007-01-17 o Updated docs/WINDOWS.txt a bit. 2006-11-30 o Updated release add-on to reflect new directory structure. 2006-11-02 o INSTALL.bat fix of deprecated directory removal. o Put back spell alt word suggestion routines over-zealously removed yesterday. :) 2006-11-01 o Removed obsolete text help for opsplorer. (David Howland) o Added Window menu items for tab positioning. (by Philip Pemberton) o Modified INSTALL.sh to use "install" over "cp" for POSIX compatibility. (Damien Couderc) o Entirely removed now obsolete script-style spell check. o Added version check in creamrc, now requires >= Vim 7.0. -- version 0.38 ----------------------------------------------------------- 2006-10-27 o Added $USERPROFILE to possible location for user dir. (by Ryan Weaver) o Conditioned $USERPROFILE only when $HOMEDRIVE$HOMEPATH does not already exist. 2006-10-25 o Flipped version number. o Fixed INSTALL.sh to use "=" instead of "==". (by David Howland) o Updated Korean menus. (by Hanjo Kim) -- version 0.37 ----------------------------------------------------------- 2006-10-15 o Fixed SaveAs does not properly refresh syntax highlighting by reversing syntax enable and filetype detection.) (Philip Pemberton) o Removed obsolete File Tree/Explorer and replaced with just opening an OS file manager to the current file's directory. o Added option to turn off statusline. 2006-10-09 o Fixed menu state indication for wrap width highlighting. 2006-10-07 o Fixed locating new tab from external. (Philip Pemberton) 2006-10-06 o Fix of window/tab managment problems associated with external direction of file opening to an existing session. 2006-10-02 o Added empty line collapsing to email prettyfier. 2006-09-19 o Removed variable listing contributors (still on webpage). 2006-09-06 o Change column width highlighting to buffer specific var. 2006-09-01 o Finished Windows side of slide generator add-on. o Added missing cream.bat to release packages. o Fixed Help links. o Removed redundant references in About dialog. 2006-08-30 o Added tab management to single-server call by second server. o Developer CVS update routine path trailing slash handling. 2006-08-27 o Wrote slide generator. 2006-08-14 o Fix Windows installer Start Menu to indicate version number, and properly reference icon in gvim.exe. 2006-08-11 o Fixed email formatting add-on header word shortening substitutions. 2006-08-09 o Improper initialization of line numbering when started from command line. (Elias Pschernig) o Changed broken cwd fix of two days ago to escaping rather than quoting. 2006-08-07 o Fix current directory issue with spaces in path on *nix/BSD. (David Howland) 2006-07-28 o Fixed one-off error in highlighting of wrap width. 2006-07-21 o Removed debug code from dec2str conversion. 2006-07-13 o Windows installer fix to include only Windows files. o Fix of developer install bat. 2006-07-12 o General cleanup of various modules, also personal cream-user. 2006-07-11 o Completed work on remote listing of Vim spell files via FTP. 2006-06-29 o Fixed bug in cmd_on_files() that prevented it from working on Windows. o Added progress indicators to multifile-replace and cmd_on_files. 2006-06-28 o Renamed lib function to cmd_on_files() from cmd_on_paths(). o Reorganized devel function to playpen. 2006-06-26 o Added function to create shortcuts with shortcut keys on Windows. 2006-06-23 o HTML download update for vim releases to point to latest, not specific binary. o Graphic file updates. 2006-06-21 o Fixed flaming error in separate instance startup on non-Windows platform. 2006-06-15 o Upped history to 200. -- version 0.36 ----------------------------------------------------------- 2006-06-11 o Final release readying. o Developer menu install mechanism on Windows now calls INSTALL.bat directly. o Fixes for INSTALL.bat. 2006-06-02 o New website polishing. o Added find Settings > Highlight Find Clear. (Marc Elser) 2006-06-01 o Fixed per buffer initialization of current line highlighting. (Marc Elser) o Finished beta of new web site design. 2006-05-30 o Continued work on new website. o Updated KEYBOARD.txt. 2006-05-27 o Change bracket matching default to on. o Disable new 7.0 matchparen. 2006-05-26 o Wrote cream.bat. o Began web site overhaul. -- version 0.36beta2 ----------------------------------------------------------- 2006-05-25 o creamrc improvements so that it checks multiple paths instead of only one. 2006-05-22 o Fix of uninitialized g:LIST in statusline when sourcing creamrc from gVim. o Doc update on sourcing Cream from gVim. o Fixed some wording in word count. o Fixed SaveAs tab label refresh. 2006-05-19 o Re-write of tabpage function to resolve 6.x difficulty, drop back to standard "while" format. o Wrote function to "comma-ify" strings of digits. o Spiffied up the word count function to include chars and pages, in selections or not. 2006-05-18 o Fixed column mode issue with Del. o Updated INSTALL.sh to indicate when a file is copied. 2006-05-17 o Fix for Vim 6.x :source error on endfor construct. o Fix of trailing slash for Windows installer menu item. o More Windows build updates. 2006-05-16 o Fixed automatic directory changing. Now file actions generally follow the cwd, unless g:CREAM_CWD exists. o Huge fixes to both Windows and Bash build systems. 2006-05-15 o Developer menu fix for Windows. 2006-05-14 o Huge check-in after SF.net CVS down since March. 2006-05-13 o Fixed Del in column mode, now doesn't leave mode. 2006-05-11 o Developer menu tweaks. o INSTALL.bat updates for 7.0. 2006-05-09 o Fixed restoration of incorrect buffer if multiple tabs remembered. o Fixed filetype (and thus, syntax highlighting) not refreshed in last buffer restore with tabs. o Fixed last file restore error when path was via link and Vim has somehow re-calculated it via absolute. o Fixed tag jumping with tabs on. o Fixed possibility that an unsaved change could be lost if user elects to tag jump back from a file that was previously opened and modified. 2006-05-07 o Finished alternate spelling word popup menu. 2006-05-02 o Added email formatter fixes for Date: and Cc:. 2006-05-01 o Revised file open to option creation of a file if doesn't exist. 2006-04-29 o Moved developer tab code to window-buffer. o Renamed cream-window-buffer.vim to cream-lib-win-buf-tab.vim. o Changed file_open to follow current directory (cwd). 2006-04-27 o Added missing mouseover balloon for toolbar Print. (Ben Armstrong) 2006-04-21 o Addition of email formatter add-on header re-formatting option. o Disabled file explorer and file tree except for developer access, they are severely broken and unmaintained. -- version 0.36beta ----------------------------------------------------------- 2006-04-18 o Fixed tab guilabel updating on startup. 2006-04-17 o Try to fix Settings menu on state check mark items when char does not exist in a font. (Ivailo Stoyanov) o Added newunmod as option for Cream_NumberOfBuffers(). o More work on tabbed document display. 2006-04-15 o Began implementing new Vim 7 spellcheck and tabfeatures. 2006-04-13 o Tweak Settings menu "x" char on Windows. o Improved readability of insert character list. o Updated docs for release. o Fixed color preference menu not updating state. 2006-04-12 o Make F3 with selection select the next occurrence of the same. (Martin Felder) o Revised all Settings and Preference items to indicate state with check mark ("x" on Windows). Accomplished by modularizing each menu item to a stand-alone function, and referencing only that function when it's particular state toggles. o In parallel with above, removed refresh of entire settings menu in every instance but startup for a noticeably snappier startup. o Fixed flaming bug in highlight of wrap width. o Moved selection color preference to devel only. o Test code for Vim7 spell check. o Added Vim7 current line highlighting. 2006-04-11 o Fixed bugs with middle mouse pasting where a trailing "y" was added when starting with a selection, and where selection was cut instead of maintained. (Martin Felder) o Tampering with developer installation pathing display. 2006-04-06 o Solve a number of Vim 6.1 issues with showinvisibles encoding, multivals use of :try structure, and statusline number of items. (Nico) -- version 0.35 ----------------------------------------------------------- 2006-04-05 o Added Ctrl+K x2 keystroke to list digraphs. o Doc updates for release. 2006-04-04 o Finally able to check back into CVS 2006-03-31 o Refined check mark for preference status. 2006-03-23 o Moved item refresh in Filetype menu to bottom. (No need to alarm.) 2006-03-08 o Fix Toolbar print icon. (Peter Mason) o Clarify Print setup button leads to another dialog. (Peter Mason) 2006-03-07 o Fixed SaveAll bug. (Peter Mason) o Added print selection when one exists. (Peter Mason) 2006-03-02 o Added more conventional status check mark indication of Settings menu items that have no other status indicators. 2006-03-01 o User environment variable $CREAM no longer depends on trailing slash. (Pere Quintana Segu, et.al.) o Added FAQ question for installing Cream in a non-system directory. 2006-02-27 o Copyright updates. o Minor fixes in (unused) Cream_browse_path(). 2006-02-25 o Optimized filetype menu by caching it. Menu is not created at startup until user requests it the first time. 2006-02-21 o Added Alt+,(x2) mapping to display available characters. o Experimented with speeding up menus. Unfortunately, the slowdown is in actually loading the menus, not the dynamic creation of them. o Toolbar global type fix. o Startup optimizations. Load menus and toolbar later so that Vim window opens earlier. Net setup (until ready) is no faster and more flutter is visible, but at least there is more impression that things are being readied. 2006-02-20 o Reduced Filetype submenu depths. 2006-02-17 o Fixed errant developer menu reference in encoding call. (Rafal Sniezynski) o Updated README.txt. -- version 0.34 ----------------------------------------------------------- 2006-02-15 o Re-tabbing code, trailing whitespace removal. 2006-02-14 o Removed buffer menu overload scheme (all are listed now). 2006-01-26 o Added warning to developer state of typing tutor. (Ronald) 2006-01-22 o quickfix error fix on BufRead loadview event. (Pandhare SheetalKumar) 2006-01-14 o Fixed missing escape for "-" bullet in text filetype arrow. 2006-01-13 o Revised Cream Lite message to indicate cream-conf var to avoid future warnings. (Ben Armstrong) o Improved INSTALL.bat location guessing, and included search in vim64\. 2006-01-12 o Added ellipses char (dec8230) for UTF8 as show invisibles char for precedes and extends where char exists. 2006-01-07 o Added "=>" coloring for text files. 2006-01-06 o Fixed email prettyfier add-on to ensure one space between greater-than quote line leaders. 2006-01-05 o Fiddling with email prettyfier add-on substitutions. 2006-01-03 o Tweaked character listing for clarity. 2005-12-30 o Added Syntax Highlighting to HTML conversion add-on. (by Ben Armstrong) o More Syntax-to-HTML updates. (by Ben Armstrong) 2005-12-24 o Shortened timeoutlen from 500ms to 300ms. o Fixed paste fix from yesterday. 2005-12-23 o Fixed blockwise insertion on Win32 from paste obtained external to Vim. (Ben Armstrong, Peter Mason) 2005-12-13 o Added menu translations for Korean. (by Hanjo Kim) 2005-11-29 o Added inkpot color scheme. (by Ciaran McCreesh) 2005-11-28 o Mod of INSTALL.sh to handle special passed path vars. (Jeff Woods) 2005-11-19 o Moved general OS functions to new cream-lib-os.vim. 2005-11-16 o Removed literal control code for Home mapping. 2005-11-14 o Fixed Home mapping where it wouldn't go to col 1 when only one char in a line. (Gerald, laige (at) eecs.oregonstate.edu) 2005-10-31 o I can not spell "vacuum". 2005-10-26 o Added dialog input/instruct for character insertion by value. Fixes related to dec174 map. 2005-10-24 o Remove filebrowser filters. (Will Pratt) 2005-10-23 o Fixed subtle bug in browse open where directory and default file were inverted. (Not a problem unless user specified g:CREAM_CWD.) 2005-10-18 o Fix dynamic menu generation (currently just developer menu) to eliminate redundant path separators. 2005-10-17 o Refresh keymaps and menus on (file)encoding change. o Added .jpg to filetypes packaged from docs-html. (Then removed again.) o Removed screenshots 5-8 and associated files. o Updated INSTALL.sh and INSTALL.bat to catch obsolete files. 2005-10-12 o Developer routine to insert a grouping of graphical non-standard characters. (Scrapped.) o New Character Under Cursor display. o Make MRU menu work in normal mode. (Kevin Kleinfelter) o Change Tools menu so all menu top items have no submenus so Left/Right Arrows page through all top level menus. (Michael Marquart) 2005-10-11 o Updated Win32 build routine to build all executables and include them in packaging. o Consolidated developer pathing between menus and release script to fix files not included in manual release packages due to trailing slash confusions in DOS. (Bernd Littkemann) o Simplified Insert character methods and display of possibilities. 2005-10-07 o Fixed poor line collapse regexp. o Removed developer test code in menu transation scheme. o Added unicode char echo Vim tip: http://vim.sourceforge.net/tips/tip.php?tip_id=1013 o Changed Nr2Hex() to lower case. o Added Cream_allchars_list(). -- version 0.33 ----------------------------------------------------------- 2005-10-04 o Remove display of a few test and devel files. -- version 0.33beta2 ----------------------------------------------------------- 2005-09-22 o Reversed order of Format menu Leading/Trailing whitespace options to be more intuitive. o Refresh buffer var for buf name on SaveAs. o Doc prep for release. o More testing of developer install routine. o Fixed weird regression in INSTALL.sh where Perl method of finding $VIMRUNTIME was commented and bash method tested "-nd $VIMRUNTIME" and wasn't quoted. (How did this even work?) 2005-09-16 o Fixed SaveAll from error on un-named modified buffer. 2005-09-14 o Fixed buffer local pathfilename for situation when goes from non-existing to existing (SaveAs an unnamed). 2005-09-13 o Numerous adjustments in statusline, window title, and associated libraries for long standing bug where editing performance was degraded across high-latency connections. (Ben Armstrong, Michael Freedberg, et al.) o Renovation to pathing determinations in File Recent menu and Window Buffer menus. Numerous expansions and re-configurations of path strings made to use existing lib functions for these purposes. o Diff mode now updates on buffer switch or save. 2005-09-08 o Added recovery of email sig line trailing space to Remove Trailing Whitespace Format. o Added/fixed empty line removal/collapse where empty lines with white space chars weren't considered. -- version 0.33beta1 ----------------------------------------------------------- 2005-09-06 o Beta release packages and adjustments. 2005-09-01 o Review of tracker patch (not applied) and clean up of INSTALL.sh and INSTALL.bat. o Fixed taglist window key (Ctrl+Alt+Down) toggle. (Felix Breuer) o Tweaks to Settings menu (Colors to Preferences submenu, etc.). 2005-08-18 o Third party add-on simplification. o Doc cleanup. 2005-08-15 o Added option to fix sluggish behavior over a high latency connection via g:CREAM_CWD in cream-conf. (Matt Wilkie) 2005-08-11 o Fixed bug where printfont could be initialized to an empty value. (Ben Armstrong) 2005-08-10 o Removed reset of comments from filetype() and moved to individual filetypes. (Ben Armstrong) 2005-08-09 o Fixed ctags current directory add-on. (Was quoting on unix environments.) 2005-08-05 o Added Cream_touch(). (Ben Armstrong) o Added filename option to saveas for forcing save. (Ben Armstrong) 2005-07-21 o Added "both" as an option to the release package. 2005-07-10 o Change dailyread add-on to unmodified state of buffer. o Smoothed out developer installation routine. 2005-07-09 o Experimentation with highlighting double-words. 2005-06-30 o Wrote helptags function and add-on. o Wrote function to determine existing Windows drive letters. 2005-06-29 o Solved longstanding bug of network lag due to Vim setting pwd to it. (Matt Wilkie) 2005-06-27 o Updates to WINDOWS.txt. 2005-06-24 o Fixed missing trailing newline in lib getfilelist() that prevented developer menu from showing last item on Windows. 2005-06-22 o Fix refresh of buffer menu during aborted close all. 2005-06-11 o Moved default cream shell script from /usr/bin to /usr/local/bin. 2005-06-06 o Hook testing. (Ben Armstrong) o Fixed statusline condition where read-only filename was improperly expanded. 2005-06-02 o Added args to items debugged in creamrc. 2005-05-28 o Updates to INSTALL.sh for better validation of VIMRUNTIME value found. Now handles instance where extra spaces inserted. (rfischer1()freenet()de) 2005-05-12 o Made column mode menu call error handling smoother. (Christoph Haas/A Costa) o Removed all amenus from Help. (Christoph Haas/A Costa) 2005-05-10 o Added iso-8859-2 (Polish) encoding. (Ciacho) o Additional cleanup of file encoding menu. 2005-05-05 o Testing with tentative Polish spellcheck dictionary. o Refined help-related function to open with default application on WinXP. 2005-05-02 o Added HTML template "html" for page structure. o Cleaned up HTML templates to use single-quote style. o Added option to open current window with default application. 2005-04-18 o Global customization load order discussion. (Ben Armstrong) o Mac OS X issues. (David Palm) 2005-04-07 o More thinking about i18n. 2005-04-04 o Exploration of lock files and open read-only. (Ben Armstrong) 2005-04-02 o Continued work on i18n. 2005-03-31 o Attempts to add developer menu item to run installer. 2005-03-30 o Actually fixed syntax file list errors this time. (Paul White) o Fixed menu-ization of syntax files where single letter would occur in last grouping and force it to first item. (Paul White) 2005-03-27 o More fixes (removal) of Vim's HTML indenting. 2005-03-26 o Initial attempts to fix parsing of syntax file list when $VIMRUNTIME contains tilde. (Paul White) 2005-03-07 o Making Cream the default app to open .txt files on Windows. 2005-03-01 o Added File > Save All and Exit item. (John Culleton) 2005-02-25 o Added Alt+Shift+LeftMouse mapping to drag selection in column mode. (Roman Polach) 2005-02-24 o SaveAll now updates file modification state in buffer menu. o Lib dec2str fix of uninitialized pos variable. o Bad call in encrypt-algorithmic to obsolete function name. o Fix encrypt-algorithmic. o Removed unuseful reverse capitalization key and menu. (John Culleton) 2005-02-21 o Added Help browser open for Windows. 2005-02-19 o Added Help menu selections to open Cream HTML documents in default web browser. (John Culleton) 2005-02-13 o Added setting for window position remembering. (Everyone ;) o Cleaned up reading of Preferences menu so that current state is obvious and menu item wording doesn't need to change. 2005-02-11 o Mutt FAQ question. (by Thomas Adam) 2005-02-05 o More tweaking to debug info in creamrc. 2005-02-04 o Turned off autoindent in HTML filetypes. o Added debug feedback in creamrc for when env. vars already exist. o Removed added trailing slash on $CREAM_VIEW at set of &viewdir. o More web site front page tampering. 2005-02-03 o Fixed time insert and stamp issue of stftime(%e) on dialog button and string on Windows. 2005-02-02 o Fixed Format > Join Lines (was reversed) and clarified option wording. o Added additional Insert > Date/Time and Add-on > Stamp Time formats. (Matt Wilkie) o Modified Date/Time insert so that single keypress opens dialog, repeat inserts last used. (Ah, no more counting.) 2005-01-29 o Finished tweaking INSTALL.sh to allow directory argument useful for some distros. (Felix Breuer) 2005-01-28 o Added crazy Pi URL template ("urlpi"). 2005-01-26 o Tweaked default color schemes so statusline reads a little better on 256 display. 2005-01-20 o Localized all utility functions in replacemulti. o Added localized versions of global library functions and forking on the existance of $CREAM in order to publish on Vim online. 2005-01-19 o Sped up multi-file replace simply by de-activating autocmds and swapfiles. 2005-01-14 o Cream Lite shouldn't use keymodel. (Felix Breuer) 2005-01-13 o Don't use &smartindent to avoid bogus indentions with &cinwords. (Martin Gignac) 2005-01-06 o Fixed errant call to obsolete function name in Format Capitalize Titlecase menu item. (Martin Gignac) 2005-01-05 o Removed errant keyboard shortcut indication in Insert character line dialog. (Martin Gignac) 2004-12-28 o Added lang/ structure to release and install scripts. o Clean up routines instituted/improved in both Windows and Bash installation scripts. -- version 0.32 ----------------------------------------------------------- 2004-12-26 o Added mechanism to read menu translations, essentially Vim's own. (by Ralgh Guilong) o Added various Chinese menu translations to CVS. (by Ralgh Guilong) Fixed fileformat to Unix. o Regressed genutils back to orig version, too many dependencies in upgrade. o Removed errant imaps.vim from CVS. o Removed no-longer-interesting Commentary web page section. 2004-12-24 o Upgraded to current versions of multvals and genutils. 2004-12-16 o Removed setting of imdisable and remapped template completion from Shift+Space(x2) to Esc+Space. o Removed add-on remnant in text-filler tool. 2004-12-15 o Group indent with tabs in statusline. o Finish statusline docs. o Document softtabstop feature. 2004-12-14 o Begin statusline change documentation. 2004-12-13 o Fix developer menu issues on Windows when dynamically generated since adjustments to path/filename functions 2004-12-11 o Insert text filler (Lorem ipsum) tool. 2004-11-24 o Added warning on discovery of non-writable user directory on Windows. (Matt Wilkie) 2004-11-17 o Tweak front www page language slightly less superlative. :) o Taglist menu item called obsolete function name. (Carfield Yim) o Modified statusline filestate to show modified only if file not help or untitled. 2004-11-15 o Discussion of i18n patches. (by TGL) o Conditioned :popup menu to use extra blank line and separator for version prior to fix in patch 6.1.433 2004-11-13 o Implemented Cream_path_fullsystem() and removed Cream_pathfix(). (Impacted lib and replacemulti.) o Fixed bug where options relating to &printencoding and &printoptions were presented to all Vim users despite being new to Vim 6.2. (Robert Lindsell) o Fixed wrap width highlighting to update when wrap width changes. Also adjusted wrap width back to +0 from +1. o Attempted fix for syntax highlighting not being turned on when opening a file from MRU or developer menu (non-autocmd events) by adding call to Cream_filetype() in Cream_open(). 2004-11-12 o Wrote Cream_path_fullsystem() to format paths, either by current system or forced. o Third party script work. 2004-11-04 o Added developer add-on to de-format Vim script. o Restricted tab and soft tab values to digits only. o Removed octal and hex from &nrformats setting. 2004-11-03 o Fixes to statusline: show dashes if no encoding, change modified character to asterisk and read-only character to empty set. 2004-11-02 o Added "plugin" to filetype on setting. (Ben Armstrong) o Clear existing &comments prior to initiating filetype. (Ben Armstrong) o Load both system and user cream-conf, not just one or the other. (Ben Armstrong) o Continued exploration building Vim on Linux/gtk2/gnome. 2004-11-01 o Minor adjustment of the statusline, shifting filesize to the left with the other file-specific fields and away from the right side editor settings. o Initial investigations into building a unix/gtk2/gnome Vim. 2004-10-30 o Added softtab option with code changes in lib, settings menu, statusline. (Walter Mundt, et.al.) o Modified statusline to indicate both tabstop and softtab setting (when on). o Fixed statusline to indicate proper show invisibles symbol when Vim version greater than or equal to 602. 2004-10-27 o Exploration of restoring :promptfind and :promptrepl as default behaviors. (Ben Armstrong, TGL) 2004-10-25 o Continued attempts to fix macros. Vim is severely broken in regards to positioning the cursor at line ends in functions called from insertmode and it looks like the first and last 1-2 columns will always be broken. 2004-10-24 o Appear to have fixed a bit of macros. 2004-10-23 o Fixed error on buffer change to Vim help file with highlight group not found. Conditioned highlight group clearing in filetype(). 2004-10-21 o Fixed bad variable error when adding word to dictionary. o Exploration of how to fix macros. Partial fixes enabled. o Fixed unescape filename in prompt to save on close on Windows. 2004-10-19 o Added Rndm.vim by Dr. Charles "Chip" E. Campbell for the generation of random numbers. 2004-10-16 o Removed old, second errant instance of bad word wrap function which was obscuring corrections for window positioning on Windows, "fixed" 2004-09-08. (Sven Vahar) 2004-10-15 o Continued work on random number generation. 2004-10-14 o Beginning work on random number generation. 2004-10-13 o Removed path indication in statusline for gui since it's starting to get a little crowded and is redundant with the titlebar. o Reversed behavior of word completion so that the easier keystroke completes words just prior to the cursor position. (The function names were reversed.) o Initialize case-sensitivity (&ignorecase) off. o Make word completion convert match to case of current start (&infercase). o Upgraded EnhancedCommentify to version 2.2 (from 2.1). o Fixed that commenting a blank line fails/loops. (Zen Zhang) -- version 0.31 ----------------------------------------------------------- 2004-10-12 o Fixed instance of missing argument in recently modified Cream_emptyline_collapse() call. o Fixed indention scheme based on filetype. Cream's re-detection missed loading Vim indentation. (Thomas Adam) o Document updates. o Trailing slash management in developer menu global override. o Attempted fix of Cream icon in Windows Start Menu. 2004-10-09 o Better Vim version checking for prototype feature. (Thomas Adam) 2004-10-05 o Added considerable debugging information collection in creamrc and moved debugging report gathering routines from add-on into creamrc so full diagnostics can be done at initialization/load failures. 2004-09-27 o Added mapping (Ctrl+Alt+PageUp/Down) to go to middle of screen. 2004-09-25 o Refined date/time insertion to include compressed ISO format. Added additional menu item and moved all to submenu. o Modularized timezone string calculation to lib function and adjusted various uses at inserts and timestamp add-on to call it. o Added Cream_vimscript_compress(). o Improvements related to third-party canine script. 2004-09-19 o Fixed last tag warning in cream-lib. (by TGL) o Added user stuff to dev menu and abstracted it a bit so that the general design might be re-used in upcoming project file menuing. o New function to add trailing slash and cleaned up three spots that used similar code. o Optioned release package making based on dialog, not current platform. 2004-09-18 o Cleaned up notes at getfilelist(). o Fixed developer menu and corresponding autocmd. -- version 0.31beta2 ----------------------------------------------------------- 2004-09-16 o NSIS (Windows installer): * Installer now uses generic NSIS icons. * Wording of name in titles changed to be a little more readable. o Modified Windows context menu name to be a bit shorter. 2004-09-15 o Cleaned up installation page a bit. o Fixed missing a pattern delimeter in cream-spell-dict-eng-l_4.vim. o Overhauled Spanish spell check dictionaries, now version 3.0. o Spell check now defaults to the default dictionary. 2004-09-14 o Fixed errant warnings (opposite) for tags being found. (by TGL) o Fixed spell check word errors with non-ASCII characters by dropping back to engspck regexp for BadWord. (TGL) 2004-09-12 o Finished documentation for spell checks. o Fixed Word Count and added highlighting of word counted when Highlight Finds is on. o Fixed stamp filename path on Windows. o Fixed Cream filetypes/ and files missing from NSIS. o Fixed Vim tutor shorcut by bypassing the .bat file which doesn't work when called through the Start Menu. 2004-09-11 o Investigated spelling error problem. o Added docs about Stamp Filename add-on. 2004-09-09 o Re-structured cvs modules around focus on broader spelling documentation. o Begin overhaul of spell dict documentation. o Added stamp-filename add-on. 2004-09-08 o Spell dict fixes * Fixed names of spell dicts "eng-x" to "eng-h". * Added missing end quotes to *_3 and *_4. (by Thomas de Grenier de Latour, hereafter "TGL") * Versioned package names. (Thomas de Grenier de Latour) o Cleaned up playpen a hair. o Show invisibles fix for utf8 Windows. (Sime Ramov) o Fixed window position error with word wrap toggle and initialization on Windows. (Sven Vahar) o Added warning of function split and name change for obsolete ProcessImapLeader() in cream-templates. o Word errors in French dictionary. (Thomas de Grenier de Latour) -- version 0.31beta ----------------------------------------------------------- 2004-09-06 o Added NSIS uninstaller. o Refined numerous operations within NSIS. o General tweaks, improvements to INSTALL.bat. 2004-09-02 o Improvements to current line highlighting to match only screen line. 2004-09-01 o Fixed keymappings so they are retained across sessions. Current mapping is now indicated in the menu. 2004-08-31 o Completed filetype cleanup. o Removed emails from Help screen. 2004-08-25 o Added lisp to supported file types. o Added "alpha" as first priority in nrformats (string incrementing). 2004-08-20 o Added $HOMEDRIVE$HOMEPATH as valid location for user .cream/ on Windows. (Wolfgang Hommel) 2004-08-07 o Find/Replace dialogs now use proper icon types. (Elias Pschernig) 2004-08-05 o Simplified return of various tests by Cream_has() to better comply with standard Vim returns. 2004-08-04 o Continued wordlist exploration, specifically related to German. (Wolfgang Hommel) 2004-08-03 o Finished spell check re-work. o Continued wordlist exploration. 2004-07-30 o Localized all supporting spell check functions. o Changed character to indicate an unsaved modified file to "*" (from "+") in both window title and Window buffer menu. o Tweaked GNOME menu name to explain Cream is a text editor. o Fixed iso639 and 3166 to return empty string if passed one. o Modified preferences option for keymap to menu every possibility in $VIMRUNTIME/keymap/. (Danny Su) 2004-07-29 o Continued work on spell check updates. 2004-07-28 o Massive overhaul of templating to make simpler and concise. Renamed module to cream-templates and restructured and renamed internal functions. Anyone previously using this module needs to update their calls accordingly. o Ongoing overhaul of spell check. 2004-07-26 o Removed irrelevant menu separator and description of color schemes in non-developer conditions. 2004-07-17 o Overhauled ISO 639 to include both 2 and 3 letter abbreviations. o Created ISO 3166-1 table functions. o Added to new ISO modules to general loader. 2004-07-15 o Created ISO639-2 table functions in preparation for dictionary versioning and finalization. 2004-07-14 o Removed file open error notice when dialog is simply canceled. 2004-07-08 o Updated browse path (directory) lib function. Discovered gVim dialog on NT-XP cannot return one. o Added accelerator to Tools > Diff Mode menu. 2004-07-05 o Renamed and restructured whitespace trimming functions. o Continued canine craziness. 2004-06-30 o Fixed imap "debug" template completion of filetype "vim". 2004-06-29 o Continued suffering at the mouth of canines. 2004-06-27 o Reversed order of File menu's New and Open. 2004-06-25 o Changed html docs ToDo and ChangeLog to point to the "live" CVS text versions rather than htmlified ones. 2004-06-17 o Disabled ctags-not-found warning in taglist. (Sven Vahar) o Added warning for unchecked taglist Cream_Tlist() call. o Added horizontal scroll bar activation when wrap turned off. 2004-06-16 o Make File>Open browse starting with the current file's dir. (Falk Pauser) o Enabled INSTALL.sh to work via call from another directory. -- version 0.30 ----------------------------------------------------------- 2004-06-14 o Bash install script refined to autodetect installation location. (by Elias Pschernig, Luc St-Louis) o Fixed release add-on bug for creating Windows zip package from g:cream_cvs where slash wasn't reversed, and removed creation of obsolete views directory. 2004-06-12 o NSIS build fixes. * Fix broken components page mouseovers for Cream. * Prompt to overwrite existing installation. (Bram Moolenaar) * Prompt to continue if exisitng $VIM or $VIMRUNTIME exists. (Bram Moolenaar) * Register vimext.dll. (Ryan Hennig) (Fixed prior, maybe 0.29?) 2004-06-04 o Continuing work on Portuguese spell check dictionary. o Exploration into using standardized language and country codes for spell check. 2004-06-02 o Updated to taglist version 3.3 which eliminates remaining Cream-required modifications. (by Yegappan Lakshmanan) Wrappers can now be in lib. 2004-05-28 o Continuing work on assembling wordlists for creating spell check dictionaries for Dutch, Polish and Portuguese. o Added "comm" option to dictttool.sh. 2004-05-22 o Fixed menu-window-buffer buffer menu current file indicator for Windows to character abstraction to fix multi-byte language issues. (Wei Weng) 2004-05-14 o Clarified INSTALL.sh assumption of $VIMRUNTIME. o Fixed taglist "return" to "finish". o Added system cream-user. Now both $CREAM/cream-user.vim and g:cream_user/cream-user.vim will be sourced. (Elias Pschernig) 2004-05-12 o Modified taglist to automatically find ctags flavor. 2004-05-11 o Modified default color theme to highlight number columns so they don't appear to be part of the buffer. (Benji Fisher) 2004-05-10 o Changed Help>Cream About to Help>About Cream. (Benji Fisher) 2004-05-09 o Picked up a few more minor Gentoo patches: GNOME desktop categorization, and testing for "exhuberant-ctags". 2004-05-08 o Refinement of packaging for third party canine app. o Investigation of 0xf1 (Alt+Q) issue with &enc==cp1251. o Patch to refactor mkdir routines in creamrc. (by Ciaran McCreesh) o Revision of file "flag" to global g:CREAM_NOVIMPLUGINS to avoid loading Vim plugins. (by Thomas de Grenier de Latour) 2004-05-04 o Checked in some variable type function changes in lib, mostly associated with third party canine app. 2004-04-29 o Explored guioptions+=b, toggled with wrap. (Elias Pschernig) o Modified license screen to open in a new windows, untitled document. o Bit of tampering with algorithmic coding associated with canine experiment. 2004-04-26 o Resolved garbled showinvisibles characters with with v:lang=C filter. o Updated taglist to v3.2. 2004-04-25 o Added highlight wrap columns function. -- version 0.29 ----------------------------------------------------------- 2004-04-24 o Developed Cream_ShowMarks_Exist() to test if we have signs in the margin. o Re-worked mapping. Developed Cream_ShowMarks_Exist() and Cream_linewidth() as a result. o Tested Bram's batch to fix Win95 :browse... successful. o Final build series. 2004-04-22 o Discussion on list regarding unicode compatibility layer for Win9x binaries. It appears that unicode breaks :browse. o Fixed cream-release addon. o More documentation updates. 2004-04-21 o Discovered some patch in 6.2.247-382 broke normal g$, which hoses our mapping. o Clean up of installation documentation. (Hey, the new change makes everything easier!) 2004-04-20 o Finally finished build process. Vim patch has now broken :browse, but our builds are finally resolved! 2004-04-19 o Removed ADDCREAM from build option in order to greatly simplify our build options. We now only build Vim or Vim with Cream. This coincides with our decision on Bram's suggestion to install Cream with Vim as a complete package rather than parts and pieces belonging to some other distribution. o Changed all documentation references from "gVim" to "Vim". "gvim" only occurs now when directly refering to the GUI version, mostly in file naming. o Changed shortcut key to Ctrl+Shift+C and made available only to Cream. o Mostly finished changes related to new Cream structure and packaging. o Ruby 1.8 explorations. o Build process refinement. o Scripted patch to include cream.ico to gvim.exe so Windows icon can be correct. 2004-04-18 o Beginning examination of gvim.nsi. Inclusion of all 2.0 language references for the MUI interface. 2004-04-15 o Begin binary work (vim-build-bcc.bat, gvim.nsi, etc.) * Removed classic build (using install.exe) and references to NSIS1. 2004-04-14 o Fixed creation of user directories by creamrc on WinXP. Tested functional now on Linux, Win95, and WinXP. o Fixed a few inconsistencies in code copywrite statements. o Explored error in Cream_filesort(). () 2004-04-13 o Require a user writable area (g:cream_user). This is $HOME/.cream when possible, or $CREAM/.cream when not. o Writable subdirectories of $HOME/.cream now required: views/, tmp/, and spelldicts/. o Refined requirements for user spelldicts now that Cream always requires a user writable area. o Now require default spelling dictionaries in $CREAM/spelldicts/. o Backup directory is now forced to g:cream_user/tmp. This can still be overridden with $CREAM_BAK, but we want backup files per user for more sanitary conditions. ;) Note that setting $CREAM_BAK to empty ("") will allow backups to drop into the ./bak folder relative to a file if it exists, and the file's directory if it doesn't. o Refined path detection for Win95. Vim detects $HOME regardless of whether one exists or not which poses some problems. (We have to allow C:\.cream as the user file location.) 2004-04-11 o Finished INSTALL.bat, except for menu item. 2004-04-10 o Finished multi-image .ico file. (Thanks icoutils!) o Manually update CVS files, icons, *rc, cream(.sh) o Created Linux .desktop menu entry. o Revised CVS update routine. (No longer includes synchs between a CVS checkout and "live" files. o Created and refined INSTALL.sh, which can not only install from a CVS checkout, but can also act as an updater for developers working from one. 2004-04-09 o Modified cream shell command to pass along arguments via "$@". 2004-04-08 o Finished massive project to score hunting dogs. ;) o Added non-octal and time format conversion functions from dog project back into library. 2004-03-16 o Final testing and refinement of re-structuring on WinXP. o Fixed Vim version error. (Ben Armstrong) 2004-03-13 o Continued massive overhaul of new pathing structure, on Windows. o Changed default location of swap files to the file's own directory. o Set Win95 backup, temp, swap locations in $CREAM . tmp/. o Set Win95 views and viminfo in $CREAM . views/. o cream-user.vim location now in $CREAM . cream-user/ (when no $HOME present). o Found that looking for a path to $HOME on Win95 is slloooow. 2004-03-08 o Resolved path expansion in cream startup script. (Benji Fisher) o Forced to use real Vim to fix things. Anguish. o Found uninitialized variable g:CREAM_SEARCH_HIGHLIGHT error in var manage during startup. o Finished system multi-user install on Linux. All pathing appears to be resolved. o Removed gvimrc. o Fixed get_vimrc() to reflect new path. o Fixed developer menus. 2004-03-07 o $CREAM moved to $VIMRUNTIME/cream. This simplifies pathing, and also makes multi-user installation simpler. o Multi-user default install now requires all writable configurations (backupdir, views... ) to be somewhere other than $CREAM * Re-located backup directory to ~/.cream/tmp. 2004-03-02 o Renamed _vimrc/.vimrc to _creamrc/.creamrc, _gvimrc/.gvimrc to _gcreamrc/.gcreamrc. Converted references in developer menu, vimrc, gvimrc, and cream-lib. 2004-03-02 through 2004-03-06 o Massive investigation into trimming whitespace via substitution(). (by Benji Fisher) 2004-02-28 o Updated taglist to 3.1. o Enabled prototyping (Alt+9) without the taglist being open or operated. 2004-02-06 o Fixed runtime path issues with toolbar on Windows when external $CREAM uses backslashes. (Ivailo Stoyanov) -- version 0.28 ----------------------------------------------------------- 2004-01-31 o Fixed font initialization in print_init() when none existed. o Fixed var name in recent autowrap work. 2004-01-29 o Fix g:CREAM_AUTOWRAP initialization errors. General clean up of wrap initialization. (John Sampson) 2004-01-27 o Created Dutch dictionaries: * Small: 115,690 words * Medium: 84,635 words * Large: 127,728 words * XLarge: 176,852 words o Fixed redundant language return from Cream_spell_dict_avail(). o Fixed some pretty heinous errors in language dialect and dictionary size detection. 2004-01-25 o Fixed Format menu's unwrap function name error inverted key description for upper and lower case. (Michael Marquart) o Changed add-on name from "Cream Bug Report" to "Cream Config Info". (Michael Marquart) 2004-01-22 o Modified PopUp menu so top item is blank to prevent accidental clicking of undo, especially on window focus change. 2004-01-21 o Finished printing backend and menus. Refined dialogs a bit. 2004-01-19 o Patch up of print header text dialog. 2004-01-16 o Fixed copy and mouse events in column mode, and was finally able to figure a way to disable menu calls. (Paul "silly hat") o General work on developer's keytest addon. o Refined a few key accelerators in the Edit menu. (Paul "silly hat") 2004-01-15 o Work on printing options. o Detached &printfont from &guifont. 2004-01-14 o :hardcopy experimentation with &printfont having underscores. o Cleaned up some of the font code associated with printing. o Added File.Print Setup back on Windows. o Modified Recent File list on Windows to display backslashes as path sperators. (Paths used are still slashes however.) o Finished verifying that all MRU path issues have been resolved. (Some time before 0.27.) 2004-01-13 o Fixed SaveAs puts new file into File.MostRecentUsed (MRU) menu. o Moved MRU autocmds out of module to autocmd file. o Removed option to hide/show bookmarks. (Now always on when existing.) o Slight cleanups of autocmds (a little more speed). 2004-01-07 o Mostly completed print options back end. o Black and White color scheme tweaks. 2004-01-06 o Finished HexMe encryptor. Includes various improvements to associated library functions. o Added Black&White color scheme. (by Mike Williams) o Added Microsoft Windows platform tests to Cream_has() using genutils OnMS(), and updated several references. o Modified Cream_fileformat() to use nr2char() over actual CR. o Began adding print options. o Added license to About dialog. 2004-01-05 o Fixed typo in Hex2ASCII dialog. o Created new Encrypt HexMe add-on. o Modified Nr2Hex() to return a value padded to two digits. 2004-01-02 o Fixed txt filetype bug where undefined globals were unchecked. (Michael Freedberg) -- version 0.27 ----------------------------------------------------------- 2003-12-30 o Fixed bookmark toggling to not destroy file's modified state. o Changed Cream_get_dir_above() to condition spaces and escapes for all versions of Windows, not just Win95. 2003-12-29 o Fixed File.MRU placement of separating lines. o In CtrlChars highlight add-on, toggle highlighting back off if none found. o Fixed crazed QuickWrap re-wrapping indention which errantly followed C language keywords (e.g. "for", "while") (through &smartindent). o Removed Font toolbar item as it is both confusing beside spell check and a waste of space given it's infrequency of use. 2003-12-27 o Repairs of buffer restoration, mostly cosmetic but removes warning on exit when trying to save buffers with non-existant files. o Added "nonewmod" argument to TryAnotherWindow() to avoid landing in non-existant modifieds when re-starting. o Updated Cream_exit() to reflect above. 2003-12-26 o File.MRU overhaul: * Removed redundant scope indicators "l:". * Created individual priorities for each item. * Commented out unused functions and code blocks. * Created file open wrapper function within MRU to handle cases beyond that normally handled by Cream_file_open(). * Removed conditioned placement of menu item based on buffer existing or not. (Wrapper will decide what to do.) * Invalid (non-existant) entries now removed from menu only when opening one is attempted. 2003-12-24 o Updated multivals to version 3.4.2. (by Hari Krishna Dara) o Updated genutils to version 1.10.1. (by Hari Krishna Dara) 2003-12-20 o Added new character line feature (Shift+F4 x2) where the line is drawn only as long as the line above. (Good for underlining titles.) o Fix of column mode bug where display of invisible chars was flakey. Toggle during column mode now works (beautifully!). 2003-12-19 o Improved ASCII table to name decimal 0-31 and order from 0. o Hacked on keytest. Improved key readability and recognition, added multitude more tests. o Fixed several broken key and mouse events in column mode. o Smoothed and added several keyboard accelerators in Format menu. 2003-12-18 o Fixed major memory gush where spell check continued to increase memory footprint each usage because the GoodWord wasn't cleared. 2003-12-17 o Text filetype highlighting additions: Bullets, timestamp, titles preceding fold marks and character lines now highlighted. o Syntax highlighting toggle. o Cleaned up autocmds for BMShow(). o Clean ups in filetypes, autocmds and highlighting to correct behaviors as a result of new syntax highlighting toggle. Load times may have fractionally sped up, too. 2003-12-16 o Fixed Hex-to-ASCII conversion and enabled them to work on a selection rather than just the entire file. o Corrected statusline filesize. (Off by one.) Eliminated negative values (non-existant buffers). 2003-12-15 o Fixed error on SaveAs with unmodified, Cancel by checking if buffer exists. o Fixed restoration of last open buffer on Unix when path contains spaces. 2003-12-14 o Refinements and function name changes to showinvisibles and update to Vim OnLine. (Javier Cardona) 2003-12-13 o Cosmetic change of spell check progress bar character from "#" to "=". o Modified show invisibles to use multi-byte characters for 6.2 and above. From now on, if it's hosed for you, use another font. ;) 2003-12-09 o Added removal of characters to de-binary add-on, after #vim irc exploration. 2003-12-07 o Removed the "n" and "2" flags from formatoptions settings as it was interfering with numbered lists. o Added string invert addon. (Algorithm by Preben "Peppe" Guldberg.) 2003-12-06 o Freshened cream-capitalization a bit, with function refactoring and renames. 2003-12-04 o Removed filereadable check in recent file menu for much faster loading. 2003-11-25 o Recent File menu tests removing escaping prep and single quoting. May have fixed some of our failures opening items with spaces. o Recent File menu removed normal, command-line, and operator pending mode menu items for speed. This reduces the number of menu items that must be re-generated each time a buffer is entered by 60%. o Recent File menu option removed to list numbers. o Limited maximum Recent Files listing to 30. o Dialoged Recent File options. 2003-11-22 o s:Cream_addon_function_check(call) now more agressive in stripping text (like "") preceding "call ". o Renamed "Cream_mbyte_highlight()" to "Cream_highlight_mbyte()". o Fixed a couple of heinous bugs in Cream_bwipeout() where current buffer rather than passed buffer was being deleted. o Modified SaveAs to silently close the old file without saving it when a new one is successfully created. o Removed redundant filetype detection autocmd since both VimEnter and BufEnter events call Cream_filetype(). o Created Highlight CtrlChars addon. 2003-11-21 o Fixed errant command in Cream_window_height_min() so that Window=>Height Min. now works. o Fixed exit with new modified prompting twice to save. Var wasn't retained because it followed the viminfo write. (Elias Pschernig) o SaveAs closing existing exploration. 2003-11-20 o Fixed position remember bug for word count. 2003-11-19 o Fix toolbar Paste tooltip typo "from" to "to". (Brett Hallett) o Installer batch file fixes. 2003-11-04 o Fixed statusline to show multi-byte char for show invisibles with version 6.2 (and obviously with 6.1's patch469). Still slightly hosed though. o Dead key research. (Elias Pschernig) 2003-10-31 o Removed redundant old-style user var testing from vimrc. (Christoph Haas) o Removed nested "cream" subdirectory in Unix packaging in favor of standard "cream-X.XX" subdirectory. (Christoph Haas) -- version 0.26a ----------------------------------------------------------- 2003-10-30 o Perhaps fixed our statusline regression bug. (Everybody) o Modified About Cream splash to indicate unpatched Vim versions with a patchlevel of ".0" rather than just blank. (Sevn Vahar) -- version 0.26 ----------------------------------------------------------- 2003-10-29 o Repaired statusline for Vim versions prior to 6.2.071. (Thai Dang) Revised space problems with diff/expert indicators as result. o Removed special statusline indication for column mode. o Added missing function forced declaration "!" from two mouse functions. -- version 0.25 ----------------------------------------------------------- 2003-10-27 o Modified FAQ shell script to reflect sh (v. bash) limitation to set and export var on same line. (Christoph Haas) o Modified release packager to name version using periods for Debian compliance. (Christoph Haas) o Add Ctrl+T as Tabs/Spaces (&expandtab) toggle. (Elias Pschernig, Jon Wood) 2003-10-26 o Fixes for spell check dictionaries on system-wide installations. (Christoph Haas) 2003-10-25 o Tweaked timestamp add-on dialog wording. o Modified user directory to use env. var ($CREAM_USER) over discovery of defaults. 2003-10-24 o Quick Wrap (re-wrapping) now better respects numbered lists. Numbers embedded within a paragraph now less likely to mis-format. o Timestamp addon verbose "Not Found" error silenced. 2003-10-21 o Fractionally improved speed of h4x0r encryption and experimented with multi-byte substitutions for no good reason other than it was fun. (Multi-byte still broken due to strlen() measurement issues of multi-bytes. 2003-10-19 o Convert text-to-html add-on now prompts to save file with .html extension, and doesn't require it either. 2003-10-17 o Disabled color themes, font selection and window positioning in terminal. o Fixed bug in saveas for unnamed buffer where buffer was apparently not being saved. (Whoops.) 2003-10-16 o Column select menu keystroke indication still old Alt+C,C form. 2003-10-14 o Tweaked a few default settings. (Tabstop 4, line numbers on.) 2003-10-13 o Windows installer batch file fixes. (Bowie Bailey) 2003-10-03 o Fixed Shift+Space mapping for GTK2-enabled gVim. (Bram Moolenar) o Revised cream-ctags * Handle Gentoo (and others) renaming of exuberant ctags utility. (Tim Cera) * Removal of (undocumented) option to run ctag on path of var g:cream_ctags_path. * Revision of wildcard from "/*.*" to "/*". (Tim Cera) [*** Did this break on Windows? ***] 2003-09-30 o Added Cut/Copy/Paste mappings in column mode. (Kent Garner) 2003-09-27 o Synched with taglist.vim v3.0. 2003-09-25 o Fixed some ancient doc references from Alt+O,O back to Ctrl+O. -- version 0.24 ----------------------------------------------------------- 2003-09-18 o Handled empty &printoptions value on Windows. [Note: this change didn't make it into the 0.24 tarball. (Christoph Haas)] 2003-09-14 o Printing option retainage and improvements. o Synchronized to taglist v.2.8. 2003-09-13 o Release prep. o Verified cream-conf.example.vim. 2003-09-10 o Added statusline graphics and explanation. 2003-09-09 o Warn about potential system vimrc conflicts in installation documentation. (e.g., Debian Shift+Insert issue.) 2003-09-05 o Toolbar icon fixes for GTK2. (Urke MMI, et.al.) o Fixed middle-mouse disabling in default/normal mode from typo and absense of double-click mappings. 2003-09-03 o Documentation updates for using Vim and Cream interchangably. (Matthias Kopfermann) o Exploration of GTK2 icon issues. (Sven Vahar, Urke MMI) 2003-09-01 o Shift+Insert problem on Debian/Sid exploration. (Elias Pschernig, Jon Wood) 2003-08-22 o Find, Replace now recall last selection of Next/Previous. (Did this fix Previous not working when using regexp option? (Sven Vahar)) o Slash escaping in Find, Replace, Replace-Multi now permitted with regexp setting. (Restricted only when off.) (Sven Vahar) o Fixed Find regexp global typo. ;) 2003-08-15 o Find, Find/Replace and Multi-file Replace were hammering slashes regardless of the regexp option setting. (Sven Vahar) -- version 0.23 ----------------------------------------------------------- 2003-07-31 o Modified statusline column position indicator to refect actual column (virtcol), not the number of characters preceding (col). Tabs will now be counted for the number of spaces they occupy, not just one. o Modified character line insert to insert based on virtcol, not col. o Modified date insert to handle line end position based on virtcol. o Corrected NSIS uninstaller to point to uninstall.exe. (-gui extension is now deprecated.) 2003-07-29 o Restructured library a bit more. o Added Convert Tabs To Spaces item in the Format menu (Vim's :retab). o Changed 2003-06-29 addon email prettifier filetype from "email" to "mail" per Vim's standard. o Updated remaining color schemes to reflect new indented email colors. 2003-07-20 o Removed Shift+Space key mapping to list. (everybody) o Changed Alt+Space template completion mapping to Shift+Space (x2) for better support on GNOME/Linux and terminals. o Added X11-style middle-mouse button behavior option. (Peter Heslin, William McKee, Dave Williamson) 2003-07-17 o Removed errant reference to Ctrl+O in keyboard shortcut docs. (Marcio Andrey Oliveira) 2003-07-04 o Modified signature separator to use trailing space ("-- "). (References: http://www.zrox.net/Mail/Signature/, and Google "sig signature format".) 2003-06-29 o Added "email" filetype to acceptable filetypes for email prettifier addon. (Dave Williamson) o Added colored email thread indention level indication via color up to three levels. (Dave Williamson) 2003-06-10 o Updated taglist to v2.6. 2003-06-06 o Patched up cream-ctag routine. 2003-06-04 o Removed Dan Sharp's pathdef patch from build process. o Put docs-html into developer menu. Renamed some items to reflect physical structure. -- version 0.22 ----------------------------------------------------------- 2003-05-27 o Made listing of non-Cream color schemes and experimental selection colors developer-only. 2003-05-26 o Finished CVS sync on Linux. o Finished Linux release packaging. (Thanks to "seth" (@getnet.net) on #freenode.net#linuxhelp for resolving the cd;tar issue!) 2003-05-20 o Uniq options sort prior to running. o CVS sync improvements. o Add-ons now have consistent vcall and all use : prior to eliminate range (except where desireable). o Set &smartindent coordinated with &autoindent. (Wolfgang Hommel) o Set &softtabstop coorindated with &tabstop and &shiftwidth. (Wolfgang Hommel) o Finished release packaging script re-work on Windows. 2003-05-19 o Improved Settings.Filetype menu to list based on more voluminous syntax/ rather than ftplugin/. Created submenuing to keep menus less than 600 pixels high. o More refinements to CVS sync. o Changed optional select_all() argument to "endvisual". o Added add-on for the Uniq() utility. (by Jean Jordaan) 2003-05-18 o More experimentation with EnhancedCommentify. 2003-05-17 o Fixed paste positioning error (1 char) when pasting over selection. o Tweaked website colors. o More tampering with EnhancedCommentify trying to get both respect and irrespect indent mappings. (At the same time. :) 2003-05-16 o Finished first pass of CVS update stuff. o :set noloadplugins is now set based on the presence of a "novimplugins" file in $CREAM. (Wolfgang Hommel) o Updated to new EnhancedCommentify. (by Meikel Brandmeyer) o Added Autoindent toggle back to Settings menu root. (Wolfgang Hommel) Alphabetized the subsection. Added indicator in the statusline. 2003-05-15 o Altered developer menu to use g:cream_user. o Changed Quick Wrap's removal of multiple spaces on repeated keystrokes delay to within 2 seconds rather than 3. o Re-work of cream-update given the new CVS repository. o Synced as much as we could with MruMenu version 6.0.3. (by Rajesh Kallingal) 2003-05-14 o More thinking about implementing CVS. o Added a few more timestamp variations, including compressed ISO 8601 and a human readable with 24h. o Pushed up to CSV. 2003-05-13 o Finally fixed block commenting so empty lines are always commented! Note that the fix includes removal of trailing whitespace on all lines commented. 2003-05-12 o Paste menu item did not properly pass mode variable. (Nathan Jones) o Window vertical position was errantly being set to 0,50 rather than 0,0 in Cream_screen_get(). (Nathan Jones) o More tampering with the buffer menu current file indicator char and encoding. o WINDOWS.txt testing. (David Menuhin) o Fileencoding menus fixed and re-organized. 2003-05-11 o Addressed utf-8 issues on GTK2 with buffer menu current item indicator. 2003-05-08 o Added optional argument to select_all() to allow it to end in visual mode (broken by changes 2003-04-24). o Fixed encryptions with select_all fixes, too. o Added optional add-on loading from g:cream-user/addons/. o Made sort selection case insensitive. o Adapted user modifiable files to be placed in optional location: * Can be set by environmental $CREAM_USER * Windows: $VIM/cream-user UNIX: $HOME/.cream-user/ * If one of the above paths is found, user files in program directory will not be loaded (except addons). * Files able to be placed in user-defined locations: - Various advanced user settings (cream-conf.vim). - User spelling dictionaries (cream-spell-dict-usr_?.vim). Must be in a "spelldicts" subdirectory - User addons. Must be in a "addons" subdirectory. - User file (cream-user). o Added colon separator to insert line numbers. (via Payal Rathod email with :scriptnames output) o Changed statusline to use UTF-8 beautiful char for show inv. (But broken, we end up with a space following the bar separator.) 2003-05-07 o Modified addon call to lib function sourcing cream-user through $CREAM_USER. o Changed algorithm in Title Case to simple substitution. (Benji Fisher) Still unable to correct replacement positioning. 2003-05-06 o Changed Spell check add word to dictionary key from Ctrl+Shift+F7 to simpler Ctrl+F7. o Created printable keyboard shortcut quick reference (docs/KEYBOARD.txt) and PDF. 2003-05-05 o Upgraded to taglist v2.5. o Recovered broken taglist by re-commenting our old nemisis setlocal bufhidden=delete within it. o Fixed global add-on mapping retentions caused by recent array format changes. o Finished fileencoding menu, based on Mozilla's layout and naming. Note that we do not adjust termencoding since not all corresponding values are possible and we're just too uneducated to know how to find a "best guess." We'll rely on Vim's guess and the user's setup to dictate. o Tweaked de-binary addon to change non-alphanumerics to returns, not just delete them. 2003-05-03 o Invented way to sort/alphabetize addon menu items regardless of load order. This disassociates the addon filename from the order any item(s) registered within are placed in the menu. (Only first two chars are valued in the sort process, and only letters are counted since Vim has a 16-bit value limitation on menu priority and 26^2 * [1-26] puts us just to that limit. 2003-05-02 o Implemented BISort for line sorting. (by Piet Delport) o Added invert lines addon. o Added Format.Join Lines item with option to preserve whitespace. o Migraged entire addon structures to use curly braces array types rather than MultVals in preparation for sorting them. Slight speed improvements from new form. 2003-05-01 o Experimentation with BISort. 2003-04-30 o Fixed word count to count multiple occurances on a single line. o Added (now working ;) document word count. 2003-04-29 o Renamed SearchAndCount() to Cream_count_word(). o Added Cream_count_words(). 2003-04-28 o Updated three Format Whitespace/empty line handling functions to remember cursor position. o Added g:CREAM_USER for location of all user files (cream-user, user dictionaries, future): $VIM/cream-user (Windows) and $HOME/.cream-user/ (UNIX) o Added env var $CREAM_USER to define g:CREAM_USER. 2003-04-24 o Fixed addon warning for items attempted without selection where old remap of was still being used. o Added drop of current selection before select_all(). o Added silent option to encryption addons. Organized existing optional argument finding, too. 2003-04-23 o Fixed Algorithmic Encription to properly call unencryption routine when encrypted. :) (Typo.) o Confirmed (yet again) that h4x0r encryption cannot be done through substitutions. ;) 2003-04-22 o Realized &encoding=utf-8 won't work because keyboard encoding (&termencoding) can't be coordinated. Non-English western languages require latin1 and there's really no way for us to guess at the proper value. Making the user decide is no better. (Christian Gbel) o :set listchars is appently broken within a function. Column mode is unable to change these to invisible spaces as required for hack. Decide default on with columns more intuitive. o Work on &fileencoding Format menu. 2003-04-21 o Logo improvements and web site beautification. 2003-04-20 o Added &termencoding = &encoding for developer. o Still sorting through multi-user install issues. 2003-04-19 o Spell check now clears BadWord highlight group when turned off. Refreshing highlighting no longer is successful given the new filetype configuration. 2003-04-18 o Updates to Chocolate Liquour color scheme. o Removed option to select separate font for Column Mode. A severe Vim window positioning bug makes it too annoying. o Exploration of gvimext.dll updating via installer. 2003-04-17 o PopUp: * Pop Up menu cleaned up a bit, behavior and positioning now more predictable. * Improved subtle behavior differences needed between Pop and AutoPop: - AutoPop default behavior changed to off. Can still be turned on or activated with Alt+(. - AutoPop now avoids trying to pop up the current function. * Vim bug hacked around where first time never works. o Fixed show invisibles once and for all with decimal abstractions. o Experimentation with GCC building. (Dan Sharp) 2003-04-16 o Moved GUI library functions to cream-gui.vim. o Fixed fonts with spaces in names by escaping them. (Jens Langner) o Made column mode font per os like main font. o Hacked huge repair of screen positioning errors on WinXP after using set guifont=*. Essentially we wrap calls at both font set and column font set with window pos calls. o Modified all font sets to "let &guifont=" format to handle spaces. (Jens Langner) o Enabled list chars in utf-8 to be multi-byte >= 6.1.469. o Explored using CVS again as main repository. (Jens Langner) o NSIS SectionIn format change to new form. (Mikolaj Machowski) 2003-04-12 o Added (dynamic) menu option to change filetype. o Added filetype indicator to statusline. o Straightened out filetype organization and autocmd loading. Stuff like comments adjusted each BufEnter via single autocmd call to Cream_filetype() to tree remaining filetype dependencies. 2003-04-10 o Commented removal of nmaps and omaps on Cream Lite mode. (William McKee) -- version 0.21 ----------------------------------------------------------- 2003-04-09 o Release and installer fixes. 2003-04-08 o Ctrl+F4 mapped to Exit. Shift+F4 remapped to character line. o Color schemes coordinated with all new features like current line highlighting. Several tweaks in various colors to generally subdue NonText. o cream-user now loaded last via autocommand so it can overwrite the remainder of the project and any earlier autocmds, too. 2003-04-07 o Installer work. o Tampered with turning off statusline indication of mode except for developer. Reconsidered. 2003-04-05 o Screenshot work. 2003-04-04 o Tampering with templates, tried to fix errant positioning stuff. o Change display of path slashes to backslashes on Windows systems, both in statusline and window titlebar. o Window title improvements. o Cross file prototype pop ups. o Improved Cream_pos() to remember screen position, not just cursor position within a file. o Fixed generations of Cream ctags on Win95 by passing quoted path to shell. o Updated to taglist.vim 2.4. (W00t! Yegappan accepted our changes, no more synching!) 2003-04-03 o Added syntax highlighting for email quotes and sigs. o Updated taglist.vim from 1.94 to 2.3. o Added function prototype return to taglist.vim. o Fixed Cream Lite behavior retainage across sessions. (William McKee) o Fixed logic errors in behavior warning bits. o Removed escaping of spaces in Cream_get_dir_above() for win95. o Renamed cream-conf.vim to cream-conf.example.vim so we never overwrite a user's existing conf file. 2003-04-02 o Added "Ctrl+F4" accelerator indication to File.Exit menu. (The mapping didn't change, we just wanted to indicate a window manager standard.) o Fixed timestamp which couldn't remember the last choice if it was the sixth one. o Renamed many addons. (It would be a good idea to clean out existing addons prior to reinstallation.) 2003-04-01 o Collected project update time into variable. Along with contributors, now also displayed in Help.About. o Added Bug Report addon. Fixed system() call with shellslash. o Fixed broken menu call of tags navigation. (Todd Miller) o Fixed vile error in developer update routine. (This will likely be the death of us one day.) 2003-03-30 o Changed Settings.Preferences acceleration char from "P" to "R". 2003-03-29 o Continued installer work. 2003-03-27 o Added Insert line numbers of selection (cream-numberlines). Released as module to Vim-Online. 2003-03-26 o Added four Insert date/time options to menu. Cleaned up function a bit. o Corrected that word count is case-sensitive. o Added Chocolate Liquor color scheme. (by Gerald Williams) 2003-03-25 o Added digraph insertion and listing to Insert menu. Existing Ctrl+K documented. o Cleaned up verbage in ascii table. Added table list item in addition to existing table insert. Generally adjusted Insert menu. o Added another date/time variation to timestamp add-on. o Fixed heinous column mode bug where motion characters used to exit weren't properly trapped and Esc caused window location shifts. Removed one level of trapping (initial Esc). o Fixed file format of cream-lib. o Toyed with encodings in show invisibles. Hopefully fixed cross-platform and multi-encoding issues. 2003-03-24 o Removed errant on four anoremenu items for folding. (Sven Vahar) o Added vmap option to incapacitated imap. 2003-03-22 o Fixed occasional Daily Read problem where strftime() added leading 0s to day count on Win95. 2003-03-21 o Paste doesn't respect indent. (Sven Vahar) 2003-03-20 o Middle button as paste can be quite troublesome for a Windows user with a cheap scroll wheel. Removed mapping to paste. 2003-03-18 o Fixed bug in autocommand call to load Setting menu Colors after loading the Setting menu rather than prior. 2003-03-17 o Continued work on installer 2003-03-14 o Beginnings of filetype selection menu. 2003-03-12 o Fixed diff problem on Win95 by reversing path forward slashes. o Fixed errant call in Close All where argument was omitted in Cream_NumberOfBuffers(). (Colby Jon) o Optioned restoration of last buffers. (Jeff Bottomley) 2003-03-11 o Fixed errant (non-destructive) return in Cream_redo(). o Discovered shellslash causing (Vim) error with :diffthis on Win95. -- version 0.20 ----------------------------------------------------------- 2003-03-10 o Optioned parenthesis match flashing and made default off. o Changed default case-sensitivity for find, replace, replace-multi to off. 2003-03-09 o Closing of help window now removes all other hidden help buffers so window closes. o Closing a window now refreshes the buffer menu. (*ahem*) 2003-03-07 o Bug in gvimext.dll in GVim.exe build packages resolved. (by Dan Sharp) 2003-03-06 o Quick Wrap formatting now condenses multiple spaces or tabs down to a single if used twice quickly. 2003-03-05 o More efforts on installer. 2003-03-04 o Finally got NSIS installer v2.0, modern theme working smoothly. o Continued torquing of Quick Wrap formatting range issues. 2003-03-02 o Fixed Quick Wrap bug of orphan left following a paragraph if the preceding line has following whitespace. (This despite &fo not having a "w" in it.) Ugh, solution was to reverse range, although the larger number now comes first. Anybody who can figure this gets a credit. :) o Comments use "setlocal commentstring=" in cream-filetype-html.vim to better handle folding in HTML. (Colby Jon) o Slightly tweaked Ctrl+B shortcut to tag bolded text in HTML. 2003-03-01 o Added incsearch option for command liners. (Gregory Gerard) 2003-02-28 o Column mode improvements * LeftMouse ends mode. * Shift+LeftMouse and Alt+Shift+LeftMouse extend selection to click location. o Re-instated dec 187 ("") as current indicator in buffer menu. o Brace match flashing added. (Bob Hicks) o Added Dawn color scheme. (by Ajit J. Thakkar) 2003-02-27 o Changed more defaults to "No" in Vim installer build. o Column mode improvements: * Feature: Use Alt+Shift+(direction) to initiate column mode. (Christian Gbel) * Feature: Use Alt+Shift+LeftMouse to start column mode and extend selection to mouse. (Christian Gbel) 2003-02-26 o Wrote encoding conversion function o Added current fileencoding indication on statusline. o More build refinement of Vim installer (6.1.362). o Cleaned up timestamp dialog text. 2003-02-25 o Changed installer's default response for removal of existing installation files to "No". (George Reilly) o Continued tweaking of build script. 2003-02-23 o Cleaned up bulleting. Top two (equal) bullets are now "o" and "@". At two spaces indent each, the remaining are: * (second level) - (third level) + (forth level) Custom bullets are (way down) on the ToDo, please let us know if you have any issues with this arrangement. o Fixed column mode problem with utf-8 on WinXP. Apparently a Euro character is interpreted rather than an initial Esc. 2003-02-21 o Got Nullsoft installer working. o Build script can now fully patch, ftp update runtimes, build binary and package the installer in auto mode. 2003-02-20 o Count occurrences of a word in the current document. 2003-02-29 o FTP games. 2003-02-15 o Sort now works on an unnamed buffer by saving it off as temp file. (Wolfgang Hommel) o Ctrl+[ now mapped in expert mode as well as Esc. 2003-02-14 o Added timestamp add-on with preference saved as default across sessions. o Experimented with revised PageUp/Down behavior: Scroll on first key, don't just go to top of screen. (Maintain cursor motion to screen edge though.) Abandoned due to redundancy of Ctrl+PageUp/Down for this purpose and bothersome behavior while reading. 2003-02-12 o Moved a few "important" items back into the root of Settings menu. o Added calls for current line highlighting in most motion functions. New PageDown and LeftMouse click events to accommodate. 2003-02-11 o More fixes related to encoding=utf-8. Note: this encoding is now on by default for developer, none is currently specified otherwise. (Your system/distribution may vary.) (Sven Vahar) o Finished functionalizing the Window menu. o Wrote Cream_vim_foldfunctions() (addon). o Wrote email-formatter addon. o Finally came up with almost fast enough highlighting for current line. Works on P4-2Ghz, too slow on P3-450Mhz. 2003-02-10 o Fixed template (imaps) character left over. Added another , but can't find why this broke in the first place. 2003-02-08 o Added undo steps at each space. (Simply added a quick bounce into normal mode with a key mapping.) [Later reverted due to the problems this causes in column mode. 2003-02-07 o Forced encoding=utf-8 in vimrc. We've been too tempted to use troublesome extended latin1 characters which are interpreted differently among most platforms, fonts, keyboards, etc. o Abstracted separator character in Recent File menu while improved its encoding behavior. o Prepared all scripts to not use characters above decimal 127. 2003-02-06 o Tweaked justify to miss multiple spaces at line beginning. 2003-02-05 o Provide a Window.New Vim launcher menu (multiple sessions only). (Wolfgang Hommel) Note that use of swapfiles is turned off for all sessions when this feature is used because we have yet to split things into session and instance scope. (Thus you see the first session's buffers in second session's buffer menu and vice versa.) o On startup, open the current fold if in one. o Screened Vim v. Cream file save dialog tracking to developer only. 2003-02-04 o Vim Windows registry explorations begun as WINDOWS.txt doc. 2003-02-03 o Fixed justify current paragraph selection behavior. (Xavier Nodet; tip by Klaus Bosau, Benji Fisher) o Revert mapping of back to to solve encoding dilemas. (This means File.Open is no longer .) o Alt+F4 mapped to dead. (Your window manager may still use it.) Reason: With file modified, Vim (not Cream) opens 'Do you want to save'. But if canceled, is processed, which, unmapped, is inserted into the text. (Xavier Nodet) o Abolished "o" bullet type, caused too many problems in re-formatting. [reinstated 2003-02-23] o Fractional speed increase of single server mode. Foreground now works properly on Windows. (Swapped remote_expr() for remote_foreground().) 2003-02-01 o Columbia disaster. Little ambition to code most of today, despite being a precious Saturday. o Added extra space removal from text justifications, so one can re-format fully justified text. * Remove all multiple spaces when justifying with any mode other than Full. (Vim can't do this through any of the options available in &formatoptions, see :help fo-table.) * Face wrath from people that like to use (antiquated) two spaces after a period. 2003-01-31 o Justify text fixes and improvements: * Clarify feature description. (Xavier Nodet) * Create a justification "mode" so that Ctrl+Q and Alt+Q(x2) formats according to the current type of justification. This enables justification of the current paragraph without selection. * Added statusline indicator for current justify method. 2003-01-30 o Fiddling with email munge add-on. -- version 0.19 ----------------------------------------------------------- 2003-01-26 o Fixed error announcement when font select dialog cancelled. o Added WinEnter event to update Window.buffer menu on changes induced by mouse actions. o May have actually rounded out window management features. o Fixed diff mode to be buffer-specific. 2003-01-25 o FINALLY found window tiling bug where new modified buffer wouldn't be windowed. 2003-01-22 o Added more types of munging to email-munging add-on. (If we can just focus on finishing the window management, we could get back to writing cool things again!) 2003-01-21 o Vim binary compiling adventures. (Not really Cream related, but we've burned a huge amount of time on this.) 2003-01-20 o Fixed order of viminfo writing stuff in exit, broken from recent "clean up". o Worked on help toggling via (conditioned on being at front page). 2003-01-17 o Disaster. Somehow lost some of our window management improvements from the previous day's optimistic efforts. Rebuilt what we could remember, although still miffed. (Probably God saved us from ourselves and eliminated a bug we never saw that would have destroyed somebody's valuable data.) o Torqued save, close, exit functions. Added save_confirm. 2003-01-16 o Fair amount of progress on window managment. We're beginning to approach usable. o Added header tags to HTML templates. 2003-01-14 o Fleshed out thinking about v. stuff in vim list mail with Benji. o Re-organization of developer menu. o Playpen addition of Windows file MIME type association function. o Wrote mostly silly email-munge add-on. 2003-01-13 o Fractional read out tweaking of file format. o Continued window management stuff. o Fixed somehow botched call in addon mapping initialization. o Reverted back to original-ish algorithm at addon mapping assignment. Turns out the looping had some logic to it after all. ;) 2003-01-10 o Updated calendar to 1.3r, with added "Today" nav item. (by Yasuhiro Matsumoto) o Tampered with print dialog. (Christian Gbel) o Revised cut and copy icons to more traditional variety. (Whew, that has been annoying for too long.) 2003-01-08 o Updated calendar to 1.3q, which includes month navigation. (by Yasuhiro Matsumoto) o Fixed heinous bug in add-ons where items with both a visual and insert mode call skipped the insertmode and repeated the visual one from 2002-12-12 change. 2003-01-07 o Added justification and toolbar icons. 2003-01-04 o Experimentation with binary Arabic language support patch. 2003-01-03 o Patched Developer menu to use window management (file_open()). 2003-01-01 o Daily read escapes spaces and backslashes in filename. 2003-12-31 o Fixed window management to handle starting from new buffer. o SaveAs modification to remove original buffer in favor of new one. o Recent File menu now calls Cream_file_open(). o Other miscellaneous window/buffer clean ups. 2003-12-29 o Had baby. ;) 2002-12-26 o Attempt at making 'ruler' behave like a bottom line statusline. No success. o Upgraded multvals.vim to version 3.0 (from 2.5). 2002-12-25 o Added minimize function. o Variablized the email address. o Special buffers are now toasted on startup. (Save the Calendar, which is the only one currently managed.) Last buffer memory improved to recall only open non-special/new buffers. 2002-12-23 o Resolved shellslash issue with taglist.vim. o Continued work on window manager, maxmimize function, etc. 2002-12-21 o Immense toying with taglist.vim to get it functional in Win95. No success. 2002-12-19 o Tweaked $CREAM path on Windows to accept several case variations. 2002-12-18 o Weekly tweaks to statusbar wrap indicators. Width is now always shown, but always unhighlighted. o Upgraded taglist to 1.93 for new echo prototype feature. 2002-12-17 o Fixed errant call to new isnew() at close() when modified. o Modified character line insert to terminate at the text margin. 2002-12-16 o Continuing buffer and window management. Major works in Cream_bwipeout() and Cream_window_setup(). 2002-12-14 o Buffer and window management beginnings. 2002-12-13 o Added split new window vertical menu item. o Added diff mode with statusline indicator. Haven't instituted autocmd buffer conformance but groundwork set. o Abolished foldmethod=marker. (Use modelines if you liked this.) (Markus Flaig) o Added selection mapping to go to specified end of selection (add Ctrl to Shift+Up/Down key). o Added the "m" argument to &formatoptions for multi-byte breaks. 2002-12-12 o Improved add-on listing to allow either icall or vcall to be ''. Both menus and mappings adapted. -- version 0.18 ----------------------------------------------------------- 2002-12-11 o Changed behavior of Insert key to over-type tabs and multi-byte characters without moving following character's positions. (Vim's "gR" rather than "r".) (Benji Fisher) o Added favicon for webpages. (Yawn.) o Refined multi-byte character search and exposed it as non-developer. o Fixed bug in Window open file list so that it updates more frequently. o Improved open file at cursor by trying a period as a valid character. o May have fixed vicious bug in File menu's recent file list where paths with spaces or apostrophes failed. 2002-12-10 o Finished imaps template display. (Truncation regexpr courtesy Piet Delport and Srinath Avadhanula.) o Improved accuracy of Window.Buffer menu by updating on all buffer changes (BufEnter event). o Re-organized ToDo list. ;) o Fixed "Working ctags required" error in text file (TODO.txt!). Error is avoided even if no tags file is found as long as ctags executable exists. o Removed QuickWrap formatting preference to break lines before a one character word (set formatoptions+=1). o Attempted map of Insert to gR (virtual-replace). o Huge speed-ups in de-binary. We now use simple substitutions rather than looping across characters. 2002-12-09 o Refined imaps as required to display available templates. Created rough Cream_imaps_listvars() for that purpose. 2002-12-07 o Added spelling auto-correct loading by language. (Only English and very brief French available currently.) o Removed prompt to confirm using multiple spell check dictionaries. o Prepended "imaps_" to all available template expansion vars. o Prepended "pop_" to all available pop expansion vars. o Added open file under cursor feature. o Fixed non-argument bug in Toolbar.Print. o Added auto-popup preferences and conditioned for Windows only. 2002-12-06 o Updated multvals and genutils. o Removed EasyHtml dependency on libList in favor of multvals. o Added warning to use of tags features and new Cream_has(feature). 2002-12-04 o Removed irrelvant mappings in abbreviations and shifted useful items to template expansion module (imaps). Created language-specific abbreviation files. o Found brief French spelling auto-correct abbreviations resource. (Luc Hermitte) o Added argument option to ProcessImapLeader to allow script-scope mappings. o Tampering with bullets in comments(). o Exposed Sort selection command as add-on! Created Reverse Sort, too. o Insertmode-only add-ons now warn user if activated with selection. 2002-12-03 o Upgraded multvals.vim to v2.4.0. (by Hari Krishna Dara) o Continued ridiculous pedantic fiddling with statusline. 2002-12-02 o More status line tampering: Hide autoindent from status line. (Does anybody toggle this?) o Status line: re-ordered path/state/format so file name stays on screen if path too long. o Fixed buggy Shift+Home call with selection (missing ). 2002-11-30 o Modified unindention to automatically select one character. This intuitively informs the user that a selection was been made for the process and also retains one in case a reverse tab immediately follows for re-indention. o Fixed French spell check dictionary. (Xavier Nodet) o Fixed bug in backspace with selection when a line end was included. No longer deletes an extra character. (Xavier Nodet) o Fixed French spell check dictionary yet again. (Xavier Nodet) 2002-11-29 o Fixed typo in backupdir where test for C:/TMP where Cream actually used C:/TEMP. (Xavier Nodet) o Fixed bug in show invisibles menu item where mode wasn't being passed according to new required mode argument. (Colby Jon) o Added file/buffer size to statusbar and other statusbar readout tampering. 2002-11-27 o Refined developer edit add-on menu autocmd on developer variable. o Added auto-ctag generation addon for Cream files. o Added and refined mappings for prev/next tag, go to tag, close and go back. (Alt+arrows) o Experimented with the excellent taglist.vim (Yegappan Lakshmanan) o Squashed existing HTML templates like a grape. From now on... Alt+Space following a valid template abbreviation! o Fixed EasyHtml tool. Ctrl+] now lists language keywords and Ctrl+] x2 its attributes. (HTML now, other languages later.) o Revised imaps (templates) to place cursor at non-multi-byte character, which is no longer hard-coded. o Refined pop so input can be more free-form. Added all Vim pre-built functions. 2002-11-26 o Improved Left/Right/Up/Down key mappings with selection to terminate selection with cursor at corresponding end. o Diminished color of invisible characters. o Mouse Popup menu now occurs at cursor. o Pop Modified to use parenthesis as prompt, not iabbrev. Added filetype-specific and universal scopes of available pops. o Experimentation with ctags. WOW!!! -- version 0.17 ----------------------------------------------------------- 2002-11-25 o Finished French and Spanish spell check dictionaries. o Optioned removal of decimal 127+ chars in debinary. 2002-11-23 o Improved spell checking of lowercase sentence beginnings to include possible start quotes and nested quotations. o Refined German spell check quotation chars and lower case sentence beginning rules. (Wolfgang Hommel) o Completed ispell French and Spanish dictionary conversion to wordlist. o Console menus now only available from the terminal. 2002-11-22 o Put Auto Wrap width indication back in the statusline. o Started final re-work of French and Spanish spell check dictionaries. (By Wolfgang Hommel) o Renamed conflicting function name "cream-update" from add-on. o Tracked down weird parenthesis + 1510 returns bug. (Peter Karp) o Added some levity to Vi behavior mode prompt. =) o Fixed dastardly errant map of to pagedown function. (How *do* these things happen?!) 2002-11-21 o Created mbyte-highlight. o Handled potential multi-byte difficulties in all files. All characters with decimal values above 127 are handled with options when &encoding isn't "latin1". o Changed default selection color to white on black (from white on dark blue). o Added possible argument to Cream_fileformat(). o Added new devel add-on to set Cream fileformats to unix en masse. o First attempt at a French dictionary based on official Debian dictionary "ifrench-gut_1.0". [http://dict-common.sourceforge.net/testing/sources/] (Jean-Philippe Leboeuf, Christian Gbel) o Fixed bug in empty line collapse function. o Explored expanded French ispell hash table from http://ftp.ktug.or.kr/TeXLive6/texmf/ispell/ o Disabled single-session in terminal mode. 2002-11-20 o Created French spell check wordlist based on official Debian wordlist Francais-GUTenberg-v1.0, found at http://dict-common.sourceforge.net/testing/sources/ o Wrote "How to make a spell dictionary" document. o Finished add-on unmapping scheme. 2002-11-19 o Remove add-on mapping if invalid. o Add-on unmap options work. 2002-11-18 o Fixed reversed menu mappings of macro plan/record. (Witte Andreas) o Optimized add-on menus. Removal of priority lets Vim alphabetize. o Added ispell conversion add-on. o Fixed subtle single-char position error after paste. 2002-11-17 o Fixed abysmal mouse pop-up menu. o Refined keytest. o Re-worked German spell check dictionary from new, improved word list. (by Wolfgang Hommel) 2002-11-16 o Optimizations of single-server with forced server name. o Added hack print function. o Removed terminal warning. (You should know better. ;) o Wrote developer key test module to test returns in console. , it's bad, very bad in there. 2002-11-15 o Huge adjustments in vimrc. All path initializations now occur here. Optional D: checking for backupdir removed. Super critical settings (3) now here Loader follows initialization. o Removed insane bug where Windows-type paths were included in &directory. o Fixed font initialization bug. o W00t! Functionalized all key mappings and menu picks save the yet-to-be-renovated Window menu and macros. 2002-11-14 o More functionalized mappings (completion, etc.) o Relocated indent and tabs stuff from cream-wrap to lib and settings. o Refined indent/unindent. 2002-11-13 o Bug fixes and cleaning in Daily Read add-on. o Modified find-under-cursor(F3) with selection to extend selection to next find. (Cool!) o Functionalized capitalization. Keys from insert mode now affect the current word. o Functionalized folding mappings. 2002-11-12 o Retained add-on mappings across sessions. o Added intro warning to Debinary. 2002-11-11 o Fixed whitespace handlers. 2002-11-10 o Finally resolved repeat errors with some visual mode calls. Bram helped us understand how range is passed to a function for each line selected. Simple following the ":" removes. o Began final road to functionalizing all maps and menus. o Moved some more tools to add-ons. 2002-11-09 o Resolved insert/visual mode dilema from menu call. New algorithm able to react to visual mode argument passed from function. Applied in encrypt h4xor and rot13. o Functionalized shift+up/down functions for insert mode based on new algorithm. o More refinements to add-on. 2002-11-08 o Slight revisions to name prompt on close if modified on unnamed buffer. o Created Cream_is_unnamed(). 2002-11-06 o Additional work on addons, and associated work in encrypt. 2002-11-04 o Uploaded cream-vimabbrev to www.vim.org o Experimented with imaps.vim. Cool! o Begin add-ons. 2002-10-31 o Sought faster Opsplorer detail view with arrays. Failed. Made minor speed improvements to original. o Upgraded Calendar to v1.3n from v1.3l. o Added close-all function and to File menu item. 2002-10-29 o Continued improvements to Opsplorer. Resolved most bugs, fixed GNU/Linux platform problems, added menu. 2002-10-28 o Completion of initial revisions to Opsplorer. o Improved fold toggle behavior. When not in fold, go down to next one (or up to previous if Shift pressed.) 2002-10-27 o Continued tampering with Opsplorer. 2002-10-26 o More tampering with bullets. (Sigh, we really should document these some day.) o Opsplorer improvements: Fixed color syntaxes for better control Added single buffer name "_opsplorer" Window management o Modified several buffer and window management functions to handle new Opsplorer. o Wrap, autoindent and autowrap initialization functions modified to ignore calendar and opsplorer. o Added a few more window/buffer management functions from Hari Krishna Dara's genutils.vim to the library. 2002-10-25 o Continued refinment of vimabbrev. (Still plenty more bugs though.) o Initial conversion of opsplorer.vim to longname format. 2002-10-24 o Functionalized [error|visual]bells call. Default is now off, except for developers. o Fixed errant Settings.Preferences.Font call from earlier font_set() rename. o Finished (mostly) Cream_vimshort2long() 2002-10-23 o Created basic functional code for Cream_vimshort2long() o Beginning work on French spelling dictionary. 2002-10-22 o Added set showfulltag o Continued work on cream-vimabbrev 2002-10-21 o Fixed bad screenget call in File Explorer and Columns due to renamed function. o Windows toolbar icons did not have transparency. Reduced to 4-bit, although this greatly reduces the detail in inactive icons. (Jean-Philippe Leboeuf) o Revised developer packaging script. 2002-10-20 o Renamed the four font/window positioning functions to be more consistent with remainder of project. o Fixed printer font (based on font) attempting to be set if first time use of Cream_font_set() is cancelled. -- version 0.16 ----------------------------------------------------------- 2002-10-19 o Added Cream_charline_prompt() to insert character line from prompt and added to Insert menu. o Changed Insert menu character accelerator from "I" to "N". o Changed default location of docs to $CREAM/docs o Changed default location of spelling dictionaries to $CREAM/spelldicts o Moved future help files to $CREAM/help o Fixed packaging script to account for new structures. o Disabled swapfiles in single-session mode. 2002-10-18 o Finished environmental variable settings. Significant adjustments to read/write matrix across supplied/guessed and readable/writable options. o Cleaned up behavior initializations and added Cream Lite setting. o Enabled conf handling of Cream/CreamLite/Vim/Vi behaviors. o Modularized menu calls to the extent that keys does. (Still quite a few "problem children" in both though.) o Cleaned up header license blocks in all files. o Significant charge on documentation of new stuff. 2002-10-17 o Cream/Vim/Vi behavior toggling finally achieved. o Changed cursor to Error color when in normal/command line modes. o Fixed bug where swap file directory was being mis-assigned. o Placed setting's path assignment above swapfile. 2002-10-09 o In functionalizing tag forward/back, hide error if already at end tag. 2002-10-08 o Finish converting all errant string variable types to number. o Finish converting all -1 or "on" global values to 0. o Finished conf file for power user configuration Last buffer load. (Stuart Langridge) o Created Settings.Preferences menu for settings that don't change often or by user. o Began functionalizing all mappings 2002-10-07 o Revised Set Wrap Width to not prompt on Cancel/0. (Just do it.) o Continue converting all errant string variable types to number. o Continue converting all -1 or "on" global values to 0. 2002-10-06 o Begin "correction" of var types, namely several have been strings which should be numbers. o Addition of g:cream_version_str in keeping with above. ;) 2002-10-05 o Created terminal color scheme. Not great for small fonts or bright rooms, but definitely has the (marketing speak) "retro" flavor of traditional Vim. o Added "@" to the list of possible bullets in general or text files. 2002-10-04 o Changed &foldmethod to marker. (Please tell me if this cramps your style.) o Continuing restructure of cream-lib and cream-settings. o Experimentation with imaps.vim. Nice keyhandling and flexibility, but still no visual feedback (something like EasyHtml.vim except that works ;). 2002-10-03 o Experimentation in playpen with debinary() and empty line collapse and deletion utilites. 2002-10-02 o Tampering with comments. 2002-10-01 o Began cream-conf. 2002-09-30 o Major re-structure to modularize key mappings from called functions. o Major re-structure to modularize initialization, configuration and autocommands away from functions. o Major re-structure to move gui positioning functions to library. Functionalized crazed g:CREAM_SCREEN_{s:myos} meta variables. o Structured advanced user override capability. o Collection of autocommands into one place enables us to abandon order-specific script loading! 2002-09-29 o Initialize line numbers off. o Thinking about meta-filetype modules and meta-mappings. 2002-09-27 o Miscellaneous tampering with patches, binaries and toolbars. o Modified F11 mapping so that multiple strikes insert more detailed date information. o All dates revised to ISO format. o Sped up mapping timeout length to half a second (from a full second). 2002-09-23 o Enhanced developer update routine, separating archival from updating. o Fixed day numbering inaccuracies with daily read module. 2002-09-21 o Assembled corresponding managerie of GNU/Linux icons (.xpm). 2002-09-20 o Finally enabled custom toolbar icons. Collected full set of GNOME icons for Windows (.bmp). 2002-09-18 o Patched and compiled to 6.1.186 w/ Mike Williams 148 patch. o Woot! Changed icons to GNOME! o Wrote PathVim2Win() and PathWin2Vim() o Better filtering in the buffer menu. Stopped pretending we're going to syncronize this with Vim's ever again. (Cruft removed!!) 2002-09-16 o Reinstated call to Cream_colors() after turning spell check off to sync highlighting. o Modified find-under-cusor routines to be silent. o Removed cream color schemes definition of g:colors_name variable so Vim's sytax/synload.vim doesn't try to load it. o Continued experimentation with compiling binaries. o Banished Vim's help to a submenu. 2002-09-15 o Fixed errant reversed has("gui_running") check in exit() screenget call. (How do these things get in there?!) 2002-09-14 o Added Zenburn color scheme. (Jani Nurminen) 2002-09-13 o Conditioned Cream_exit() to call Cream_screenget() only if gui is running. (Joakim Ryden) 2002-09-12 o Multiuser setup now possible. Vim's three writable directories can now be set via $CREAM_BAK (backupdir), $CREAM_SWP (directory), $CREAM_VIEW (viminfo and viewdir) which over-ride all other guessing. Failures and alternate (default) result indicated. (Joakim Ryden) o Removal of (apparently) redundant "\\" pathing checks in vimrc. 2002-09-11 o Typo in backupdir "C:\WINDOWS\TEMP". (Colby Jon) o Added /cygdrive/ series to possible backup locations. o Modified backupdir series to only slashes (Vim handles platform specifics) o Turned on swapfile and modified location to that of backupdir as first option, followed by current. o Spell check removes newly added word from error highlighting. (Wolfgang Hommel) -- version 0.15 ----------------------------------------------------------- 2002-09-10 o Fixed file sort to handle spaces on Windows platform by quoting path/filenames. o Tweak single session settings to forget last buffer before viminfo write and just before remote command send. o Put back single character mode indicator in status bar. 2002-09-09 o Created single Vim session manager (cream-server.vim) Provide Settings menu toggle. State is retained/activated via wviminfo without having to restart! 2002-09-08 o Modified Cream_screenget() to obtain screen position and size separately for each Windows, Unix and Other for better multi-platform sanity. o Collected all exit events into single function. (Having problems with multiple VimLeavePre events for some reason.) o Fixed first time initialization of statusbar AutoWrap indicator. o Changed autowidth setting function to turn on autowrap automatically when used. o Removed "\" character at right-most end of statusline. (How long has this been there?) o Fixed some sort filename/path problems on Windows. 2002-09-07 o Fixed file update (Ctrl+S) to prompt for SaveAs with a modified, unnamed buffer. (Wolfgang Hommel) o File sort now requires file to be saved and named. 2002-09-06 o Tested calling autowrap function (if on) at each space. Hmmm. o Temporarily suspended indication of mode to speed things up a little. 2002-09-04 o Improved modularization of Cream. Identification of critical vs. non-critical functionality and distinction of core scripts from modules. Developer menu and cream.vim now reflect a better architecture from which to move the project forward. o cream-colorinvert.vim. o Added Hex2Nr(), Nr2Hex(), and String2Hex(). 2002-09-03 o Continued tampering with spell check double words (still broken). o Fixed spell check mixed numbers/letters error bypassing. o Added HTML filetype mappings to PHP. 2002-09-01 o Escape spaces in CREAM_LAST_BUFFER variable when loaded by Cream_start(). (Tom Sawyer) 2002-08-29 o Updated the Oceandeep colorscheme to 0.4. (Tom Regner) 2002-08-28 o Updated calendar to use calendar.vim version 1.3j. o Last file open now retained even if exiting via window manager close. Autocmd users VimLeavePre to call Cream_exit(). o Fixed slightly broken filetype detection of .txt files in concert with spell check highlighting. 2002-08-27 o Optimized multiple file replace. (Still slow.) o Re-numbered popup and toolbar menus so console menus show them last. o Turning off spell check wouldn't refresh syntax via filetype detection if filetype unknown; declared as txt. 2002-08-24 o More attempts to customize the toolbar. Failed. 2002-08-23 o Fixed PageUp to move 1 full screen just as PageDown moves 1 full screen down. (Wow, nobody ever noticed PageUp was 1/2 while PageDown was 1?!) o Removed autocmd to detect filetype on BufEnter event to preserve spell check highlighting on buffer/window switch. (Wolfgang Hommel) o Removed spell check calls to Cream_colors(). o Fixed typo in Cream_prevwindow() which actually used bnext. o Enabled buffer-independent spell check highlighting through fancy footwork involving syntax refreshing via filetype detect. (Vim effectively purges the entire syntax hash table with the "syntax" commands, thereby destroying our spell check highlight group.) A severe hack was also used for text files which Vim does not recognize as according to filetype for some ridiculous reason. o General tampering with filetype support: *.txt is forced to "txt" filetype, but Vim help files preserved. (Somehow.) o Added Oceandeep colorscheme. (Tom Regner) o Brief experiment with multi-file replace to test validation overhead: very little. 2002-08-22 o Added visual mode Up/Down mappings to go to next screen line rather than next logical line. (Colby Jon) 2002-08-21 o Fixed bad Show Invisibles menu call to recently renamed List_toggle() function. (Colby Jon) o Added space characters to those escaped in the viminfo path and add escaping the viewdir path the same way. Solves some directory with a space problems on some Windows platforms. (Colby Jon) -- version 0.14 ----------------------------------------------------------- 2002-08-18 o Added block comments to tools menu o Added expert mode to status bar o Finished expert mode warning. o Corrected errant DOS format cream-behavior.vim. o Fixed errors in case-sensitive find under cursor routines o Put find under cursor mappings in Edit menu. 2002-08-10 o Abandoned Ctrl+Q,V mapping (2002-07-15) for decimal insert since it caused Ctrl+Q (reformat) to hestitate. o Abandoned autowrap width indicator (2002-07-17) in favor of "auto". o Re-enabled console menus (:help console-menus) given that necessity is the mother of invention. ;) 2002-08-03 o Separated show invisibles (list) items to separate module and posted to SourceForge. o Added pipe/bar ("|") as possible email comment indent char. o Added g:cream variable so we can test for Cream-specific behaviors and mappings in modules that might be used outside of the project. o Changed case of g:Cream_version to lower case so it's not retained. 2002-08-02 o Forced retained window positioning to always be on screen. 2002-08-01 o Update of EnhancedCommentify.vim (by Meikel Brandmeyer). 2002-07-28 o Verified buffer menu code has incorporated updates of Vim 6.1. o Window/buffer menu items not able to be opened within (calendar or help windows) o Created Cream_TryAnotherWindow() for testing if current buffer is special (calendar, help). 2002-07-25 o Calendar hidden from the Window buffer menu. 2002-07-24 o Added spell check bad word identification of lower case word after an ellipses plus a period (four periods) and stand alone numbers. 2002-07-22 o Modified toolbar file|open to use function rather than direct command. o Fixed terminal Vim file close routine. Closing unnamed buffers without has("browse") now aborts without deleting buffer. (Target: v2.0.) 2002-07-21 o Reversed word completion mappings for Ctrl+Space and Ctrl+Shift+Space so more intuitive previous is easier. (Wolfgang Hommel) o Polished mappings for commenting/de-commenting block. 2002-07-20 o Struggled for hours for an operative mapping with a block comment script, EnhanceCommentify.vim. o Split expert mode into a state set and toggle. Added select mode off in expert mode to test with anomolous third party script. 2002-07-18 o Addressed calendar buffer issue(s). Calendar buffer was not being properly handled upon exit. Now deleted and restored each session (if open) which coordinates its presence in buffer menu. (Wolfgang Hommel) o Line numbering now set by same buffer's previous existing state. 2002-07-17 o Continued work on Spanish spell check. (Wolfgang Hommel, Jose Alberto Suarez Lopez) o Added alternate quote characters ("", "") to spell check lower case checking. o Refined spell check BadWord definitions based on each loaded dictionary language's valid characters. o Added Cream_goto() via Ctrl+G to go to line number or % of file via dialog. o Added toolbar toggle option. o Experimented with way to avoid shell pop up on external command. o Shortened autowrap indicator in statusline from "autowrap=80" to "80". [reversed 2002-08-10] 2002-07-16 o Addition of expert mode (Esc toggles normal and insert mode). o Added (slow) Spanish dictionary. 2002-07-15 o Reinstatement of the insert decimal value with Ctrl+Q,V + (number). [reversed 2002-08-10] o Fixed release packager to include _vimrc and _gvimrc! -- version 0.13 ----------------------------------------------------------- 2002-07-12 o Changed default search highlighting to off. o Fixed spell check add word to open user dictionary with split to preserve existing splits. (Wolfgang Hommel) o Clarified vimrc handling of VIMINIT so as to add subdirectory based on available, not on current OS. 2002-07-11 o Added Cream_appendext(), text2html uses it. o Sort * Added temp file testing. (Wolfgang Hommel) * Changed GNU/Linux "--key" to "-k" to work with some Linuxes. (Wolfgang Hommel) * Eliminated GNU/Linux "-o=[FILENAME]" option to simple redirection to work with some Linuxes. (Wolfgang Hommel) 2002-07-10 o Fixed bookmark signs warning. Again. Prompt only twice. (Wolfgang Hommel) o Subgrouped developer menus. (Wolfgang Hommel) o Added directions and explanation in doc-SPELLTEST-ENG.txt for download of required dictionary files. -- version 0.13rc1 -------------------------------------------------------- 2002-07-10 o Documented VIMINIT: * Allows the bypassing of Cream. (Wolfgang Hommel) * Enables use a Windows installation of Cream on GNU/Linux. * Format: - Must use windows 8.3 format if a Windows installation. (We at least know that space characters don't work, and can't be escaped properly.) - Must be in the format "source [path/filename of vimrc]" - Cream must be installed in a subdirectory below wherever the vimrc was found. o Document cream-user.vim. o Caused text2html to open file in a new buffer with the extension changed to ".html" prior to modification. Also hide not-found errors. 2002-07-09 o Added ellipses char () to indicate words off screen in nowrap condition. (Also moved listchars settings to behavior from keys.) o Spell check: Created English test document for spellings and conditions Fixed add word bug so that word added no longer is highlighted. 2002-07-08 o Spell check add word filtering by language (cumulative). 2002-07-07 o Spell check add user word allows visual mode and places word into input box for editing. o Spell check add word multi-word and case sensitivity. o Warning for signs only repeats three times. (Wolfgang Hommel) 2002-07-06 o More cleanup of the VIMINIT startup option. o Finally finished a commandline progress bar after far more pain and suffering than should have been. (Wolfgang Hommel, Antoine "Tony" J. Mechelynck, Colin Keith) 2002-07-05 o Allow optional subdirectory for dictionary. ("spelldicts") o Added dictionary load progress indicator in empty buffer via ProgressBarBuffer(). Now need to find a way to highlight errors in the main buffer. ;) 2002-07-02 o First attempt at spell check doubled word error highlighting. 2002-06-30 o Added clarification at "signs support not compiled in" warning. o Fixed broken Alt+Left tag navigation shortcut. o v.12 and prior g:CREAM_SPELL_LANG strings handled. (Comma separated languages, no dialects or sizes.) o Verified that user dictionary is created dynamically and doesn't need to be distributed. 2002-06-28 o Refinement of spell check dialog sequences and better option changing handling. True beta quality. Some optimizations. 2002-06-27 o Finally completed spell check options selection. Refinement of dialog sequences still needed, but basic functionality is as expected. W00t. 2002-06-25 o Mostly completed an alpha version of spell check options, but still some bugs. 2002-06-24 o Finally finished an alpha spell check loader! Now for the options... 2002-06-24 o Tinkering with single cross-platform configuration loader in vimrc. 2002-06-21 o Terminal Vim prompt to load Cream or use default Vim. (Wolfgang Hommel) 2002-06-18 o Incorporated new multvals.vim version. (Hari Krishna Dara) 2002-06-15 o Hacking on options selection for new spell check. 2002-06-14 o Finished loader for new spell check. 2002-06-13 o Began loader for new spell check. 2002-06-09 o Fixed conflicting option order in cream-replace.vim. 2002-06-07 o Continuing work on spell check. Design is now complete and dictionary making tools almost finished. Loading and selection routines beginning. o Creation of mymakedict.sh, a script for making all dialects and sizes of English Cream dictionaries from SCOWL wordlists. 2002-06-04 o Fixed Ctrl+Space completion which became hosed with the new Ctrl+N mapping for File... New. o Added Unix/Cygwin half of cream-sort.vim. o Fixed cream-statusline.vim DOS file type that crept in this week thanks to a brief encounter with UltraEdit. ;) 2002-06-03 o Added cream-sort.vim o Continuing work with Wolfgang Hommel on spell check dictionary creation standards and needs. 2002-06-01-ish o Developer preferences now determined by single variable set in cream.vim. 2002-05-30 o Dynamically determine dictionary files to archive/backup/update in devel module. o Added MvReplaceElement() function to multvals.vim. o Continued modularization of some function into cream-lib.vim, including Cream_getfilelist() o Phased out use of Cream_strcount() in favor of MvNumberOfElements(). 2002-05-29 o Mostly resolved simultaneous loading of multiple language dictionaries. Includes proper accounting of available dictionaries, those actually loaded, switching to default and refresh on change of selection. o Initial experimentation with multvals.vim by Hari Krishna Dara . o Creation of cream-devel.vim. o Added MvRemoveElementAll() function to multvals.vim 2002-05-28 o Re-made exhaustive English dictionary. Now in the neighborhood of 500,000 words. o Finally resolved a small (70k uncompressed) default Cream dictionary. [Which gets changed again. ;)] o Created insert mode mapping/functions/menu for quick wrap/unwrap. 2002-05-24 o Dictionary utility testing 2002-05-23 o Fixed developer's update module. 2002-05-21 o Fixed (lost) vimrc GUI check to provide warning, instead of not load. 2002-05-20 o Added mapping for PageUp to ensure motion to top of page if in first screen. [in Orlando Airport ;)] (Wolfgang Hommel) 2002-05-17 o When adding a word to the spell check user dictionary, it is closed and doesn't remain in the buffer list. o Changed all dictionaries to use "syntax" rather than "syn". 2002-05-16 o Moved spell check mappings from cream.vim (loader) to cream-spell.vim. o Changed options dialog look for Find, Replace and Replace Multi to indicate both Yes/No condition. o Added Spell check option to reference multiple dictionaries at a time. (Wolfgang Hommel) o Modified SaveAs to alter/initialize syntax highlighting. (Wolfgang Hommel) 2002-05-15 o New makedict applet by Wolfgang Hommel for turning word lists into Cream dictionaries. 2002-05-14 o Restructuring of spell check to accommodate additional dictionaries. File names are now in the format "cream-spell*.vim" and all dictionaries are in the format "cream-spell-dict*.vim" with a three-digit language code replacing "*". The language code for the user dictionary is (still) "usr". o Added German dictionary provided by Wolfgang Hommel. o Menu to select spell check dictionary language. o Added (ugly default) Close button to Toolbar. -- version 0.12 ------------------------------------------------------ 2002-05-12 o Re-enabled Alt+F4 mapping to exit, but only if using GUI Vim. o Fixed path/filename return in dailyread(). o Dropped dailyread into separate module from playpen. 2002-05-11 o Fixed Hex conversion, hosed on my Win95 system. Due to temp file not found because of a forward slash issue. Resolved by loading cream-settings before cream-menu. Off-shoot was splitting cream-behavior off of cream-settings so behavior stuff (syntax enable) can be loaded after menus while settings stuff (set shellslash) loads before. o File explorer now :bwipeout! temporary buffer and refreshes buffer menu. Slower, but more intuitive. 2002-05-10 o Attempted to fix autowrap state retain on buffer change. o Yet again tampered with the all-powerful remapping, currently . (Frees up the standard mapping for i18n.) o Moved autocommands from cream-lib.vim to cream.vim. 2002-05-09 o Added menu item to un-split windows, without closing the buffer. (Timo K Suoranta) o Added menu item to choose print paper size. (Still not retained.) 2002-05-08 o Reversed requirement for GUI. Issue warning instead. (Stuart Langridge) o Incapacitated Alt+F4 mapping, since it is usually handled by the window manager (W95-W2K, KDE). May perhaps option this back in later for GUI only to avoid conflicts with containing terminals. (Stuart Langridge) [re-instated 2002-05-12] o Column mode improvements * Typing retracts selection to a single column width for more intuitive column typing. * Delete and Backspace delete selection (any width) and retract to a single column width. * Improved accomodation of mixed white space (virtual editing). * Undo better retains position by reacting based on the previous operation. 2002-05-07 o Added cream-user.vim for user customizations. (Stuart Langridge) o Reverted names "Cream_fontset()" and "Cream_fontinit()" because they were correct the first time. ;) Fixed call at Cream_columns(). 2002-05-06 o Temporarily modified fontset() to make printer font the same as display. o Reversed names "Cream_fontset()" and "Cream_fontinit()". [Reversed back 2002-05-07.] 2002-04-24 o Reversed key mappings for Play Macro and Record Macro. 2002-04-20 o Resolved conflict with Ctrl+F4 and Alt+F4 mappings. The standard Windows mapping for all programs is Alt+F4, not Ctrl+F4. Cream has been revised to match this, which means Ctrl+F4 is the meta-character line insert. (Erik Moeller) o Changed undocumented Alt+V mapping to minimize Vim, which conflicted with German , to v. o Resolved remaining two Alt+letter mappings, AND discovered a solution around this "the Right Way": double keystrokes. Column mapping is now c and Quick Wrap is q. Both also have maps to support the "lazy thumb." The best part of this solution is that now all i18n maps function normally, AND we have 24 additional key combinations available for future use. o Added Navajo Night color scheme by Matthew Hawkins, an inverse of Navajo by Ed Ralston. Tweeked several colors to conform to more recent Cream revisions of statusline, selection, bookmark and spell check colors. o Created Daily Read. 2002-04-18 o Attempted to fix occasional "buffer not found" error on startup. (Didn't work.) o Added sweep of ^M characters at the end of a line when converting a file to DOS format. 2002-04-16 o Bug in Calendar menu call used wrong function name. (Jonathan Atkinson) o Added Replace one-at-at-time option. 2002-04-15 o Fixed capitalization paste-back positioning problems (hopefully for good). o Cream now aborts loading if GUI not running. (Will enable terminal once we address it.) -- version 0.11 ------------------------------------------------------ 2002-04-14 o Finally found solution to destroying column position at the end of a line. (Helmut Stiegler, and vim-dev@vim.org in general) 2002-04-10 o Finished major architectural restructuring. vimrc is now only path and main function loader with cream.vim loading everything else, merging with the now obsolete cream-loader.vim. o Optioned formatting in algorithmic encryption for faster speed. o Changed capitalization module to paste back correctly in the middle of a line. (Thus, selections involving line ends are even more broken.) 2002-04-09 o Continued shaping of Find and Replace modules. o Refined Columns to function properly (by forcing single column). o Fixed bookmark loader's error in information dialog when signs not compiled. (Needed to quote "Info" dialog type.) Re-compiling for signs solves the problem, but not the error. ;) (Kim Roland Rasmussen) o Turned off Find errors if string not found. 2002-04-08 o Added column mode font setting (we prefer italic!). o New Find and Replace modules, based on Replace Multifile. 2002-04-07 o Modularized three color schemes, integrating proper statusline, bookmark and spellcheck colors for each. o Moved bookmark initialization from Cream_start() to autocmd group within bookmark module to fix find error. (Jonathan Atkinson) 2002-04-06 o Column mode now beta! Behavior fully intuitive (but with bugs). o Added session retainage of show invisibles (list). 2002-04-05 o Fixed refresh of colors when selecting default. o Continued column advancement. 2002-04-04 o Initial explorations into a more intuitive column mode. o Caught miscellaneous amenu change to anoremenu. (Probably still more though.) 2002-04-03 o Added (omitted) menu items for bookmark functions. o Finally managed to re-map , with much help from Benji Fisher! o Added h4xor encryption. o Began algorithmic encryption. o Changed all amenu functions to anoremap to accommodate change this date. o Changed selection color variable names and default to reverse blue. 2002-04-02 o Cleaned up Cream_get_dir_above() o Huge restructuring. Hopefully a little more modular, but certainly not straighted out yet. Help. o Wrote Debug() routine to display any number of variable names and values. 2002-04-01 o Added regular expressions option to Replace Multifile. o Initial efforts on Shift/Ctrl+Backspace mapping functions. Several anomalies still exist due to broken Vim line end behavior. (Matthias Kopfermann) o Added Ctrl+N mapping to function for File.New. (Matt Sergeant) Changed menu and toolbar to call same function. -- version 0.10 ------------------------------------------------------ 2002-03-29 o Added simple record/replay keystrokes with default register "q". Began groundwork for custom registers. o Added case sensitive option in Replace Multifile. o Changed installation web page to point directly to release download files rather than a static zip file. We'll see what that does for the site statistics. ;) 2002-03-28 o Made Ctrl+Tab mappings jump over unchanged empty buffers if others exist. If no more, drops into empty. o Added a function, mapping and menu to list help topics prior to searching. o Added Cream to the Vim web ring. 2002-03-27 o Fixed MRU menu's redundant autocommands and added help file filtering. o Refresh buffer menu after closing calendar to remove it. o Added meta-insert character line function to free Alt+letter combinations for i18n mappings. (Thomas Piechocki) o When closing a window/buffer, Vim now drops into the next open document rather than an unlisted, unchanged one as long as others are available. o Fixed MRU menu to handle files containing a tilde ("~"). 2002-03-26 o Fixed capitalization pasting back one column off when selection involves the end of a line. o Added trailing whitespace removal function. o Conditioned tabstop initialization for non-help files. 2002-03-25 o Test for sign support at bookmark loading. (Thomas Piechocki) o Changed abbreviations to "eat" the trailing space for specific inserts. (Correct-as-you-type remain the same.) o Changed title case capitalization to lowercase entire selection before uppercasing initial letters. o Continued tweaking of status bar. o Fixed initialization errors for several options. Cream global variable initialization functions were only being called through the autocommand event VimEnter. Changed to BufNewFile,BufEnter for linenumbers, wrap, autowrap, search highlighting, autoindent, and tabstop. o Created a Shift+Tab (unindent) mapping for insertmode. o Fixed textwidth initialization bug. o Changed character line mappings to Ctrl to alleviate non-English language mapping conflicts with Alt. (Thomas Piechocki) 2002-03-24 o Initial tampering with toolbar icons... didn't work. o Modified $CREAM environment variable to use forward slashes for Windows platform. (Holding breath...) o Edit menu removal of Delete command. -- version 0.9 and prior --------------------------------------------- 2002-03-23, v0.9 o Modified title capitalization function to uppercase chars following spaces, parentheses, tabs, newlines and carriage returns. o Modularized capitalization functions into separate module, for upload to vim.sf.net. o Provided global state for search highlighting on/off and provided menu option to control. (Peter Sefton) o Solved color highlighting anomalies with spell check. Completely modularized color themes. o Major improvements to Replace Multifile, including proper escaping of slashes and backslashes, and appropriate replacements of \n and \r. o Globalized textwidth via g:CREAM_AUTOWRAP_WIDTH variable. All functions requiring textwidth now call this variable, and prompt to set if not initialized. Created menu item to set this, too. o Globalized search highlighting and enabled menu toggle. o Removed bug in Ctrl+PageDown where three spaces were inserted (trailing whitespace at mapping) o Instated autoindent and expandtab at quick format ('gq')! This fixed a huge amount of consternation about wrap v. re-wrap functions, and empty lines required between paragraphs for re-wrapping existing text. No problems. Woot! We even fixed bulleted paragraphs to our liking. o Created Quick-UnWrap function and menu based on the glee above. o Two new filetype files (vim, txt). Began exploring filetype customization loading via autocmds, starting with customized comment for each. o Added an Insert ASCII Table script and menu. o Removed redundant Format menu 'qv' item at bottom. o Worked on cleaning up Replace Multifile character escaping. We have almost effectively thwarted regular expressions. ;) Option to use again on TODO. o Create ASCII Insert Character via dialog and menu. o Added Cream development backup scheme to automate archival and updating across several physical locations (developer only). o Fixed initialization and retain state of wrap and autowrap. Single global value (for now, buffer-specific later). o Backed off of autoloading by filetypes due to difficulties with commenting, syntax highlighting state and filetype recognition. o Conditioned ampersand replacment in ASCII and Replace Multifile dialog for Windows only. o Fixed DOS to UNIX to MAC "converter" o Added both fileformat and filetype to statusline. (Filetype later removed again.) o Refinement of comments. Included nested bulleted commenting within Vim comments. o Fixed QuickFormat not returning textwidth to off after use. o Released cream-ascii.vim to vim.sourceforge.net. o Fixed Replace Multifile Windows variable dependencies in GNU/Linux. o Fixed broken call in menu item for calendar. o Created oh so clever Cream About splash screen. o Added Rot13 "encryption" formatting. (Silly and buggy.) o Made all mappings . o Responded to Sven email about Cream. Should post for posterity's sake. o Somehow made Window.buffers menu behave. ;) Now numbers files consecutively regardless of (now hidden) buffer number. Still maintains "New File" flag of empty buffer, but otherwise intuitive. o Added a shift-tab mapping in insertmode to delete. o Made all menu calls silent. o Hugely enhanced and repaired buffers menu (again): * Files are listed in numerical, consecutive order. There is never any "gapping". * Current file preceded by '*'. (Yes, I thought about "%". ;) * Modified files are indicated with a '+'. * Modified buffers that have yet to be named/saved are named "(Untitled)", which matches the same name shown to confirm save/abort when exiting Vim. * Menu is properly refreshed at each File.Save, File.SaveAs and Ctrl+S. * Occasional "not found" anomalies hopefully resolved. * SaveAs doesn't appear to hose things, and is properly refreshed. * Menu numbers above 9 are not preceeded by an underlined hot key number. * Refactored and cleaned up a good bit of debugging and "working" code. o Created saveall function. o Initial touch of Toolbar. o Repaired Ctrl+Up/Down mapping in visual mode. o Fixed help error with argument ("E329: no menu by that name"). Error message from buffer menu add/remove was being retained and displayed rather than potential help error message. o Incorporated an updated Most Recent Used (MRU) file menu, rolling in previous Cream enhancements. o Created global variable and initialization calls for line numbering, and dialog routine and menu access to change. o Created global variable and initialization calls for tabstop/shiftwidth (forced the same), and dialog routine and menu access to change. o Created global variable and initialization calls for autoindent, and dialog routine and menu access to change. o Completed restructuring of all menus. Added a Settings menu to collect all items from the Edit.Preferences (removed) and Format. o Removed all menus for syntax highlighting due to their entanglement in other features. (They should JustWork(tm) anyway, why option?) 2002-03-09, v0.8 o Continued website documentation improvements. o Found work-around for heinous first mouse-in issues: * Inserts the letter "i" on click, drag, selects. * Need to use [Ctrl]+[l] or [Ctrl]+[o] twice the first time. Vim apparently hangs in normal mode, although the statusline reads "-- INSERT --". The fix was to simply add a "" for versions <= 6.0 [*** fixed by patch 6.0.254 ***]. (Thanks Benji Fisher!) o Continued status bar improvements. o Turn off 'showmode' permanently now that we use the status bar for the same thing. o Initially incorporated autowrap and autowrap+, which artificially wrap text with line breaks at 70 characters (with wrap off, and wrap on respectively) ([Ctrl]+[Q]). o Extend [F3] (find under cursor) to include case sensitive via [Alt]. o Hacked a solution to the [Shift]+[Up/Down] not selecting the last character if at end of existing line. The side effect is that the selection is one char too far on the next line, but is much more easily and intuitively remedied with a simple [Left/Right]. (User may never notice. ;) o Font is now determined and remembered across sessions via menu. Actual font names are no longer hard coded. o Fix errors for first time use of recent used file menu. o Menu customizations, including incapacitation of default menus if Cream menu is available. Recent file menu is now under File, and Buffers is now under Window. o Dynamic window positioning and sizing. Cream obtains current settings on exit and restores them on restart. o File explorer customizations which work in insertmode, and which toggle the window. o Re-work of the buffers menu so that File.Close automatically deletes them. o Re-work of [Ctrl]+[Tab] (and [Ctrl]+[Shift]+[Tab]) mapping to alternate between open windows if multiple, and alternate between open buffers if not. (Cool!) o Major overhaul of structure, modularizing logical groups of functions into separate files which are only auto-loaded if present. o Initial struggles with auto-commenting. Vim bugs from insertmode are presenting a significant problem. o Relocation of .viminfo into the ./views subdirectory if available. o Initial functional implementation of multiple file find/replace (alpha) o Adjustments in date/time functions. o Major improvement in abbreviations (auto-correct/ correct as-you-go). o Renamed "engspchk*.*" files to "cream-engspchk*.*". Rename function names and function calls, too, for parallel installs with original. o Renamed "calendar.vim" to "cream-calendar.vim" and internal functions for parallel installs with original. o Fixed undo flakiness from visual mode. o Additional extensive menu refinements and extensions. o Clean up buffer deletion behavior for File.Exit, File.Close and File.Recent list. Now remain on Exit, but are removed on Close. o Upon startup, buffers open on exit are restored and last current buffer is restored to current (if any). o Spell check state variable changed from global to buffer. o Hacked some initial color scheme stuff. Need desparately to mature all Cream color schemes to include status bar, selection, etc. o Initialize bookmarks on setup o Re-worked some variable names to distinguish Cream globals from third party originals. o Retain and initialize color scheme selections (Cream's, not the default ones). o Fixed Visual mode hang in Shift+Home/End/Up/Down functions. Now returns to select mode. o Created Cream_close() to allow GUI dialog to save before closing unsaved buffers. o Exported menus into separate modules for each. (For better or worse.) o Appended "Cream" to File.recentfiles (MRU) module variables, functions and calls for parallel installation. o Appended "Cream" to bookmarking functions, calls and variables o Auto-remove obsolete global variables for the MRU module o Finally found a solution to selection highlighting reversal problems with "gui=bold" ("gui=NONE"). o Fixed GNU/Linux bug in file explorer call where getcwd() shouldn't be quoted. o Fixed file explorer bug where it was closed outside of the function and left an incorrect variable state o Mapped Ctrl+PageUp/Down (needed for GNU/Linux) 2002-02-16, v0.7 o Added access to calendar.vim. o Refined functions to find the vimrc, and re-source/edit it. o Refined functions to establish $CREAM. o Restructured Cream configuration locations for both Windows and GNU/Linux. o Initial text-to-HTML conversion function with basic competence. o Spell check based on the work of Dr. Charles E. "Chip" Campbell (http://vim.sourceforge.net/scripts/script.php?script_id=195). Improved so that it now has almost instantaneous speed with both dictionaries (). o Dynamically set window size and placement, and font size based on resolution. o Created HTML functions for tagging a selection bold, italics and underline. Each maintains the original selection for nested attributes. o Created capitalization function which capitalizes the first letter and each letter following a space in a selection. o Created a $CREAM establishing function, and verifies that this directory is writable on any platform. o Changed status line colors to muted black on gray scheme. Refined display to include relevant information in logical colors. o Restructured the entire file by function. o Book marking and book marking highlighting in earnest. * Mappings created (goto next/previous, add/delete, show/hide, delete all) * Turn on bookmarks on each buffer. (Margin stays closed if none exist.) * Speed up show/hide. Now "instantaneous". * Modified bookmark indication to anonymous arrows rather than display actual name. o Fixed [Ctrl]+[Home] and [Ctrl]+[End] mappings to go to beginning/end of first/last document lines, not just in the current column position. o Created [Shift]+[Up] and [Shift]+[Down] mappings to maintain column position despite word wrap. o Finalized [Shift]+[Home] and [Shift]+[End] mappings. (Could still revise though.) o Started a Cream_get_vimrc() function (to develop read :help VIMINIT) o Created Cream_get_dir_above(). 2002-01-27, v0.6 o Explored spell check... gonna be a lot of work. o Hacked solution to [End] not going to last char on line shorter than screen with wrap off. o Put GUI cursor and winpos stuff over/gui_running into vimrc from gvimrc, qualified with has("gui_running"). (Eliminates need for gvimrc outside of winpos.) o Fixed [End] going to second to last screen line char with wrap on. o Eliminated [End] toggle between end of line and last char. (Trailing white space is heinous; don't encourage.) o Revised fold creation keystroke to match fold toggle, except with selected text. This is more intuitive, but also negotiates a conflict with [Ctrl]+[Alt]+{F#] combinations in GNU/Linux. o Finally completed [Home] functions for all conditions. (Well... ok, still one remote workaround to determine line width but we should be good for a while.) o Dynamic view directory setting (beginning, still broken) o Functionalize HTML insert (beginning, still broken) o Added mappings for HTML character equivalence insertions of "<" and "<". o Added Insert Date/Time function. (Mapped to [F11].) o Fixed [Home] function to eliminate going to start of non-screen line when wrap is on. (Mostly--still have bug from beginning of second line.) o Added new fold options, mappings 2002-01-21, v0.5 o Fixed bug where [Shift]+[Home] from inside the last column would leave a '0'. o Added [Shift]+[Home] and [Shift]+[End] select to beginning/end of screen line within a wrapped line. Repeating either combination now selects to the beginning/end of the line. 2002-01-19, v0.4 o Added folding capability. All fold info is stored in an external view. o Corrected change log dates of year 2001 to 2002. ;) o Fix [Home] to go to first column when only one character in line. (Note: changing the entry to breaks the toggle function.) o Created [End] remap function to option end of screen line before end of line. o Enabled [Home] and [End] remap function to accommodate wrapped and non-wrapped text. 2002-01-16, v0.3 o Added backup file path possibilities for Windows NT/2000 o Modified behavior of [Up]/[Down] keys to remember column location when scrolling across wrapped lines. (Typical Windows-like behavior.) o Fixed [Home] first char/first non-white char toggle function 2002-01-13, v0.2 o Added testing for existence of Recent Menu (mru.vim) before trying to add. o Added testing for GUI version to smooth out terminal highlighting. o Added testing for general backup file locations. o Added additional files into the package including one for creating a Recent Menu (mru.vim) and several Windows registry files for using gVim with Internet Explorer. 2002-01-12, v0.1a o Fixed endif termination. ;) 2002-01-12, v0.1 o Initial release. The single vimrc file mostly works (nothing serious!) for both the GNU/Linux and Windows gVim. Please see the web site [cream.sourceforge.net] for documentation, project goals and other general information. cream-0.43/docs/README.txt0000644000076400007660000000464211156572442015553 0ustar digitectlocaluser INTRODUCTION Cream (http://cream.sourceforge.net) is a free (GPL), easy-to-use configuration of the powerful and famous Vim text editor for Microsoft Windows, GNU/Linux, and FreeBSD. Through common menus, keyboard shortcuts, and extensive editing functions, Cream makes Vim approachable for new users and adds powerful features for experienced users. Cream is a set of scripts Vim uses to conform to the Common User Access (CUA) standards of interface and operability, typical of most other editors found on Microsoft, Apple, GNOME, KDE and Java platforms. And it is all Free, licensed under the GNU General Public License (GPL). The goal of the project is to provide an approachable text editing application with keyboard shortcut and menu access to Vim's full arsenal of functionality (http://cream.sf.net/features.html). Cream also has numerous custom extensions beyond the default Vim to meet most editing needs. Cream uses the Vim's own extensibility to improve editing behavior. There are no customizations to Vim itself so you can easily try Vim with Cream and without. Just download the one-click installer, or, if you prefer to install it manually, the file packages for various platforms. Cream is a Common User Access (CUA) version of Vim. CUA was originally a user interface standard of IBM's Systems Application Architecture, but it now generally refers to a broad, generally accepted set of standard Command Key-plus-letter keyboard shortcut combinations and menu structures. Examples are found today across most applications on the GNOME, Apple, Microsoft, KDE and Java environments. The project continues to develop and grow at a steady pace. Please see the Cream web site (http://cream.sourceforge.net) for the latest documentaton, downloads and features, and contact information if you have questions or are interested in contributing to the effort. Cream's name is a play on the idea of the coffee temper: Both soften something stronger and more sophisticated, and neither can stand alone. SILLY TAGLINES o Cream... because the mouse was invented in 1981 o Cream... usability for Vim o Cream... something good to put in your Vim o Cream... gentler till you're ready for full strength o Cream... it takes the bitterness out o Cream... Vim for the Emacs user in you o Cream... a familiar feel for the famous Vim text editor o Cream... the Vim text editor in sheep's clothing o Cream... sheep clothing for the Vim text editor cream-0.43/docs/RELEASE.txt0000644000076400007660000000374411235040024015660 0ustar digitectlocaluser How To Make A Cream Release o Verify all new vars pushed into cream-conf. o Test on all platforms (all two and a half of them). * Run without any existing view files. * Confirm all files are unix fileformat. * Double-check upgrading is seamless. o Docs * Make Press Release. * Verify all the web documents: - home.html: date, news headlines - download.html: verify file names and sizes - featurelist.html: update - screenshots.html: update - keyboardshortcuts.html: update o cream.vim: * update header version number * update header date * update variable version number ---- FREEZE ---- o Package: * Use handy-dandy release function to create TAR.GZ package. * Use NSIS to create Cream with gVim EXE package (excludes vim.exe). * Use NSIS to create gVim EXE package (includes vim.exe). o Release files to SourceForge. o Tag CVS with release version: "cvs -q tag release-0-42_2009-08-01" o Upload web pages. o Send Press Release email to list. o Post news at: * SourceForge project news * FreshMeat.net * comp.editors * GnomeFiles.org A Nice List of Goals o Regressions - Make sure that previous bugs don't pop up again. o Integration - Make sure that all the pieces work when you put them together. o Globalization - Make sure that none of the user messages / interfaces are hard coded. o Localization - Make sure that it is translated into other languages correctly. o Accessiblity - Make sure that handicapped users (blind / deaf / etc.) can use the product. (Can you use the program without a mouse? Does it work with large fonts, high contrast, etc?) o Scalability - Large numbers of records, large amounts of data. o Performance - Is it sufficiently fast? o Reliability / Memory leaks - Can the system stay up for multiple months without hint of reliability problems? o Security - Do we verify the data before we use it? Do we protect sensitive data? o Update testing - Does data persist and functionality work correctly after upgrades? cream-0.43/docs/WINDOWS.txt0000644000076400007660000003740411156572442015752 0ustar digitectlocaluser WINDOWS.txt An ad-hoc compilation of tips specific to using Cream/Vim on the Microsoft Windows platform. From the Cream for Vim project (http://cream.sourceforge.net). Compiler: Steve Hall [ digitect dancingpaper com ] Updated: 2007-01-17 08:14:53EST ********************************************************************** DISCLAIMER THESE TIPS ARE FOR ADVANCED USERS ONLY! THEY MODIFY YOUR WINDOWS REGISTRY, SOMETHING THAT EVEN MICROSOFT HAS TROUBLE DOING CORRECTLY. WE CAN PROVIDE ABSOLUTELY NO GUARANTEE THAT THEY WILL WORK AT ALL, AND MAY EVEN COMPLETELY DESTROY YOUR ENTIRE SYSTEM AND DATA, AND POSSIBLY A FEW OTHERS NEAR BY. YOU USE THESE COMPLETELY AT YOUR OWN RISK! ********************************************************************** Registry Backup {{{1 --------------------------------------------------------------------- You are advised to back up your registry before using any of the tools in this file. Simply run "regedit" and use the File.Export item to save a backup before proceeding. On Windows 95 (possibly 98-ME), you can also copy the lines below into a file "regback.bat", drop it onto your path (C:\WINDOWS works) and run it. ----| regbak.bat |---------------------------------------------------- @echo OFF rem Saves copies of Windows system registry files. rem change to Windows directory C: cd \WINDOWS rem turn off hidden/read-only/system attribute attrib -h -r -s SYSTEM.DAT attrib -h -r -s USER.DAT rem back up (up to 9 versions) if exist SYSTEM.DA8 copy SYSTEM.DA8 SYSTEM.DA9 /Y >nul if exist SYSTEM.DA7 copy SYSTEM.DA7 SYSTEM.DA8 /Y >nul if exist SYSTEM.DA6 copy SYSTEM.DA6 SYSTEM.DA7 /Y >nul if exist SYSTEM.DA5 copy SYSTEM.DA5 SYSTEM.DA6 /Y >nul if exist SYSTEM.DA4 copy SYSTEM.DA4 SYSTEM.DA5 /Y >nul if exist SYSTEM.DA3 copy SYSTEM.DA3 SYSTEM.DA4 /Y >nul if exist SYSTEM.DA2 copy SYSTEM.DA2 SYSTEM.DA3 /Y >nul if exist SYSTEM.DA1 copy SYSTEM.DA1 SYSTEM.DA2 /Y >nul copy SYSTEM.DAT SYSTEM.DA1 /Y >nul if exist USER.DA8 copy USER.DA8 USER.DA9 /Y >nul if exist USER.DA7 copy USER.DA7 USER.DA8 /Y >nul if exist USER.DA6 copy USER.DA6 USER.DA7 /Y >nul if exist USER.DA5 copy USER.DA5 USER.DA6 /Y >nul if exist USER.DA4 copy USER.DA4 USER.DA5 /Y >nul if exist USER.DA3 copy USER.DA3 USER.DA4 /Y >nul if exist USER.DA2 copy USER.DA2 USER.DA3 /Y >nul if exist USER.DA1 copy USER.DA1 USER.DA2 /Y >nul copy USER.DAT USER.DA1 /Y >nul rem reinstate original attributes attrib +h +r +s SYSTEM.DAT attrib +h +r +s USER.DAT --------------------------------------------------------------------- Sources {{{1 --------------------------------------------------------------------- o The vim mailing lists over a period of several years. o Vim help document "gui_w32". (Specifically sections "win32-popup-menu", "install-registry" and "send-to-menu".) o "Vim", Section 5 "Configuring Internet Explorer v5", by Freddy Vulto. http://home.wanadoo.nl/fvu/Projects/Vim/Web/vim.htm. o Various mails to vim@vim.org list from Colin Keith, Pritesh Mistry, and Dan Sharp on Feb 1-2, 2003. () General Notes {{{1 --------------------------------------------------------------------- o Verify paths in all cases! We assume the path: C:\PROGRA~1\vim\vim70\gvim.exe o Note that path backslashes must be doubled and that all paths must be double quoted to protect possible spaces in paths. o You can define the character used for the shortcut by defining a name for the command and placing an ampersand ("&") before it in the name of the command. i.e "Edit with g&Vim". 1}}} Default Vim Registry Entries Main {{{1 --------------------------------------------------------------------- These are the default registry actions taken by Vim's install.exe and uninstall.exe. ----| vim-registry-install.reg |-------------------------------------- REGEDIT4 ; Source: Vim help (:help install-registry) ; Tested: 2003-03-05 [HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}] @="Vim Shell Extension" [HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\InProcServer32] ; *** VERIFY PATH BELOW *** @="C:\\Program Files\\vim\\vim70\\gvimext.dll" "ThreadingModel"="Apartment" [HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\gvim] @="{51EEE242-AD87-11d3-9C1E-0090278BBD99}" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved] "{51EEE242-AD87-11d3-9C1E-0090278BBD99}"="Vim Shell Extension" [HKEY_LOCAL_MACHINE\SOFTWARE\Vim] [HKEY_LOCAL_MACHINE\SOFTWARE\Vim\Gvim] ; *** VERIFY PATH BELOW *** "path"="C:\\Program Files\\vim\\vim70\\gvim.exe" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Vim] "DisplayName"="Vim (self-installing)" ; *** VERIFY PATH BELOW *** "UninstallString"="C:\\Program Files\\vim\\vim70\\uninstall-gui.exe" ---------------------------------------------------------------------- ----| vim-registry-uninstall.reg |------------------------------------ REGEDIT4 ; Tested: [-HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\InProcServer32] [-HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}] [-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\gvim] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved] [-HKEY_LOCAL_MACHINE\SOFTWARE\Vim\Gvim] [-HKEY_LOCAL_MACHINE\SOFTWARE\Vim] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Vim] ---------------------------------------------------------------------- Context Sensitive "Edit with Vim..." Menu {{{1 --------------------------------------------------------------------- o Create a Vim entry in the right-click menu that is context sensitive. (It will present different options depending on the file(s) selected.) o These require the use of the gvimext.dll that is distributed with Vim. o Edit the paths below to match your actual location of gvimext.dll. o These are redundant with Vim's install.exe default behavior (above)! ----| context-sensitive-menu-install.reg |---------------------------- REGEDIT4 ; Tested: 2003-03-18 [HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}] @="Vim Shell Extension" [HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\InProcServer32] @="C:\\PROGRA~1\\vim\\vim70\\gvimext.dll" "ThreadingModel"="Apartment" [HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\gvim] @="{51EEE242-AD87-11d3-9C1E-0090278BBD99}" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved] "{51EEE242-AD87-11d3-9C1E-0090278BBD99}"="Vim Shell Extension" ; Not sure if these are required, but won't hurt. [HKEY_LOCAL_MACHINE\SOFTWARE\Vim] [HKEY_LOCAL_MACHINE\SOFTWARE\Vim\Gvim] "path"="C:\\PROGRA~1\\vim\\vim70\\gvim.exe" ---------------------------------------------------------------------- ----| context-sensitive-menu-uninstall.reg |-------------------------- REGEDIT4 ; Tested: 2003-03-18 [-HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}\InProcServer32] [-HKEY_CLASSES_ROOT\CLSID\{51EEE242-AD87-11d3-9C1E-0090278BBD99}] [-HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\gvim ] ; Hmm... what if these involve more? [-HKEY_LOCAL_MACHINE\SOFTWARE\Vim\Gvim] [-HKEY_LOCAL_MACHINE\SOFTWARE\Vim] ---------------------------------------------------------------------- 1}}} creamopen.vbs Most default registry tips for Vim rely on passing the filename as an argument to Vim or some part of the operating system. Unfortunately, Windows has historically promoted the use of spaces within paths and filenames, meaning that when a single path-filename is passed to Vim or the OS, each section between spaces is interpreted as a *separate* path-filename. So when you thought you were opening: 1. C:\Documents and Settings\me\Desktop\My File.txt you were actually opening four buffers called: 1. C:\Documents 2. and 3. Settings\me\Desktop\My 4. File.txt To resolve this, an Visual Basic Script (VBS) is created to concatenate these parts back together and then pass them to Cream/Vim as a single quoted argument. ALL TECHNIQUES BELOW RELY ON THIS SCRIPT! creamopen.vbs {{{1 --------------------------------------------------------------------- ----| creamopen.vbs |----------------------------------------- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Start Cream/Vim, combining multiple arguments to single file ' argument. ' ' Sources: ' * Original script: ' http://home.wanadoo.nl/fvu/Projects/Vim/Web/vim.htm ' ' * VimOnline Tip #118, by Freddy Vulto: ' http://vim.sourceforge.net/tip_view.php?tip_id=118 ' ' * VimOnline Tip #190, by Hal Atherton, tested on WinXP and ' IE6: ' http://vim.sourceforge.net/tip_view.php?tip_id=190 ' ' * VimOnline Tip #134, by Eric Lee, tested on WinXP and ' http://vim.sourceforge.net/tip_view.php?tip_id=134 ' ' Orig. Name: gVim.vbs ' Orig. Author: Freddy Vulto ' Modified by: Steve Hall ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Make variable declaration mandatory option explicit dim oWShell, sArg, sFile ' Create script object set oWShell = CreateObject("wscript.shell") ' Loop through arguments for each sArg in wscript.arguments ' Add argument to filename sFile = sFile & sArg & " " next ' Remove excess space sFile = Trim(sFile) ' Run Vim with file argument. oWShell.Run _ """C:\PROGRA~1\vim\vim70\gvim.exe""" & _ "-U NONE -u C:\PROGRA~1\vim\vim70\cream\creamrc " & _ """" & sFile & """" ' Destroy script object set oWShell = NOTHING --------------------------------------------------------------------- 1}}} creamopen.vbs Actions Context Insensitive "Edit with Cream/Vim..." Menu {{{1 --------------------------------------------------------------------- If you always want "Edit with Cream/Vim" to appear in the context menu, you can use these. ----| context-insensitive-menu-install.reg |-------------------------- REGEDIT4 ; Source: Pritesh Mistry, 2/4/2003 1:16 AM mail to vim@vim.org list. ; Tested: 2003-03-18 [HKEY_CLASSES_ROOT\*\Shell\Cream] @="Edit With Cream/&Vim" [HKEY_CLASSES_ROOT\*\Shell\Cream\Command] ;@="C:\\PROGRA~1\\vim\\vim70\\cream\\creamopen.vbs" ;@="C:\\PROGRA~1\\vim\\vim70\\gvim.exe" ;"$\"$0\gvim.exe$\" $\"-u$\" $\"$0\cream\creamrc$\" $\"%1$\"" ---------------------------------------------------------------------- ----| context-insensitive-menu-uninstall.reg |------------------------ REGEDIT4 ; Tested: 2003-03-18 [-HKEY_CLASSES_ROOT\*\Shell\Cream\Command] [-HKEY_CLASSES_ROOT\*\Shell\Cream] ---------------------------------------------------------------------- Open Unassociated MIME Types {{{1 --------------------------------------------------------------------- Windows prompts the user to select a program to open unassociated file types. To automatically open these with Vim without any prompting. ----| unassociated-MIME-WinNT-install.reg |--------------------------- REGEDIT4 ; Source: VimOnline Tip #185, by Leif Wickland ; http://vim.sourceforge.net/tip_view.php?tip_id=185 ; ; o WinNT only! ; Tested: [HKEY_CLASSES_ROOT\Unknown\shell\Open\Command] @="C:\\PROGRA~1\\vim\\vim70\\cream\\creamopen.vbs" ---------------------------------------------------------------------- ----| unassociated-MIME-WinNT-uninstall.reg |------------------------- REGEDIT4 ; o WinNT only! ; Tested: [-HKEY_CLASSES_ROOT\Unknown\shell\Open\Command] ---------------------------------------------------------------------- ----| unassociated-MIME-Win2K-install.reg |------------------------- REGEDIT4 ; Source: VimOnline Tip #185, comment by Klaus Horsten ; http://vim.sourceforge.net/tip_view.php?tip_id=185 ; ; o WARNING! This tip appears to tamper with the "Open With..." menu ; and in some cases remove it. We can't recommend using it. ; o Win2K only! ; Tested: ; o Win2K (David Menuhin) [HKEY_CLASSES_ROOT\Unknown\shell\openas\command] @="C:\\PROGRA~1\\vim\\vim70\\cream\\creamopen.vbs" ---------------------------------------------------------------------- ----| unassociated-MIME-Win2K-uninstall.reg |....................... REGEDIT4 ; * Win2K only! ; Tested: [-HKEY_CLASSES_ROOT\Unknown\shell\openas\command] ---------------------------------------------------------------------- Send To {{{1 --------------------------------------------------------------------- Simply copy a shortcut of creamopen.vbs into your profile's SendTo folder. In WinXP, this is "C:\Documents and Settings\[username]\SendTo". In Win95, this is "C:\Windows\SendTo" In WinNT, this might be somewhere in between. ;) (See also :help send-to-menu in the Vim on-line help.) Internet Explorer, Edit With Vim {{{1 --------------------------------------------------------------------- You can use Vim to edit local files browsed with Internet Explorer. Just use the registry entries below and restart IE. Then use the Alt+F,D keyboard accelerator for fast editing. ----| ie-editor-install.reg |----------------------------------------- REGEDIT4 ; relies on creamopen.vbs ; ; Do NOT modify ".html" list, registry for ".htm" accomplishes both. ; ; Tested: ; o Win2K (David Menuhin) [HKEY_CLASSES_ROOT\.htm\OpenWithList\Cream\shell\edit\command] @="C:\\PROGRA~1\\vim\\vim70\\cream\\creamopen.vbs" ---------------------------------------------------------------------- ----| ie-editor-uninstall.reg |--------------------------------------- REGEDIT4 ; Tested: [-HKEY_CLASSES_ROOT\.htm\OpenWithList\Cream] [-HKEY_CLASSES_ROOT\.html\OpenWithList\Cream] ---------------------------------------------------------------------- Internet Explorer, View Source {{{1 --------------------------------------------------------------------- To change the default View.Source editor for Internet Explorer, you can use the following method. (Note that the previous information for changing Internet Explorer's "Edit with Vim" entry is more efficient and doesn't require a VBS referer as this tip does. It also has a slightly more reachable Alt+F,D accelerator key combination as opposed to the View.Source Alt+V,C.) ----| ie-viewsource.reg |--------------------------------------------- REGEDIT4 ; relies on creamopen.vbs! [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor] [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name] @="C:\\PROGRA~1\\vim\\vim70\\cream\\creamopen.vbs" ---------------------------------------------------------------------- ----| ie-viewsource-uninstall.reg |----------------------------------- REGEDIT4 [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name] [-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor] ---------------------------------------------------------------------- Cream the default .txt application {{{1 --------------------------------------------------------------------- This might be a better way to set the open action for a MIME type. Except that it doesn't appear to work in practice. The vbs runline is effective at the command line, but there's still some sort of quoting issue. ----| default-text-app.reg |----------------------------------------- REGEDIT4 ; relies on creamopen.vbs [HKEY_CLASSES_ROOT\txtfile\shell\open\command] @="C:\\PROGRA~1\\vim\\vim70\\cream\\creamopen.vbs" ---------------------------------------------------------------------- ----| default-text-app-uninstall.reg |----------------------------------- REGEDIT4 ; UNTESTED [-HKEY_CLASSES_ROOT\txtfile\shell\open\command] ---------------------------------------------------------------------- 1}}} vim:foldmethod=marker cream-0.43/docs/DEVELOPER.txt0000644000076400007660000003402711156572442016143 0ustar digitectlocaluser Filename: DEVELOPER.txt Updated: 1200 A.D. This is just a collection of notes, FAQs, and random ideas related particularly to Cream development. Cream Questions and Notes {{{1 o Where are Cream's path variables set? In vimrc. All of them. o Are environmental variables related to Cream's global variables? No. Environmental variables are effectively external to Cream's inner workings. o How do the global variables set in cream-conf.vim work? Cream establishes a multitude of variables, a few of which are global (in the form g:CREAM_*, all caps) and retained between editing sessions. cream-conf is simply read after these retained varibles have been established so that they take precedence. o Can there be user-defined modules? (like filetypes) Possibly, although we would prefer that quality constructs simply become part of the project! (How'd you like to be the maintainer? ;) Otherwise, why not just place them into cream-user.vim or at least source them from there? o Restrictions encountered in abstracting module loading and dependency structure: * "the big three" settings are so important they are set first, in creamrc. Example: &shellslash must precede menus. (vimrc) * Vim's own gui settings file is unused (gvimrc) * developer and version variables precede everything (cream) * most modules depend on the library (lib) * syntax highlighting must load afer menus (colors) * spell check is dependent on syntax highlighting (colors) * menus must be loaded prior to syntax highlighting (menus) * mappings are loaded independently of functions (keys) * autocommands are loaded independently of functions (autocmd) * GUI-only features are set appart from remainder (gui) o What about Alt+letter mappings for menus/filetype mappings? As an English speaker, I had never realized that other >26 character languages use the Alt+letter key to enter digraphs. Early on I just assumed that Alt+letter was available for any mapping I wanted, but I now think these should be reserved for internationalization. Unfortunately, it is also custom to use menus in this regard and we have few other simple combinations available to map filetype specific functionality. One very hopeful possibility is that Vim can read multiple repetitions of key combinations. While combinations like are doable, I am inclined to start mapping doubles of the same key, such as . The downsides are that there is hesitation upon entering the diagraph as Vim waits to see if the user is going to place another keystroke. But we have recently reduced timeout length to 500ms from the default 1000ms and this seems tolerable. The biggest question in this scheme is usability. Can the average user understand? Are international users satisfied with this? Could we make it even more complex with triple or even quadruple repititions? o What's the difference between Settings and Preferences? Settings are options whose states are varied depending on the particular file being edited. Preferences are option states that are particular to a user's habits and editing style. The distinction is in rare cases unintuitive. For one person, using &expandtab seems to be a preference, while another can see its usefulness depending on the task. For example, if you're a C coder all day and your company's policy is to use spaces, you might never have reason to use tabs. But you may also be a system administrator or be participating in a complex project with many file types where the language determines the coding style. So the overlap could be a problem. That said, we believe it makes sense to maintain a root level Settings menu which contains a Preferences menu. This provides quick access (Alt+S) to all settings, separates personal prefernce stuff into a sub-menu and yet still collects them both into a single place that one could easily browse through to control the editor's behavior. Cream Architecture {{{1 We're still trying to work this out. Below is an old roadmap, which may change tomorrow. ;) Core ---- Interdependent set of scripts that create the main architecture. Nothing able to be removed. vimrc and gvimrc o We start Cream by specifying our creamrc with the "-u" switch and "-U NONE" tag to avoid any possible conflicting statements in Vim or user vimrc or gvimrc. creamrc o Cream's vimrc. This enables Vim to be run without using any Cream files. o Path initializer o Starts cream.vim. cream.vim o Essentially main(). o Loads all other scripts and modules. o Loads cream-conf.vim first so an abort of the remaining load is possible if the user has set behavior to Vim or Vi "mode". o Loads cream-user.vim last. cream-conf.vim o User customizations that "configure" the remaining load. Dynamic load routines (developer menu path) must be configured here since it will have already been loaded by the time cream-user gets loaded. cream-lib.vim o Project-wide functions available to all scripts. cream-settings.vim o General settings environment. (others) Modules ------- Scripts dependent on core functions, yet not depended on by the core. These are just logical groupings of functions to keep the source maintainable. Includes: o Misc.: statusline, bookmarks, etc., etc., etc. o Colors o Filetypes o Spell Check and most other functions we couldn't live without, but which might be able to be removed without damaging the remainder of the project. Add-ons ------- Optional extensions that aren't really critical to the project. Each has a singular function that is made available to the user through a menu and permitted to be mapped to a user-defined key. cream-playpen.vim * Experimental and testing stuff loaded penultimately. cream-user.vim * User customized mappings or abbreviations loaded last. Cream Script Preferences and Code Style Guide {{{1 Functional ---------- * Don't ever use . It does different things depending on whether insertmode is on or off. * Always create insertmode mappings for those who use insertmode. * Avoid loose script commands. Instead, create functions that do specific tasks when called. * Try to have mode passed as an argument to main functions so calling mappings, scripts or menus are forced to consider mode. * Always scope functions and variables when not intended to be global. * Always write script with &fileformat=unix. &fileformat=dos won't work on unix. * Use register "x as a register local to a function. NEVER use "@ as it is the global OS/Cream clipboard. Style ----- * Never use Vim's abbreviated forms for commands or options. Always use the full name since code readability is paramount! Use :%substitute over :%s :function over :fun :execute over :exe :edit over :e :normal over :norm and so forth. WE WRITE CODE TO READ, not for entering quickly at the command line. * Always use spaces around operators and concatenation symbols. * Never use spaces between function names and enclosing parenthesis. * Don't glob normal commands on one line. Separate them into readable chunks. * Never use the "l:" scope indicator within functions. It's redundant, redundant, and repeats information repetatively. The Evils of and Keys {{{1 (or "Using Normal Mode with '&insertmode'") Statement of the Problem: --------------------------- * Three keystrokes/combinations exist from which to exit insert mode to normal mode: - - - * can only be used with insertmode on. * and work with insertmode either on or off. * Both and destroy position from an insertmode mapping and are unable to accurately position within normal mode between a line's first two columns. * does *not* destroy position from an insertmode mapping, but is unable to accurately position within normal mode betweeen a line's *last* two columns. * Returning from normal mode via normal i or normal a solves none of the above problems. The error in return position is only translated to the opposite end of the line. (But nice try though.) Excerpt from a Vim List Discussion: ----------------------------------- To: Benji Fisher Cc: Steve Hall, vim@vim.org At: 2003-01-14, 6:38pm Re: Re: imap and col() properly returns to the last position, over the invisible return character(s), when at col('$'). This is something that or do not do at any column except column 1, effectively destroying the position. (You are faced with the dilema: add 1 to the return position everywhere and never be able to re-position at 1, or don't add to the return and never re-position correctly at 2. Throw in distracting variations of returns via normal i or a for good measure.) I maintain that there is no way, from an insertmode mapping beginning with either, to know whether the mapping began from column 1 or 2. Once dropped into normal mode, has a similar problem of position loss between two col positions, even though the return is somehow corrected. I've found it more manageable here than at line front, too, since at column 1 or 2 inserts occur frequently and tab chars can shift an insert 8 space beyond where expected. However, it is quite rare to use a function to insert text one column from line end, so it is less noticeable. (Although still an error/bug.) Discussion of Obtaining Insertmode from Within a Function --------------------------------------------------------- * When inside a function, Vim is automatically in normal mode. This makes some sense--you have to get to the command line to call it. But it means you cannot check for mode within a function because you will always get "n" for normal. (General script does not behave this way, but of course lacks the ability to be mapped or called from other script. So we'll disregard "non-functionalized" code for this discussion although a portion of the same principles still apply.) * While within a function, you can change modes using the syntax: normal i or any of the other many variations. This essentially is the same as entering the "i" command from normal mode. (You must use the execute format to run a keystroke in combination with Ctrl, Alt, Shift or Function keys, such as execute "normal \" and similar.) Once in this new mode, Vim remains there even after the function terminates. * The last mode set within a function remains after it returns. (This can be quite dangerous if you like to append normal mode commands following a mapping, as we'll explain.) * To execute a function and then return to insert mode, default Vim uses a mapping "" such as :call MyFunction() which is understood to return directly to insertmode after one command. *HOWEVER*... And now the trouble begins... * Vim provides a mapping "" which implies to leave insert mode until an "" is pressed. However there are some fundamental flaws with this command which must be side-stepped. o must be forced to return to insert mode, via "normal i", ":startinsert", "execute 'normal '" or the like. The script writer must decide how this happens. o ruins position. To see this, do several times. Notice your cursor move backwards one space each time? In a more sophisticated example, take the following function and mappings: function! MyFunction() " insert "Cow" normal iCow " back up normal hh " scroll screen up one line execute "normal \" " move cursor back down one normal gj endfunction nmap :call MyFunction() imap :call MyFunction() Place your cursor in the first line below, over the 1 in normal mode and press a few times... "-------- Test area ---------- "23456789012345678901234567890 "23456789012345678901234567890 "23456789012345678901234567890 "23456789012345678901234567890 "-------- Test area ---------- Then try it with the cursor between 0 and 1 from insert mode. Notice the two are different? Now comment out the above two mappings and try these two instead, performing the same tests above: nmap :call MyFunction() imap :call MyFunction() Now both positionings are equal! Cream calls all functions using this second method because of the erratic positioning behavior of . (In only about three controled cases do we deviate.) o terminates in an unpredictable mode. With insertmode on, it drops to insert mode, but with insertmode off, drops to normal mode! * Matters are further complicated in situations where a mapping calls a function and then follows with further keys such as: imap :call MyFunction() With insertmode on, this mapping correctly calls the function and then uses the to return normal mode to allow the final to line scroll once. However if insertmode is off, two errors are created. First, produces a form feed ( ) character, and secondly, in Cream toggles Auto Wrap. In summary, use of the and keys to manipulate normal mode is unhelpful except in very rare situations where the script writer is highly confident that their many unpredictable behaviors are being properly handled. Vim Thoughts {{{1 Vim is like a racing car. It provides dashboard controls for the ignition, fuel pump, brake bias, starter, fuel mixture, suspension settings, communications, etc, but doesn't have a radio, adjustable seats, air conditioning, defrost, or anything else you might want driving to work. Cream, on the other hand, has a great sound system, can haul cargo and carry 7 passengers. It also lets you under the hood to add high performance if want--after all, it's your ticket if it's not street legal. 1}}} vim:foldmethod=marker cream-0.43/cream-conf.example.vim0000644000076400007660000001261611517300720017273 0ustar digitectlocaluser" " cream-conf.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " "********************************************************************** " WARNING: " These options are for advanced users only. If you are not an " experienced Vim user, it is recommended that you leave this file " alone to avoid undesirable or destructive behavior. (Or at least " to maintain your productivity. ;) " "********************************************************************** " " Description: " o Use these options to over-ride default Cream conditions. Each should " be pretty self explanitory. " o None of these options are required for Cream to initialize or " function properly. If in doubt, comment out. " o Most of these are simply the globals we store in viminfo. An " autocmd calls this function to overwrite those pulled from the " viminfo on startup. " o While called via autocmd VimEnter, the function is actually called " twice. The first time happens immediately after being sourced so " that Cream can abort further loads if a user has Vim or Vi " behavior set. " o String values/types must be quoted " o Number values/types must be unquoted, 1=on 0=off " function! Cream_conf_override() " over-ride defaults and last-saved settings "---------------------------------------------------------------------- " behavior and expert mode " behavior (default "cream", other " options "creamlite", "vim", "vi") "let g:CREAM_BEHAVE = "cream" " behavior warning (default on=1, off=0) "let g:cream_behave_warn = 0 " expert mode (default 0) "let g:CREAM_EXPERTMODE = 0 " open last buffer (default "[path]") "let g:CREAM_LAST_BUFFER = "" " open last buffer (default [not existing] or 0, on=1) "let g:CREAM_LAST_BUFFER_FORGET = 0 " bracket matching (default or 0, on=1) "let g:CREAM_BRACKETMATCH = 0 " Vim plugins loading (default [not existing] or 0 to enable " plugins, 1 to disable them) "let g:CREAM_NOVIMPLUGINS = 0 " Default path for current working directory "let g:CREAM_CWD = '/tmp' "---------------------------------------------------------------------- " font and window positioning if has("win32") let os = "WIN" elseif has("unix") let os = "UNIX" else let os = "OTHER" endif " font (default "[font spec]") "let g:CREAM_FONT_{os} = "" " window position (default 50, 50, 50, 80) " Note: Relies on font size above. "let g:CREAM_WINPOSY_{os} = 50 "let g:CREAM_WINPOSX_{os} = 50 "let g:CREAM_LINES_{os} = 50 "let g:CREAM_COLS_{os} = 80 " font for column mode (default "[font spec]") "let g:CREAM_FONT_COLUMNS = "" "---------------------------------------------------------------------- " editing " tabstop and shiftwidth (default 8) "let g:CREAM_TABSTOP = 8 " autoindent (default 1) "let g:CREAM_AUTOINDENT = 1 " wrap (default 1) "let g:CREAM_WRAP = 1 " autowrap and expandtabs (default 0) "let g:CREAM_AUTOWRAP = 0 " textwidth (default 80) "let g:CREAM_AUTOWRAP_WIDTH = 80 " line numbers (default 1) "let g:CREAM_LINENUMBERS = 1 " show invisibles (default 0) "let g:LIST = 0 " show toolbar (default 1) "let g:CREAM_TOOLBAR = 1 " make pop automatic upon "(" (default 0) " (Note: only available on Windows) "let g:CREAM_POP_AUTO = 0 " color theme (default "[cream color theme]")) "let g:CREAM_COLORS = "" "let g:CREAM_COLORS_SEL = "" " daily read file (no default) "let g:CREAM_DAILYREAD = "" " single session (default 0) "let g:CREAM_SINGLESERVER = 0 " spell check language (no default) "let g:CREAM_SPELL_LANG = "" " spell check multiple dictionaries (default 0) "let g:CREAM_SPELL_MULTIDICT = 0 " selection highlighting (default 0) "let g:CREAM_SEARCH_HIGHLIGHT = 0 "---------------------------------------------------------------------- " find and replace " find " find string ("Find Me!") "let g:CREAM_FFIND = "Find Me!" " case sensitive (default 0) "let g:CREAM_FCASE = 0 " use regular expressions (default 0) "let g:CREAM_FREGEXP = 0 " replace " find string ("Find Me!") "let g:CREAM_RFIND = "Find Me!" " replace string ("Find Me!") "let g:CREAM_RREPL = "Replace Me!" " case sensitive (default 0) "let g:CREAM_RCASE = 0 " use regular expressions (default 0) "let g:CREAM_RREGEXP = 0 " replace one by one (default 0) "let g:CREAM_RONEBYONE = 0 " replace-multi " find string ("Find Me!") "let g:CREAM_RMFIND = "Find Me!" " replace string ("Replace Me!") "let g:CREAM_RMREPL = "Replace Me!" " path/filename (no default) "let g:CREAM_RMPATH = "" " case sensitive (default 0) "let g:CREAM_RMCASE = 0 " use regular expressions (default 0) "let g:CREAM_RMREGEXP = 0 endfunction call Cream_conf_override() cream-0.43/docs-html/0000755000076400007660000000000011517421112014775 5ustar digitectlocalusercream-0.43/docs-html/installation.html0000644000076400007660000000646611517421020020376 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    f

    download

     

    (Page has moved...all downloads are now referenced on the Cream download page.)

    a

    cream-0.43/docs-html/screenshot1.png0000644000076400007660000011435711156572442017770 0ustar digitectlocaluserPNG  IHDRR3ӶPLTE.%&$!(0: 3+ O+,$+,*120+5?,,897*E-gV?@=.%65D#HhA{dXPOQ\[#ffcKpSrcdY[mmkPuaq}Yswlakor=u{ilQQE a]Ozjjvt]uur{unUqofgXy|ittrh{}zg|udmot2ff~dz{8v>SbFtvt~TT~x9}kx}^d~x||☕O]w[ӛ"^r헗«~~ђk–Ӧƥґ񫷚ѳJ{ȼ٤ºͼ̿ᴰ¿ٶežˤ⻽Ԃƺ pHYs  tIME H IDATxX[y Kimf+nk-k4PAq/eLBYQbvbYƒ}m15jC-QȐ⮪ ~Vd&63GΑ]H;3gO̙911 ad]$M#"Mf.!,,h' z H%|7苻MFy3it4͝oE )D|nnN;WAhG{w (ټy4f~@ ܠ8MZSLYUЛo Hݻ71_4Ľ%Gupw6串v{k߽B6}y8(UA{lW{{D-3/oncc"AMٛHsBA(H޻# &UU6 7卍Ggqk?o=wh{3.Ay={%kno>ގّTsgy6DP[Llߑfvq7No*oooW%i{O|c{v{id}ʐh3|<y{z f'(=?J|Qyy{6-;Fi' 7R!=N4#mo!dpclR{233gv啶L]{s\sl7T<4p J|Ѿ<{b\WԌ@%+ޞi7헷 n1;iWew$Wʑs|GX/ 9 l7vi[2393!؞=2o߹ǞWϞFs{^~Af eBd;:޼g[y zl/׽(C{΍hGJs~Ď)k&f\ ڽ;~YUv(9q|ǎ[ۛ3t3%۹7$[{0Ruɐ*i}SxMy;wxg 'oJvmIDȕn:ڒ9M7c_{{bb +$BD~fMf<þ \׾\zUsf=&9 2;5P㪔=frݖL;0  oK.9?s`n8fys8t0ybFׇwfpcP؝[L6W36Lp'gd>}M:C JlCHx վ̾)6L6kܔgar[5 %Ӿ%#zHe"ypIL>䀎D[@ߗù%9%fX*ܟܮx4KfMǡ Dȭ|p&]s9UdڛMpvafČf4G"U3Z(A; PaR;wRT*~pIFFJrʾ)M[w$fHK\wo -F A8ov| X:acBMS6ARV v%oJHLD)~9  (GK&}};Pd㤨_cmI$ބMɛ;'&Bm")`m=/' '% %LaPd^Hz(_dI僡 H)jPbcŬ Gj'L!?3Rp>v"g0HFp,@;;q䑱D3PXeǡB#frf?bJ2ꙓcf$SܝdY 04@`dd?1Lܓ3:YX^bʆAbyM0RaAтH?+υ RVx w:^ E\)]#G+c  g$'fl4INٝ#j RG)넔'j`Sv~NbgFƔ ,:M20"t? H/L6>΄ |sW/ǰK3Ⱥ0!F03#&$)FRÌ0. #ad]$JUDzX<@-Gt J0')3BUv')Skixqxɲ[dtYQth߉łrՔ }|D,5W;\R+xJ.%X&X>jd.S2&i5gX7lQT+h4TsAg(2R-Q$J TFB/S VV0e6+2 Kx<1lIRT*RfIdZ3+S>Am-jYϕj@ej ֢VShjTPeR5B dP+( ;eH+I E3$ %W+\^VF-@:/АB{ ^TqET⺹ K",|a,xa5B'C_E<1WfNV+D\8I2lzGBmxmLGEݠ"DIEJ"pdҳ(_d "ZoIh B,h9j@q>SēRK`Y) RCE|1Oaejh屔$͖b !%KJAU $`)}c RqHAǫy,6OicI,$Q$0+xŐzf!-Wt俞ҲD"+ӲF1l퐅[ *zZ,V"$)R!=W8E eU; Wp9ݖ"!3|>כ$= mH5GSXyJE>LU"+bQ,ʤ^j_O趠j$ AϲX$G}Eɱȶٱ"%LIodY,? bǛ/$HI-zp<0FҲdj $8IeE)E$Z@EZtnPIƳ0BH+ų%AH9 Qoe( `źi֡!Ҩ9J54Y,Ywnd'Xd1 $I!V3[[nX̫6Zf2D"e i㇊F-ڨ7"WdتRF3͕ qFZZJfgH$$8A1q5 DazB?:H h&:.'P+x,IIEFa[)ך [(>OBSxxnls݀\)BaQn"!KՔcx[e%c)S?BZAB/HFX)ăŁ2>?IF%d)-XERz(oqj%  V"PI$1L+[) `nkJ-Wgn֪F5j)c4 '3†R=LMjdD_nZ4j`'Lȳz-rEˌXJJt,(5 [Kqi!RbaKkҫZ-:&ir)ʹ @'HFFV5bY,w%\< _9 *ZFkV%faVιUۙIQZJ}>o$ wx!yC)F^̌0.X)FWH}#!33,g`A)Fy2TݟcgJR sf׳GJ$>^ڄ,Į@VK,9,L`} f&R׆/* ZGke kI覕C4GO=Q[ZEP3{?nW)2y4JEƫiH`jGZ~nXeXP, gkڐ_@23.Pc)Rmx?בr=>XRiKyE-,m*S:g 8Ê 9{9¸eNs(V_)C'NA,qV0)*6ؖCJ[/ ȓT 1:Rju):vNJ)BMgPIo~.ieoK %j" V("Bqڹ+q)Tcs&^VЕR*7vT$!Oɤ4Z_\|I|*~jJ Ӆm%&*RǏ\XHx"j8HDHYu2HY?r-'TiQN5jJ ?35Kj;[)>T! |S˅¸J~NP-rHylU̎!喫TZ0*R1 qx%{9ԙG3PA9$%U[׌ O)対!fHo_UƐ;R2!G7hHiPݥRj9FuZ)8[h%SRMē{w|2X](륑fb4y)Pпe\A1"m1_hJEj4 )e-F@IY_*ٷ"e"EH4LqS\.Mˌ !kʥ/mk֔7wd&Ӑ$Kw,+&^N"qqcC M"6"%NH1\:?Xo;7 &ԳwȄ$* LR~Nm^ t8V}ǪEqqqI8~mHkZU8>>V, BJ&R69Ya?.?̟;>7,TkaA%)#=x LB,J\2a)t E*SFP-0%ܫ9l? m#O- R0H1 #<5R݌0zVY_ì}Q@!y=_LͳXoo^K2 m@Ǘyl}|YRTaH|~j?-jeCkHgTv3 [GE KIizMZHU7RgROׄj5Կk3H1HyVg2dHILKmgr}0jR,E" иiX"JS FJ/p%ZtRKe[z"y捣 R˸! |6WFI$7U8|Y v_ک}3HmR"6G֝ )! ;AdԳ ݚgN0qyl Fdc 6O;Q{HiyBV@); -f"LRokn|ԋGيn=yVVw-F52jyn2A-KvCElTˑlѰXCz-Gs6)7 %K[Yap')2-OM"e7Cky G=,(xݠ# K,RO1,qMfHYhSb -qP̋Ö|?W hю3\U,xZS+xh6 "j54jf EְYQ$Hx6 J)ѨE6J-j)4aIѰ^@Q8PbQ$pA*0R #!&!U$Hd2!Ye^$p$n=+09Hո$Q7[67*ߣa](ƭ R R >_i+7Q}P$V@E8<$XD@G-vXo,Ks%[k6K٨(yERIZ/HJ }|,H*KFB O4 EFTϮёnJ2H1He R/^lEBEkKlJHyfH:ycI"F^HF(je$ e)F*Z=BZJ̌3ZC|*1;n RFY%E?4:lԥHk~Pa>K:BeSYAj,l%]E#s"Co'K<3FjTѮ࡯w;Z KʜYjClEF}5DA f5HlZy*R^x-LzS [BJѯ`2.:v7fdh 乜~{/w +ӑ2ͩ#mRm`z CUP ;JZ羲9-=d %ٗm9ԥS#<:lRޖؼyZ;H֎ ZZ`H5$ VBj$5Կq[6;Xi*Iߜ]8%S֜pF^ KamGN`1 {B#߁-V*v6ٗNAf٭FHZρ]>4h鿔:cUg0j,AH%TGmڒRKsP/ԟs(׹mRS# Jhm%@ޥ9acA0/H:`@"uQhA|n.9QRq"TY^KG}eʫ5r$6NNu9h,xPeرa/ CeTsQ ׯ+P9 KїTF\ ʈ|emSj8F^waNcRiԩN#r*J?'ʑaHj:un$p2p2q SȀB d#*oԟPؑV_ZI?Ei>VT?ttdCtNϥI.7>T :ߟkqK0Syk FmF{TqU^^*, uG"ՑZHH4ut':}5#+3W:0l\7u >^,ֹ#~`~2-#yZdKFTǙ![} $HpGj*PCCX񜣣%FJR!J#sضfgG YW]-b)b:YI'̞3 # RY@a!Gj kCW| F%#Id\US%Ӭ>W#CR@#6;x$>>+jd3Ӭ(>>v0LCe}|Gґs>>R Ghv#558qjI*XRnMN/\Јcd[ 🞽q>}g)_"<SKݲ>>=TǶT >舰R#rF;Ih&?{޳q@@?u[v Lk:E!'nўL#P}|%{ΡSe}|>>:RT҇Dj!*m@1+Q/3_8}P^~UeN%Fq[(>>o/ I͇w1>CQB>yeT1XY#%nHߥRrhs+ Zۊ}|}|ѐz58֏ Wb&N~1;8S}xAVGtUOw D>e}xA߹>nYߩK8+kH!)`%4"V8d9>{mNO ==v:RXDy[s:PBSL :%t*/rELoK||>>r̎Z8Z0=8~?w``G-l7˩>gw_V6fg2Lu2 # R0H1 ||* F*%ߡF]%h¦29i|| aa˥^,!>+Cksd:'q0.Ha\?pj< W\١e*+!ZNIehI||هN<ڟLzO#tK?M3[FdBs8.m[CHW8_鉘=JB>H_jpV}|_A>mw55-nؿ6tg Fկim۶ V椧:Fu~9#6-R^[y[VdJRH^Rm5za>~aCӝhu`7]K،Rpo>WӐH9:R/9* AW)KAIOg#?kHߥŽڪOoS;dNOa^x'ǯ9[s*ŽʜBJt|#5ϮGCϬӐqlTle! /Dn-;YF|QUTPO,RԷb^H}-U_R}x0k#T'{.Wj}|"_m6"ߠ#*R-x v^mz{tV@z"ՑFCԫPK#ՊɠEc#5b S=2Pe[A|h?R?BS=aKQoS2}GHd>VT^Ǖ4F#.u+srsK45ӏ}|C>XZGK# /UI>HMMMGW|t0/BpRI_}|9 ~Fu|9ٵ`)@? Zw دBq<}=RUЌ4R . :9HϰOu>t0Ϯ*~~ 1VE߾ީb|zCc'm)zd_LA'Qi:;@Vȩy<6 Dl&;TZgK0{*dxm' "5/mOueH,7kicƊ[@ 6X)(r96=9G:sji-YeӾ޻DLde Lդ9մ@骬Y eAʴN-؋ u~58H&1LzP=U Y+)$"68Pg:uʠ]S`5GLyD_*j,1U6= ([5V%tz[ZcSiaV]"jzzʚB}k>1V5u(> (Vʏ1隐$C[O1Hm R*#!RT t|$R`&:R8> )2R< ێ>ZS+!ɂA=IW/6>L7"T:MJri u|!*dnqF*JaVjHyPXa rtrfNಚ\CjklBj@~i_ɩf :-SeaHMV L* ui>:RUӡtd#0A+H.+thۦ 0`8sJKK;상rp)EY?C鴴cкUܚ,(%jjZ*|8VVOfeUM1HmKmьAKowt,\O,Vc>H֔S EʊON[gH "䝞Fm?rg!K^ruGvxg穐񹬎Rg*EefLֵ3-0D1i" `&*eHm}YРOWy"J,9HE<&!]׈{k&E,_D;{Ck١BXuqEIHfx˥! $}rp^3x?`H-^CV*CS !wA_wbؕ_0ݻ3p]WL,Ǯ :RB` gh\: W, I'suxeFquDKÉ\7'/Y1 x@D࿁'\71SkZ l)" c ht;W*Ɓ.`k L)O"(Hw`k3=mnsP%-Apne33sr9:܏e ~п555 O Yx`A\\4ҭSaTVBPn3qJXyn/`HA )aBp7@'KwvM0H Hd0kw!vD ;CxT b@O== R9 GQg(#e/QH90l%Ka H9x Eǿ(>(H]!U1T|? Oͥ D԰R)W42E g;$RB'>)_gS ||jCVmӹÐʿXDj"v]aTTɿGjAkNm6+  RܙR"9@*vGq47VNRRg!Bq\b[f,R>>Nr߫`b uXz^ ȯ_SfHU|fPac5S*hX EBtgVڇ~RnB`A1#B\B@r +fdC,/aȒq.4 .bX AeL)\^6n + o#fϟ &!ozJ /?]/>ٶz mrxpl#|-P\ʢNjm3mz#ʔbhفNC~5 4ҥ3+ /HaicpYeA|YYKd u|DK}n,1Ζ1»i#{:`X V@VUZ'ҺO ՅNRUE)^#>ɭ iXS[Svו MVմ^,kݺ4[Dj*8m~JYv괚. Nt|krےC6RWwlMzqpUY&_C9U5;Uc,Pޚ1@AMn"9*mTU0^kBu`; ELmGMV;b,kj6 `Y@TTd[Mdr{ˠ[< LӇ{ _6;)h;M,@dTٖoMגk>}iP5R Aa@>>g3IHm Cj -=@1X)OYr2mޚVdZ(FD !!;5[<:> 2—eH}RLgj!&ѢC0QiDUR£jB;\R:ɚ}Ԁ74\5x4J"5K܈ެbT>}tNAfm R||N˳|YciH z{6Rd]wVDTq1T<Rie -G  Gj3XEEj WNq/m_BHˆݏTF75P<7o )8@dT|-0#+zHx3TT$R`g‘"au0RӰ3Y5+|h8i "5P5E~ Csv6*R]5LBHy}:ǦfHHU^oRSU`dHULל$OR'`4F׻:0UӰG{gC]vWTo4_TD2IfOj+, 5#\ZŨuzx2(, 7j`]|qpD[޶NaisJ6Z7]WCp9@|҆z`[E5,oضKLRI0l-RU@2*X񶡓BQ>x2[\}dz)¿qj,,m}R`ѣ?'jlVMb0G,bH;V.Zrcʘ\eJ/T' g:M6O.m_a_@?pr=n*:RVV@ ,uķ:BJˑ}?L3H1>>FcڢxWO+pG6#uOt+{; [vz #=,rZ3G,ogDlJNX$5X(6-?HeÒz tqS丧2șn[#RcŽOT` QKKʠ?C&4gNo'6D, M:?6tD*ipD} {|z/}@!ڲʦoGwY_MCJUYh[ouP>ooiU~ӅvhZ=ų;ʚf,:> x9w iSi"|,70vx|i[мP,h2T~5Y{ʠ,DZ[\w|(-_MCi_GO?t*A#e]pMbV}NL[guG ޽<}!@oaW0UFhɿ3|mr k8>.lhO96(HkCٓNs] Q]SŔ[ݠ2CR]Hg|"t|4SD*Ǖ ^OGBy)+ FHfط@6%ۃHZj H|~}̀}ГJΞ^k9z# 6 p%?\D u|Ucα49G#Uӹ- cI+RQe~#AA>=._[)R3pTQlRzLER)k%}p$R-~pgH!b1<MGjiMuu!tRK޴RKN?R'Ӆ%V!5D ]]]DAZkg>>I*w~D<.A=> Gd0ؗ IDAT4_=x y3[ 8Z > W&)o4P򢎥~d 3}p΂ih Oj9969 Òn/?R~az 602_,,z"_O؇\6 RYÆ0w ?XDerFj *nMt:˱Tg }^waC%僁K:} 'mx9F~z/Qs R-u/7P ]rУ:ʾ7?]/~ t~k,-}k ODL_ZOSKcz87U}8I^|eawvXV_n)(h)z?r!N}kPO}4c"Mkɥl/NCeeeDإe1S.\!.\K܅/ӟXϟ/įAAT/?Oϯ_W U?Pa;q oN{ģ+$S~~B77_g1y|T?FrH#99 ~4E㩻wl=Ċ_=6u`gD;0=XWU8$0,じo ɴAF RWģW>z4g(>>z>۽o"7`߄K@ڈ9O|ϓÎ#O+] D cVTL,^ĭ^;q፳L~֑46*q^~P P6#zx T5.vǵ-' Čа <"u&_~q{/?>4TwRrfi H@}d<81jbיkăEt 1R>>Q*+,^ufە_1A\wW!.?0"sti_\|{ BRԮęϴTϭ O"|UQk" )<~nA9F*`{ʥ$Rg]{ !gӭǷ2RuMOug&'/1H8R瞯e&ޙ 4VQ78uwug'0H=H10H1 #yx sYB#sXkxVt+ū^\>>|GÛ_'kug;^` RȇwqϿ-CN Pb|x/0RQyǏ_[[V z sF^PXR*vM3u*cbZvS^> RwyLUL"}x$Ru R Ry)LJKݫC>3 TD?s!Ub#̞3 # R R|: R)πOw0#/6RCl.F֌)zu|H:9 ̻Y+R`||ny##kG3r1#/$BeXIF)f)FaZ R<҅{<-2H}|yy҇Kmohpl߿ru}g n^G8ׯCC[PdG8/>C"B~7A I7|8ɕ+}}(%Ro6XwmAj>ռ5>˾og!~!U3|ta)>:{mg?"|O`n͇G.c]N܄'@}t, mH]{x)Iԅˈ]rJq dy:r#o<|xDȅ e"?:{:z[h5cTOCwncUHE~ϖ ;\uu  =N8f,"-G\reRo!A\I|7(H!TGdfxD Y/?DiH~[gې!tG oG{e"Sb Ԋ>>ɡ[ۛ~?Z> V껤ZG/yx.օы@}0|/߄ 2n?$}6 ':rHG'>{M CC)?b8{uz#3re~#uGģٻ=~I||e5g3"~3 wVМBݲNpyʉ`>QX@!tTsօ#o;[G?r+W獎 !;{%g_˿ |imx"~HAHv~R{?R`m RB'L vhH޻C߉[N \!~ %z$)[ywD Uf,XC[$½?@s9 +@3\AGN$$n_ȑn_{u-C&޾}z'.?GgQu.` .9}u<@yN@7OW]؃R=7`م2=p}({χ <Džw^u3'@κ̼g! h_pʣեBq/\xQz^AHD^"qȜE7>mzF6)ML\\LHbq4D nP ޛ|xgq=r AA"Mm 5RLKZ)%@x1+,ԜI38U2f.ۺQ [>> JF3n\ Rq<qbܠMb 8$pNa7^"qE&Ĩlvl)`eIZRd9'_.yh ?SVZ>'DCxrOŌ#8&ae)Q$wpb6).&԰b@).Vĩn+97H8 99XX ZXŰmpX(-- 9.qq\|`q`lND"vI)Q,MbFNuK3z2(>>hq1YkG**:x~D*ĹOj`D1|TۤXJqq\.V \("7K~'4XS\'!ƅNR6 ]G!<4 )tqn/WW(=RT3nr!Lu@ʣS99+ ؚlXcHĚXn)i8ԙ:;H&JxT*. "} RbSIHY?TaG&W<@/o]#F)?$cV* EGիW= gd׆JD,tU %hlW*Hل QbZ"}|.Gd3mkC)Ui"`$愐 cH Ex:J QZGG* "H NHn+S 83s k>it_lp>ϰ_0.ѐӊglalF= /d`%D|Z}|4HF;|'pcQP<O "% OrQ#U\]$LrHiȉ Zrqu.NT\{2>j||\+ lHƳJ!G)?W NKHAC+ r;A3*!/393#3s-f׉ŊD)B%X 9IU6sAr mSr֐VaFfW?s]kROc5T/ֆJV ͞sq'c đJݴs:RUu3A4* H|cΓƨH q&N\(l0*OJRv=Ht['ǕZ)dD&T)㻺'K|,RCp ԈHKuH-_\) \1rAu%Qj Y)J̉搉-D5"rlDT#mC8P䇐>@%rLM`,GBfA?H}|&̑Ay:Fh>>[ǧIpcb&;dՐJ65b )I]';435P0pp\)BMG&iFhye xb*gJR /p4||E<$]|eH}y~|>>^\.>ٴTBM >M5]pz>s\ TADwE5\t>Yzջ{ba_a*Miyڵ>I?yO&ȼd49x'_}#Px^W_գztOpwջ{OO_i. 6H+ه*+';GfQHkl= r]}w…mJ!=H/=3SӺF1f`H NfzuoHLW}|fߙm߯9rpKT7=`U{jkIz%\t|*R"ȼ"Wq=}'! z`]KzڟUŌ$ )2{\ZPW 9놥Zlj92G ] y@sŊ+ 0XGJ:~Q6АŠgc#,,ج nl4OOZH^o=אzڈ sGj_&JH!uokK|_֤^1بHE"8>@XAd<믟<_jHwduH$-eDdaRŐg W*di tD]MD Ŝ@p,-^\"k{6[c 8ة!urn3 0GRǧCjymxYqO""Ƿ@ :ǚz)Nz`'8W^l)8^5 U{/kImFq,P*4\lEh_"}+ъ<Kqaν#$otSay'mẛbyV~^/{)Ɗh笽5_)69!tM5SY<۪)sf~k9ȮGǗ+LgWMU7C\zF*XTa0,C 4kH]ccbԇlX61w]CUVdUF}[}=WtW^KsbȳxO1݃nĐ)1J)&vZs,kNԈ_{"H+XB1W|?_е6S,F"8`\;R4KC׈[61O$ ~kF<Ҍ}w|{ ) 5D&`M3!qm3@S;&u|~S8V'?Gp86sԁf*.9nޜH]^Zc߁giq z`5琴AS{AQq|3h)ϳ$1N &ˋ./թ|vFHQ(Rq|\L+bKz'!s)R8>V+0j_'|7ĥjuDz+.7Rt E E E"EH5Jt"EHGrQZ"EHZ)*D/)RT.)>D1!XHrI&ZHѩN*)*)*vHIzՖW* H$olw8's0w@"8 !T/Vr%9Np,ؾ%|z+mq~T.R-||LQDcDz9186"$/G޷tԥBi/Ol:6@r=-U=HȺL2!aYVPJqjW,kmxҋ0FAJ "6&<Ή9GNJqj㫋xrcG!%T&ER"y|8%ҁT3wSA4wSAj8msK2Rφ'xLRMq|nM၇ߧGA4I#;78z9%CΞSHQHQHQ\f_>)RT.Tri #S9)RT.T"R|"G9jNHH1LǦih(R>4CDhX|Rt EWQ'yOH SB8eR<#RM>|ZwljEi3LԢg/)*(0 gB9_$Yfc`!QL㟢LF:wi_?~w;Ds FmsU'rP |<7< q|^eiEe|2GlKO/]#3a$%)ٯϚW"FUsE I@.7fv8<`rnt,6-Iq|W+RQ]Ko]6/ bl! P?C6-1-]Fmִ!VD|CEb*bA+LDٙ0$l.~fF#] }}f,TuSHu|^_LJ~V:[3ܜ;1{R9Ɓgr RO*o,R !HҬ !hHUJ oPpͼqRPp1Aڀl,hL:RJ|ezȹ+Q (90"Cjtz~-ǧ@Ӑ)AWRDtnzUDjӳ~R::bSZ,Eh.)|S*P!JZE%Vu2)RP!H6blȹnHKBJ,xq&"M̌Y.H G9f"GIwaDX-EHmc!5i)i^G t<W#Ri-|УRHIH6ksOG=Tw|WJpFAM&.c=Tpɡb%%!PWdFb"t")HgTA-QtC)oh@*S HZtD_)[~7NRM>>2"AIq{MclQ^u F|لjl+~!RdX^оf?T)#lgyItL_OO?WۊPCa]]=fq:2#zĐg.nmD( +0þd۝#:k60A,_a"d/bԅ:Df*e[U c^p 7z(I*k9ݡdz0 ,ݙ\ AɏTP?ws\I2ǥKT$?Ma$HH'|f <ʪ>b6{xVS՞m9e'Ov^}dM}_Ez|>yX>c޼TGpo߳5̵vv׶} pjmwH{ K U{ Yo jW}t+pX15kҦGSgu-|pP[n]Ͼ9ZSӏn77XjI?tή6N^{l7XDLBY|~{J wHEGE~}8>-bB{]5=f~xrxuɿ5 ,*_\Sҡz)ܾ֞6ɇgc> ƖoMxl_>˳nn[ѭkRK;wT[J㱱'GZVzr:c1()cp[HUw>ވn]wg)ۻI uw><}ɇǷ|-ΝP؇cw4^}x\;U[pzݭoP58[Gc}~'o{8>_ưZ7 Hݝ|7zmlG_UTm5e`eۿLd>{H|wY!N}['׾=y6րԇۏk;o>66n)˳'~*R_Ylap;o.]o0I]'kA3K_"}{S͞v<n@e廻w5oـ ovw*]_y;D|8MM?}}˱g_"ՙflu%3ED_"RkkdK:7p{݆P2O4 [} R1DjY|6)7tA?Mu "1p?tZ NNe;rp K`P{ZrX+-5xP3 Ha.;>Ԋo'gguV}$;YcH&PYo[ېfhq|=\nBj'm,gDڬl5";p7Z}:HIm#uH)f /U'#{{v)(?T zHfo)އ廏_ R-||lhVH.ZRwPoݭ6,}PzNH=p'kDjrnME_}^/7D]i( fmgvay-\7MHY&ɷ:[.t۷o)MW+T_Y> )IW[~#||Ƶ:{@P?@޸FM0n.٢pê?5;b$;vFG{wn|c7-tk6Z۷o6Vɸ4׮xvtKKRXDׯ xLF{o.(I6ÝsW7qN-/m8S nxoޘ1kb`D0|Gۓ7ps4CV _;wگoX/ ~nS˳Gomn?4zZ4gUo9o)*?9ِ*H sf󚏏/P\:_BU\)ǗP}|E6]H)*EǗHY "WH0 EEjW?B9TXjS$B1Y:@#ST(RT(RT(RgAJZ/]I:?Yү.82Un$^=^W'hHZ Nq|i8Kc:tlbn"AJ%X+bE\pRwL]Q nBer7"(H)s=RM\kO5u赸݋Oi$<E^`?Rۀc9~OpL)A,2Re둂6WA/ߧO^Ͽ~76OÖұOd0p@H~R<+Rp?<&ߓ q]e:'<=3p\a|fs9>/tx&Jg߉'rGzxA*̂:HRIɅ)Rv2U2 PˍT&p+j}v Xu5<|괪Jm6:g'B$/efu:OE3lW.F%'5 ?.}*ހ< WI2&OŸ̥Fjnv〔q=> Zq^;ΌwB-p^q㘱2vwkONX48'2؝I>iwqsOYG'Qq |X@R:ꝰ ;i8'oN'rkuZ;eO[ց+d✰Ϋ M0/~݂7pJ1!9r3eFjg<`RAco氆xu dvָڀT& 8nq{k\XOBIaSuqRAIwQh@+2哽 Qp؂";]wRWFT*45 g 8ϴ5ju{C8/To`1+>ڣ|| $Rȱ;A%a(i!}.!RQkj1i-|n|gROM훚BTX"2q2WZWRI)KN5Et`RA?'LOTtz'e%T;R@fI:)>H &SPX@ (jBJ>/AjAak_)3|["9H-/t/HU^T8̅lNHQ}zhL_oH_jէIzONZXF{;SF7ͬ3-v)N'v\q5?섔,pZ+I EމHe,R6N,q73eT:\hT:HEmjz#5%ZBR}eŝN>LmNǝuFЉhHW:cˮK^`\Pӡ0SZ OAsM5gzFR0D-I%W2h@eC)SӚS PDHHY& ;0lԨG RzX;),슱 \Aj ʴBj%#+r~'x{TZF#ޫOn4-kY Ia b;x j*5j\YH +w`PoSF8K,i)~a8> -"CobK]%}Jo @ʉG#l1˜!0Di'wQ.n9X1X/)&xBq%G&o*i(v\OV^1{wN9^?<&[N*q:ɞ) _(vznSF*_IGCU%g~_Cx ^?{i >;X?SGVz}wJ+/d9 #|K|w.sqp!%,YK)5O CcDVТZkP8'C]!x܈i:Ga.ˇz|MH׵W7O^ $O_qWw՜,=R%[ZWtlXaGav1{[?EtWtNL/`/m@N%!w 2YV׈kf }w$##.ϙ6Pa+s.`&nθ]eX Gm)g1wbF<V U/RKX"+13w,rVHf PAy7Y0PڀЊ=L~7>%0^RzTPWq >h!| r6'pg bR+0=)e둚ꓑ5~eOC*"]Lu"ŧ1NRiwlnU=%IKѢtle0AEpDhz H]yHG ](M89"ڸPTI$NМoTAJoTǀT/C [/ HA W H%sl)<Ǘ.B}1^x8 9 ۼݒ`_0M [aqJ_4Ub&KmWrLh~̘^qcp^4d7ÈYCwO_DL!<7WEK鐿 fF(C!vv\_F"mbp،2Q^7U~@ G\xH C ]R%䪴M϶M^}RY rfB bI?V ) #Ko8+}K`vX$Qn8%aZ.EVBe*_3R>b6OraT_Z8HQ0R>R6Mrq||ҋ)RT.TiQ|R )RT> >>DhX,˿RHѩN*)*)*:'RIDATs"E%V[?lnNr U6 Y9|9BnnHUo $(HWAY9GNJqj+hA㘛TrlTHU5)T;ݟ6 ,967Dg馂ԁci馂Ԟ' }ށccS.T/T[=q(H)\ssܶ'#Eث)R):{N"E"E"Era||#_HQ(R>"DzCm)*BU!Uֿw*/h/M.x~%^!?u|&Z{z3p}a{ >vdtAC=urE=mL*";͸ՈjkKǝFm3{p@{s|tb霖6%'zɿVQnztԎբalbNs^~NZ> @tN*`2ڋ;`)k Avu%lZR̴ՙ;DfAI~z%V:K" X;xy?5:bb7^¨42MH% BNW=D֐:0p E Krwba0 Qx "ddmS@jŒhR`kZ[!)h [|:M2Tx<߃j>X)rPIhYSz)#o{SIHŠuɖl7"ZeH_ioHHRat GIz^Wh3"exɔV)~|k$ XJZ^㙘Ȝ>>v:8R-zGWZ#ET&FUʟċ~~J4n:=:!ۭI}e@A }|@7O4OHz!=6}TXbt tC:p `ɤ2N@ pTJ `&T[K9)Nl ?Zhg%}"iDe%S@jlܙ [o nl@*F$wqRU xOjR^z}j0ïC"R`5ס{5H`$L!`@Too`3vgQ84ZAqH4:y $:$h5 R-*sI91{xqg6'E꜒Nfupr6'EeF*)Mu,mMYi*C mK|Ƿp_4^OVIǯ~OI;8d_Јnr||)}AdS)#Y乃Abϩd-`7g 3]ۉ: )ݛ3Sv+휲39BH>>VeZAW.[onD*`{TVFS1Ƨpw>8ĩN`TAjj'wa nNnnF_9}EMiNO+t ||Ѷ>x;qʊj>Lor̞g' N2QgiHӈ9A_ n+ҩ$ո꣓VHn>N|hO>>kLQ?km㫫,F[TI@`@YaR^K}.88qIH֧||1||W5OJ@C-I;9kO5 7(ڔt E K[@_2zTT@8>yT4D*>Y||hkg^mV)ݓuJ,~H>NXGwuݫL;Nni]m[7~8vh˔z` Ƶar1a?:R:q% ̎D;Z< 4Os6֍;ġ>dn-ۓT&wwWo׽$E4Fq~?=p9N?R ǗB-3؁v9/3NQˠP||ޫ&>d4E3aC;:dQ/iXWO;e-e؂98q+<5B_)ot,ޤ/Ǘr:իu|||8&>L<>()Ɂ)|;JS0)KI+"ߙTR;vT`/^u>8ʅf^<9GטmË6>EzhvF/}|̊1NLJ|f =\7*H+z5^'jHMYǝ*Rh;\ELJ}|/7zp/J>>އgm[zSq3"5Aez X||6T $>c -HuJZjcʚDS;+|R~x˘Le&툔=hd );K;g^JM Ԣ:Lx0n8^/ t:0H9G8@ ɓV; Nb1I H-8ЩO& 1:@G|OD9A9H ! PDhTEr_TA~}ab67%|{3 Gon|y|i r+*in?;ɿ˸ssCPǥ%\=(2,da)k/eTj\߁_٢XH2Z?DD.;FWPgxٺeR\B[_RVW!??4g]t?[!%?Ґ^*VdreN9 Z JLY(/|yǂFKp%T Bsl-fF2&CxܿT |3H0l %ӕddycTrf0}fH%X,*Q3Jpu*PT!4[rp0跒cb@HLRp6ӥ|B+Ј\nݵYEK'\CA5ˑk&}.p KY&ұXB-QBE|, JH y$L9c8)H1 }e6!UD8Pʶ+ 2l݌UBl\2!S9A*tyN鳨[J!k1H$b* !P'R?1YSW?+#Ut˂J"է!JLE O#QpuHuG\HFb2o8-h\RxEIA*R )H`3iFHzXe9-/M2RTmYۅp2G-hK#x3HeHKŐtuKETmH0uy]}!H&J% X|\O" $G|JB/WFŰjwS˪2/غ !VfPI-i'mR lj!6g+>Q&VZwrީ\. 8^2|""/I!+_Dʥ;xW[*)} U.cE_Q"G_IB*)*)*)*T(RT(RT(RTC**Ѻ)B"EʧπT_Pd}濧BIG,7IENDB`cream-0.43/docs-html/statusline-orig.png0000644000076400007660000013371011156572442020655 0ustar digitectlocaluserPNG  IHDRhO pHYs  tIME j IDATx{@W pP@Ԣ([AZDP(ڂVVT=֪VT^Z/w (xR (O$3B3+3ϬR) N@TٳzmXt)~ӧY:QPPP#ۧNZSS3h pΝ;dZXXlڴ$FxN0#4O޽l܋m_fĉ>>>999G( Bm;OЧOZ\\ 6@+Pdbnnnjj+bݝbEEE-lllL}BB3g djjuV@`bb!@yrssꢣr,Xmd2l6 W@M,[V&jyyy^K"Y/zFFF ċRFOO\q г?~IIɭ[ *++.\Hi͚5v튈رc۷o%SZZZeeOHHHcc#rΝ|ڵk׮]qƷov|P}"RSSӧ1Bճg611ׯ_TTTKK BeÆ xiӦYZZ/]dgg]DNO2嫯"پ}@ll]^,,,6nɓ'cǎeX"Hi_WVVfgg˾xԩq-\dwSSAz֭ϟާ# ݻ?8::?_lcz;3gRirr2~Ԑ=Ŀo"ҥKĖ{wgNOʝجYBv.{֭5k744HR__ߏ>$//J/>E  ~W^ 80))vvv_R4 ÇO}T*U8,)}eԨQr>|x`` +FzJ(:IҥK>JyyId_IOO8p Y___^=BM>g%Iss3y7 ׯ_/"[:88!4"VXaddԵ!nj# [ZZ^~ . :!hѢݻwoذa̘1'NJ׮]6l^fff.[Z~!>Ћ/~?~Y^7YCCCCKKK"C#Glll@@B(,,,&&ȑ#ğ*++ nllTfX-_}ݻkhhV<8{iiiqqӧ֭[7a„իW[3g׿%7|Cd-Zt9cc-[X,^fͩS^~mff&*[bErrD"4i4ɀ:`XjlnmmmllȐ( T0LPRR#񢍍MaaaۍkkkǏzĉ0eέC@lh!?>uꔿuSK`0߷o_|||iiK*Ǐ#ƌSWW .|go޼ &L L8̙3ɓ'}}}͉Ǎ7y䐐]v͟?omCUUU>6(3,pr'&&&==gN:5a„~mg׮];a„7\Dnӧoݺ5##cƌ..._Ν~FFF?B(44ƍغrJ󫪪nݺ_/\0-- .BaFFٳ{u/i;QgggN<ӍsrrD"֭[wt ijj*// ^|u|||bqNNq&͛NsB@ho߾y󦇇mXXX ===Wv[A?&~p88=<<_|͛_~4qŋoڴI(Θ1nnn˗/@~kza53 dŊNb2r T*ł͛@W^]SS_ݱj9su$IRRRrr2V'7NN:EFFi@P[XXlڴ),,f;;;x}݈# Ƃ pE,t@166KOO twwׯ;w3FNȦfΜyf.[WWP|K3f?onn>jԨ$rO?s̑{wܙ4iݻw9fŭ_^M_VV1k֬N'555М9sӧOWTTВ_lٶm G}DRwbHҕ`ix",,,$$> @'prrJHHvneee...}a0VVV{:Es166p8+Vx=*++ !tʕ+~Oۮqk"..!t9] === F}n*T*mii b24iRUUa{N|rܣGOooq 4(!!Abjd7044e72%99oaZTT6~~?UP'= X|!WXX+dĈɤ ^bR'۶mCm󲲲/;i&{{{GF=O  x뭭tHnݺwر ˀ?#::… TT\=+ty@pa&nX@544{sθqumι<IIOA$ϣGHόR˖-[fjjگ_?펕x|>_OccO>Ν;|;ܹ+0L eZkϞ=5jT.t{P'矉 ,І9gN:߳gΝ;ݻGHnBCCCa*((yuffwu˧USS3qD33PtRgϞm޼^PHh,Z h9fv@*SVVvر/fḍ0&)) $d ɓ'ߟxܘ.\?ݛf[XXxxx\ :O[WWطo_.`hн{۷ 4 is@;GP'D"ϗJQQQZa̙Νå qL6ճg611ׯ_TTtM,GDDX[[3̐"1rppӓhhh 177755'*v+ sEkjjL&.p؆ &huz,Yq^~wwww%˔)S ם;wU=E RSSWƟ3@#ի.QEM=MMM0P<4d-9ӧ⌌ p߶g ϝ;oϟ]VnǏ}痔ܺur…А'wommq ÷IJ$''JNϼ7Zfͮ]"""v؁c?sʎ:k֬u֍3OLᙷW~ŵkצL@!(<PxA%t.]Nr=iIo]}mQ^wFr劫k>}<`466~^<22_UUb:>8nj# [ZZ^~MhѢ .=zÇr#'&&}>g#Ki ---q;uX@' PkC8tNw@@"mhƌ YBW̎ifYYY{M뤧8iϟ?tдxƍkTZTTޱ~mmm{o$ŝޒ~iӦ`޿߾}񥥥.]۬w7n!!!v?~kddK?Xb|QNN.]iHtٳg8w1u|A{]x̙3į $>7M0akkkǏzĉϼPVC(|2k֬'Nڵ-Go߾"HO ϼS/^x_u͚5ϟ|2\,'uP(ܻwN7ʕ+MiVҿwwpǏ?p8KKˁ">}@ P>}?Qx7yܹcӇ`XYY͛7{n̉ ZZZMf``x |fffG~:S\\lbbR\\ _j@;1bDrr2[@%GqwC$EEE+ӈoںukԷo?_~uZt_$99966?֯vww?> :ӗ/_Vh=8ׯ_tN 8_v3i 肀~䉝)SP[qUVm۶mȑnU[IV!޽_w h9 aGM@Θ1C@8uYگsssy<@J et qh9P%~ TmD @*NNN6" p+ҥK.p Q%vʔ) zzzׯ'^ʲ"1'ZTZT::AFxЮJȰ}S 4wϞ=ۼys{{Е׉_qm٢^^^t-hjjGP'@ԈiwlX,d٤{PI޽{uuu{jE"jOOϗ/_پ 6W__Oȅ &$G.e4Bmf E.]d"' Q8bnnnjjOQٳg/** ^hޙ3g djjuV@`bbO ((Ɔd'$$ Bx>t(gfhhYYYQQQ,: .∈kkk&Bp&%% cAjj; tz(H:6"֞ĉ̟?֭[ .TisΝ6nHi/_Bܹ355oYvڵk҂7n[D䔖VYYxqAC v ܮ]͕H$˗/gxxU MMMMMM}ڵkvܸqmoyΝGɵ:XèԈX6qR2;ȉ!GLXYY=y^ÇǗF6mpBJJ hѢݻwoذo"bbb\מ={֬YCFFF]|}}㫪|>}l6ZJUZ#R[[/zzz>}!1~x兛9,dUUUBBÇGrppPxNvXP0ƿPXXXLL̑#GrbP'+UJ<|/pqq122~bO=hzz w|BhXvH$W^޹r_}g꡸xƍċ=D+V:udoM*J$͛7egllP(Ș3gB;%%˗+VP2 Z[[y<^ǧ⼽0&СCbqUUՀ P'yҥKQ2qt?ёu(g$₎Qr@9-9UQ[[;~xWW'NAiLZF`̚5+""B<';;v,HOOO X. Μ9SXXX,&"9aU P (vP?4d۷EEE3f̈krG$8;;<|p$:bǏ8JD[:;;\hIA=ȑ#5oU133r[l߿?tttݲeː!Cp6BOG?)sNXB;;;ͨ(@tTjD|ot%K(l׭[gff#srr|}}̜9s\.n͛|qㆱD#퐰vy OO={x{{9rOtrrr|>妤#wNrJJJlv~~~\\lI7@Ckvt8D5kћ6m8z(^$vtttvv3g %x}ݗ_~3u XYYEDD,Y/$,]^y!$ó-,dbbw0~9Bh޼yxiڵkW\ C!:EuuuHHHXX؋/K ;//JKK\nBBX,_d󫫫E,'$$899UTT$)))R(H!`fGPJ<==ѣGCBTB @! !3;jzYAiqطo^|y̘1rUba |:CSSSZZZ~~C%N.\XX۩*~~~ rr':CQQQdd;F^J&N X N  PPP!V#+ IDATꤧt\{)8Dn/Ѕ·iiiQICN1J&N4ŝQXt)ѣXabUkhhPɗzJEՊZS )S&ʲiMR___QQ1l0ĠNz46"&!J&N4-((aSN4h-ԨKOl 1G=O<:sLkkk={l7~:kFFBw$dffzyy6jΫWbsɩSF51-rppَOwD L0gmmdccd2HMMű+ H\N@\騔8+LYY?[nTVV.\ k֬ٵkWDDĎ;޾}Zx}v󜜜ٳg#ΝٳsoDϟ]VC|rΝj͂H$.=qℇiӒ;^?~gPN{G`hh1dl6O\~ښ芵˗/7)--'$$oyΝGCԑh|UMt ?KX,~ӧeO"VVVO99;UgϞxe___ӧn/L$OFedd?byyy]r։B__*+@9rf(HN@hH'999^;6550qxm=z>}:իWEp"KƒHҢֱcǶ=#>*..nmmxCܿE4В㵝.]R3)//4i+.\I)Sɝԉ2'366V(fdd̙3!흒LUBDxƍ8,X1#* @@tʎ;jz8ٻwWþ}޽{'Nܸq9$ܻ0`@7 HD\B666 7VfrXL,:xfU\؎v^ti,ƌ YrITJzٳgHcǎe0蟎gΜ),,lۗv񮮮'N(** SRu6H$FFFQQQ!'8N:z9á‚^>mOQF_zU݈#B?&~p88S?>~Ia,O^,+55\۷iii۶m>}:~ϟ'bHB;ݲeKqP9::nٲeȐ!m999"h֭y m  t<:'z]d˗/_nX,Ux=}s OBaeeԩSgΜyf.[WWP==='''.\nJJJ||n۶m...N:s R:%V =6vЂPR4,,O>!C^ԩSxɓzx"-Bƍ666 A===L}??c}sMccc8KJJlv~~~\\lI7@UA uWL\#bĉWDԇ%i>i&{{{G]ox/ ?ݿ!taGGGggg9sK'߽{7|L>ԗ8qDMM͈#nݺyfx蔑$&|ɓ'?sB zW_ӦM-**駟XXd V9^[u#ɝ:!/2&&fԩ ,x9Bh޼y֋-Zvʕ+!4#2HmB,:touuuXXXHHȋ/o nL***߅ ۷oӧOkk+|PQQ䔐 Uy-^0.))111)))O8%%!TZZ CBBBBB 9. w].pR)QHS\\|RPuֹsdDbQhA9rEe ˴;ڮX"88 )3AH9 ;^NlhhhggeV]b?|N*Ku~XMAAA qqqu|*?92b ^=>ƴб r'9'a4"42u} ]w  ӈ*$ A8N>`s:*%N~X*wNRXt\_fQ3n8U)S_dKdeeYYY>7ݗ-[fjjگ_?Ʊ IOVڶmȑ#IRDI?,Ȱ}SA+n +hqįL///mϞ=ۼy3߸={ܹ޽{$ 쮁% 𜎫3H騚8~Xooeݛ-b2l6[Ղ}_l6ĕA=Қ/_$l6;//P'r5ӚTݻ]WW"qJɓOkpn]^ !pzrs:&N[PAaN!$$߿!rL2/ ~ݹs ,W$Q9 @(:ڰzOqt "⬭lllL}BBPwX;;^zYXX!===b/\ _ED"Yn=ɴXjUCCCV8&Bz&&&U;~QQQ:PIJzeH͟?֭[ .TfsǏϝ;yΝGS9 @@!1ACeH$ ܮ]͕H$˗/gxrDì_|yܸqNNNiii>>>!!!u{!J~a/^vڔ)Sw3JlEŋ۷sϟ̞=["=v;wg ϝ;oV_fͮ]"""v[ T(vI Ce455:tjW\t7ot0?"ʔ@܈Wx<zw766vzх =zÀ,@9rիWx'l Hw?~djJz͛7<}4B(##c, 7%։B__*k%Dc PbK/ #Gݻw̙!KKKi+ܽ… )))xE޽{Æ ׯ3fP(liiyn OQQQdddZZڨQ48Q/LgϞT(bD"ъ+N:]<==}g}}};>z!4}tc$IssW;>ŧ~oM6 8C⪪*G肴IrbMLLoܸqz8I ===cccBaFFƜ9sB)))/_ĝ1Dxƍk^0ħ:nܸɓ'ڵk~JWֱcʽi+:::_?jB9;;vV8(vt\.TM(Sc:joCCC??^I۫:ORRqC(sYfEEE5558qb׮]m7 qIi'LMMy<^nniӈ;Q^xѷo_pOc2t\@̙3m֎?ĉEEEaaa(S׿x˗5k֜?^v99m1{Ԩb'Nz(ZOnNGĉ_4 |(5^I 6yϸQXXhggp'zն `޽ݻ7dfff\.w˖-S[l2dHGNNH$ںus{.l"D;=:Nab)N"vss[|WhQF_zUIi+sĈǏ?p8bIwb'N9hҥKI'8QKllll^|u|||bqNN2osJJJlv~~~\\E(]\I$ҁjjjzM___Z{ UG+b'B͛|oh`0pɓzx"~] ܹsgҤIwp8涶7ntYYYDGG[ZZ~B+;mf̙7oruuu 2PDMC1 R>,R6ћ6m8z(~@TZyY[[/Zhڵ+W~(xo޼xzz"d3pxrBEDD|w_~eLLԩS,X( Qz*G6mZlllQQO?j``pĉ>ÇK,Qf> ӶR8Ç}||̙#fGwb'E hX|!WXXHz{5*!!A,+}uuuXX7|S]]&&&h]޽{Z[[)))RBxcᚗgjjJjB}ɕ+W޽{W]]=eʔѣGCiy-^X/}ȝtFĤ'JևE]TMM8p/; xşheeeoo===c ccc ?ѣEڟ`fGۡ؈RqXiS6wMxO$':T?~ɳg=zĴZ{rE\Bh="8Q:æ+-"@!l˟bG(W~ɺ QVVv1E1&N*~XO7N-PIS'7Ν; ot 1 P' HRiTT饪'JևEaCi*Kd\a mfA Ġ 5 H$NêkmmU*,IK.%*lVwIp'UM6vZ0JJ?رcJvVȔ)S_dKdeeYYY2RRRlc)Iwb#b҉@Lo>uԚA4NMMĉrrrBavvҥK (ԫxzz^~5##!$[6>33ˋcJkڴig6o,Uuq#KR)?J"qVz͖ar9:%77.::ѱo߾\.w!r($0Nhxzz|=ddd켼<\- iSjnnV: {EGGA* h:nF;v ׈t臥y !!!榦m;!m'P垴 <{4  &NJJ a2 DĦX,__߶M* bqDD5 #ӧO?cꤛ@1ĉJ~Xuϟ_RRr֭ʅ m:k֬u֍3 w̞=[BZ hH&۵kBdl6O\~ښ0߿ƍsrrJKK illGFF޹sѣGT MMMMMM}ڵkǏbr'22#""vءC`4Æ 5;Nt19rA/ꐲ2y<13lذ4YrrrLLϟ?O\ ޽{pBkk%KQLMM,Y2`C)?8o5L?#;;-ddd?byyyvr:~Mdd$dzĺ!>0bĈdDBX׏=/ }!cƌquumiiy5\5(8FIJ:cK~؆۷oYD]$Z`X,~ӧe8?+ !#D"inn~ }KKK/]$7O?TXX/J 3t'+66WҥK C|ҤI!66V(fdd̙3!흒+V[7 ,=nnnCb2`9uBEEE<dOB%Iwz#bBg\vM___yT"RTZYY899988'50`@:"))I2M{ۏ9r߾}&^e˖9` 9%ݖ'.]|Ӡ̙3m֎?ĉEEEaaa BkXcb"*bDIA>|tz_{n\ʕ+Q>$7jcc3qDcc5k֘+LXMl``CٮmuBM| ه?H4wܠ` Nɐ!Cd裏fΜi``rJr333.e˖7[l2d\!#nܞήWXc ӧOqW r$iwB?&N>'*a4\ sscCxl6{֭;rȋ/'N%EӧN믿>~ݻ;w3fMHHڲeK?(98>(ְG;iI@@͇JgEE/_l8AYZZ"n޼YRRommE~… qqq˗/Wxɉ]vc!΍7`bRPNtZ&N-[RDU?,!PHaE# hM6{xx=zEkcc>srrJJJ&%% `D&[Vfhh8zh}}k׮u!$. Nj˘S.XyY[[/Zhڵ+W~w ><33˞%K=94@лw\-E i?,'ѷox7frd =PR|e0Dy5Lw{j@s:ㄊt'z|U2KsZJۈz*~XNTzzKv*r}P'ޢ*~X`=dzMT>KqЪJX]q'N4SOՒ8XOzDP ,-EI݅NԈ'D$=zғuVvDb]:׈yPOEZP'=N{'((ٳBPaiˉAh5"&'V?,ҦD%XOztEV'U XZktmOl5"&-zVK,v'=iRL&S"P]D}1t%N"!5T2O`=!PO{Uvݽ""olOz:Qk#bBPO}@D`ah*;addJqp/^-Sh"vG5"7qBiG6Yzs@)=赵:! DC1 K&XOz(;Yvtb@:J5"&Av?vI",腥:;u!ZP$Nh"mF֓"Pg촰腥:;u ڈCWv*Ҧ:lktհ´腥=$tP'ߛڈHxВ8ajAKNkS^hw :P' Е8A"޼y.SSSlFw;]5Vvr6@t݈X6Av?,BH(={6((FԤOq//۷oAKƎL&S*2z]k6/$@OT'X4 2D RV˗Ɓ[B%VvR(K(vD]8Qie6 4XOt'jNtYPHzXZm@P'j|nSwzBRЕ8Qik69z] D_ieeeooO:zaivA ''j"1>;|h=AXb'NԂ'"m& XO'NEEXb:QW`ih= R^ߩ'jNZYb:Q ӡq&?:갩 ]!ڿtk**kP AEl]5au!'OPĪo6ЅcHk XZUrbP'4STTtiuG&N燥&zҝKUc鄡ݓ'OT``iDoAA;,'uB_jնmFcј8QVV;AW5-`0^mMzKm.Ds:3fPN?,:lr{@%VNХaih늊aÆP'%340vt,`=vҭhkXZ ɓ'vvv;*(KR P({͛7p]]ܹC=RD"r.kk>OQ[O8q֭ՠ5OCCCnn.SCЁx,mK/errݻr[[[՝8 tpp~˗/{xxluy]]ݳgϸ\.ɤ}V4nbbPXX8h Q 7oDDDX,c %J ]&r={VWWGeX&ꪧ;`hV7<%*i^HV$r >Y݇+--=}Cpt61s]{{{Oxp722rssʚ8q"uGR<Z4T*miiwXŲ;*O>Gt| 4l@kAWVjO0<~RvǢ$++K1B7o1:⯗.]U^ׯ_裏;オ"ѣs1b4o6{lZFk˻wѣ񛛛ݻj* ,,,&Mܬ4pyAD_q\333Ȉ`ћ۷ѣ3M81<<TV'k֬9~_^ޟKRUJq^J[wW-1%  q_ADhii9{ݻ'Ng_zիbƍƥ:Ha ]vUOtoi{ mtnzM6 *QPcD")d*]ZQ\]]}}OOP6MǏ?~鞞277www'48Qw}XSu䀪'@Pj]Np8AAAgϞ mwrrr*++!4 (FU' -t555]rpoGoDa1UM.4b5ub355x0+++{{{m޽>EW v3޽{GAȠ(ΝhNYYÇ!Chp&N"͊OpGwQ[^(+}\]]o޼I]p8///ZIt`7S'޽MDqi臘...'NԌ¥qw,;;Cc`=evbcXdekq= N!TQQW_ifNĉ o`=GOhi(>F};d}':Ɛ&r?hgΜx쬬,PHP(}sd_$]v-;;ڵkIMhttN ZVh'6+//E@bM;]4i`fG{IMMݻReG5~xۼ|QNxǻtaD~XNR2zwZ,:݉رcE`iŌ]P'ZbԉtfϞ˶ ޽{'ۍBnGUnқ8A"Mh Ƥ]CC&zYZ X.f캇(%(*^z/޺u֭[GfddܿuUD~XBD1iGWI.^ _v `: ::N' ,͔;vرOJXѫn8'RSzyEq|nћ"DAQ5y5OԨQPFcEF ǚ`KTc'"MzGzdqsw.7 cXjpXq4wvuNT}B3&>>^]?XK@ CҤm'U8(=1Mee}޾}{Y'B0::Z(2 OOOp@b!C$%%ST2 '7oT31ch#6hZ:Jhr5hbbgCCMabbr5^.-Oo߮}F wHe F266vqqR(ƍ~H$CCCetӀ5vSMi%߱c0ggxggg-|"uQct꼬_'..NOB w3c\$"ouA\ Ĥ'cc[M.wzR5׼*G@ ^V<@ ю1@ DB=3;SLINN AW^=wE^ Wd466h4SS۷/ZԴp)I$kq:``` %%%kkkiwAvJSSSxnnnCCH$RvvvУd//.UZZZVVa75''afhhaXKKK^^QMGGG==d}&8۶d8c0qzsf ٳVSS<3gͤEεCOʙ34x0,$qŔY^^^RR" 1 0B@/g9v**;gS'{a@ immq\__ٙB?qb})m6bĈ7oިo;<AB8::[(>{L^? V=\Mӭ%`򓓓HT8.1 r P_\D"Q( kkk@MMMii)T ȪU߿naa2yd@||W_}UTT;uTrr2n͚5@ xvl'Q' 4n`ӦM !!!AAAl6fzjΜ9Ǐ700>}Ç;vqyԉ)++IӓB҉\l1!Aa\!ɞd2Yƹ8; `wH]tppxNt@ g2omm%HD5 dsccckkkEEE~:T3//oȐ!:TN!2 uii4`zz H$$9B_bH$ %ң6W9cccccDy^$MyN".+^yy9_~$VКnϦDa.((2Cdd$PQκvN IDATHH HCUKk8::jG⸄@ hkk$BRTxWP=qĉ'***> 6@uzj>KP8gΜ+VXZZ׏L&_reVVV҂oyi-'O|ͫx'`:O?Nad2eJZZZzz֭[|0jԨҀsFFFvN)66"OOa{;ho' "ЪIII8'&&&%%㉉qqqɥ0LUUURR۷o"(99999gffB!'qE9MHHHMMVFQ(>( ^[[[[[[߾}P(PZX)]L&d>d2&HNNN3JYYLOp kkkUKHHMJJR4UM =ngǶbmm0FbܹH qՕeiap;7+ɉrrb\Iq|TfZ ~=]F{1cd`" +W(l77?|L|'L`VU8O|98MȪV@X˓l"{JJJJJ@ ;>>>!!!>>>//ꤤ*XJOJJ8xia555Dlh#N}eR$UTTZZZz{{gee8~ƍaÆY[[{{{)\f=\aED"ў~ooo777q{a|||> kTTT4f̘~@{ĺkS±dWS۹T...Hg(nʜAkkkrX6˛WZ%լX1+ˋzDM| C !-)unjWA&yСe˖X,ssӧKL)\ #!a*Л1p:YcaaannKD"ٕJ+t%''ğX{SZZZff&]ͭU0{{RD"x<.K&ůbB!V qrrJMM% WBD" 0喕՗$Ν6 v7(lӧ F7n{G:zHv}ǎ9o46|p o\>^ܻlʶgIR?p݅gDZHp!­޻{y1 Ƿ]L#"˔  hwq;;;SSSx㌌؉p*** q###CCCxzeexGy#hvttDUUUp yMhNUPPPPP"ٔxuP(fffВ7wQ{3,ĉ'L >3g,^ΐh7n>|800_~f;gSFLEsE-\BD`0nݺhѢ7[*?Ϟ=zt$%K\.N(WHHf ԩSO â>hԩ8[[[GDDykkk߿lSVmueUEZV_V%j5z!Cܸq,,,LpWW0rPюD6]SSCRdGvy-|+@!d2)9a$bR;u |+455ttJKKI$&NNN޽{࿝@PH$fX|>_'ű|>prF "qjfF =OӅB!Nj0L!/]x_Pʰl&YXX4:-a Nf=!ۉfss34LAqO|>Qj{ǠAn Mvqƭ_~[ðlJXYYN8X̙CR;>Ք8.Il:D%%%޽sssSݿ͛7_w622Zp!ܿc>M6z_}y``̙3ZJtfubaaH$h_vJ9Z$ArcQ" UwV/Pgk( p8C:d2;8q[__QM8*6͛V}}D$:P0 cbl\]_r Ij#:3 rexb0 *tEgQTKg`l} g,--EQ痘*Y/.`H={,]?ϑ#G=ztMiJKK1 355s39 'ibbqA M ?8+E - cv hS,++0`D:q uF4N>䓸7n`֧Oqm۶|8%1%T*uܹĹ<( |UFF@ زe 1K9nۡY [_[[(,,$,B 0 / jR@@NE"Qcc#"W&Nsss{{;Qx!a>L ",N$P$VUaϟEUUCh" /^Nif{mmm CFTUUxܼ0;aڔ/uuupnjJtd+t+QAxe~666>{`uΝcXNNNpvРW͛drHHȡCd2 NZVVֿիWC &1% ??Ν;vp8ćȬYNZ^^oܹsGbJk p&bHD /N% bﯦB0!!!##CQ\5C&%^Å|H$***" /jjjRb݅BaFFFbb"pK8r\nzz:2999++Kv[ZZLLLhjBy88N[$(ۿޠAi 0Ԅ;;;Xe !_xP7 F򥥥2DSܡF8CFRt:QxWZZ 9ޗ ˖-#SLiii!Y|-[8N`` `ƍ rss0lD[^SŕpiyvfϞ=o…X*G!:[jVTTťIQQQ@rSRR( 1'''7rZM6ߟf8qĉT*uϧNjllf0޽xB?|*D"@ `2Y޷Ȫ;yQ%Z0LQnȑl@ttkO܃n3;p]ڛCo#!#T̞U ǀ"~;O~q;l/C͆EA}Ut}ߟ8H: 嚣i_ ЇrǒR\ٳ=o;A j-ġ!^j5@(JQQQ>}bL2[3Q(5@ s9.nzQQFH(_yxx4 @(”LUūxb 5cǎ1m۶[PwabB:" <k/Ν;7""۷!. p_bzISSӃ&X4$nZZZKel'$''oڴСC#GԾ4  ?~<",,L:er_v.B&9(-nQiThd;A >}mP?~ID*P/^tʼnNyL,59W7hJB=l'.}ؕ?xJl=( "##1?>w[nɣtgddr I!# nդ.n}A+'?BBBN< B'O/ X53n8+? qzzK$PBvsIZCχ`=4JԢo4 rA艤 Bs.{aC{YJG Pф4WۻEow۷me׮( '|Lz}qBp,---sptP*J{]1u"BCFܺ%eKGZCj݉={vy.,, |Fyaa p_nnnDITAҨe.G] tD=UشO}m%;=v~MitiӦЍ vf޼ >rOC Qo]x qeg^UUuY %vJDt  T徳GRː奧gXŝrWvҩ#:Mz4Dd͚u'On¢ .,]򅝝̹\ޓϒSReb Rk<I[[K\\ !=nlڧ\l'fVh$B>*++O RZs7yFwV޾M.8dM>mت3g(ҥ_v۷p:@JzPqH@ q 埂I~[Tآ z\.'IGvMX*p׎^#MИF23vݷp}}'R56lsKQϓSR~dkceo ٲe!Ct[pZښ; kOϗiM 5rDo jA~fUy<ݻݽkYY{,|DDITNY>T0L`TuםRP^Z k0M_徎~ɇDj&._mҷoC~O eEE7oFr;v R-^P(&97dڒ%L&]{_4 mz677z;2hwRfG8/Z`kcLLJ>rdC{t3QeK)H\E tvx<.<>Tz.B!{ʩ(F zmnn{k|)lQ=EhfG5ik8[6fVVv{ޤPTٙWWW;B(]/LIM[u-(Tj?~h4skikMKr &CVvv)+uIK^6=a4xw5?}hP.R(EX%#~u:Q]ΰxgJMK\Ix<띝;  jqH$hJT آGc5OD4qKˋ Vo3\z񥋿03z%118vxr%!rၺh' "#+̶Rܣ4 z>Eeg_3ӷ2]1)%-^82| ^&Eⅳ[W1ʪGO8a|muamuyF̝54S'Kz5˷Vn}e줊jDO⋅$H$Lffq}fV6k]>@ %x ?߸q6_~a0l6f FQ( o/"ښϑ)i[ZhBe% `”Q#:]歁=F7g>OE9/L@OnQ]Yy3W,Nj{ ww o[D"N:O0c'|/ SkG|:s>&d\ܝ[ 2fv*u uDŽ'1UZsSyfGt*}'V.TTz1}^֒'a}B0;%?3kd#>[;*=-P(<_4{ g cL&S|fG:A @ ڹ}6T'`Xt: IDATJ;!H\.x<B&@$AuBd BWHNN|rPPРA4tP(3gZYY6GH$>$ɚ$Ds̑'wޝ;wncǎe]?pqq3f) d(Ό(+++400Ў$4P]h4B@#JJ҄B@ <4ijsDbcc:tѣGwojy(4Wǃ:!HpgXD9B.E E!$H$0 3ׯ{yyi"?s׮]~~~}jp~_ݞEjj޽{ƌC:5;\.F___|Ajj_mbb-$=kL!`4A)));w]`7Ǝ>҈޼yʕ+gϞ~h'ONN޸qU.L^^ޏ?H"6oތt?T঩)!!H|Baqqu: i{R\.799`R PFyͶm"##===՛sSSÑ4At[lQ?Jo&˗/5X'ꄘPQO[[۫W|||{򻛂z iӦC9R$<<<,,,22r2ɱc7l(*ס(hf6::zݺuWWJKK{ZCV\ovl###NNGTÇ&MzMccΝ; 033M( F]S %'S׫$|>?33sʕyZZr%!U<ԌbCoh*;wlllWWW_oxx[j%x¾D---/RW^%5zh&[WW`ĉ~~~G]t5k 10XbŊ?ә3grrr?<<<""~pqqJMMDÆ 됏+ܾ}*gϞED ǏvZJJʕ+;K L&L~ӧO/]}<}[nu8k?S~ ySE:E`mm-Tuuu.]RWMw9 Kx}F]S(~<==-/c ipte YT eչ|>?&&f֭Wb É%&&&l| ņԉV7otiY.mNLL3g믿{ üuć5T}FpwwWNGGG]kHHk"I($&&'|'_uСuNNNݦs>\!Cϟ/h'N\ӧOppEjr~iP(uMS$*ui!>Rvb6dI2&0LiV\X ņIŋ?_~9vXiQ2~1b߾}֭?dff?LLL,,,'77teBLLLx[򆈎^nի'O4q_,̙388(gggŝ>}z.O0b}͛'NݻO7oވ#͋92j(4-1O5kΝ;-,,>򒒒S_~׮]&Mp8ѾyyyK055%sP"Z& h2> YURvVʤP?+ W~ӦM  HDh_,!!xMMM}n~Ax<L޽>|fe==ϗ]zVܷ+>>pi{7o:8NΚ5kذaٱ}ݶm|˗/q2eʕ+W`+V :ð>},YBSbx<֭[C;rHR'LPUU%T= Ǐ w`oHGbg#<<yRw.K Y111?SnnnYYҥKMLL\.)Ĭ[PŭU>hN/It۶m leG y,o!Y:dN6ܹsDzfFEE!i׭\%J !u~agghѢ f1c1|Y߿7q<""bΜ9_%3gÆ T*O͜9Sp%M;FΟ?|ww~dҤI~~~Ok֬ٴiS|||FF})..nǎ۶m+++{Ŕ)SDE'&&޿ xKmݺU<^ W~ZMjkk?~fi҆&, 1 ܺuQOOСCl6{߾}Dက.ihhZUZ:Ksx]2ĺBœH$re]:y񩭭;:0m4c7oh46"흱bŊoHtW^%$$(i_uF}FEn:lذ>}r8bΞ=mʕ|>@-,,  '*,,|Ν;}||VZu)b|ppp {_{uV4(< Ӌ&HKKqKZrV6G/o~[lYPP۷=ztÆ &J#11'HāZ)T|q"""O.n8۷o;;;Vg+IDATZu={TWW_zp`$"""**e˖3̞#MzǟSĶi?j&NwѥKYG[FFť;3S'PTTt%kaM/:#mh'}yxx|G'Oܾ};vcݻGU^^. kjjE"ÇO8a"KKeNuT Xsؐ:61 311QYfڵ燇GDD~gDaÆu6m:޾% 'N022BD:~xook׮\sh`2d2ѣGO>tCDZ...nĉL&SZH-:555< _~ V:~1b߾}\3...PFO8Q<}?#Jb9spd622;}ݻa0az ?dXֳf:pGccchh+!9C{VE l'NXlŒ]dYy3g[6+++hHyrvru_ښf:ۿѵ ;v7nժUd8k֬hqhpww}6|9֯_k.CCI&q8h___][6l؆ 6ov Ö/_~ԩS1 o7n?]m۶vOOHsXz5Djjj:U<== ŋ,Y`eeEdޢ'VM/cǎ8^__ѣÇ˖>}_NP=zJ+DiN%ѻJڥ7nܨeZ.A!4۷fXC=z(kNNO;g#8Lb|7<IOO:t(ɜ6mڹsB088ёJO0 5*s}?׮]J$%%yyyr8_?O>p9ɓC{Uщ.xwF; n۶m`at ( @u?c#t]  P#3f@XF 0ۦMt+R'fއBC4@ zjwF$əX-& {@HS wWSTSSӡC2ͥ% IsJѴ̫Wv!^.%iiif͒g u? 7D;_"TGGC!u@B?cCC򨨨k>%..ɓGIJJ?p@(A|#4U*)AssE֭[7uzGGGz)7lХ4QÊn.Cbjkkual6{Ak_n(6P;wHz5ƁؿԩSK%(++[rM`|+WhܫW988I޽ۿ]]ZWUUxMy<^}}P(qPkp8/^(,,Թl'Do )񯵵se0v3$i̙.Ҳxbkkk*jooUOYYYGf2/mmma.^$~tFFF1C\pO?H<O`bccɓ'?~\"]_?ojj`ϟWUUܹ3))iΝjadddnn>v؍7+jRFFF_8jxyy=@t3p#G={AO^^^1118OֈwXbhkk lmm.\8ԩS.-x0C[[SXX7Ȩ zjd2$6Ǐ ᥕ1,,+117 ^r)]SS3geffuV@@viggGPLLL6n(1*qM6coob`V˗/722b3f̨ r{ ֭[;,z]7oB( } L611ٻwx>\bVbX 8R'D/D(>}z&W_5668^PPGIl޽"H_0k0 8wdsp)D#Bnq<""Vիqojjjoop8JǏb~ yv9n_ ˗/755~ u2rHC&'LS(("gϞ=v,ooiӦISdkZرNHD-Qg8VZ,YdպN 0lŊIIIIIIK,9sٳd...UUU\+55u޼y/b۷>8qÇ9Nds綷Ct}HSai.0-Qs|*E&bӆEдT4HA+$J퉖VVSd>`-5iOS8K/]_~)-MNN>{ñZ@ `0RtttT**mWSVunݷoҼP(ڍg .9H$...BBBBBB:111=!Cۛ@ d2& H({1L_OٱcX,ΔxG**|;!X,H4?;994'Z̭ c"`0ge;~ `jtzYYϟgggTjDDDII ~X,KKSN^m</==ϟӧsi?nnn윗w&77waabD""3%%%r'''M:rss I*c#S]ׯ_r|vvˇrz Fp8Gd8 Bad29##.<<|qq;""b{Ձ6DQ6 X6㎾|mcutuZ#H,--]^^4$BdffjJ.^HшDkIIR$qqqTJSSȣZT|777 *:99y<ῴUDlggG$;;;u qծ֚L ˝昘?{A.qxJO>> 5X,ܹceeU[[7j_\pAݻNOOl+++*(Ƀvܙ/..x>V':ڎϝ;rH uv0AKKKx<6]WWӵBڒ#\[(,, dJsss߯Gtoll|Ⅷ'B))) v=+`ddD"mt?exxѣqX ].lбcŝ҉> 4k{xxLOOONN_)bօW*wΣp啕͂:|vdd$11ΈOn Ɂa BH(j777ͩfBu{"BBg;РI?!:.HLW*SSS'O" BhnnQQQx˛7oRRR|gx#"^^^! డ ٳ!'POObD`XXغh !Z]]]()( D"Z>sv[[[& BGG~!E"tzlllqq1ɜ)//OKKhՌ7L&I d29##.<<|qq{Mڳו4l w"5;P}'&@8qDkk"##]600p/KOOwVVVXxCjv~WWW7??s>^xݵ*ufZ @:H't`\;$5pIENDB`cream-0.43/docs-html/vim.html0000644000076400007660000000646611517421020016470 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    f

    download

     

    (Page has moved...all downloads are now referenced on the Cream download page.)

    a

    cream-0.43/docs-html/featurelist.html0000644000076400007660000004107611517421020020220 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    features

    Following are all the features that Cream directly supports through pull-down menus and/or keyboard shortcuts.

    Basic Features

    • Runs on Windows 95-XP, and on all GNU/Linux and BSD platforms.
    • Edits Microsoft, Unix and Apple format text documents.
    • Supports editing of very large files, size is limited by diskspace.
    • Encoding support for 38 varieties of 8-bit, 2-byte, and Unicode.
    • A single editing mode. (Cream does not use Vim's modal editing unless turned on from the Preferences menu.)
    • Tabbed document interface as seen in this screenshot.
    • Have multiple documents open at a time (Alt+W, listed in the Window menu)
    • User-selected font, window size/position and most other settings are retained and restored automatically.
    • Each edited file retains its last view.
    • Simple, intuitive keyboard shortcuts to move and select text. Arrow keys, Page Up/Down, Home and End keys move the cursor and adding the Shift key selects text.
    • Standard and intuitive menus. All functionality is available through pull down menus which indicate available keyboard shortcuts.
    • Syntax highlighting makes reading code easier for more than 350 programming languages, or can be turned off.
    • Intuitive status line can be toggled off, however by default it indicates considerable information unobtrusively:

      statusline
      (click to enlarge)

    • Toolbar for commonly used actions can be turned off.
    • Undo/Redo are unlimited (Ctrl+U and Ctrl+Y).
    • Word wrap toggle (Ctrl+W).
    • Automatic text indention as you type. Can be turned off.
    • Print (Ctrl+P) will also prompt to print only the selected lines if a selection exists.
    • Block indention or unindention (with selection, Tab and Shift+Tab).
    • Show/Hide "invisible" characters like tabs, returns and trailing spaces (F4).
    • Tile multiple open documents vertically or horizontally.
    • Recently opened files list (in the File menu, Alt+F).
    • Quick key to exit (Ctrl+F4).
    • Preference option for Unix/X11-style middle mouse button behavior to paste the current selection.
    • Word count an individual word or the document's total words.
    • Find and Find/Replace dialogs use intuitive search, with Regular Expressions as an option (Ctrl+F and Ctrl+H).
    • Find Next/Previous under cursor (F3 and Shift+F3).
    • Convert existing tabs to spaces of the current tabstop width (Format menu).
    • Bookmarking with visible margin marks (up to 26 per file) (Alt+F2 and F2).
    • Spell checking with alternative spelling suggestions. Many languages are supported.
    • Go to specific line number or percentage of files (Ctrl+G).
    • Auto Wrap formatting wraps text to any margin width ("Wrap Width") while you type and automatically converts tab characters to the equivalent number of spaces (Ctrl+E).
    • Toggle insertion of tab characters or the equivalent number of spaces (Ctrl+T). (Over-ridden by toggling the Auto Wrap feature described above.)
    • Text justification to left, center, right or full alignment of selected text or current paragraph. (Toolbar or Format menu)
    • Quick Wrap re-formats existing text to Wrap Width and justification margin with hard returns added at the end of each line (Ctrl+Q). Quick Un-Wrap removes these existing wraps in text (Alt+Q,Q). Both accommodate existing bullets (currently @, o, *, -, +, subject to change) and nested reference marks such as ">" characters in email. Quick Wrap and Un-Wrap work on any selected text or on the current paragraph with nothing selected. (A paragraph is defined by text having two returns at both the beginning and the end.)
    • Line join re-formats a selection by removing hard returns.
    • Both Quick Wrap and Justification remove repetative whitespace now if activated twice within a second or two. This means that text formerly center or full justified can be compressed back to the left simply by repeating the Quick Wrap keystroke, toolbar justification click or menu selection.
    • Auto-correct spelling which corrects common spelling errors as you type.
    • Insert current date/time (F11 opens a menu of possible formats, F11 x2 inserts the last format used).
    • Auto Indent toggle.
    • Capitalization formatting of selection or current word with Title, UPPER, lower and rEVERSE case (F5 and combinations).

    Advanced Features

    • Conversion between Unix, Windows and Apple platform format files.
    • Keyboard mapping choices for one of 39 available language or encodings.
    • Current line highlighting.
    • Color themes provide change of scenery during long editing sessions or various lighting conditions.
    • Word completion (Ctrl+Space, Ctrl+Shift+Space) matches other words in the file you've already typed.
    • Macro record (Shift+F8) many keystrokes and commands and play them back with one keystroke (F8).
    • Find/Replace in multiple files, through a simple dialog. No external programs required!
    • Toolbar able to be toggled on or off.
    • Calendar window (Ctrl+F11).
    • Column selection mode (Shift+Alt+{motion key or mouse}). Select, insertion, delete and backspace in columnar areas, not just in rows.
    • Open file explorer to current directory (Alt+W,X).
    • Open a path/filename under the cursor or selected (Shift+Enter). Cream will also open a URL (beginning "http://" or "www" in the default web browser.
    • Insert characters by decimal value (Alt+,). Easily list all available characters on your system (Alt+, x2).
    • List the decimal, hexidecimal, and octal value of the character under the cursor (Alt+.).
    • Insert character special two-character digraph (Ctrl+K). List your system's available digraphs (Ctrl+K x2).
    • Character line insertion with any character (Shift+F4).
    • Character line insertion the width of the line above with any character (Shift+F4 x2).
    • Email thread levels are indicated by subtle color fade. Deeper levels (more indentations) have less contrast.
    • Syntax highlighting of special text file elements such as:
      • Email signature: separator "-- " on a line by itself and lines following.
      • Bullets.
      • Section titles prior to fold markers ("{{{1", etc.).
      • Time stamp tag and value.
      • Filename stamp tag and value.
      • Character lines
    • Insert text filler, Lorem ipsum. (Direct Latin quotations from Cicero's 45 B.C. "de Finibus Bonorum et Malorum", used commonly for this purpose since the 1500's.)
    • Advanced user configuration via manual config file. (FAQ)
    • Expert users can still access the traditional Vim "normal mode" by pressing Ctrl+L and Ctrl+O with their respective behaviors.)

    Programmer Features

    • Context sensitive completion (Vim's Omni completion feature) (Ctrl+Enterh, Ctrl+Shift+Enter).
    • Block comment and un-comment selections (F6 and Shift+F6).
    • Ctags navigation. (Requires installation of the free Exuberant ctags [ext.link] or other similar tag navigation program.) Through Alt+arrow keys, move back and forth between previously visited tags (Alt+Left/Right), move to function or variable's definition (Alt+Down), or close referenced file and return (Alt+Up).
    • Function and variable list available for the current file (Ctrl+Alt+Down). (Requires Ctags)
    • Template completion based on file type (Esc+Space). (See Tools menu for list of available templates.)
    • Line folding intuitively hides entire sections with a keystroke (F9 and combinations).
    • Pop up prototype and information menu ( Alt+( ). View the function's prototype under the cursor without having to open the file with the definition.
    • Insert line numbers for current selection, begin with any value.
    • Soft Tabstop setting allows existing text to be displayed by Tabstop Width while new editing uses this alternate setting, inserting tabs and spaces to accomplish the new indention.
    • Diff mode to see differences between two files.
    • Terminal mode menus (console menus) (F12, console only).
    • Cream, Cream Lite, Vim or Vi editing behavior setting.
    • Expert mode, an option to use the Esc key to toggle back and forth between Vim's normal and insert modes.
    • Multiple user configuration from a single installation. (FAQ)

    Add-Ons

    Cream provides additional functionality through add-ons, modules that can provide a vast library of functionality specific to your tastes.

    • Color Invert -- Inverts a standard hexidecimal ("ffffcc"), abbreviated hexidecimal ("fc3"), or decimal ("255,204,0") RGB value.
    • Convert Text to HTML -- Converts a text file to HTML by substituting a few special characters to specified character equivalents, tab and space indenting to none-breaking spaces and hard returns to <br> tags. Wraps the document in basic HTML header and footer structures.
    • Convert Hex to ASCII and ASCII to Hex. Works on selection or entire file if nothing selected.
    • Cream Config Info -- Provides quick diagnostic information about Vim and Cream.
    • Ctags Generate -- Using the third party Exuberant ctags [ext.link] application, generate a tag file for quickly navigating a file of any single directory.
    • Daily Read -- Choose a document to read in entirety over a year and have Cream select and present that day's portion, including a day's context on either side. Great for meditative or religious readings.
    • De-binary -- Utility tries to recover ASCII text in binary files. All non-readable characters are deleted. Useful for recovering information out of corrupted word processing files among other things.
    • Email Prettyfier
      • uncondenses ">>>" thread indicators to "> > > " in the current document.
      • Collapses empty lines to one.
      • Option to simplify email headers to two different formats
    • Email Munge -- Rewrite a selected email address to a format still readable by humans but no longer vulnerable to being harvested by web robots for spam lists. Examples:
          |username|AT|domain|DOT|com|
          [username](A)[domain]*[com]
          useNrnaOme@SdoPmaAin.cMom (remove "NOSPAM")
          username___in.com (insert "@doma")
    • Encrypt -- "Encrypts" the current file or selection with several different possible types of "encryption":
      • algorithm -- Converts all characters to decimal (numerical) values. While no mathematical encryption takes place, the document is readied for some an overlaying encryption algorithm.
      • GnuPG -- Encrypt/De-encrypt selected block or file using GNU Privacy Guard. (Must be installed on system.
      • h4x0r -- Converts certain characters to visually similar equivilents (e.g., "E" => "3", "S" => "$"). So called for the slang nickname given such spellings found in certain chat forums.
      • HexMe -- Converts a string to hexidecimal or back again. (Can not handle characters with decimal values above 255.)
      • rot13 -- Simply rotates each (English) alphabetic character 13 places forward in the alphabet (e.g., "A" => "N", "B" => "O", "C" => "P"). Given the English language's count of 26 characters, a second rotate will "unencrypt" the first rotation.
    • Helptags Current Directory -- Run Vim's :helptags command on all text files in the the current file's directory. (Useful file sets organized around Vim's tag and link navigation system.)
    • Highlight CtrlChars -- Highlight characters in the current file with decimal values between 1-31, except tabs (9), newlines (10), and returns (13).
    • Highlight Multibyte -- Highlight characters in the current file with decimal values between 127-255. (These are characters that are usually interpreted differently across languages (encodings) and operating systems.)
    • Invert Selected Lines -- Reverse selected lines so that the first is last and vice versa.
    • Invert Selected String -- Reverse the characters within a selection.
    • Slide Generator -- Creates a website slide show from all web-type graphic files (.jpg, .gif, .png) found in a user-selected directory. (Requires the ImageMagick [ext.link] convert utility.) Will automatically thumbnail all graphics in a directory and create a master webpage displaying these "slides", each of which link to a page for each individual image at full size. Does not alter any existing graphics.
    • Sort, Selection/Inverse -- Sort or reverse sort selected lines alphabetically by first column.
    • Sort, File -- Sort the current document alphabetically by any column number using the external sort command on Microsoft Windows or Linux/Unix.
    • Stamp -- A series of add-ons to insert various useful bits of information automatically within the current file. The stamp occurs at the first location of the stamp tag that is found. All characters following the case-sensitive stamp tag are replaced with the stamp up to a single quote, double quote or the end of the line. White space following the stamp tag is maintained so the stamp can be aligned by the user. In each case, the global variable in which the tag is stored is given so that you can provide replace it with your own tag.
      • Filename -- The filename or path and filename can be inserted following the tag (default: "Filename:", global: "g:CREAM_STAMP_FILENAME_TEXT").
      • Time -- Various expressions of the current date and time can be inserted following the tag (default: "Updated:", global: "g:CREAM_TIMESTAMP_TEXT"). Note that if your system (like all known versions of Microsoft Windows) does not represent the timezone value in the standard strftime("%Z"), you can override this in the variable "g:CREAM_TIMEZONE".
    • Uniq Selected Lines -- Condense duplicate adjacent lines (sort first!) in a selection.
    cream-0.43/docs-html/screenshot3.png0000644000076400007660000006741211156572442017771 0ustar digitectlocaluserPNG  IHDRR%ݑPLTE)#$"'(&@")/2%,3,-+%0;P!+{020510-5;!@#35278629@0;F<879;8<>;4@KA=IT;JZGHFBIPIKH;Q`KMJAP`FP\NOMIPW5Vo;Uj?UdGWFPRORTQCYhXSRTUS@ZoIWhMXdUWUPX_WYVE_tJ_oZ\YX]_Oal]^\_^WU`lIdxEe~X`gNdt_a^GgChcaYac`Nh}UhrRix[frcebhcb_fngf^efdJoih`ghfOnlgfYojkhVqanznmeOtlnkLxnpmrohSx\wkszP{Yybwrtqjvxun-SuwtTY~c~xzw`u{n~i}|t{|zztZ}|xb~l~{jt}h~xt˧ŶůνȻ¿ûĽǾžo( pHYs  tIME 輔 IDATx}|}gkV'wIDŽ1rHbl|@ eHX s$o ťh+tJi*FE!9b$4r iQ:HPN9~y@Q$Hv|Ggys-̍6oE2~m>}/x103\K]o ^wz~o`^W^_|d;s#_ny+_X_[cYJs+o%cW.k[7?_}dwO~ ,/ kܿ?ɟ~/?~qc;?GOv}O^x=}w|q_<ŗ߽[?O~g}Sޏ{_?߇}=_Z¾?_.$!}kXso5wyS?p/Y_g~?/÷ҷ /Η^|ŗO~w/~7^|{z{}om/}=ڻ]>z}={~YBOvٷ__}{ QYw/{޳>ҝ{Gw>|ٽ_/y/}/ƯtO?·|ޏ۝|}g?އ-o>pdޏ~t?}Gy䗿$.yX`wowo {wU`_x|`)pC?g_;~~;_`?|C xxc{cw~w?w?x=}};?>w(~R(X#Qg C٥EkKs?u}{>p}{zw{h߷<<>{྽{so{g>c_wٳե;2,}{Gp磐fwd 0{]{yf>\~[mj`n s707h,~>07leq泟O;rrp8\;|ĩc].pD `[ѾSxџ_<~JY4Oɭ^9:'ʼn~zeǑ>Oz0ug?މ;.l3On#O*iF4G!gziu nۿ|tX\͉]`c=g/j~?sЃg=}.NxZޯF<}s+Ӯ'/<|v踱7؀%bA.1rșcs>m<;x'2w|㇍N]O ?q]| ^s\w> vpO8uCz=^osO;zf=r乕Ǟ9vsg}{챳us'=rQ9ee=ry;A>̩GO=}\>ubs'V?v;zl3ǎ8<ʉNyyy'r[0O?nZ.lwqe[jc*5^u0q;t1 C<~魎X/oߡoJerH^V:S.1=)祋}p~\c+ݠ訁?._Kco躜.pܶw}[Fbsne=eXݹF\\8=07\PXg̡SZ{Od`n?|z8(Ϗ?=`qY?ѓōgzۭ',n Oz-81`q38sO/XvX X ̀MCybbP.fWEZTVAXrku%0JWxK¨G.?UHvvYAjKWVhp)d$fBaѡ C0ak$ #I»`j}'Z6 BB,fx,:͙5 .rB5h6j \x2Ƒfg׾)QȵU"~IuT%1cO-,u vP)A ԍ* oVLM 6mBEx센Zi, 14E0עy1ʓ, d曬O[q¢([bUH,*vcщ7(D*&aI,6ʢ0s},X0ѱ?(QaDsh8cH_\ŅA*bQar=,`JHҌ\6 ?IRm_dglNa9ŧhLl tc6o8/i۴B )z rlN@:nx|tI'yH<ZX#qp3A? ~"8^J%>3UYZ,ic13=ga " O㎘4%KpppI P֑E;?C5D0CE[ט ZYx^xp >zЅL,F46RUǢg8!~&.O1yMhOFPX֤mtP M®~tB"# 34cIkqCzZоr!l ڡqڿG{jwdJ3ӗ6ǭ u]mtTs{ͽ*R i/^ŕOդ@5ȺYҎB '$ګ(;WيTPӲwkeUOU$8Ks5iZxECX½f:R/Wp0eF 7R(pH\]0RlhbQHٶ$KwHyp^_]n»єAhl*LթlΈi z7r"FxaLӄDFKpSA!ߑzY7KPR!_W#s۳l 4iMGUe~fgB!G$1^Вy{QwLO*㪇f0U!D 4elx8cd{ HthC"keQLv⨔-4QOˬtIq)_( wP,IMEj8B$.ibiz( hup4`},luѴD(fPiP1 ,l?nY7KMNwNJX!oɮVav,AԜӑrxUQq5@>Pex'qSRC~X8[Y$ \ȺYAJYʶ1m{x+D`pn7dD f PXLʸ^wIpQ44A2Y,y;ճ0H켦yE0h,)4Y7K/ xJ2 pF?^mxI9] gWXipdGe! ˺YPf$&POK/X@ B ,r07Ic}Pu,n savo"<͒=4ulvZKbB=-"iB#(}3-FtHj v,ZƔf+1o^@46YxӈPQ:\xݜԗ~ 3U+G IDATe10o *.ܒi\@ukumsEm/-c)V?W>BbA)hCӉ֫aQ,3[` gW `W=Di {kξ4ߞEgi .z,XjlRW3PrWUGD}m;KYOaig~N5yE++Kc}g0ߊ#<;pgSa-9i͖WMP<B&RYr o͢-AvOm+ah 2N[Ό)8.%.kn[-8zX[$I˒V mC>8Ff겒حDgn,*)l4O%ֆ'-2MF䶅Zt;2:X+h;kIa&3y(*S yD3!특6|.ԙ5m}4-$wi[NJ]n9L-TLw>1TJvPlGb;ͻYB':K5>$ݪ|"ᯩ\CIkXMiA^v ,v8H϶TGP9y^>d_ǮǖXP4jU&}ݗ%Ūߖip ԬQK&x ǠDPfNۗTEKYgƶo.Âq۲v@OphhgEk,WΐtNTn&3j]΍m_GMMgW',DR7tì뷰Xg-* !ݶowy s!4F?X¢-,Ҥjg9Eh0>@U!k`OŚ;W ~eK*2u *4C0},L*D5p5QeQаHxLN!\u1*dLK/TJ$x42nH( Έ},3L  6jg!OE*4UI|6E`v;P mVZ9&\]Y&b,:%-ui- 8_fJ[G)Oq5 ^Z$%tk–+*Z51F0qE.Jfk%F-*J ,z|ʑPZ%mFi6 RW9[bbGcg+'ުoBזEUr~Ԋ HCtlWHp6%-Z^quz'rfvMrѼ\,V5UH[Gfm+3ºS03StpnKdZV6NVõYn<PݜUŚc8U78CHİ5ڸ'VKRly"NBՊ#Y7˖ w츺ÛI'am%q!" p݀Cʂ2Y+˪ENH'Wô$3d3kT:Wn* Ң&#L΋ḢE~(}V2?.և mb-kYj?ClWYpšIB(q11f1f"jB4"&p^)DТf#%9-}:ۤba^bdΤzy&F},zc^PȶB ~T9G)Ʀihu\TO g6Cƭ,UݒV^Ț‚u},'!)2<l.d>ޓD},=,F},f;pR-gqDC\Rt3Dt|j͖UYoنSκyWYسe$MsK +O)Y!, Ta*NĒ!P6Xے QB4X KpװoGcx\(dpUd+pbGA+MpNߢ"QУ*W'HOCk1i1$jdxDǵ5fel¨ͣOn'M/JRDDzHσ t$Ǒ:o]d,|рXlQgKcn1AAx݌l<&'ūyY{/ǰWIY ̀śߝjQ?*#佯r[Zj{+.q:*mW\Y1bh8Ig!dү:= gx5H0 ]?0t-DȆE6tvkJZKl=lMZEҾ Eɽ)&YbEZ]Db(-:,$;qd:蜦w<#72&cY(;DH* q~uԱ$fqSˉdCB~7I:͙ZOsw(ާdVel6&\+ >WdqC]j}{~q&½`pmK5hKV3\46 2Yw38' aA+HyR-͏%6ީ>%kemVqܒ@V8Ø 3-vE D.L"&eO5Nυ⌔ܛVRv:ҧ%LNȢ/Uǡ.au5ܿZ7UB?_QL7~QeGWi>!ˆU},jnwn$b֦Z'-9CQC}EAȆe[:jJ"9$V"ЏVá]Vi GxԒQlcx&?I,D6dSТN0{SKxR%ND<&* W},UECK ECKf:eH9$},5WYਔB :l^M/|fʧRf"CYzYi<4=WYwYC8T! s]dVqfۄ♌[ ,4X&j)4>tY4F^—C5VtMfRG5iiŋuZq2E=RY] I+t(,F[+:{,B.% S_ 2Ef1bTj\p'Qu%6.2 ©,z9ZhEYC&/XKGqMvҜBH3f$*E&{~jeCȌxU>[~hZqҼp^ɎƼmKBcZ%ZYA R܂;:1YtIٜhJ9!OHpy[ Ꭴn1lE|\mK:9hR4Q^*J*D;)1`IzX?b)1}}{X`[$^XۢؤoB7|CLr3{020'5<E -J~jZ#^f|D]"kZ.$%)_N%*nu%'qvÅ+Fm'TD\)TWkNҵb$p[m2!Rr>UC ]V%,+3] Abb1j{u{SһTR{G5&l6Q%>,5liֲ;LTm-dA(m$A͒#QS dh n2h躎$@^!5B4!p rfBmSEŤ.\Ort5D4ICSRNzt)2j,(%?ۢOIg!D;Yė}x :ޫ ^# ^m-G|S OݴzY@sa$,_@lu+ޔu"7S`LJw5쮛N 'd,ΆvQ6lTIZ .%쎴e5ƻT lbۣPɵ6]&ŰZCa|K> ]W s0GT9 Y7KpipLkW@Ao:ݦ^ _)ڽ, mR+w٠ `[_\t#Bǃj̧T υmB(h1chP1ܕ՜bV֫vGʄ FNFHPYD!ԉ6,PCK? u|Fr6I bEXȺY&,.JDHUY[ -2:&nTY$m-Հ}Eb,rW4 g͖* Qo"oTнxʲ֔6E,ѡ,D  L*Y3b:waȱI"MuF>DtJzaJϘ8:~]nEuBM8"RvkQYD6^ +(;-Нi8* |78fz*f&(2ϼ @輴\ A}Ɓli{@Rخ\ 61L2 * av4H8\ LX~+;źoÂ,ad"nfy-!^yjaQ;i#X뮛uN7Kz*yzzgWU^, c챯֬'ݻPϜ"7e_Eh_Y]]:"i  <W{ܫ^i豯,LdLӌSS]e1N7tΎT@ʾusܟh@LwE:,k jkAeF&q Ǵ.aR4EЧp7Snʂodȗu?3 p7w'QƗt۲lu&٩KZYD:%,9mMˊn7:!ثl$,DlB^-$+=zըjZ]+$I4G=eT1 u\󐇤-Pni|1=+PCKB,%/ieƭy^řo9a<C"1yJ E7,"IU2jT_eX&Uˊlgzi&e? ;v+j]n_.sn Iʰn ~.JxK70ӎxR:bpڇwYoTңvȀn%mP"lzpu%u ̢RGyPA ,z@eZ0в=cwKAr X$ib Ύm-EOznrWMm<V<:0Ԍ,*X$ҼX96.pK2 On]ܕAea H[DI) 薖u/sd*CEOK 2q},Bi~164emQYc!SDRK˕nħDIJa:$@2@E#֛DǢhQ"VHF오?A_G,"w4`.{ǹ$<- DFCuz7ۘïͦ$+b`n oʵu {д0H7e|vuxjxg|]XZYjM;J-,9!eVb $Bʢ1lǢwдt\EoTQQʂ<u(WbpT"; RR$k]GZYo-ӡHM"-% p7 @f175sPIC=faC1u'+$CY&6ޏB09Bkf$XINks5H,9eu?Dw{XSh(" m2\'Y7)~,rЬt BZ_˄Wqd73*VX I\K IOM\ۧP3e XG), XGע?5X^߭ȦB?SDvɟb;}pv`Q!<:ʻSNQ\e(d8n:6z=u0^ئMx:Jv1nr&ikBN fLeg ו: HMPS&Da*[G%ÁBB^OEɃ,wng,*cIM[JT_v)PX \5Rt @caJ=<վB>ƇBuwh] >\0_]wu٧4"V@: !^DLυ(,h~\;rxGL:Y4eR\/*|z'j#Su5NCHKhi0fPy^IHmY^;ia. ӈG Sڃ벲$PK"K7!14di@X,Fq}WӐ,ϵIgst>~.O!2rd#j |FI6%l6ZX%H;<%dOH5iI'!tN Y-_ gq3=`hє ʥ1 ܣ"U"pJ0LJe$E)aNdLHH;:LwC^24 dA IY,wωل!ǃ7*3[G :x IDATdqEx~FeI2T)I2vv'Nt@\>AS![C 9Ys1ږ8tRɿXK͓~Sx VystoI={]1KO<"k,Qk}Ǐ?@rN>2ec㼖!jghSI][ UMۜL_ ce4ݭ.]ЅfZזbsn,']蹅Io=:|jϸkeCjIw >OV6 (5)Ax,0߸*D(Tq 7%h3eH*[UZBdPx gm锒(֙U5[3٤+ 81U-gL Vx:Z i㙃<T1>Hj"iUyAT:[]ZVgk> "qe<ʖb˫ap,XFio3h`J}hq ¼Zoq,AMGGy21(~z|{2dd.ej&yOسJؔlPA9ēl3lEczK[jMtH#mҲwC?-#N&q4j),飆Of)Ġbp`| V g,Em4)3,#6IV [XY[~;huh\'YL0$'˒IB ,N[D [-smRFP^t3*jIOP>sX0O|^s'˜@ֽuk`GxyU[Iu LGNJmmGS@WY^ 5UT@1'xq86k^74|1RyP1>-' I(rSŒ3+lCS̄IKe:c󝜗 2cYM—;jp@!ԕEEamhSS؜/h$&ّYy-,D6umNc;r p);a \Ыw:X ]NIe1䴃gNZGc)k8Z3w(v])ɗ08x+\(MWv,,|4W Xy$nY:q8Ѵ!o nLJ̸oN%nM%cD!QF]:J Gp2DEj:v\CK+{(%b2 t-g]%pE$uc? W$,p}~d Y6^IU_T 2䌯U"Y-ttY 0D*ps!MwZ0q-")?CKIf$IϨ.g (wv,>pB-Ra^JDM(xs:4k <Ԋ:EBZcaE%UTFCљ6)w" Or; X/\0i?p"0"NxRqu] $ Uqe)6i4!M.\:}leԻ|D^*dWKۑkNTy|Z =ow$wff1>J҄Q Hų4Em%7yZɪ<\b)t]ǙUmvl]~eԧ8tiUЂ/uWr//%nwUdp굓܅GjƱ%;|w kǢnү'd/◻-17xTJ ̖NJxͧ|&Յ,lLpK*~R絡]蔋(3ʄׂ !7gPS΃}:!yu!ׁEm|ҤdCqMFn~$1֯łs ڜ"$sLWy {㡩Hu8s@ s=05&{lXY-<3Zד&Q; BfFWIkCa}m)ʡ =b1IskFq:&3~W)ʅl1'qŵ<=zlȭd]),Z&حT4B^'P,\k(U4BU{31,i>ZfP`GV:%9V]GQ<]lUGF "% u@-E_`vɋ;nx=#4Z,hYMPdEkV;/· e/Sn dMVM]7*,>vN1 9cpn;P@3eX#sm5I)Ф`:릔0ޜ]TvH,#!+NyW %d좋0~&4lÅVXƜ-6Fn'֫9߼)eltVX ChcKaᘡM\rO&%zgi\[1JOUǪ (Iq_gy\tSLmλ~MP0Ru cR~$uB8*,U楊&Y%]*͌,'l.gqe]qJWmBvY#NeQrV!Js},tȨ~d,Q)R\NYJNt"Y N{et;qPjΆmr4z>Pr$C %.g*1j8yRd%-ނ/b"ة`Y7OrEwKKP8@!(B1O,-[,Q`B] k,xb# 6ʅЮyעYm..Rg1S8E2BKǚ$ yyת0|jC)Eod!|7;iYZk4bN]َWy!Y:.B7Ni0n gVƠt24AY4 . vbɤ^­$Gxf)h%\{诩wvܬ}) _{`n*?HҚ m Ojkh)>܈Վl36dgH3V]MXd Gp{KV) 6GgQ8p$&%,'oY3μ˒I =}^}eS;Jdp.ѩYh귑uIzZ-,$R W.ƴpZ4B$*xd t%,$1j5t X#y6 )sfYf,I!>?g\RMk+7lȺYL;$冣LHlь=#pyu,*9\ygьk|㱂^ YpdMH$>Rjh{0|V^Vu,LBIzZ&ӏt>)(Tr8 Me,H`" r\Ap 7.qv.\y>@|4B/ !@8CpFW=6d^ M4Wuc=9Tnt]+kCnJ2rU,Yw=N|0(wb6kev00avB]7 MJe}z!wuu2qutcq09WH%9yE4ߋOQhpmez͟s\\tH+Ήxh=iM#PQV6uHYru f7Y*0lGe?h{ւR^nuł-)%(+Y؊ѼɢzȈqK&hYKESmZsUq^,rh}Dt~ Ű}AUL ahoY\,NZکp ,dn8S, :ۛ%E@7 C?`HPĻxdH·)eE=,-QFE9g*/N-tf"wuG4qKص.&; XxąũA3Y0";T-oG:v Kc#f!)Wp8 (^Wk|2u-~3$t3ߢO\Dⓐӄj"x!9ǧ9JΧ`1#c)5e4fKfQcjF% Fk .M;/'щ6ѥA #ߋF T苫*Fkv-ĢB/_jeqiicѩڑ%Y=>VݤhNBUf&1wIzO8jje%VTzf;⦚NCJFs~DB,{2ne}gYDj9 Qjv|bJ;XҩN{'CG5XjȥS=H#/8: )cj 29\5%eu.R{͎pjE1P4y>O` Kl `eQ 2Y b[(g y}+ɹ| ,J¶ xmA[`1'_ u!20w?~*w#53C  #|y=^+p9w؏ =^f~׊_xػOi ։b@Vg#((E!%,F2np!V? '?h,Bͱ-j:] T;fC_w_8+Q2 ,K$u%JL@%z o 0 B -J?eJˈ$[6%\\x&mq=B=-.8X2b,gM o5d 2:Ig}v*( +Y -ɴR+8i7ROD Aʹy FzwHvybSϳ2-m5Yl wqJ:aVukt^eTns+dQlk,Bioa1Ie}fAnpŌ_d,[)DtTYЄ( kDeD~{|d"".6Y`B,opՓt-=k N. '=M됱IJ*aȽz?\72]>28O(:=%9P%&vNexZeK%ړR+.c1O`՞(,,2 =&,噕=™WNʸE1+x^7Zojr\szC},4"I,5e:ZIq(=&bhr jir6S8!ߺ];K֐<~gh' ń+¶ Yzq#kYO9W{h~2/XvY,SRp"fQY7ˇsq9fڶVygăYY7&b7f7.P;9gsMOK|,3f庛rZH[VpcUr\>ЛZMDaf1#i?)Z}Q&C8H+W,u=u <-z`XPAbrBo[Sd\Th[e7^ u$k:(~+> ~eE}VKMO. ]s-#݊.UFu*uLQMwfDoFܽxi`AݵknѸq$\'m3 '%lc:7z-HBkX8/*[sJt[x˱҆~U^.#'Ҫr׺n5z7XP A¹6cF O<-MԲYf՛K\w-oLU3G_;Eo`m8+\bflYN.;=OE$owxz(H&ggYl[Jr3í9~ n͂|](yZ 9C0{q}]`^N,?7{2jm2t1ovpR oھ6 IDAT)6?/ZFNYh;k6EzĹ+̒f=X&ъ cqdA˱U BXؾmIlvІx!B>^q5A"oЎ3O&o_px/p}RԐ^"IJ͡g -n:q ıbmGw7%9$5fknP'rq^ReQCvgE~aZ`|OX8kF,RR&{J &TKi]7;(yU#򹓅ʲҁ8v/ 3RPr.9is |FB,9iU\+M󂱸B)+(VȖyῦ%"Sl. -'`as KdĞgiq()3mJ},do![ZYwxZjb_ɪ;loP>jWV#q>MwΩeh+孏VvP|, n"c-y^|+)Sd4ZggbaiCBo7:-~E^C>6.ɢuK}mWOEjƢ.ՌwF񍍵v쉷n[[n$!O8fQ@cUnC,%-uH NL4{x)IBd8_Eu\~{m 7[iZd_+6!N%c8S&HUv*;G-_ި6_C+Kg̼$rkQ|fbkruǝOѪHd|K5R2sE`L# O%L,xeF6- UY¸fQyFXit)\L]h]ӻ0xZޤ8?uO:'kuXϵq{]|#ܾB翰APO_ake`8ɔTgehܗ1 ɆN׆t kYh_;,_}߭]YLǀ1%t͑rwQeYT${n4Ԩ[Y,*0\z-h c,,0&H>+%R?x4N<-a/:Qpݳɛ9 \^  sGnPdqX)}±&;n$hVC ޞaNACg'&׃,t%dgL3VeZ op4%) R81U$, VGj䥅rbm(\ceh+N@ s7P+d$9&ؒ}Q}iq-yyAl iFro%.q ;u:ʃSX" T Wؔc}={ne/#caɤy]qzAΚ=~MJX A=/w䆷 =g,!RSm.ޏJF^yxt?E?O28*|#Q,&#:aٓb25O˨k,}#W/ Do5eyjeB>v=lAV j]A9W]4=T[*l.-e-wZ:yykVAۑ,4w`F8rq AvzrmƋC~|W3r6k4~][/f Iڞ/n T-/>|J>^=.z'B+'Q?i>8 x<,8 ΂'΂,x,8 8 ΂'΂ kS6毂rM,~vxYpOggYYp< s`[|1G2,8 8 ΂'`鏜ŗf@嗿gYVi:?_6Xө~c ?sO<ʨN^g7O,m//;a?'gY_Dҟ gY8 ΂'΂,x,8 8 ΂'a/O_C,.kH9{Ox;^XIENDB`cream-0.43/docs-html/screenshot3.html0000644000076400007660000000510411517421020020121 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    features

    Screenshot 3


    (click to return)

    Who says text editors have to be hard to use? With just a few mouse clicks, Cream can be simplified to the most basic typing editor.

    • Toolbar, line numbers and syntax highlighting can be turned off.
    • Keyboard shortcuts follow industry accepted standards (technically called Common User Access [ext.link] ) so that they behave as you expect and most selection and editing tasks are intuitive.
    • Because the underlying platform is so efficient, Cream feels fast.
    cream-0.43/docs-html/about.html0000644000076400007660000001555711517421020017010 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    h

    d

    about

    Mailing Lists

    cream-announce [ext.link] : : a low volume announcement mailing list with the occasional release or bug-fix mail.

    cream-general [ext.link] : : all general discussion about Cream for users and developers, including help and feature requests.

    Documentation

    Cream's traditional open source ToDo List [ext.link] and the ChangeLog [ext.link] .

    Credits

    Numerous contributors have improved Cream since it's December 2001 beginning.

    cream-0.43/docs-html/download.html0000644000076400007660000001242511517421020017474 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    f

    download

    Cream is free software [ext.link] , licensed under the GNU General Public License v3 [ext.link] .

    • Debian Linux [ext.link] : : by Christoph Haas
    • FreeBSD [ext.link] : : by Janos Mohacsi (FreshPorts)
    • Gentoo Linux [ext.link] (unmaintained) : : by Ciaran McCreesh, Thomas de Grenier de Latour, et. al.
    • Windows [ext.link] (7.9 MB) : : One-click installer, includes both Vim and Cream.
    • Source install packages [ext.link] (0.9 MB) : : For both GNU/Linux and Windows. Requires an existing installation of gVim and basic command line knowledge.

    Archives of previous versions can be found on Cream's SourceForge Project Files [ext.link] page.

    Vim Without Cream

    Windows Vim installers without Cream [ext.link] : : Includes both GUI and console Vim versions. Note this does not include Vim's standard install.exe, we rely soley on the Nullsoft Installer.

    a

    cream-0.43/docs-html/screenshot2.html0000644000076400007660000000607111517421020020124 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    features

    Screenshot 2


    (click to return)

    Vim is the perfect foundation for Cream. With a feature list as long as any text editor you'll find, Cream configures it all intuitively by default.

    • Cream boasts a good variety of color schemes. From the light default to the medium Navaho scheme above, Cream provides a whole range down to several dark, low contrast schemes for long editing sessions in a dark environment.
    • The side-by-side windows above are displaying diff mode. Two similar documents are being compared, with differing lines highlighted in pink and their specific character differences in red. Notice the white lines indicating additions in one that don't appear in the other.
    • Invisible (non-printing) characters are turned on so that you can see line endings, tabs and trailing space characters.
    • Long time Vim users can still use Cream. All Vim command line and normal mode functionality is still available. Even Vim's help is available.
    • Additional useful tools are included (not shown): file explorer, tag list, HTML lists, calendar, completion, plus many useful add-on utilities.
    cream-0.43/docs-html/statusline.png0000644000076400007660000016451411156572442017725 0ustar digitectlocaluserPNG  IHDRL ػ(bKGD pHYs  tIME 'e IDATxw\S|2!{alD W]YUj]uԪZU+8Њ* 7aCBH!{cL6gΜ\255lΝ&L?SSS?wg~(Jŧdhh(˟_lٳϟd2Ϟ={ &ɹqƬY<8k,g+Wlp#G޾}[{L0oԨQ ? 3gNQQ!wwwj †d;w#OȌ… /^x޽aÆ9fnݺuVqʕ׻/ZիRbuuu盘|[[׾oMM;}(ʣG֬YsȑF:p>APSSӹsv1bĈ[sSSѣG@pP,ܹ366vԨQO?tׯ_^(g2P( mmmU*UQQJ{nHHȋ/͋I$GQQP( ^֭[&MB">>>6mnnH$juuuu^^^kkkee% cll۩j.-?8.00{ԩk֬ILL SjPbA@ H$ 7y_̌F} &?~KTF9rҥK.]}o*jMdL$H* ޅJ[/^LLLܵkWppT6d2H=Vju( DKHHp8Rdvtthz .lhh@͓JeeeD;DR333I$~@ 8yի_~tPqF"XWWApO81x`ss}̙vN@޽ŋ{ |2snݺťM㌌tzUUP(j Ɓ&NA~xx8|Oת`x{{|wjooRx22rJHHXti_qL4~8u̙35]&իWGDD,_JT*H---5AH777CCC`b1A fɡW /b "%%e۶mRd2٢E/^r8*Sx<YYYh4"T*U*(jȑ)))x<>22F3tPX^^`0LMMR)x+Vb 򃇋a%y畕oꫯ>h3fЮbÆ 344paaaOJJ ÃL&c0ss:7\v< Z>@;v֭[>|H$CBB!*\.F+ﷵ544T(UUU= b2L&ԩSt:;:: __3g΀7440LMĻ֭[ f[YYY[[i.9qF{բE͸%K_zzzƍw^GG\. hРAZ=dȐ jrG"h4(HLLJ&LxZÇ_r|@ b"DP(TR 0@СC@_j`%B ܻwNڹsg ^hdM ƶm :tСC5" mH$fUVitW= '' uwwc0M6yzzvuuܹBUV 4xϟ?'Ntww (((_~ |ZXX|W \9ryÆ =rH///KKK:33ٳg؀NNN;w`0~~~(J_"f4mȐ! \M8J' ٲeayWP(VVVFFF...FFF ͛yyyϟ?wssvppy󦅅ACCm0J ˗/-Zdll ? :62#@ 6B^;ÌfΜ ^u4t mOs<<<\{qhYLJj|V-5K`ffv===MQOOoǎk֬677ߴi=z˗/ccc=<n۶*9ܱl[uuu;w9rĉ?T / "55Zb ٽ6<0F> tuu]v(""p0h ==I H$ŚVL ̢uֽG=r/\P^^~!vZWWYfЯ"(11B\v+++I$(@Q7,, xׯ_WT 4=dȐI&ɓ֭{d5,Y&effr\<0v޵JeCCF0zbJJ>#tvv߁...;Օ|ĉpé/d|##cNJ'NPooAs /RSSSRRƌ3cƌSN={t˗*Y^|y0.. ::˫ܸqCt~&&&Reؓ n߾mhhr/]@ 4JD"YYYaXPr\ cJJJOn```D"Dx<F&F AyyN'@,vuuY[[fX--- Ha<*BS(:p 4_:::BW&Hg655լ|…82d2 Q4,>>t 2 LVSS,˛@gWHr`JFIRX6`% ???==}ѢEMǏ=5rȦ&:DRRY&LtzJUXX啛wofX2|ݺuW\wmoo_fMDDDiiCd2H$nZhځY.[VV쬧_U___ 5j999W^JsΝ={vVVD",b`XGayҥ_}ռy󊋋bK 555;=<<ҲH$iSSSww}&LW_]pȑ#ƍKMM---ݾ}і-[4-[lذa?A֭[ vÇ2$L,744XZZ[b0VSSYfI$={L:5::޽{[`A6nhddg???^z1 ŃZ[[w! oߞi``VCCC,Y!0a_`hhrq:~~~_7nݺ8x J366[reMMMLLL^^Ç{LxJYYY{pf+ ;;;8*CJfd؍"ϟ?/--ݶm[_M-˗/xik׮7bϞ=p\.&5b sᶶggg\B RÏP]]]TT?pQWWWZZ:i$x\.7$$D$PXUUU]]}ر? 4{nrrr^^O]]]yyΝ; An:pxQQQhii)kjjL&J p8h4Z*{f04-33xNNNh```cAH$RDPF>7n\H__o4iӦlݺuǎm6H$JB͜9^fͼy6n>H$***2d-+ x|ŋ 0O ʸ\!U$@ r.P(\qP(X,H$X,V"gdd|BР7TTTX,B>IPtttñJeJ²+r<##uɒ%}*Rizz:N?}[$ɚ<~dggD+Wb؈͛7& _~ŋsssxʕ+g̘wuaX|ƒ%KԵkk׮qqq>>>?i^^^aa7|sɬ,4CP۷C4dҾnҒNiWQBTSSs%$@ JMLL6m4={_paݺuׯ_v-@ؿ\.YZZ7o{BaSSӠAqE0z@&x< XiPQQq1v+**:>qaduuuھT[[H$F D"JOOOTx|ccMss Hljj`0 #0@RwwwS(HDѦNzUcc㮮6kLbH$Nonnstt *ҲJjZMR\#R---H$ܜJj ;::lp7nvB!x, Ji4dX<ZP9S(2BA۝:;;rR*=:ps>9-X3f\r+Rѣ۷oCT>}˗w~[EEEW^ݱcsK999?;<==?}AB~Rs ㋁BHKK;v%m8Çk׮1f߻woş~G0}#cǎuttO<@R׈-FFFlJ=}tlls_qsL ]>6+w+,XVmYXXFO4<cp8ǂ >6Y3T*Ucc#455+ `\.;`%oݻw={w(DW^HY~~#8z]N>}}www6{P(pyLLL~~F9.Bvvvo5c`Æ +WtիWǎfэtEAPMMͤI޽ ~[nhhh nΜ9Dv~"p8l0ٍ711A FV#O򈈈_D"A>t ϲMMM{駟y_Fq ڻwX,p"իW111H$իW#G|7a ,KTxb@ b]/QjkksrT*>|(HuT8mfitBwރOO4yXbq||<ݟ1c>nii144D"hҤI"(%%gƌ%%%7oljj:u͛7BQfϞ KN)jkk333CRՃ za`` '%%%֭JnzՔ)SSRRq8ܠALիWڴ%HNNNB@h IDAThmmmǎsssfYnnBzYIIQNNOLL̀J[ hllLJJa}O:FE>ѣÇgff;v ~cc㦦Çs\\feeQ,x<3gh___XlzM...z<ظv---,@ ]~ĉaaa_~p8G?cNNNddX,޾188,ڶ:::=ziڳgOnnߑ#Gܹ3\BxX<}jj`~><<<\T*ҔJexxxoS]Tdwj5 \ |J2=yuOOO[[[$byADDFPӧOpB|||`` H\z5`3f̙3Ν[VV:gΜ˗/ GGǎѣGpsssXxz#BwNRUUU}bbb~E C}%Annn,""B(&%%M8qҤIWSbccDrr+WJ$5<{{{@ɓ@ /l6)LMM.];ͦ7NV755ݻW `'ryee˗---gς\}P(vuuedd455j''}99W[[ 6 h4L&l( PX,а l2&СXknbs璓>./J ň#oo:88dggݻW( B D"B~Q"H$KJJ4􀕕D*(((,,?> O@P\x199BP(q8\><%$+++::NDST555B0<<U{P(4 'D2fp7JcCCC  OD,ߺuK*nڴEEET/a;rҲlٲQ(Jppuu;w.Drww?}tGG3AͤX,V*@P*`gKKK7R L簰8utzee%8ȑ#7nd0k׮XWOVr b144 Fq;vx.^xrH*~Wh4g2v. 633300pssb_u\\܁bbb9McQ(/Fcccj5k"$ =~Wr|TjSS;vhAP{{;ͶzcFwwR400n1J=zĉuqq6mPT+V3f̜9srss⬭52w񴴴ӧOϟ?wLwҤIω' Vmٲѣ,￿{nGGGnn9s6nܸ}ɓ'(H$`# y@ssIRT*Uqq9s_{RtŋT*`& -Z,u&ɒ9΀z>1c@ T*_x1o޼O¿ހ=|nqb8''`|]]]2썳RA} F@שppŋ1޸Ⱦ&``vk?VOٳgڵkqU*.<_5&&{~̙(GGGX,RiII7qЌ>КuW/JC(޿" ?湎qh0rSRR@L&#ϟ?7nnG >jX&eggD##@Sr,?J%>|'hH$?F(@ x9ɴP*mmmÇ"瞞^}֠m}ÕEEE999ox8BO"?`a˖----\.dr<..tj@JJʉ':::4+(+Hp]L&H`A!*BwRVʋOUWWر鉶.??_ltvv9sLB̙3[limm b]p7v\.J9`O'&&+SwoA]]])))!!!cܼy4L]`,YD"M9s&̤# :455,--_zeaa7޽_pp,X|aÆ-[Μ9sioo촴+aO#BT?|pŊoPuuuƉD2 ,⫲6@5}tMµk@ޘ1cz/^>|888djS[[{E6355ƛ6mZf@ HMM~իB!]tŋO>{ׯ?۷oںuk.((駟~|__~!**O<پ}-\^\\ B(W]]]X,3&O+V;z(?رcݻWc-Y[[x<@=d4) be2ِ!C&O\VVjժoذa…/^\~fT*J5>z@zc YP(H}}}HHH-/_M{͑%@* +**ZZZz(9T8xollydBB;+v5sƍ'ODGGCf?~<}t0v >)HrFYZZgdd:DP;wHR[[| /H֮]T*_x1:Jr`Ng%`#\2mڴLV*YYY ϯ/񒒒F{lyjdzxxOul=1p8A"OinB \\\RRRX,T*t:ŋfffT*ܼ㵶Z KKKDRVV]uCH7B[299`;v…܋ޮp?31nܸqmp@ZȘ\.H$NNN:::j~ d[!b2ǎo5U'fff^rzWTd2PXXX>51jVr ɓ'd2ǧ?;H{{{~ cr8Ɣdj`0fڽ{O?dff&H&Oܣ|ɓQ)BFŋbQF}.]*,, >޺u !(p:n@ {+N#A/_LJJxd2ٝ;wڦMF^RiRRZ8qbRLOOQQQla0[[[OOOJF"T*uРAL&KRaXKKKm "hjj0:noo`0L&t@D"LRAhTT#Acƌqwwqtt򲲲rwwR̆ B"pŋzN&7L=|РA=DQTFJÇkn<occ`ll`0h@bcǎ !NNN355uuu-X,d(kԨQd2Y Ϟ=[G X,q_RRݛx<h/ q ՟ J֦¯= +>={6) TjhhӝCoo d}A&eeeP(__߾2I*Z"C?nggS %pXlᄋnvL&Ìh* =VrMMMq ICffft[mnjjUTTDGG{k_ݳgϙ3g233Ot\k.X>kmm%!/JVVV߿ѣGk6=zh iRRҡCs7a\paӦMBÇ_~wM9CVs8ز8\.[ϋ/uY[['JП8JKKgΜxX,3"n߾bjD>{D.ɓJ~ʕK,3f'`Jd t:Dq@}}}?EoeeuɥKw>}4===88@]]]oC$ɭ[H$RDDĴiT*USSݻ ~^555 Wvttx_*1Lx>$x<ɓ''Nڐ⍽q@wVTTP(''˪ꎎ>M 0 ,,,p>>>[@@8NR=zyyy^BѡFFF*˗J ΓGl:::|||K$6;;O`űX,:;;vvv3f$''766vttP׻œ777sss0k=;;BR1 ++cǎQ(aÆq8F.[RR~ennnl6ŋmmmaСrP(Z[[\zĉx<׷1** ÕcXПcQZZjaa\.Juvv61bD?ipe2YjjnqX`0^mP(---?fnn?~|iwwOn޼ϟ?~[ZZΞ=w`W^l۶رcM8%%M:;;-f"XpH$ Ѕ[YY^:>>bj D"'LP(JJJkjjBBBlC6tÇ/]0!!ʊBlܸH__RPrXF1\zuҥ$_~innvsslmmmjjT(׮][lL&ST6...((rɓ'k׮]bży󺺺322>Bhll > j5źyfttt_~otttܾ}{ҤI:v~SRl [bqcc"ۃ?M.!Ν+W<</ߨ@Uvb?˗L&=qℙtuu-**"t:,f񉍍呑8˗=dcw=[[[Y,֎;ҥK?A$ϗdW^ (33\KLرcE"vv… cD" 6deepH<i`EApNVr,Py9++)SSAPWWי3g_I HIs8pD"%&_U{hllLKKKJJRTR6|||;zP1bDrrrH$5557oE R444TP<USS 鏒knnR}ɀb4_~H^H  }PPC~~/4]C kjj˫ PT=d'9|o}^^^Dj,?HkVjĉeeeUUU  b3֖Fx##z B&HYRBZZZ`OVr**##O<Ɓڊ6oZE }ht@@mt7h333P?fbbABllE%Nӧ%%%6ma0CCC2Hܹsb˕J%N߾};FSsM6Md'' 6 0sԩ{}7pnO޾?;L&2eJc4MPlY* Ȥ@ W\}{rm볣P(gFDD_J\\\{{;^|ш#v=mڴ.lٲSN={zcǎ=~xuuuHHHbbQL_ f!ȚoN2%(((''Tr<U9C7X -[V]]]W.'%%-Yso{Ϟ= v%ɩS.\޾};44|̼<zXr*8 ?'X,__ھd,99y…ǯ\2{춶OtFVVֵkgϞaX tC,>|xժUӀ yĉ_ 鍃 H$YXXhR]RϑWK~(d\WWd97ciiB덌>ZPܽ{W$|1@]QQj`ÕRÇcAP[[[}}}HHW0vX jΝ&BPTWW'ιb9J4JNl 2D&&P*~V{/UgL?{ ***:zHZiV*F͘1***c{ B!Hl }}}V?P(O+7}QQQGJqxQF RiAAkPryuucHTSS#J5GLMMJ%nlld0K>x:`jjj \A/@PSS3t; JZ__k"(,,dZ썃 2DRJsj[UTT 2Dc7N$Q(f͚Tn\.߽{wmm-HTTh4zL&6l3P(JKK)u2ms3h4%11gϞ?}4E5s΅ ܹsbx˖-//uAtڵNZ8t`8>p ܨzPV̍rit–WW `H?:eʔT~a\.HT*@044tss6mڣGzϙH$ׯ ;wnqq1,Zlmm9?E(w8ÔJ%~ }}}UYY&HMLL/_~رs?~޼yAAA/**3ۮ_=sRe}||ZJeqqСClX,ӦMcJ:ujdd;w KJJ !Ξ@T*W^T*ϝ;bŊ0zͭ?z |wg@-))Ѿ999%%%\.p8O<镕/_ޱc\`T*>,.]yfիWk˃ʢs),,rYYYx??tՑH$q\AB!h& /rDp:J)Đ\(sĉ%KuDD[[()) |BdWW |vo߾O4oIDLL]utt[οٳD0l6#㏏:D?pEEEKKˏ?Gǘ^xfvPl6}{LNϤ$g2l6ͳp6#;'\(:w_p:<ϧ~zi"|={@^GׯZJ"dgg߼ywKRPVT.F` +o fffꚚw\uuu[[[qq1(#al/T*vtZ ET_ucc~3B {[nMJJ |#aJ2+++~jY,V2 Gj޼y\.XxGFEࣺH$L/‘C7oޢEzzzMÒ۷oW,--ݼy3 Ns ͋u:L& ] pLLD"%kl6[EEߙH0333nW^ylV q\/^w766iPud2ڵkVuƍ㵴=裁s |>_cccFFF@lvff&jA@ x'~ӟ*^x9s}7-[rrWWo_r%!!!++?k=Ì2-h 嚴umͻvڂ Qf/^|ʕzhmA>h`g…#!EryuuuUUUmmjmoo(RtOّ$ɯw֭8|/+WNzO:8 GYdT*wpږM=9Aвe˲뛛I,.. B800PYY ʷ{y ZhaaaAAD"ill cpT*]d xځ˗/gggL (h4޸qG`0ւ* ?E\YYr(ZJRvf /|>_mm-Xlc=6*XիWT* lm۶MP6##C"\RR͛7/**1...66vŊ<75W ;v ~7_JO?˗ð#G{)MAKKc=vq/Ylٝ;wD+**q. Ï?je>Ť`"sw9rdٲe%%%kZkkkDct@0n;!!!()Š.3\.㉎BTB└;wC`/((/G%0q8/ɘ0.:`HBseC{bDQu:ƍ'M̴PTw1 A1G 755}㧿x< ^z333d#HO8q3R1ŝCͭքjunn.S*!9Z I۷o 2./]TVV6iP%8S˗/T:*(ZPP0<<s( |Nqw嵶 OHHX`sn73; 3{!{ 6>*((XhQP===x-HDGOw:FQPnUR"lcyvΙ3*r0V#e^L&TlӇcH<υ L&Ӯ]BƥLJ/_Nw`XRSS_ Q*JE"Crzn4e2r577gee*H8Ψr,+++ jdLOOg|Oihh8s#<'8ǫ`^t)t\^wҒ (`ԀyyyH8j폫*dQd7o޼3g 24{,~^٢ }a4Ϟ=_VV ̙36lP(tH5114zð,+!!nR~ $In4JscMZBE$r0X̛7l6,`fl6D"uuu6l㵵$I.Ze5MNNAEGGO=)) Fb0aX]]]AAb@ϟtDEMT8RRRf(x,Ү\„9Cr_QQ1gΜr R6-@Qf_8!,+--M"QŗZ߯T*`aؤ>mArKa@$++ntQ-[V__8f r@!@z-Z@$AF/; >o,Zjhhq,|>b Cr<ѣG)ڱcGh*pPqÇWVVã6up0T*cn$I(Ha$9?͟?ux%R~G35r2884 1$7>+Դn޼9AAv=[XXHS(:qEQ3asΥsWl6ia8)))%%nb Ȳe`b$90$7>V#GrssKKKC͍phn^!P.\2ͺn7iii47/ 'CCC)))d 8'++iV&i@Dooo\\\P /_vO>***Ƒ$xhD (&999QJofTYX %YhfffOOϸ# srr4^gfm8Cdb&nH.''!9>ҥK0 oذ!۠r〮ގ * An@Q4;;b 0Rf-^h`87= r|>MgŊ.Ot:)b۷o'%%kAqFVV g"q\c9v].H$NАBx(D"lٲѣLb4v+˙p{k׮ 9(8t:]MM }R# 4 [nT0 Vp$9vJeē@ m4ǵ9ŋZmww7#Tl %9 kjjvܙZ =88aeWQQRLJJ&˓:;;DY GJuWW*Z0 '$$]|9@[Sǃh 1$MP|z{{SO|.\H(J׫˗%Zh4F"999FQ2>;B@@?JJr~5k4660g$ H$H$`Hщ'PݸqcȺAfŊ4D&tv 軭hM0as2k (j)ay.P(Fc뿸XT^r ܝN~Ydqƍ۶m f}**??>W?~` "%%%$a2> raE96;Ep eTՑMMMi-\.g 9r.\Wxf#UUU0 /]4(3677E$ |$b%K.]Ĕ֝d ޮR~G{ \,nwAQv0 SfH^aOrWGq\/^/**X.5111>>^'55ypQl63MC̝;;)H= ]KKDEff7ju:=`H^F9y͛C*vKKKGGǺu[Wz$$aF111rP o(oZmfFxA%v3u=niiqYremmm&($cH2 ***hv`]|9--~yejf+//-N FX,Vj IDATsس̈ˡ~2%H4u$bd2h  H~~~NNl6 Ir}< ' 񺺺W>s+OZcǎ_>>>> t~gk׮U(Ss.l:5L'55uѳ좢Bp_~eww7s27x<0 ϧd $9$oݺzpRIq ,o *O,H "srn . *0~3\jjX,sN\AJJJO>sSz.;njs%%%aAaXUUJJJJ ֟v˧[nn['ƧAt:P8=/.. u  KKKM&cMp7bi&w_ܵkvfr 2͇ 2IZbM-7 ;weaZBT̰삂*5m, :::RS׫h#^!{E=zt˖-**Bn0Ŏ=[XX|ƌP4y,FL& J7x<**j4޽{whh($bN*0vg}P(V^/8\VVB Hvz9Wfz6`֖8>=>+P  3:uvL&cB+G0j IMhq$Ivuuy< De2JJJ#S2ϧy#[nV)Vuxx8999(0l6'$$LfUPPm",Vff&Ͽs#ZSߟϸ+;5k䄹Cˍ0ZTfee$I޽{  Ga p8J2Gvvv>e֯_iL1# >|866vÆ a.r jiiikk[zuPwIf숗 ܬRl6 WxGGG\\\tt4lv0 '&&ܘ^x1ǻzj`FdݼysΜ9L'[[[7nBnP #W&JLoكSi#J\.R_$='Od:E>YR1$wߑ`8tPyyyAAA>8n7ryʵ4 b,9Ahxooobb( X;aYjfcr1:!Y}APuB6F!8t:]MMͺuB{`XDHcz,yN*IdϯbDuvvfee1lȱ-7 ݾo߾ J38Ny2K2f϶x<^Pwy<pԍ6A <888\.wZݻLpSAf :Pe09nݺ !7<^W˗/WNdGG!9NT [n8l'.5###A4PE,Xv>qW[[rYvgن*&9 Ξ=k2v28`HݺuK$TЄvߺuKRvGQTiLoYxzz:}$ICӨBQ8Mw|||qqqccNcf9".人.]3.8v/_r:A!v Lo{zzd2YPe8=BTZTT_;Igً-lj舀 `} Us8]vmǰ!8^UUҥKC(]TT4LoRyyyAz!ϟN$&&qq0~cǎ1ނ`!aW^۱cGc'8O&&&LJGBh@o۷o3 ZrEP5$Il6T:3(Ν;WбFqry8p#<rQ~r &'''ޕbxz=͔7":>+77wb)JhX,+))IRUUU1OL;Cr3~СKF 68jf+//9- WЄBazzzcc#c9 S" )JmKJJ_ND"QeeÇf33 L;CrӭΜ?`0|[ xŋj;vl!Qe4/\sΐk|> ø\n$7:\vm޼yA)$IXТ`xAe_4XO?%a;{"Q x/&&0([ ԫ5!q8d_j:`U<EfngzMb>88ONp8$ub)JiD@DRl6BS`Bڵkz{{ ™w ɹO?T"Y&e\to۶-X3ð*JNIZVPw(*4S266f3)fD˃z UylPDŝ#JCcV̧&\c6mڔvǎ l>|peee8ʒMKKgD$LjY,V\\\z^(Δ EQTj0kEJ2==!7#,{(|뭷v9gΜhPѣGsss QNgooo^^L\.W*N|ƌ`ϕA‰L&3ѫVy ---b>d 6lj=Crܹsp8>r`^"reeeTzLC HRRl6L2=l6Pz<@0J}RR ),,a:#0CCC"(CrAڭ[*H M[[[OOʕ+eM$<OƎc08 . YYY26`BΓhX,3G.8hD۶m;>0ZTfee 8PqYT   ov'$$+nf'JB!(C_*((9~8Sa'Lo q}߹suÆ Aֶz0+L9sLC7JKKknnfMx<^+>$I~ĐjYgg'l9P9XwArGy衇RSS#bW_I`s "IA+YVl|]pܹԞ r!F 222Bl6[I#(FVK.Arssl۷ ;" Z~^^ŋ#E)8n7B6vð`Fe%' E\.п4dCD"0z`bcc1 A(J.\xeIp8Ar70 ;|ww3<~,rn Țuօi0HIIYa8&&ɖ6v ,HprY,VJJ Ar8e˖YFF҂0EQ9e0I/bӦM鑚Z$C΍Ӿ}***Fx a5r m(<`LL Rzϗ6z&IT#~Fp! H~~믿nۃyxT6zzyv+Ut=@f;~886 (RXnҥKJ27771m6۹s,Y"|$bqttt $p妤444TD+H$ ةx<C*38SED2-bcc*P]WWe~)qg&afXEUvtqϯ(;y('瞻|2-Lj?~l6ݮ!dLLDi&ٹ{`e:EWZN)K$tN ړ\._hѭ[vTp2)r:n[R#\.bq8.!%H.]ԋpܝ;w޽}…`Rh^~ePx_}bPMR$I?4=ο;z~Ͽ/--eX, A&kE5#:K]]݅ }l:8tO D"Qmɍ r&&&GDjC%Xy s(ܴ4MJJJaX}}}a!۷o?xfcDv}+rqyEo3QkjjVXl2YVVVnnnNNPQ '7 ^hrrr"Ҏ<^bS 40†xwwwRRRX(&&&p8<@ooopVZeXnܸ$O HRrn7a8Y`9ІZ*0s R6<|Q T-7 p8:.777A|l6;@D.gY,ܹs'XbX鹹_}2XSSSXXPx0 17+,7&''G@ '7 zرLJa_?NݙrӰagddP655DDGD&Վh"Vx&ՉA& p8\.K17媫&IZ>00/:EbtF r8i4g ÚΝ~Kdj|AvB1{6;@lJ8@FFD"ihh`>֭[L2300ܮ6ܨdPTx3l6k֬;wD"$''d2&PU*<o0?Ç+++#]$ID+An$IT&1n,XK4xmH$'r~(ZRRbٺkƒӸ-бc >?҄x<oؕ=[XX [q8*IO"JC_릤6w\\L&!beffΙ3ŋL_qVDEE' Gp)Ӽ:::6n诚8gΜ̉ fʔJe`GGq"+bccg0tú{nBBBar$I昘٦΋D"\n0B;=Э[:::qh4D"WIӞ 9c$W_Y aA6 L0sHxAÆ ,YڡXDEEm޼d1"B0${O**ڕ\.<<| T >}3rڷMI$At%IEZmO{7c$OOl6;"NWZZ/p"h )6Dj4>ODJg0LSx"..SkS'%` (x@EIB A)`ɀ2a#~ I =G0`Yg ɍ8PUUP(6nܘ_f)ʷ~ڵk?RSSyA*?]rc7|_~y=|pmm+2Ÿ|ȿWΝ;Rvk4\YdOHHp8z{{A|itt%M&HMMvl[EꘘVt:}>L& m6[TTTNNθReX4 E.z{{1 C$...&&F н)55 9s̬ϓ{9xXO?}[]];}6԰?9n7bb11޽̙3ܽĸL(b(`FFRf( A'h0L&A^W*&''\.V8VT\.,i"EQ?я˷o>=ZSSx<===#//olʐb1  6x0__$%Kl޼?޽{!z饗b`XA{H}*J.r&t:q剉^P󓒒|v8PHQ n[ EEEGB׿njj2{ٶm[CC~aWZT*}mh4IdBBT*&{~]vٳ|ܹk֬ٿ;3'H{}ᇉǏH$/ŋ򗿬\rԘjAϛ7OP8q"11Q,'N^`Aaa!GF$F֡CVJMel6y<EQ^W&!"\u8"D|8>< Vw7 EB"#:}ILbKzp (N*A DD(r8Qcx4Mg-bqłx||@ `XJnE IDATVHH$BdԘ@FQ`0Xl2 rׯ_/ZP(\x1;}vWWEQ<`_sA [ZZaŏ@]@Ųv;WRT" E.`mdT ˗z=É---rn7Bϟ?njllbax"bR!11ry<].ؚF`R4!!7gx /r&Jz'M?-gہ&ccc8(Uת, Lt:|>\.Jtک|5lr ͛w/QY?)-W_|:>ryM6A7n ? Bmm{/":p@jNqodp@#c`b`bjAXVPtjZχaXoo/0q'qP588800r@5s0#^"dOV dxRX,zpF) `Z^WכL&<9344rAm#vn7A+|_2===N`4_8qbdY4 |ޡ{/qFQصe߾}o޽{~ L?O_|Ewwn@0@ h4 @@HŅ~6W*aniio~յm6V^+={v>x<|>ɒ%cGkMJJ|^Y<v)>o&AVAqOAAARRRjjjEEE\\ >z]㓓srrRmƚq(T\L_[QAЩUe2EQ8x0  XKJxlvRRD"wIEL&\ d2 PQEVwww p@ m\.W (@7 6M(H$(JR@@a L&{hۥE( EQ\P(8\\?޸!N'裸_څS,$Q>d>̮EΟGA^ED3;vsdRJmڄ5 jog54 O>{XL!BZE׻XLԦMe  dJ kIM3p87& }tu:@Ƃ ;@H`No.p= ;7nͭ ,D. Y,Ovv;xeHxƙ@ H$F>ǴX,(?8G/^,JΝn:PT*0 xQ/ի]fXAOO^DDT:L&52IcsoH$4%kS,/_|d]ESSS/^lX0 3͗/_^zK/h~~>6mb)wqqqL7BKJLLLHHZ7n/~j86mNj.#Aqojj$I%''x& EQp8Mz?,Z[#[D…֭DL  =ad B6!nH$ ]===f]&11Q$B9~aovZ2@xsS(BA`l#E(* z=wmΕM0C~*qBłP%pߺ嬪rGQH,F)(6߿R477wL|>\(9w:Q{ 43㾝D")-- ~`՘fS@Xeľ:~8(WPfX?/^Oz~hX|>FHt(* 1W pN┶6s%::xg,S1%V@ ` |>Vwor8Qc( \:EEEq8a`Q5<<M,l6$p8N'EQ`g46md4u:8Fdz77ZG|>`bPR^?<<f% 8^X(,$~+/Q\?x=0<< {2;ꫜO>AߔJ>pmo.ެ,SQ f0 H6EQ̯n/fi<H53}(Bx@slj(:N ct9&S@EQe۷o: 0@b^pʕ+e2YUUF,U @x4Cb)))(txAv Iv} Lrׯ[u}}}hoo]Y,]ӹ\. )d2L ==CCC~muyh =R%0rL7Rf#v|0L(7LsxvQVZRR8F"a8..orQx@đgu]p%É\bbn'IR$I$ϗ tb,ʈ|jkc_/-%+*(Ja0PHSJ%MΙCeeQ(3@Tq1aqqg?00L!9N Csb%'S]LPZJ'X|&CX RbNJJ;BaJJ >fD"G ʨ('(Mq*%EIIIQ(<؋[AHQcƂsE-6w7!!aϞ=:nɒ%m޼9++L͛7^M(&''=\*`\0 {ާz ø8Hw!I%dMt%1@1w8rx<㶰!͖#C2QSSS֮] ڵkB@IIIQQQ\\ܖ-[@őW%Gzo{ɣE9i=ܽ^7o Fй oő#+p{ϝKoO! B@Q_RXF|1*`,M!8v;#쇚;d%AD0q;z~ʂH-b1p8tKG _G\gcc`QE| :99ylp<}dggW"|}OhooV:{?!9;^S+VLQL|7㏧1v:::'L(Nꫯ*ݻwNDGGǾ}.\aaءC^z%s>;?Vjt|C96]cZ(~68~ƍӧO?S!t}&>xsEQz|>֭!+= UرcܹS*+Jַhv0իo޶m[FFƽ7KMM LΟXr wܽ{ԩS .\h1 Addd0}bg3l6ѣG=e&x<ǎkiiy&*eَ?8"?\jՒ%KI "R~cH>BQQQfhOO?8hlٳg]o}+l3g\r' qҥ[nر~jݻwy Lk}VŎpw8 bIqW2Ep:}f{嗧p-(wތoՎb0Kx?~7x~q͈+W9rg5_|wݜ{N{n:Ef0 y g4GVơyju:)))ӟ\{…+WSp566=zt͚5֭ `vϞ={^{-L^|nkɎ;6 BVV [w$b0(O(2J8ߺuŋ=Tߓ'OlڴaY ._W_=03gά]dbut ~ԩ=f@<Ԓr7 (w&&&uǐoۏ92o޼+VL׾ѣSw hnnx/^<:t(33sts̙ׯWVV1H Z`Ob;Yr NrK," ,"GDgh(Ljlƈ*|`qNQl!\dD>RhA ڹc{Jr؇m>k! m!#taZ^=I">&!9S_RRRҙ \gLî|-m55yIDL=[Zھ lPV)b6[<5K:55czʄ|֭{J:m6˝ƺ`"GFN[7lV=D[u6o;93784BK'IWjo_P,Q\d/dGQn5hXZAYqa8#MH\];wSn__,U кݮ/pNff Ӓ=\g=k{dĪ9$5uVkBBRQmfa>2/ V)OKPuގ["ԴISz3KAz%p˯VT<5'GqU׮˗-]nͬb8( ( G}!ڰ~ `vyIq|7o޹sg ib'yhh|> =7EX,$) I|_ qٜ/ f#ef3A#Qxa4&ә3/[٣{ î]>t3O?9wnAg!a[8ZcJ$?zZSKƍSR/ZS[vҒ&9 zSgl6?r^>JJN1c>vx<Ţ9EQN >?J2YH$5=Ta6[~?[h'gV&tN> 7D<ϕ/^x陧,(ȟ=-ǰCrp?܇a;![k,^TTXXc"Iԩ6(B L&[岘{w"^awn,(#|xGGglPo$r'?8C$7e8yjKg3Ν00ۼ">>.9F^+_]s fml7EQ$Cr@q:O<,Fg|uuUUז-]RVVh4/蚱yfí+w$'|E$I;# >wQ;i~4IwOY {ǷqlVNf$KO?-dzsc}>7a 9va=)pr053*ɉE"dzIgK$"cɇ{ ʆT*իWZe{P>m@y?[Ho H O #<6e7DTQ~![UXE]Klu4ձz'XaISsPh`f'|Bxc4Ɇ:ӡD$y^:N9~}ӯ *֯^faaAPT*JUTT$Hx<zJ 윝=$b' rfX>^!0 3MMMeeeH a  PG'fB÷tuuuvvQ($L&^CCA&rQQSW]]=n8u=M BN,&1ܮ3TJX*daX a[) Xx~_M0PUUp8NNN!+f i0,Hb1gfs\'$ (ɡ@4ҮMMMOOO"=\mmm `xEEE NNN#ɵfSSS%ʬ,;;|Ç[ZZO+\sLMM=<<|mBaRRAAAAxC%9,+''I$B! H$ýX,'@.8YJu(޹k<}{yyjd2P;X/^100Cz=~X*Ciiivvvˮ⪪777џnp `,K$@ p8D$x@IJY< @Q k0yꎐ$IUUUffөT*:c?~jjj:lvddL0 |xm%)WUU>}/,,l$ZJDRYYy7zyyBRSSׯ_oeePd29ҥK544$ eCZVB`)(( wp$C;ɜM{RTvgnbp8g](\vm˖-/焪˗/O4)44tH[ W__6P(,--|իr*OII 8q5p8u@TTAAyC>A{w|<7PTW\JܒW^=B/Xׯϝ;C֠@`2n"HވD*6ZHTVV:}ɓ'#Kɓ'i d!5>Y5ݭ ܫ>(PWvppɮ!nܸႂK<?nܸND2d2$LMMOs(ɡ>cbbfΜioo?l1d^r;22 [(//FSRRkA͂`CotROOOXXؗ^_*r8eeeb1VWWn((kkkccc]]]&Jgݺu#tDǑ#G,,,FҕX,~EBBۦX,NMM qqqAhwyGo!Jy<ܐB} PI񝝝/_&H ,v>.;r[ ;66vÆ #d8PX\\|ڵS-$8///gggb)))~-p#9vtt )5 ý fPC1dqwwwHH:6rP||޼ys̙#G"<{,))ZGussswwG0 {NgggZ[[UUU]0֦i8P > 69; 0a'_(Λ7ot`0(J@@ *Ο?s~N1L*\,D&&&<ɡ;11q̙s;`[jrd]xQGGgÖ\߿nݺAJ3*|rRiGGǟ`>yyyOջr`G+eF%9R!::aI9ΐP0\SS2rcX/_߲e F{eΝ;,+88x"|evuu%$$p^lu6e2JJJȕ.K]]UW3닍UVV^i֓'O*((DՉS'99Y,9@[yy-[vKNNAxK@\QQ|rԡ}I𝝝ƍC .[[[Pc`쌌^}/^Í-x9s  ֭(((h„ oS0\VVvYf )2s/Rr^+ɡ@t(KKK+--3g0VVV#Ⓚf={˗;v! usvv~I$cǎEDD899!ŋ#Gn0 69c m\\ܴiӆq\fa}e``0|>Ç'N3g:cI"Dkk+Z[r2\LLLww;F 'N466޽u|J@NN +ɡw,33|c^^^JJJdddPP:cI"D___LLʂ  UUUȹgffZJ]]vܬ?³Jr(> :;;ϝ;gcc9$źH$*..~nj3PXܡJKKߙO X,֝;w͛3>777999449ܿ…fff_x VXNQL&3..B )_2c ԗr,ƍAAA#oq8w>y300_???wwwj1Xѣ{ϕt:LFnH$\.JcjCvM6 d2-Z;߽VP^j]]])p8LBC*_rEYY988xxQ2p\`]h uPe0AmBuukצL26} 'J((( OՅbG+Jr-99y/fffnnnx`0҈DbPPH`0lllfbrrr+}}$B0++jٲeCb8\__5?~9pvv111|߾}[lf`0DD"QTT\d=?zzzolٲ2 yyyO<Ħ a޼yX ===/^@f0:2779X FǏC`d]YYYWW`ן=BYY@ tle@H&*uRi__% ޡ駟d_W(F&iaa!ͻv"VVVFFFX⧟~277 ѣG׬YH޽{3f̰qݗ/_،c(<=ztا/^hjj|˗0aFmZ꾾ӧOs8 6 1!O89mڴACoooRRPa2L5""bd (@IPUU]tk \s$yyyөTG~ & ]-Z4"aXyyy7o\TTb-Z4k, FܹdѢE͓?|۷E"Q@@m *,, <ÑH$_>z(HLLLtRGG˚5ktuu;::=A˿۷o>}Z(.\0<<@ ~ݼyi#g͛7/X%%%?\*'55nΝIF)S^mڴ JҊ~͛$T p\"y(BIݧ,;p.]ĉ_}Տ?hmmoeeUTTdjjᅬ?vMMM eݺu?C[[D"y@ ɹzId=O6-+++,,L*溹ߓ=bLMM:Iӏ9.67n\pdZ[[ܹsHab2 … ]H$)S]Ç۷o (11q~~~?ѣGl68?{lźZ`*JOO߷o޽{wyciӦe˖-YDOO/::ZAA޾};&&f֭R_UTT422zÃP(qƓ'O֭[7¤Rȑ#ӦM # .\pqpC(- ;vsHxڵkO>?o^^^ǎʇꫯ^1UUUDH$r/^6l ɇqASNݵkׅ >}VXX=eʔUVҶ1<<|ŊĉGoxfXǏGHZ0 Pԑ PwoW^={ٳg:;;'O7/7n âڵkt:ŋ|>tppHHH߿?}zzz{tttfggݻw_} p!X|ԩr`UTT\reƍIIIϟR_fT jjjc|~ SLyYCCP( ((((88Z__VAAL&׏?(455utt?n:&zݻw744@rJkk<Ann.K]]]uuʕ+MMMuttƏ_TT$?^ZZ*H$+H$}ٙ^VVbdd4w[[۷g˗/ܹ]f6mPc7G{镔X={%$$888ݻa---TnzڵG]vܹs[nwޖ-[d^:::[nӳ{n 91BD"A]"R+(( 9TCt8H$1̷~faii9eʔb o߾>'M%''G"^7ڊ!!!߇ g(..ՕH$@ŋf", ]]]4D좢 LMM\3۷EEEDjjjA,H$@޽{wvvv޳gO]] 8.hii-[lΜ9400  H$۷---eN^^^', ^訯?Ϟ=Յ\rkjjv:Bc*}ɓ?jSS;{GxxϯIl@;wt: սqㆢcaaaHH ,d ŋ (""BP(6]XXPRSS=7$f~%155e˖0T*`s}QDaXdd$%,i6iҤ۷oWUUπl6`D|~__}%1֞>}:B>}D"p‰'޹H$yM8)p83$siӻy׷cǎ p8=y$X!!!!D"q˖-VSSp8/iaa^`iib /_s6oެt#Gq8gΜy700* g},`$nccVVV`$7mK___]]ݚGG'O$%%ڵĄNxwRÇw''Gm۶9//>x8%͜9+W^~d޽;==Ν׮]#{IJJJJJRSS311hiP58Á(Pdt:=>>-Zyҍa !!”L&X"..Jŋ+oaaaaapfϞMcccx|gg^qq10XXZZ_f}"8Ԉ4 "H$`0z{{\(0CrOz0.N>}H$͕Ϗ[p!JuttiRѣGDUU˫L&[YY쎎Yf# $XJP,--rrrLrFFF===VVVO>mkk#Gh .ESm,((سg?++kڵoI Ν;0n\|_B.v\xp'N|S_~nnnx䉹l= Ǐ8FFFSLV fRZZZrG566xKKKss  ^YYSmmmDbnnJ۞WHmHLL;vFYYýG!Cb8xy@]t:}ڵ+N.(ވA.̴655EFF^~}/ӣ߿0˽sssE":> nܸhѢ^?x`…ţd@ՕX#J9ꁍm; {zz>{l,)SQg쐐. b޶mPSҢ|AJJJ$%^7nɒ%(á֭[9 pyyy\\ܹsK$˗/ ?tWWC?))G<``P˗#G;v >>x`rd2!iɓ'#|ܧLh4iii***wdX L[0// dddBֺ>|khh``~yII NoooǏ?//͛'O |x#Gp8:Bѣ.:}v*vZPnƌϞ=733KKKI$Bٺu+Hd2[ZZ̙wߍѸwիW<88q8;wXwz0<1N"\tF޽,T$VTT999$;w tBaYYǏAwwwԩS ޝH$RT*:k֬˗/SԊyyyp}~~~UU &Lpppx)LsΉ'[ZZI$+mڲ'LPQQ9N#W?QGI)NZQQQ__k׮gϊbux  @ %?rHccHCᑗw[[[.+K]_qݺu+**999gϞ:ui"//j*&b T$-ZD"m۶`ĉ111vvvBPNNc}iiiVVݻ'M}|| h7nLLL}:,,ҥK 'NHHHtRYY̙3kjjv1nD>#rrr6o,//cGGGF$K.:]}}?R[[Jk.^b<|pbB!=S%!$Jp%%%KKǯZ ᢢ+V*''?>uԣG?~ʕ+6lhmm}Aϟ?ahh`0n߾l@K<n<bm3:ܣxc{{+Wq8\VVp8۷o葩iCC/V... ˖-kmmǯjhhH$___4&< X,GD,luuu$L&H5AWZZZǏ/((w޾}!`0&M"Hvvv/_ohhXhLVYYxb' \nGGǓ'OLJˆ ;w׮] LX,a J};wN:uƍ @s,D"0?~fރ~$IYYٱc""",J/ooy>@l4 eD"$քaܸq]]]d2y„ X,V,Cdaa1n8l߾}9::/<@MM $5mjj vwwЗ/_.S M[[xXc1*9dJ䐂喖Ι3SRR=wBwb1˅ bDby<GRMM e@ [n DP!H,--Phnnljj'qʮ.~1sL997 B"bͯ]VQQ1iҤ)SCokffFR_hS~PTTVSS燼瞞SNϘ13A***K.AZHViH#Ν;dL@vc. H DƮ]6==:z'III)++R@ FRP ɍ%|6z ىy``G###A ]]]uttҼA(n9w\khhrJrrr066N8`AB777GGG:HҾ0t̙M6Ǐ'4-<<]_Aٰu(4UnݢhC6s8 6|0<?{ 68qb֬Y UUU*--m̙Omhhw^tҝ;wΟ? x611Y~SbccTjHHȲeˈD((#22244TAAANN.::bijj~l6[AA *e>㵵ҪUZZZD"!(-- oTVV>\r#""444k>ܞ:uCc0+Wpe˖AAAjjj}e޽MEEEˇ8n͚52I&YXX|7XƶO>}!L/D&&&JV!@⣢$<<<33s*Td2cbbׯ_<|[(eee~d>p8`M6l4 jjj$ZPUU:$yӝP ]*u%Jr(P|Tٳsʑ*+N0\YYyiӦ}>'V##QudAIBPM5֬Y]]]s1WTTښO9[[ۊ:4|i6p\Pr/}ԩׯ˂Ikk ߶UWW>};eGGɓ'ǍpB>􁠺\񊊊***@R50.*//{}p\GOvfDb /UUD99WTT\rJ?ٻw ,77M6c7ȨZz0dE m۶mHL8QGGԩS+*Tܼy^ÉgX+W= X,?~< Bq͚5Oww7O]UU>yd@ظf͚ iӦ>[[[/]m۶&pGGh3$'L>TUU i޽K"mmmϜ9s1fg̘bXH$yyX-,,rssq8 ~WmIIIb844}lnnmV /((Oŋ~2p8'Om_%9(6y ͛7o &??ȈBۓHSN0m*((,Yx!^nݼy\\\޽l6733PTT466puuˋ3g… ;L-Z|yDDDkkkSSv F>y:<<b9R)Ʉa_,O2 &qe2RT]]}׮]mmm?ҥK-[m!P( < A"y Š)S'(P^_zUCC egghɓ'?}}}j)`uޖH"<_WW\__/JY,Vgggmmmvv?YTTdkkkdd$J1hjj266սuVXXիWgΜ loߦhihh677b``>_?bcc~-XIDATcUU 6J w.^NOİ0%%%EEE`C`0fUa444 PEEefffaϟ#ǃ^)**l~mPPPll'&O>Tm_ --HT $(J?~ݻwTjiiyy/ C"nZ\\lnn w/̚5)MQQq5Ǐ ܴiӭ[:::ϟO??D"_аhժU'Nػww}c:ydllݞ={:`e˖Ϛ5‚D"ijjܪp8+}rrrz>[]]oUPP}Κ5Ç7n$MOOollhnnrƍ? (ɡ@T*p< l6tx333/\0o}zڵoW6>~N:5H}? PxJo&O>r_?PߏOu_PsZ@ d2yƍW޳g@ 8tЂ N8QXXgϞƕ+W:::$$$Q3YRRbbbr__ߺ:>Հ\V[[;g'''oop%KXXX;M(&&&_~ĉ P@?bקO>ePׯ ILLܰaCtt4H1wӧO˲ݻw .LMM?>AtppHHH߿?TWWt3f/`ُ?>UlllPC1zflkkp8\CC_vPڻwWŁ0 Ao|A4> >Xh'b%X   ml-lSDb`.wٽ,׆@|J ?bZv;\u>GTr\E5Ml6L}YrVqܿ-\.rr_!4M[,njQn;|>gp8 )d,$MӚp^ /ݷz5[:~_*Y[l-e/%K.\zᒅƗ, V%˖-Y",~eKde2[K^}.>^,S.\'p]H,\x؅/kmb4,dy:v~3ӧOGCΗ D ށF;R###dͫW٫2;2llu=6o& <;{:{K!';33;c]l(ժ2Xo.\V?)pl3 /S՗շ~36Cve-!f 7|pddhHw 8 c#Cѐa@C#&/ ǾNm VOwM{#c:=660T626vB|HeqZ񎌁4 -p-U`cex_w]/ sKr*.r&OAX Z%bZvlz8lJVpV&M/_n[herWȤ^Z ^Z=4VCuD+yu7b<ÉB99 t`#^J3J)F\794C4̩hrX4)#Zp0RK),Eku2-9yA<נ[darJ:~F̖6:մnj)oo56mjB]Vint[^*kaJ{m 4Nlaj&iϑ2tÜZ8!> R#$D 4F"NK&Yq`oW'BCC8@Ja~!(} MBJ*V#N0yq;r+Uss=ƙ}fl ںD¶Zpʭhϭ'c`aF{annkOVkC,NKݵ9YX*$j Vv곊F yaa[Z3h}BhVHhnpk,UIUv{u'Xt9V=b>OY-Ui/W N/!sui? кكM<a9BC6Nm1Z5'i>Nv5Z $ˇEPC̭B"vS6Uh0V (jjomk 8#-pH}цTIU-͒β8^koZ@T6}0h(MMMu8;n!Xd? [=t"47 nV,;00S4`>mC Ϥi6([AZʘ3Mu\K;M#Ӗϭ4L0}FMEp 񎯲F߀>ek:QhXA3ӰMpARBpBe[qS+ݢAoqzX}k|R4N8h 'm `l|hLV) 2c).>R"bEa= Ц FS[iƒ44IAp6Gkʴ{>L(7>SqG7[\d]ڔqdEk樦INJJb{ѱ6o1WBz)}/f׵'js_yel,AӤW>Oq^6|;qĩgN9{g^=wl~eٙGGO>'Oqp?irM@;4YOO='|p$ /=cǞ~Og۞}ٓFϾ«'NpWrfܱ'e}ˣOu 䱓~o8kZk-uX#N[B;Z mW_=W_HL;KhO {iύ,TNozNIUrg@ߩS/詗Ϟ==;®nh!4@;7kQڙ($DϞ"?AGwtQf{l(ZʴٮK'Y v[̙N:=$ʘ+ SSR~N-U|;3%|?⛮^47KL{&hQ[.I&%S딪䱧x^?, g:{w<ݤvO=>ylG~4OuΜڙNM+Xç~x*Ҟ&4I g(sP칶}/;O^ɩH T{GG>pʕ<wO<,L"n\g;k B;!xkWޱ21=ϝmJkAoE][S/5K(ѝ^zDMiif)N]6$4>Ntik1\=͟?'sO5\dMCfb4RI|n EiʐELWab7 HHB3 5MJĝ 2R7E#Ŕ K֣҄q#+ mbZ&CUQJ`6͐AZZX1y>eI4ډ).Ti9,2d4:i TK):*MC2e)>DJ29%Ȃ(! uA4tqOE#h(&-=>C&S$U66;,#(%t4tZCLF ~Z1(L"t.q z[{ZZ[{wg/j4Fొ,( tZạU!J[s^kRh]`Q sOhb~:qV5TKC~v0p h4Tk'F iH:#Jdm_~`Rk`~zbk4衔V6 0 ʥbd&4mMAbDZRJ +A m9sh?nA(@ PJq@Hch#m<h 4:9zx~74Gw(pL<~lG _y탫_8G |@Qǀ֠ 3)BNAe`J7 VOy=uZZ:u@#*ch 06:-#JӂQRia%U!9{A4~t$ȝ~FDa ;M Q<,IR4!$wcy.MɜAQkJo'tɃ% ihKy(C -CErلk]R j%05K~h34P´iڜ/g >Y67juJ-؏m %;؂xPVx!MRgM+}^\҇?D(%Rr/}W߿ _K4o5M̚r1h)heJ5 -dR hJ;iR)WIS4 k-P-S RI1dH &X:DhSiZZMS?Q ZT K}h5FCQLp] l2rb&f4M4&'4*CR6 ZOj]7hɚFic5MFiP\Ӏ_R4 #f)ahĤi" G$+ bii4M/4iȱxP5L!҆Qh#<hItMtIhV5)"{g6Ccqώ]9p7 sg! sga: "Iyi6Ho'H#uaa4i46np$nokSXchcn'mw[9= u>o-Pt j{."8s>k"xo`47Og0bCzl'D/ȉ Nȉވuz6k<^AGAuO9#jNܓZHy\y #>l@ z6wm6 `d9z^Qy XQuQ ul87`-lk: (ڶ5V)X}U0YNh#ghGBzh3W9V_6ג^Z7.}6GD+np qBh4s V |6k9jlh !'c\4q<kЇ#ں:b@vA!O^3dp"DO" zDo ݢD/NJȀ7(@r"!iq?6WWYPI_&a0$*4_P {nAE<0h>O B gB CD!(EHCP=d:6 ,H@"w@!'} &K80 &`oOC(X",B#b䇠D."19Hqhn-&T4@QVڕY**>Ϸk6 yjf6H=.mؕk/Wh>(e@+:o|`$G2qӏt_ñBհ6TC4hiOJf7|6 2]Y1^>DU+̵!}B2G0`CH7Xh #4ծO#o!k=U? ?Y,Jg.]~y)s~#%?̜$9ˀ]-0ghk!Hn%>!5s`ajZ!i%8](6Ki2hSb( " jaJz2C?itY$?#'D5̣,SFh-\r>˽;mܶs,w2yvn[ Ee϶4MZ8?e\jRε!t4 y3kvCM3K$=IyfG <_nSeMcA--3H8E(,1aK &+gmG؋ ?㮽w;Qh~^њ;=J'v{zhQoyHb `XZ;>73{>Bs#܃<<|d33} ]

    l(n/<SlX\# /ƂdE,t{Dd-IDAT֟-c;'v ֠Oƾ'(uyC@*ƘЪn6Ȓ!9x+F0uFid<^/6W K"SZ 9h(.U 7; {b ofCzY[ѕ[10s{iCصў[X ۃ!S@jCdИI8C- hot\XaW*Qϱ!VhvV 4]@-h6hOV]EhKVi[)j&k):rg!|׬$$.yG; M]d2sd<1"O&ZXɳG\Sp zK]VZ&/ i(M 8(L`&461U!x%8$5l EoAhbvsڻݨNl-&bĊ1xᩴi~z~G3xyBZVb܏<@tTEQyIR]F5< eRӐ<4$Wݻfk;RV|E)@e5e*5 rNCFȓ3JjE2@aw=k֯nJ"OOɳpZv Otig50 %7IENDB`cream-0.43/docs-html/PHPClientSniffer.php0000644000076400007660000002434511156572442020635 0ustar digitectlocaluserUA The HTTP USER AGENT String $is->NAME Browser Name (Netscape, IE, Opera, iCab, Unknown) $is->VERSION Browser Full Version $is->MAJORVER Browser Major Version $is->MINORVER Browser Minor Version $is->AOL "1" = True/"0" = False $is->WEBTV "1" = True/"0" = False $is->JS Assumed JavaScript Version Supported by Browser $is->PLATFORM System Platform (Win16,Win32,Mac,OS2,Unix) $is->OS System OS (Win98,OS2,Mac68k,linux,bsd,etc...) see code $is->IP REMOTE_ADDR ======================================================================== '****************************************/ class sniffer { var $UA = ""; var $NAME = "Unknown"; var $VERSION = 0; var $MAJORVER = 0; var $MINORVER = 0; var $AOL = 0; var $WEBTV = 0; var $JS = 0.0; var $PLATFORM = "Unknown"; var $OS = "Unknown"; var $IP = "Unknown"; /* START CONSTRUCTOR */ function sniffer() { $this->UA = getenv(HTTP_USER_AGENT); // Determine NAME Name and Version if ( eregi( 'MSIE ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) || eregi( 'Microsoft Internet Explorer ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) ) { $this->VERSION = $info[1]; $this->NAME = 'IE'; } elseif ( eregi( 'Opera ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) || eregi( 'Opera/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) ) { $this->VERSION = $info[1]; $this->NAME = 'Opera'; } elseif ( eregi( 'iCab ([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) || eregi( 'iCab/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) ) { $this->VERSION = $info[1]; $this->NAME = 'iCab'; } elseif ( eregi( 'Netscape6/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) ) { $this->VERSION = $info[1]; $this->NAME = 'Netscape'; } elseif ( eregi( 'Mozilla/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) ) { $this->VERSION = $info[1]; $this->NAME = 'Netscape'; } //+++ myadd elseif ( eregi( 'Lynx/([0-9].[0-9a-zA-Z]{1,4})',$this->UA,$info) ) { $this->VERSION = $info[1]; $this->NAME = 'Lynx'; } //+++ else { $this->VERSION = 0; $this->NAME = 'Unknown'; } // Determine if AOL or WEBTV if( eregi( 'aol',$this->UA,$info)) { $this->AOL = "1"; } elseif( eregi( 'webtv',$this->UA,$info)) { $this->WEBTV = "1"; } // Determine Major and Minor Version if($this->VERSION > 0) { $pos = strpos($this->VERSION,"."); if ($pos > 0) { $this->MAJORVER = substr($this->VERSION,0,$pos); $this->MINORVER = substr($this->VERSION,$pos,strlen($this->VERSION)); } else $this->MAJORVER = $this->VERSION; } // Determine Platform and OS // Check for Windows 16-bit if( eregi('Win16',$this->UA) || eregi('windows 3.1',$this->UA) || eregi('windows 16-bit',$this->UA) || eregi('16bit',$this->UA)) { $this->PLATFORM = "Win16"; $this->OS = "Win31"; } // Check for Windows 32-bit if(eregi('Win95',$this->UA) || eregi('windows 95',$this->UA)) { $this->PLATFORM = "Win32"; $this->OS = "Win95"; } elseif(eregi('Win98',$this->UA) || eregi('windows 98',$this->UA)) { $this->PLATFORM = "Win32"; $this->OS = "Win98"; } elseif(eregi('WinNT',$this->UA) || eregi('windows NT',$this->UA)) { $this->PLATFORM = "Win32"; $this->OS = "WinNT"; } else { $this->PLATFORM = "Win32"; $this->OS = "Win9xNT"; } // Check for OS/2 if( eregi('os/2',$this->UA) || eregi('ibm-webexplorer',$this->UA)) { $this->PLATFORM = "OS2"; $this->OS = "OS2"; } // Check for Mac 68000 if( eregi('68k',$this->UA) || eregi('68000',$this->UA)) { $this->PLATFORM = "Mac"; $this->OS = "Mac68k"; } //Check for Mac PowerPC if( eregi('ppc',$this->UA) || eregi('powerpc',$this->UA)) { $this->PLATFORM = "Mac"; $this->OS = "MacPPC"; } // Check for Unix Flavor //SunOS if(eregi('sunos',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "sun"; } if(eregi('sunos 4',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "sun4"; } elseif(eregi('sunos 5',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "sun5"; } elseif(eregi('i86',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "suni86"; } // Irix if(eregi('irix',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "irix"; } if(eregi('irix 6',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "irix6"; } elseif(eregi('irix 5',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "irix5"; } //HP-UX if(eregi('hp-ux',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "hpux"; } if(eregi('hp-ux',$this->UA) && ereg('10.',$this-UA)) { $this->PLATFORM = "Unix"; $this->OS = "hpux10"; } elseif(eregi('hp-ux',$this->UA) && ereg('09.',$this-UA)) { $this->PLATFORM = "Unix"; $this->OS = "hpux9"; } //AIX if(eregi('aix',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "aix"; } if(eregi('aix1',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "aix1"; } elseif(eregi('aix2',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "aix2"; } elseif(eregi('aix3',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "aix3"; } elseif(eregi('aix4',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "aix4"; } // Linux if(eregi('inux',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "linux"; } //Unixware if(eregi('unix_system_v',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "unixware"; } //mpras if(eregi('ncr',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "mpras"; } //Reliant if(eregi('reliantunix',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "reliant"; } // DEC if(eregi('dec',$this->UA) || eregi('osfl',$this->UA) || eregi('alphaserver',$this->UA) || eregi('ultrix',$this->UA) || eregi('alphastation',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "dec"; } // Sinix if(eregi('sinix',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "sinix"; } // FreeBSD if(eregi('freebsd',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "freebsd"; } // BSD if(eregi('bsd',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "bsd"; } // VMS if(eregi('vax',$this->UA) || eregi('openvms',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "vms"; } // SCO if(eregi('sco',$this->UA) || eregi('unix_sv',$this->UA)) { $this->PLATFORM = "Unix"; $this->OS = "sco"; } // Assume JavaScript Version // make the code a bit easier to read $ie = eregi("ie",$this->NAME); $ie5 = ( eregi("ie",$this->NAME) && ($this->MAJORVER >= 5) ); $ie4 = ( eregi("ie",$this->NAME) && ($this->MAJORVER >= 4) ); $ie3 = ( eregi("ie",$this->NAME) && ($this->MAJORVER >= 3) ); $nav = eregi("netscape",$this->NAME); $nav5 = ( eregi("netscape",$this->NAME) && ($this->MAJORVER >= 5) ); $nav4 = ( eregi("netscape",$this->NAME) && ($this->MAJORVER >= 4) ); $nav3 = ( eregi("netscape",$this->NAME) && ($this->MAJORVER >= 3) ); $nav2 = ( eregi("netscape",$this->NAME) && ($this->MAJORVER >= 2) ); $opera = eregi("opera",$this->NAME); // do the assumption // update as new versions are released // Provide upward compatibilty if($nav && ($this->MAJORVER > 5)) $this->JS = 1.4; elseif($ie && ($this->MAJORVER > 5)) $this->JS = 1.3; // check existing versions elseif($nav5) $this->JS = 1.4; elseif(($nav4 && ($this->VERSION > 4.05)) || $ie4) $this->JS = 1.3; elseif(($nav4 && ($this->VERSION <= 4.05)) || $ie4) $this->JS = 1.2; elseif($nav3 || $opera) $this->JS = 1.1; elseif(($nav && ($this->MAJORVER >= 2)) || ($ie && ($this->MAJORVER >=3))) $this->JS = 1.0; //no idea else $this->JS = 0.0; // Grab IP Address $this->IP = getenv('REMOTE_ADDR'); } } ?> cream-0.43/docs-html/contributors.html0000644000076400007660000002514511517421020020425 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor

    : :   a modern configuration of the Vim text editor

    about

    Contributors

    Thanks to the following individuals who have contributed code or gave permission for their code to be used within the project (in reverse chronological order):

    Vance Briggs fixed some bugs in Cream on Apple/Mac.

    Philippe Hammes updated the French menu translation.

    Ben Armstrong wrote the Syntax-to-HTML converter add-on.

    Hanjo Kim wrote menu translations for Korean.

    Ralgh Young added the menu translation scheme and wrote translations for Simplified Chinese.

    Ciaran McCreesh and Thomas de Grenier de Latour build Cream for Gentoo [ext.link] and have fixed several bugs as a result. Ciaran also wrote the smoldering Inkpot [ext.link] color scheme, as well as the secure modelines for Vim that Cream uses.

    Mike Williams wrote the Black & White color scheme, originally called print_bw [ext.link] .

    Christoph Haas packages Cream for Debian and has assisted with system-wide installation issues.

    Jean Jordaan wrote the Uniq() function used to remove duplicate lines.

    Piet Delport created the speedy line sorting routine BISort2 [ext.link] used in the Sort add-on.

    Gerald Williams wrote the visually tasty ChocolateLiquor [ext.link] color scheme, a flavor enhancement to the Cream already in Vim.

    Ajit J. Thakkar wrote the Dawn [ext.link] color scheme, a tranquil variation of the default theme.

    Dan Sharp was very helpful assisting the Windows build process.

    Preben "Peppe" Guldberg wrote the right and center justification functions and the string inversion add-on logic.

    Yegappan Lakshmanan authored taglist.vim [ext.link] which Cream uses to list all the valid functions and variables within the current file, as well as obtain function prototypes for our pop up prototype menus.

    Srinath Avadhanula wrote the original version of the clever imaps.vim [ext.link] template script now modified in Cream to add a virtually unlimited number of expansions. (An improved version might be found in the Vim-LaTeX [ext.link] suite's CVS repository [ext.link] .)

    Gontran Baerts wrote EasyHtml.vim [ext.link] , the powerful listing script once included for listing HTML and CSS items. (Now obsolete by Vim's Omni-Completion feature.)

    Xavier Nodet, Christian Göebel and Jean-Philippe Leboeuf assisted in assembling the original French spell check and dictionary.

    Patrick Schiel created the Opsplorer [ext.link] file explorer that Cream used until it began using the operating system's file manager.

    Jani Nurminen created our sublime Zenburn [ext.link] color scheme.

    Tom Regner created the Oceandeep [ext.link] color scheme, based on Niklas Lindström's Nightshimmer [ext.link] .

    Meikel Brandmeyer wrote the EnhancedCommentify.vim [ext.link] module used to provide block commenting.

    Jose Alberto Suarez Lopez assisted with assembling the original Spanish spell check and dictionary.

    Wolfgang Hommel assembled the original German spell check dictionary. He also wrote wordlist utilities used to create Cream dictionaries and was instrumental in propelling the project's spell check to multi-lingual flexibility and case sensitivity.

    Hari Krishna Dara wrote the most useful multvals.vim [ext.link] array library Cream depends on. Equally useful is his genutils.vim [ext.link] library. Both libraries are well-written pieces of code that help Cream be both smarter and smoother.

    Matthew Hawkins created the continues-to-grow-on-you Navajo Night [ext.link] color scheme based on the psychedelic experience caused by his sticky Esc key while using Navajo. ;)

    Ed Ralston and Takeshi Zeniya created the equally fabulous Navajo [ext.link] and Night [ext.link] color schemes, respectively.

    Dr. Charles E. "Dr. Chip" Campbell, Jr. wrote the powerful spell checking module (originally called "engspchk.vim [ext.link] ") which provided our initial spell check engine until the integrated Vim 7 version.

    Benji Fisher has micro-fragments of code spread throughout Cream. Little of it is explicitly sourced to him, but he was one of the most helpful voices on the Vim mailing lists [ext.link] and never tired of repeating helpful pointers for newbies and those of us who were too impatient to go groking through the help during Cream's formative years. :)

    Yasuhiro Matsumoto's calendar.vim [ext.link] adds a clever and tidy little useful calendar extension.

    Rajesh Kallingal made available the most recent used file menu which appears at the bottom of the File menu. It's original name is MruMenu.vim [ext.link] , and not any of the other similarly named modules without the same usefulness as this original.

    Anthony Kruize and Wolfram Esser allowed us to include extended versions of their fabulous bookmarking functions ShowMarks.vim [ext.link] and vim_wok_visualcpp01.vim [ext.link] . Combined, these give us everything Cream needs in bookmarking: unnamed, visible, and quick.

    And finally...

    Bram Moolenaar, Vim's author, who wrote a terrific application, who timely responds to emails, who while gifted and skilled with programming, is still willing to devote his time and voice to the worthy cause of the Kibaale Children's Centre [ext.link] .

    Donations

    Cream is a big fan of Vim's charity: ICCF Holland Directing donations there helps the children, and is a way of supporting Vim.

    cream-0.43/docs-html/home.html0000644000076400007660000001065111517421020016614 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    home

    Version 0.43

    New features and improvements:

    » This is a bug fix release, no new features were added since 0.42.
    » More details in the CHANGELOG... [ext.link]

    Why Cream?

    Vim [ext.link] is a powerful and full-featured text editor, the popular descendant of the 1976 Vi text editor.

    But Vim has a steep learning curve. It was not primarily designed to be easy to use, favoring performance and technical flexibility instead. Because it is so different, learning to use Vim takes time.

    Cream shapes Vim into an interface you probably already know (sometimes called Common User Access [ext.link] ). Whether you are writing emails or developing large software applications, Cream saves you time and gets you up and running quickly.

    f

    a

    cream-0.43/docs-html/faq.html0000644000076400007660000010454611517421020016442 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    features

    Frequently Asked Questions (FAQ)

    Using Cream
    Advanced Users
    Developers

     

    Answers


    Where does the name "Cream" come from?

    The name was inspired by the convergence of several ideas:

    • The initial thought came from my coffee drinking habits as I usually don't prefer my coffee "black." It reminded me of my opinion of Vim at the time--despite its inherent sophistication--I needed something to soften it.
    • Cream also contains fat, and while effective in flavoring the drink, it also adds overhead to the digestive process. Likewise, our script configuration to Vim performance. Interestingly, in both cases, the effect is worth it by some measure of opinions, but generally less to those most sophisticated.
    • I was also firmly committed to keeping Cream as a configuration of Vim, never a fork or customization of that codebase. Vim has tremendous support and is (in association with it's ancestor Vi) nearly ubiquitous with text editing over the last 25 years. By selecting a name that referenced a host, I hoped to imply an effort of good faith in that regard.
    • "Vim" shares it's name with a European cleaning product. Since it is available in cream form, I thought it was humorous to be able to share in the same puns.
    • One of the definitions of "Cream" is "the best people or things in a group" which we thought a notable goal.
    • Cream can also be a soothing ointment for one's ails. From the time I began using GNU/Linux in 1999 to the time I began writing Cream in late 2001, there were no sophisticated graphical text editors for GNU/Linux, one of the more frustrating experiences I've had in computing.
    • And while I have very little interest in that seminal 1960s rock band, I do play a Fender Stratocaster.

     

    Using Cream


    How can I make tab keystrokes insert spaces rather than the default tab character?

    Turn on Auto Wrap in the Settings menu. Auto Wrap also links line wrapping at the Wrap Width (also in Settings), but if you don't like this, just set your width to something high, like 9999.

    Change your tab spacing with Tabstop Width under Preferences in the Settings menu.


    Column Select doesn't seem to work for me.

    You can start column mode with Alt+Shift+motion key/mouse or from the Edit >Column Select menu. Once in column mode, extend the selection by holding down the Shift key (and optionally, the Alt key) while using other motion keys. End the selection by using motion keys or mouse keys without Shift. Please see the Keyboard Shortcut section "Column Mode" for more specifics.


    How can I start command mode for the occasional traditional Vim :command?

    Ctrl+L switches to normal mode along with it's alternative Ctrl+\,Ctrl+N.

    Ctrl+B switches to normal mode for only a single command.

    You can also select Expert Mode from the Settings menu to toggle between Normal and Insert mode with the Esc key.


    How can I install Cream without having root access?

    Create an environment variable $CREAM that points to wherever you put your Cream folder before using a revised startup command. You could put this in a single file, ~/mycream.sh:

    #!/bin/sh

    CREAM=/home/mylogin/cream
    export CREAM

    gvim -U NONE -u "\$CREAM/creamrc" "$@"


    How can I start Cream from gVim?

    You can start Cream from within a regular session of gVim simply by entering:

    :source $VIMRUNTIME/cream/creamrc
    :doautoall VimEnter


    How can I re-enable Vim 7's bracket highlighting?

    Put these lines in your cream-user.vim:

    if exists("g:loaded_matchparen")
        unlet g:loaded_matchparen
    endif
    runtime plugin/matchparen.vim
    DoMatchParen


    How do I manually create the Windows right-click "Edit with Cream/Vim" menu?

    Create the registry entry HKEY_CLASSES_ROOT\*\Shell\Cream named "Edit with Cream/&Vim" with the command (all on one line):

    "C:\PROGRA~1\vim\vim71\gvim.exe" "-u" "C:\PROGRA~1\vim\vim71\cream\creamrc" "-U" "NONE" "--servername" "CREAM" "%1"

    Verify that the path is correct for your system. You might also change "%1" to "%*" to open more than one file at a time, although Windows usually gets this wrong and passes a single path with spaces as multiple strings that Vim interprets as multiple files.


    How do I make Cream the default Windows application for text files?

    Create the registry entry HKEY_CLASSES_ROOT\txtfile\shell\open with the same command as the previous item above.


    How do I make Cream the default Windows application for un-affiliated files?

    Create the registry entry HKEY_CLASSES_ROOT\Unknown\shell\Open with the same command as the previous item above.

     

    Advanced Vim Users


    How can I use my personal customizations with Cream?

    Beginning with Cream version 0.29, all user customizations belong under the user's home directory. By default this is $HOME/.cream/ on either Windows or Linux, but enter :echo g:cream_user at the command line to see the actual path found. The files:

    cream-user.vim -- loaded at the end of startup. We recommend that all customizations be placed here so they are able to over-ride any Cream settings if desired.

    cream-conf.vim -- loaded at the beginning of startup. This file can be used to condition variables affecting Cream startup, but this is recommended only for advanced users that are trying to add or counter-affect autocmds. See the distributed cream-conf.example.vim for more information.

    All Vim files (*.vim) found in a subdirectory addons will be loaded.

    User spelling dictionaries (cream-spell-dict-usr_?.vim) are placed in spelldicts and are referenced by spell check features.

    All files should be conforming Vim script and aware of Cream refinements of multi-platform considerations, Unicode flexibilities, and auto command events.

    Advanced: Set the user directory other than the default with an environmental variable $CREAM_USER. (Requires a trailing slash.)


    How can I use customizations to Cream system wide?

    Cream will source a file $CREAM/cream-user.vim just prior to sourcing the user's cream-user.vim mentioned above.


    How are system-wide customizations loaded? Do user preferences override these global settings?

    Order of load is as follows:

    1. $CREAM . "cream-conf.vim" [cream.vim] (If present, this may/should define and call a function named Cream_conf_override(). See cream-conf.example.vim.)
    2. g:cream_user . "cream-conf.vim" [cream.vim] (If present, this may/should define and call a function named Cream_conf_override() which will overwrite the function of the same name in step 1 above. See cream-conf.example.vim.)
    3. ~/.cream/views/.viminfo [cream.vim]
    4. $CREAM . "cream-user.vim" [cream-autocmd.vim] (VimEnter event)
    5. g:cream_user . "cream-user.vim" [cream-autocmd.vim] (VimEnter event)
    6. Cream_conf_override() [cream-autocmd.vim] (BufEnter event. If and as defined in steps 1 and 2 above, this is called with every buffer switch.)

    Any setting or function found early will be active unless a later step overwrites it.

    Make global settings as light as possible. Don't set personal preferences unless they are mandated for all editing. Even then, a personal preference set within a buffer will override anything else since no autocmd event will intervene. The user's cream-conf also takes precedence.


    I love everything except [feature x]. Is there any way I can turn it off?

    As described just above, Cream will load a user "cream-conf.vim" file that can be made by renaming the distributed "cream-conf.example.vim". It provides a few Power User options and over-rides documented items within that file that are not accessible via the menus. We strongly suggest using "cream-user.vim" instead, and refer you to cream-conf.vim only in cases where sophisticated autocommands or Cream loading needs to be shaped beyond what the menus provide.


    Do you ever plan on making Cream work (better) in terminal/console versions?

    We've tried but there are many limitations within terminals that restrict the feature set including keystrokes that some of our base functions rely upon. Along with menu, display, and platform inconsistencies, terminal support for Cream would be a severe subset of the project's efforts. We would like to offer this, but with such short resources, it appears unlikely that significant progress could be made on this front.


    Sometimes I want to just use just a subset of Cream, for example, can I turn off Cream's keystrokes?

    There are various ways of using more or less Cream in your Vim:

    0. Please read the comments above on using Ctrl+L (alternative Ctrl+\,Ctrl+N) and Ctrl+B to enter Normal mode two different ways.

    1. Select "Expert mode" from the Settings > Preferences menu. This maps the Esc key as a toggle between standard Cream behavior and Vim's normal mode. All of the Cream configuration is preserved, except the function of the Esc key and use of visual mode instead of select mode in most cases.

    2. Use one of the three alternate behaviors available in the Settings > Preferences > Behavior menu:

    • Cream Lite: Removes only the customized Cream mappings and insertmode. You get to keep everything else and still pretend you're using Vim. ;)
    • Vim: Re-initializes the text editor, removing all of Cream's customizations to leave the default Vim editing behavior.
    • Vi: Re-initializes the text editor with strict Vi editing behavior.

    Note these last two menu selections are not preserved session to session. However...

    3. Cream provides an advanced user configuration option (in the cream-conf.vim file) which can effectively maintain the above three behavioral settings each restart if you need this for some reason.

    4. Use both separately! As of version 0.29, Cream no longer alters any aspects of your Vim installation. Just use the Vim icon and the Cream icon to start separate, un-related sessions.


    How do Vim and Vi behavior settings differ from Expert Mode?

    When selecting one of these two behaviors, Vim is completely re-initialized to one of the text editor's two base behavior configurations (Vim or Vi). (You'll have to read Vim's manual for more.)

    These behavior configurations differ from Expert Mode in that they completely unload Cream. Expert Mode merely provides a trapdoor to Normal mode without changing any of the extensive Cream setup to preserve settings, menus, statusline, or any of the other thousands of things we've tweaked.


    Is there a way I can use the Cream installed on my Windows partition with my GNU/Linux Vim?

    Yes, see the question above for initializing Vim without the default vimrc. Cream has been planned to work equally well on both Windows and GNU/Linux.

    Note that we've experienced problems calling paths with spaces (ie "Program Files") and have been unable to work around by escaping them. You may have to use the 8.3 format for directory names ("PROGRA~1").


    Tell me more about multiple users with a single installation, i.e., the optional $VIMINIT, $CREAM, $CREAM_BAK, $CREAM_SWP, and $CREAM_VIEW environmental variables.

    If installed per instructions, Cream does not require any specific environmental variables to be set. However, in some instances a user or system administrator may wish to use shell variables to control path locations or set up multiple users with a single installation. In such cases, the following optional environmental variables are available:

                                                      Writable?
     $VIMINIT                                           No 1
       Start Vim and over-ride default vimrc. Should
       be in the form "source [path/filename]" and
       point to Cream's vimrc.
    
     $CREAM                                             No 1
       Location for the general Cream files.
    
     $CREAM_BAK                                         Yes2
       Location to place backup files.
    
     $CREAM_SWP                                         Yes3
       Location to place swap files.
    
     $CREAM_VIEW                                        Yes
       Location to place view and viminfo files.
       (All retained preferences.)
    
     $CREAM_USER                                        Yes4
       Location to place user dictionaries, user
       scripts, user add-ons, etc. (See above.)
    

    Notes:

    1Neither $VIMINIT or $CREAM need to be writable (if specified) as long as Cream finds the path specified by $CREAM_VIEW writable.

    2Since a backup directory can always be discovered (each edited file's own path), it is not required.

    3The swapfile location defaults to that of backups unless specified here. Since both share security concerns equally, there is no additional overhead added by default.

    4$CREAM_USER is currently found independently of the other variables.


    How can I prevent Cream from loading my Vim plugins?

    Vim plugins will not be loaded (via :set noloadplugins control) if variable g:CREAM_NOVIMPLUGINS is set to "1", which must be put in cream-conf.


    On startup I get: "Unable to use Cream bookmarking features, no compiled support for signs"

    Use the "--with-features=big" configure option before you compile. This will enable the GUI, signs, dialogs and many other useful Vim features that Cream depends on. (And that Vim's developers have spent a lot of time developing!) Note that this is the typical configuration for most larger distributions, but certainly not all of them. For more information see :help version and :help install.


    How can I get the Unix/X11 behavior where the middle-mouse button pastes a selection?

    Cream now has this as an option, just use Settings > Preferences > Middle-Mouse Pastes.


    Is it possible to overwrite Cream settings per filetype?

    To overwrite Cream settings you can do the same thing Cream does to override Vim settings--load an autocmd that calls a function to change the settings.

    In your cream-user file, create a function that handles your settings:

        function! MySettings()
            if &ft == "vim"
                let &tabstop = 6
            endif
            (...other settings...)
        endfunction
    

    Then add an autocmd to call it that is activated whenever Cream/Vim starts, the current file is changed or made new:

        autocmd BufEnter,BufNewFile * call MySettings()
    

    How do I use cream as my editor from Mutt? When I set cream as my editor in my .muttrc file, a reply opens Cream, but it's empty.

    You need to tell vim (and therefore by extension, gcream) not to fork and stay in the foreground with the "-f" flag. Therefore, from within your ~/.muttrc file, you'll want a line that looks something like:

    set editor = "cream -f"

    Why is Cream sluggish when editing on a distant network?

    As of version 0.33, this issue has been mostly solved. On the outside chance you still experience this behavior, try to force the current directory to somewhere local by setting the g:CREAM_CWD variable in the cream-conf file. If that fails to fix the symptom, please let us know.


    How can I make the Esc key in Expert Mode always stay in normal mode (not toggle between Insert and Normal mode)?

    Put

    nmap <Esc> <Nop>

    in your cream-user.


    How can I make Expert Mode Cream start in normal mode?

    Put

    set noinsertmode

    in your cream-user.

    How can I use the Windows installer silently?

    The Windows installer has a few command line switches:

    /S Silent install (all GUI or dialogs are avoided and the installer runs silently with the default settings)
    /CONTEXTMENU 1 Forces installation of the context-sensitive right-click menu.
    How do I use custom color themes with Cream?

    Vim themes can not be used directly within Cream without a few minor adjustments to the theme and to the loading mechanism. Some variable settings are added (so that they can be retained across sessions) as well as a few custom highlighting groups (for custom Cream features).

    You can usually cut/paste the obvious Cream additions in cream-colors-* into your own, starting with one that most closely matches the one you're adapting. Load it each session with by sourcing it in cream-user, or hack an update in cream-colors.vim. Better yet, send in a patch so that Cream can dynamically manage and load any themes found in a new subdirectory colors/ !

     

    Developers

    Please see also the ASCII document "DEVELOPER.txt" in the package for additional ad hoc developer information.


    Wouldn't it be cool if Cream had (my) mappings and functions for [ HTML | Perl | PHP | Python | Tex | C | C++ | Java ] built in?

    Why not just write a Cream Add-on that users can load from the menu? Please see the cream-templates.vim script we use to provide templates, too.


    What are Add-ons?

    Add-ons are essentially refined Vim plugins. Cream will autoload these (if placed in the $CREAM/addons subdirectory).

    The point is to make modules more automatic and accessible, while at the same time modularizing the project by reducing out portions of "optional" functionality. We even debated dumping the entire Insert and Format menu stuff here, but decided to reserve them for necessities.

    Recommended tips for authoring add-ons goes like this:

    • Create a functional Vim script that is well-coordinated with Cream.
    • Make sure the add-on's function is accessible via a function call. Don't rely on simple statements because they won't be controlable.
    • At the top of the script, load the add-on with a statement like this:
    " list as an add-on if Cream project in use
    if exists("$CREAM")
        call Cream_addon_list(
        \ '{name}',
        \ '{tag}',
        \ '{summary}',
        \ '{menu}',
        \ '{icall}'
        \ '{vcall}'
        \ )
    endif

    where

    • {name} is the add-on's name
    • {tag} is a short tag line description
    • {summary} is a paragraph shorter than 512 characters, returns allowed
    • {menu} the name as it should appear in a menu.
      • Accelerator "&" is accepted, but not advised due to potential conflicts.
      • Cream automatically handles spaces and slashes.
      • You can use a period to designate a submenu used by multiple items.
      • Cream will sort menu entries from all the loaded addons prior to placing them. Sorting is done based on the first two letters of the entry. (Vim has a 16-bit value limitation on menu priority and 26^2 * [1-26] puts us just to that limit.) Submenus are not sorted.
    • {icall} Insert mode function call or execute statement that Cream will run on menu select or key press. Optional: Use '<Nil>' to eliminate insertmode call/map. Requires valid visual mode call.
    • {vcall} Visual mode (optional) functon call if the function behaves differently from Insert and Visual modes. If omitted, no visual mode mapping or menu is created. ('<Nil>' also accepted.) Note that a range will be passed to the visual call. Unless you've specifically designed the function to accept a range or are calling a command rather than a function, eliminate the range by preceding the function call with <C-u>.

    This call loads the values for selection of the addon in a dialog box, menu and allows it to be mapped to a "power key" combination which is retained across sessions.

    Example:

    " register as a Cream add-on
    if exists("$CREAM")
        call Cream_addon_list(
        \ 'Cool Utility',
        \ 'Jumps through hoops at a single bound',
        \ 'This utility is a veritable one ring circus in a function. Use it to clean the dishes, take out the dog and romance that special someone in your life!',
        \ 'Cool Utility',
        \ 'call CoolUtility("i")'
        \ '<C-u>call CoolUtility("v")'
        \ )
    endif

    What are some guidelines to consider if I want to submit a patch to Cream?

    Hopefully, patches will respect the general goals of the project. Here are a few principles to consider:

    • Licensed under the GPL or compatible license.
    • Vim script only. (Check the Vim mailing lists for patches to Vim itself.)
    • Simple. Remember, Cream is a usability project. Vim already does everything, we're just trying to make it simpler. If you provide twenty-three different options for the user, chances are he won't change any of them, it should JustWork™.
    • Not dependent on external apps or libraries. This includes perl, python, common shell commands, etc.
    • Multi-platform. If you must use some external OS call, write routines that handle both Unix and Windows 95-XP environments. See the Sort File add-on as an example of how hard this can be.
    • Unix file format. (Works on Windows, too, but not vice-versa.)
    • With a coding style similar to the remainder of the project. We despise Vim's shortcut language because it greatly reduces readability. While faster for Vim power users to type at the command line, Cream doesn't rely on typing so there is no reason to shorten names!
    • We like tabs. Honestly. (Ok, we'll accept spaces, but we may not be able to resist converting them. ;)

    Are there any hidden functions or routines that you've made available in the project that might be useful if I wish to help contribute to Cream?

    Nothing too special, except for a developer menu, the playpen and a few add-ons. These can be exposed simply by uncommenting a line toward the top of cream.vim that looks like:

    let g:cream_dev = 1

    The menu makes jumping around the project files easier and the playpen is where some minor things are written and tested before becoming part of the project. The Add-ons Devel menu has a few functions that you won't find too helpful unless your specifically developing Vim or Cream.


    How can I use CVS to get Cream?

    CVS is a tool for advanced developers, and explaining it's use is far beyond the scope of our project. Feel free to browse the Cream CVS repository or read more about this powerful tool in the free on-line CVS Book (direct link, 1st edition HTML).


    How can I write a mapping/menu item to do multiple or more complex things?

    There is a simple strategy of writing vimscript that:

    • Can handle complex tasks
    • Is portable across modes
    • Is portable independed of &insertmode settings
    • Avoids Vim's default preceding or following code in the general :amenu or :nmap
    • Modularizes logic into distinct functions
    • Avoids embedding logic into menu item and keyboard map calls
    • Avoids conditional codes into menu item and keyboard map calls

    Use functions (:help functions) exclusively for all actions, and single line calls to them with all maps and menus:

    function! MyFun()
        " insert "Hi!" at the cursor
        normal iHi!
    endfunction
    imap <F12> <C-o>:call MyFun()<CR>
    

    Any number of actions or logic can be put into the function. This blossoms once you realize that functions can call other functions and control options, menus, the statusline, call dialogs, etc.

    In the example above, the mapping is a single-moded one, it does not use a general :nmap or :amenu command. Using these single-mode calls avoids the occasional bug caused by Vim's addition of preceding and trailing codes in the generalized :amenu and :nmap calls. (See a few paragraphs down in :help creating-menus.) Note how the mapping has an initial keyboard code to drop out of normal mode and call the function? For an imap, Ctrl+B leaves normal mode and the ":" enters the command line where the function is then entered literally and completed with an executing carriage return.

    Another reason for single-mode calls is because Vim's mode() function always returns "n" within a function. It isn't possible to determine what mode the function was called from after the fact. By restricting the function call to a single mode, it clarifies the function's "point of view". During development this modal clarity is a great assist in avoiding vimscript bugs which creep in when the pre-function state is less obvious.

    However, what about situations where a more complex function needs to react according to its called mode? As already alluded to, we need to somehow know the mode before entering the function. The trick is to pass in the mode at the call. Take the example:

    function! MyFun(mode)
        if     a:mode == "v"
            " reselect selection
            normal gv
            ...
        elseif a:mode == "i"
            ...
        endif
        ...
    endfunction
    imap <F12> <C-o>:call MyFun("i")<CR>
    vmap <F12> :<C-u>call MyFun("v")<CR>
    

    The mode is passed from the map as an argument to the function. Remember that an imap can only be called from insert mode. Therefore the "i" in the a:mode variable will always indicate the insert mode call. Use of the "if" construct can then condition statements to mode, such as the normal gv statement in the example--since only useful to recover the visual selection at the moment the user pressed the vmap, it is restricted to cases where a:mode is "v".

    Note above that the vmap visual mode call preceding sequence is different from an imap, since ":" from visual mode goes directly to the command line and Ctrl+U erases Vim's automatic addition of range symbols. These specifics are all handled in clear, literal fasion, there are no hidden codes to deal with.

    The same principles can be used to make portable menu items in the same fashion:

    imenu 20.1 &MyMenu.InsertMode <C-o>:call MyFun("i")<CR>
    vmenu 20.1 &MyMenu.VisualMode :<C-u>call MyFun("v")<CR>
    

    Simply developing a function library and integration of calls and returns makes this approach a very powerful scheme that avoids all the usual issues with basic mappings and menus. Which is why Cream was able to grow and mature so quickly once this strategy was adoped.

    cream-0.43/docs-html/screenshot2.png0000644000076400007660000011705211156572442017764 0ustar digitectlocaluserPNG  IHDRPLTE  2))&1709#56307?V*=5+y4.fBC?@>H?5 4HXWi[U)5!A1KU^]Z bQCXLwLBHbw;:,|l[Lia5``XFf_`a_PfvfcVD=9usJj=tcTp_ejlN/v#'I9gSEb8۲s>;}|ߎYTOziQ M=ig$%_?YNkg\NەN?[[=i7Ŕ4ߊYgYi|2HP7_-+\Y9֊+WNmO>̭zyeO?1<-fXj^e[O?} 槓|֊%Zȹ xzەEʗWJ.,]r$-7]*@O,]pHMLK\,o%-u.]j-Z<)"Q+p 隤%bzI^Hܕz۴$E1yL1/yIy$~'=Iz-A $¿۪UrbFn˫c#%a#TV-4+|J%d7-#!sf نlB=78X[Z6\Ujzssl2~yqТ>d}0rrHYccz:{ݏd3&'yZ@R:$gs=mh,jmaS6͵М\١6Cc^M&Ǡ k:46f:5jȐz;ha{Ґy(1y #6-ټC^gdLO0}`Im,GlcV^ua,:y|484A*!ȱ;09dGrmzY##f׊[~˜kTYs,^V]ɶzϵ{lB \Zr2hU:d:$%ne$2Y&ψtr)IG$56ca>~GT[-1jQ33=hZd͸˚GL^drCVGU-9blC|=$[RSu`&GQ I .F'q!Vo9-'`jx `Aځuܡ1iL]'zޕl>f5 )5Xsi1ƾ `y$K:&YF ΦͯqBd Z!AAh6b k}ܦc1bí\֏Z,zޕlЈ(bfΥ%GrUW$PncS[RjPb= Wkk =ְ%%n%8gMH.or.`%ְ%%y9HZO*I$ՑM:ItߐtHOzI"=i}R=/=IO:ITOz_$eo0+%y=+V [FR{Z#a.DrUP" "a!(Iz v?$.S1ٚ MTλG+I(ټ)Vhb5ɱ[NIW?44Qmj6qInq;еЏ 1'xP8y͖vIR/ Ian{;,OR&`cGn|Sz2{zvb/Ӊ jϵĈ~v;n:9nc7Ȯ[ʅll y{dhL&mXYÛɹ{-^8k|[϶SO {̓"w<""-s$o{fMRJ ;_^l_0$Zbmjv[ 8M^<6| ͋H*>Xc$ʖݶ{~z;G #)#GF^#N~;oMȽAR$EE?Â"X4J5$2"A(8^m RQ͚/ @$@qIH IY;*ޢu5K$iW=_)>HT$1ARo jwHtFA8&{8xa9+ZvN+$v!라c^7ʒ#n7!]*Q_αIRKU$i%u:IJo~/tcgy؇\3Ho"I9` oH:24{uj {sHH z=A$ 91nw $v {< ?A͞/n?PvDC* -_ }e]$e=@RHR8&}b\X/B<]'rOX֟_ga%xCt!G0IV[EV:`z,+_ۆEXVlC@`𡇼8rʤ&%;_ ~ ws;Wܺ@7qU"I)lSo>>vڡHj3A&_lp",? 3=$iIz[eI=5G2&)N1&CRZ$rw(U1x+V؄ZG;-兝F$gHm@4&ʁ% /Hyxj֎7N^!v1iBtQ"$&)nϐݭCЧZ%ʁܺ(O_S7IF_铴o>MN|nkk]rwNc_NW5.=e۾^Ωte=UTWm-9WG;6$䍜~[lDR z>)mnW) %;JAXA\pR>lƓQ#?&{;Iva3H,?Ѥ=k3{o$ƕMvH_%! n8\Xᆋ|՗E*'eer@eݖdUNjiBN#{z}v6R>^fw'TU~9QXs Nܸ"I6i2bDI ~ysN+s7Ai'vj8$@){)z?ŇtK Tr>mIvYQ+(|}t3 }RTDȲ.Vw4ĘaIj3A{Í[wi֭o~.{ pgg2s$[ȀJJ)@z Y.@, BU+.y 68?]n=.]+W5{]e"T'tN|Ij1؜F$ݺ5xf+`:|#~HGr^hiJ#E=)>qeESTOzEP>YY $~ [ߞvyԺփ s>H`1$Xjk=F?gXJҜ͙M/R +ή<@8&#0]YdVz_mJw"DzٜO.6p> $;6dUnɷ.e:&j7^/m,8Zv?sϞ~N{^Ǫw)#j"]YD?ó {,R xpr $v]Bcaܒa#{FV-[íp=b2wuV']eHҁ>8)?Q@/˹/ I eصH' FYe)`>j@Vl C}iAFjԎݽxrKZ&ݭp=mǫ92D+EܒQKH6P3<ˀd`Ia,#HZtօ]+m(u4in@j1f2&{k3\Vұ>W/Rw7.pc6(7 j:vOYEнWOyo Aj eY6iWZ Rgp:ђT+v5X=&ḿ&Γ#͛zaYP6 mTOι"i4>}O<+{`#$=48HÓ2I/I)S.뚪q*TR^^>I'}|YZஜк'"IuIW IQq[AIz|GR8 )NNSľi$dM-\e[Iiw?8YMF4*l(*b8K>,uw"oUӏO$䛦A]MQTľyݽ &3|ON.IRIJ$ }dT%)UqɮRZ'89F)rʼnj" {審85Ç:IE)Jq|xSSO7$&)UFsS?Ut'IDFt$sREғ[?IFMI']qGP(Ȏ94}TNGO^wTq2cKaA*Hd1 SAK}M/H)JcRi6Y8I7.̇aN'[L tFƉ8%ulr,k SA1)*NVMqZ=CR8LVF!)SLN*N6㤓4z}sR3$-.DiH 9!"!8#(89D#!GB (߄`kGͻ+"١هHFqEǏt:>оDw_hAl]%|˷w7#{6 tݽd0ݓ27K#z%McIʣ!< H]44D}l<եX#4Uϑ{-jǢҕC NQ-SKi-[uBSh(J{$|N`XQT?{ԊdXqr,8M$m4~3_ÑqhӑLd4^;\4Ji]tMIJ!,"ˣQVn/[_D IFqL8,4>rj|G9ovHB(⡔yZReOtuIFW;Uf$}c*$uuv8PpR/4y pLyO{&Z=9#]s]Oh<Ȝ`Q)kFɫ͖򉫠t(p4.g;FrgfJl48è˪[,J) 8Y F}bB޵ØpO?;!8>}.(y"~;. * 嫠1ZɒlI v4*27<'~NtvH4Z$MI+NM%z 13SCX=FSu:9H8ME`(5Sg@DPCM#iJMK 3 ΄YY. = IDATP葦Pʆߔ]:%wқOZJH]y rIVdň4CڣB} \i}i}IRW|0QŊMTV]V]H |p <\qE_ݟ8#.>J")_hUlM?@Er>vSu/KHAT4B U?ET1Ȃ%]uT0'ޏ$xqGt*xP~`IiKB# B_~~LHꆑ+>8 EɮmDg\H?h!-F&TR&D,B}/S`/I1w[Sઇ"}E| g7>2L wڵ5 }TT`GΟߢIJZ^J3KT`WT%$m8 wRdŌ:o>l4k$@qZjV)fzTHH8M P $ IFnyHOjI1F`/èz:IBR+f z3'd4bE"G XcbNzTjFS 5_'iHj1Xby2=Ij0•n̜tFV)j3H걠fNRcm|&eD#(3G']8&NҨT-$5Q"!i˖-c? I Iu%)Ul}mμ!ʷS1? X}HwH({V;\aXqrcL3!ij 9%|+!BTH)I$% ܽy 89 !ʢ.ҋ>@&e[G:Vģ&sUW>!F>Oa'MzQv]D%;yĝ9%ɢԡT=Q*0fOR") s157~O+NIU^T"~9HQX:/.d.IVVu-F;u<$)*NӈwP$KH-iF R<Ѩy=Yq"U> o>O+NNYzvT=ٙ'陵R|=9*[wl,J'X6tuMi'I:k&)q2󙏓NҙIQq|bqIR ;u#)SҔX}D*$劓OҮ8͜\q<4K'"M8͔Lqb0&ݺL'i$40l$)U]~:$AT-Ơ̈t7NNiٜtFSHT'_)lLqUyyy|JGz:E8ݸVlI>N6mj{tuu2_ԏ"EͮJ?kkGoހ&+pfTIIV4}47"R b1VZ/^T@ΖW@Ҩ!IcKқGG7AKnq}ћW?ilU<Xfc!ח_~_ ^:q]s֭~}ݺFy5WG}6ªGG/C^ףJҐaIz㪪}Z輙~MA*ISYXk7S&/^ :Byv9^S+G~#5S~#Io$ oiPOGGWmWλ2IR3:^J΍уV^x@s?p}lv3 G#@Ϗۍ9WcŋˁHO-_R:>k[ǙYv2T]h*^NDXyȳNRdLn %}te B7@yW^la74 й: 'lznMvhS ]W2^hZY[TQV@~ԩ>؏O}w=~ |##)Sr|k]77I$޼Hz??YLwـ(Ⱥ?-%ξ@n'*Y qyuj5k= /֮h[E?le軛nw_ddNH'̻}BЦ?j%Uo JQ<| tū>Ox*rJ?Ɓ}Ԩ| ~ uO-j@u@Wïz}ԩ!}W=FFR$i?}kht尿H$,+{;z Zr7ͺulV́9i=3%`.jR"HԈRj^\.fD3hG_|wtӋ/n Fƅg炤Io|`S ͹j$Wox_yÓYR%See uS܀1r@lr$)DC4G|J)\Ⱦة^=9Ic@722f叇I^ pz_kU—?zfT8-+YRqd=u1 =9% $/[^ 9XN[7tM Ľ{7EOs@R89liL }}L?Ӿ/ ʏ%XlْRS}Dg]5<)IᚾHZJUS_ |8(}WO򫿞 |?\qr \"@ {ġ(Iq 1ԾW^| #,`I+X!h?]U:&VVb6]NQ_^\*Nv-=&+\(~"7*(^ϹqL cgr=?wB@]d7FJkbe(@^6zYS9憤 9ܒ73z4kHqpMәizD}VGIwíS$VlXv.9>N#)U9twoAѨz O)$eTq9Id5>N&)SL>e4sRʼn>N$)Ul1f١8I<>NQ"lዽ?s;S3?oӨ&oPqI]>N"4'$|8 r4}Ҭ0-_ >}"MMEdOޚa}r\]d.\_"IwNzdTSBt}"q-buL7aܛkav=M <)Iݽ;GkM(o.q2S8)GFⓓsHU^}G^#T_8{7?bzJ*OykVIZq1Yqyx oUœC=>: }SoON7go$օgzYI_xX/NGS>f}4C~T ˲+j\#F!@|>``| u}zK䏎2<}KG<Wu=bN>=Äן=SH|j䴄q ^c<}>v_}rЖEȳ|Gk 4})//eD}FGo|d6Jx}^SsD^m9xpf_QF0'8¬*40'3~g_7sg>?8} ^.Vz|h}󁤑8]#a}rr|rY@RU>9pI/=} hYH;Gl7>Mqoo>8>07jgbx2K]oHR>c#eoIJG${qz:P-/P^¯/>L>Z[uI|VP>9->9Ԓ25I?v G>d7L^L~@ERwQԜ͆OSd$Sd>Nޕ|p\E(37ofzC O!>\A$u"Qx.)#$gGИGQqmoy@R8̑8ONMP|rwhڱOlBD<).h|Ϗ pjo`Xfçi>N)4nڴwTD܀1+SdM'}Ѣ'8l}8dxޔ{>h:NI\Smo4礛fԌ>礛fͧ)>N8^wE9)tI='7I%m^;Eѻ񶙒!]8] }zwh!awlB8͢v8ͭvbu>NS4d‘>N#)*N0}-(TlU}DqIQqIJ'QO8ETqƘyTq2%IqId5J4sd7Z$uh*N68oϜf3FIq̏F*E~Iz7NTq2>I'iTI8Edu"i$>N\7;$S$$%[,4HAV7Eomm?S7!T}RfQc$ȴШFʆȶP.\\XqM1I_C{g8$NPJx22ָlّZ` Uk?!ș3hO\ 8Y&T~IH{,fhB>2S("&XuƅݾK-U(p6Ojw$dUڣޟal%:Ro+oH" prllJI&!'ʼnU!'9t$KHI@2STq},ߗѤc$#Oj?O׮ $Uӿu89-&kCY]#v8KM# ė,ސ_WL x\t|J'S%R!qWc|D*!>OoH ܞlkS%(a>V#Ԭeg:)i>ܨ~IK-xԔH$626 \JqaXy'|`F:I^JG,_x qۓX/N+hy=k?9< u_yI|g@R.p.0Ҏb^"Uė,Z/_U<0CD >VV3;cCI.nH_>b~ccbp6|eK'dWȇLRG$ [{QkO#Tĸ i?s` tpQC?/@Ra3a;ś(}B~jIR}~Ҵ|8u8I]}UOkpZ3 z}H@R3bUȆa^UIiyۑ!Z>^ȯJ !`{y%hy!(3m~-蒔*NN-iЌkÕzKqQMPYRl/IяK$e}$U$ 8^ i`Iq>^Jj?5 ]2'SIzR{o8I;C4 n ҽ'Bܐ*>dOR&!t ,#9qBb~qllljmO?V-O`}4h]~Iq$=y2Ҷg 0Sxd #E~C~2 i+QcȪDf(1#Ł(A)0HtLJߎ#|s@HX$衊|Qy:I#}N={,ѩJü!i=#i\Uѩj@+B*N!{GҼԎT%a>+Niئ&goo&g $(# gEI>!%$`ٿ .EatU|63ţt$$t TR V!A,OF&3 XyOn{SFDЊGɹX[r;\XKzWPamKa!ܢRdŌT%p|G)9+(PqhR)Lx 3|A˳|z/hZZ*Nvs/W:RGmv+y|maK'~)),%M瀨* 2b%<7-NzxDU>!*|&bXyO_EfMqHUd<_wɧw? В^B1,ir1LJc?Hq|$nH1| O|Gj6v,>Gڿon'3*NV]q 8 Cᒊj7a *Gױg #i FLRHTtdH II vlO6\ũO̚d7Zlܧ1"ũ^D|LRKsW82}"4CVט ")-\ J= %;2!ќCɪ8E8}0hI0Kʻ6(Uj*Vy) }ΘA,@'HK)<t'IqDqp2LJsG<ϡ%%%)BxIJ|dO))49'*zJZ*^JINq8I`4KWpKc(RR}C{ aLzBmBd* 'n"ޡRT`L+c%4*Ƙ$_JyT%'cR ɪӧ{8IQ(N+S|l>L{N Ǥ[TA1c@ x)v߆c IDATY'/SJy@bJZ4Ol?{;)_B(Œ{8MʖseBGCLeޤQP4?LM`zwА8ӼUr=,9*N n'M TdZ52|8Ijs!RW U+:4 U(NGi:]`HC"B#Ԡ-Oi5`g#>),)WU"><!Ő|n`>SnxmCw+ďS+_F|(*oEKOE)ZtHH'A#).ER'lؠaj犒/>QEOER$#٧6X?SXh}LID{rY$`͉[%,v(OTE|3Ŋ_%: _$$53'ɜ(NWeC$+D|㓊f&ĩ+La|5^(a':JqS+N*Yu|+xsL|h>bg*Vq?#}2 IY Ψ*NC*N($RI$e 2EIȏz'!0KsJLaaa{ӶCI[1IdT(Nxp\$+C>Q|%bIR3\hL$$)NutǤ 8T)NtLD' Q/ $M>LLQ3 Ob>=ʼnh$~H0),>h!St*N6)()Nq A\ =^1)xtLx >Q4X12ZNR^P)^_ _$YO!(N(F0%p]dӿ074LH)"O=Mgd$݋ĵ?Gs H[<6n۽{R$ &/6 IN-$_~v8l$؎1oO'k;_~ /#~ˑԁ`3z!U={s %%_ 8^e:EMnL;NIw:-`9)Ol/?p(ezNJRhJw }{H/!޾awݽX<BŸo_cON^vM^ٍ{tv?:&cJ?LxFks[6Ǝ|oMP7,;q(1LoN3fZM?Ł?^%I:ƤQzNz|#*۽x9 c3Lg}/r* ԍ65IWOS9ڽ8)GP89sU߹k J|jlDӣ.=N3*d(JꝛAQBa[NRT\8䑆 X9wNǩUq%4D~q)L <&4j!Ë΋E}x|' Fٓ%7`Խ~}c*" 8G >a}oZ%~5{)}{^`HyjSUr0UޜoМǨQa -!)˾Dg#O=CGiZ in6XFS a5/% ٱdr-hg%j+t"I>!.~9QB\E%w$=ilT:TC%9*t…ze69V4G>NM'_|j@!|*>K *|32g4qq)ħ~5|š}Tq#` Uu>Na}3IZAJly|Uր4JQrjBF,g(…6i1 ְ>NM8mg>N2bT&dcG0Iv%E$0 !#M񭊧s% gC>a5Id6Я|"q"*I >-8NgKǩ%'0IPR (,F>U05(3 Tח9q|9*O:C6w>Nqѩ&:l8뽿$-GςnW~rZ$9{$?RzIdJ^|}n Š%(&|K!x-t ŪT!I,vQl#|9Yz¢v`~,xbT5۳~ʔ2a'SA3WWJ+(^lxk+4+ IPJHQyd(S0|TFO\yEŗƆx O^bHOCqr'0 Jhem_QrXQ^F1WMHPb.&R^S"xpDMR,[5/*RS}<3F)_($-NA59@۳~S*NI/i(N$~Q(?ARbŢBDR!j!g˱rTIJSH=Ëϳ7*Q #')UFFqb }#{+Dse+W++y WL,) rXCj40 G}J@)59%Ƕcy(N'Y&F>*?W(YRi}\0I(Vt,fIbdI,/pI)%exQ0#yIFNRn V"Wl%g Q1YJP%13I󱼠@) /O ),:2bUĢ9MNnǤTy0_ZAJLqKX)P%lH&ű$5۳~ 74W4'01x~aW4EP$/WHxNXy2%GɋMǤrBϗ;*,?#>9O/yLAOW114?E$f T$$6iA$[2gޛO73R( :zf>A:IU#kg0IPep&:>A:IR|yLAO$i|UU_8UST|t%@KJI>9'hZR6*0 I*I@ ;&-硊|(QyN4ZIuNzy0a#1mz8D\1RNcON^;<鏿$Λt V>/]JyaI:B?:Oc3o`n]c9I:}ҼN_y6}E'OLR8ԗ6ӗuqR'jޤ/M'ۡLH: 0Ǧ8  /5O 8?F1DG89L jzӌY)zZQHzqb %74JQIl4'_7IaǶJPѨrX?-,%?TT=i6Mꕰz礨z[+^I@TuTz *PUe$&y8) |NJq񞦣!8&#QZH4j[c%^tU ZQ5H+NtIZqƓ:$O˒~PnաI9z*>zǤg{OB8+$]s1"7nA9IM0$=z*huI(')fL(_HD!,_4$eFwOR= ,4 I w7&գ#(wGRq Er$T^?̛)$IuiNIj6YNl;Eފ ~JAns穧S©SSL=}2zN͐d S3u>J55A>JKđip'oΔv9v ;p'Ոzl![_p"1)qrNCy {Q_sAm}m^"2 O1TZ5c=M&>IOM]I~i)o7_![|X}[򹗁=53͙֜d$ HZ."$;T>*ɾrVQY__BN.st+UgOݾwYήEzVʪd3ĵ|kvxP'Rs ϒs竮}K|T>J3iik9K~'38y#36 N(*Ϲq<6Boē?=.td1tFqwi =5; :Y>Td"q2b]UOIII'O N*z&yE ~Qb9I7l{-ꏕe%)Yօ OP5𫾬@+{dueuMc՝@rqÉ/OظEUzYqV@u| Iy(䳎H+l?{v>J>{~PPn~#5K@b 2<:OdCx[t D{{,te=Ïl<+'Y' WVT=i{M'm=Z IDATd]aE>ȾJ>'GFQb$$i9{8I_z],@cYR*OHL͢paƱ(VTઅE$}R\e|RW=08I`R}wnL٠}6)Oŧ]$mޡK@T>JKP_ZI9fڷ>r᝕4_ @vO1 l(?@-iت;P[rpNS:U,~/%-eƤZ>NXybd|]GKZZsEeGշv`v["I{8Y끛}t0zL“?=l]6Q} ۗHZT4|G3Cz>5̒/RQ}Ž]QbLK"˓׎7ܭy'0&,(P˷븋v pxTLX ز X>^0tW C]eEPn?PrpFevV0>Nv3$t#ʼX^Wxo>L%%%G)==GfIKG5$i랜VPUQ= 3 Ɯ0TEIdOutKaA(j1|0+rUtY_) v>p,L9i@2ߓX}A9]i{ә=0$- ~x2gtAAu_}!E+N JzN]Odm!v 31|y 'NqݩDj{Md"%I3!;U{z4rP1|4pt"}m'`OH4b&D]=Ӈ*\|:bHe͌,_kQ%޸d'0lsUveuJ|drUVSTVvZ4ipLYW91*\L EҙI=k =8+ Vc}SYQAׅ"[- (KNkmVcqiՒSdxA 6n$'Y"H!3ˆ/ y(lذa-c̏|h{J33?77ǘoA'\z^Ŏ%)\P%f0YkV(HHC**21 C.+Vǔ>!V,P1bmnnZ?H@ *Ա#^4HySIVPpB C _M = +(XӐ,ɢ!E-TP R[㐔まzlM(d_t@ )>4)5uOʏK5n}JyC ~}<UV|ɩ-ARXƻ.oOARRUV.z/R5(2C}+%wR!H*}qy@bN WΘ+<1VŒe<o;*<+!ߦtM@eIAYASaxلObTH^uyD$3#4**t(Y΢ʗ{E Ѯo i<)) cH^`(5“UB6MWZqd&±}<T݌)$Eou/A)g=gYAaEűԊZqPa5R^GCRV41X>PĚLZ~5 &н$ⱃՑTxmHl.* w;I*_YX:EJɊM= I@7ǤPT"EƺJ!aI=1+*8+^VHfzI +I~j%tߥ*P)lYa-y>$%7onl*5eIcՇ G镑CxF}t>)+V0IBV=೚umDAၾ?7&\Xc*tLR~>AiƠc8T)CE(gEIJҝi#(WcR(H gH 9|vS(> |DRHاɃv Riõu9[BO2}lȁO^+[LCw)?"6TdWxʼb <8ܺRmm.ERVbh/߯e?wx|VÊQE|'xs᷸s(Py;!|J려ҽr-NIEPr HVfyC!ŗr i9ėCCwgtEp$g ?o /K5zgTe'])Livr.ҭҝOnL_g'O8P+|ќr)>;yLJLURhMR^yDK"g%Nx~2}U3{fu9~A\}b>e:^u4US| Ů"|Ok}QʜX\3lZYr9z2D0+>:J8)LԢB;me"( ˺.L_U嚵'%,.Gx]45a{ )n3i""Ba8 jkXa>gI!r\r͍6Iz,)L&Ix7/zbvwI\wOJմxBň_I>+pUÅG-ߊYutަ7̈erM>&S#[ӴG1+D(bAIk\$4mi,CQ(4+/^NQP; I,,-=K+$n)$/ qT6LVY3fv43\ݔ5HĊǬ# "(dZL .!ASsy^Ôɛir~q|`V&J~S$鋢O iF̘לaM4/Ņ\#6BIg'+rt,UVuP4 hǃN|,։P⢉“'_%gtT!i?Mj1!ߙth!MQ$i6n-F'f},Tښ&RXE;Šll*!,~DK+ )+F4]:I J^E5|ք1BvtzkI!(5fNH`QCMcHbAIk$kZyϯH JӑtyRkV?xBۙ9$M5)!t58:/?55/ljkbB^>+4|tѻ3$*:;. 4csNIc&H:xM5cz^VAsd KoHq)r M $EoC"$͘爤8 fO4GS@4$(E:Kcޒ[g|8H{fBwj3ن? i[ǁ> lzM|*4|LoS+Fƒ}&Ebց)VīWQsXz$OVkSqHPЭQ>r< x'w[b+Ҋ{O'3 RLd9SORRt+bŊOыx +VDゐ2.@VLt$OV> Lퟂ{Zee!s'}bqkWڡgǺ(Nm3j2*{³zkqtt?_Pе1 o}k;NjF8=*33jpڃ8}劓,9[.D_D1,%d:_)"QV|!L=D$-]qu|,-/W'_27w>{NNRM-id1$nuƣ ^{CR#c.ٔ]'S/W]75BpB"nH?PuOw<3Um1%^Fn0ओS9ZgZ|JOd$q5TwuuuW?H:h6u\ AےJjJ8+Trew=Se#iDA*}N:re FKf EwQڥ̾GI mɻƻ]>LK <x)8JDz<;oSSzg|] i= ߙaI~$3 7G'-PpxM^eJ)=iCE%]~`)b_I\1=1IH$I|:#)ǩ'IOHRzK'5HZSwEwC7W x \ս3 OA:w' Iz t9IҍO7Ց;tR$=9I+y\_m}' E(ʼn<=IB];C*85;T21- %yc(Rh TH[cd3rVk<`Rls.n&q{>5)qtJyKs[Զ 85Z_IQqFJҭ1j#O{m-w8Rqx"I5F˦ݲۋz֗7pw]'۸\crF}- EJ81D׸dBRц?/81'50TDk-,1QTOfyrLBk8t]G=1Z65=/5HITX'eQj:5~.V1H*>I`(N:IQ!PpO}P>L?85HXTF9p<}RRJIRcSI #K5S978 Ud~e=c)I}^e8k8p5N ESPUS @CuXtZP)N]kL666TJ=Emo| ! *7◌a$蜺|db2eŶmdZ/0j|^A^kooLA}Md^?=e w9,&RYo&ܟpDoD}A{ɃvIcROK>Fx=no +]ӻU3r_-U4jN Zt;@ 4B QNIf?h)ʻ!{z+ }]۶[zZz+!"p>nmBR{IX3x%ml\IiMNwECUnW=&LOۿHBtDRިtہLR>TU.?O~IIqUH=36] {$]klOQIJR&r;ظ /~^} ǩJgƽ_@ =HQI>ًN=IN%-A =P\~z_)IQq^U;_=/;Mq cx)hSxܞl?h?~YHz$=*I?(N]I'eũ溱iI:2R8ݫR&5NTYcWfVU|]y4$}q68r*cWӒw_Q5HZ&.p I5N'')qR;cSHʻu+SƓ''))NQc<_ftR}T I%IHRcS{cSHkNOR'78}$S9Hj(N=NJs)Cbbl1!bu?O/靣s}r@-v𐽺'j} ^;Wڷ XgA , I9P-ڛR[hjwƴ-^""rY6z{u}h{㓔{GhrtM3I6KB,pZ%y.Ç^Ǣ]u)ޤpLY{=++_pκ.!VBNG: 8ŪqoM޴pxIsX‡$?.!Sx1j4kL-3hvZlmN=cOĦ$Kǜ߀׽#b.+rW%i'WT8n^:1%&2xbd x~ŅۋSỊ7]nB}n>IDAT1[YJ4,?9{Gn݇:TBikik[LL9mNp [^:V+*I<8)3,Z<+8rM>dk˘90Zqi(ͽ4`{jdVCTڽr w{O|}fZ}+\7=b*$x;Q̷W z H_5UY\`¿N9h^ΉLFokg Z17^\H;=I]ɤ'~ܽʪ3rimwm9'h'kS)$6JH{CJĵ/$txrkI"]wš&%I{m -iFMz$=wEnI ZFiAVS~+ެ>ד˳tũRYqBF/VIHRl-1I_߽ %H+!B yPɅkEwR+ʔ҉ u@BTi$0#]Oo{ʷ6,9$]i+.'eҍ(q)^:6VI'b1;mq&ww>*P"I'SVBRVԚZNv<YFUHJ#p[3K(q:{܀"Ў1?BO˳dũuaqpK!Im1&{O4lz"$ZK'Փ|g#'Sh(4%)؉AC̳Bk^ГTi$bRvݘfұF{E!)Yd{*++5N3#{zdyE38u?ѹܱbɳ}T7}/M&v5/)6C>BԽ{ϺIAŦ)I݁fi`Pwakk3ɪw'K-rFՐ~LĞg;J1Ec7x`7`=O]=tsfg-r5A3#U=ױ)aSA3ORփxOa"G\;|k1 O8~Ng鏗mp$X&&Uݐ5F<^:>m:=\'R0.4|3jq (|xZ-Qq".P۴tD5\6K廩G?7۟ ]v;ZM8Ѭʤ5+iAI< Pũb 9썈D1&s }WpT)G*]r-sgcηOd6H#EdL0h%hIi~W$)6!PB}Ij ~W~fH`|}zG/BRc' hE$hHԬ޴^;Dq JXC\IPENdO4 +aQC.uĒGAssz"pBU+jRa0p4IKꓒ(2Q0*1RLYqef"Gk GІ )\j`4!u|A|7ncM{Ws>5R`fDF,YlP69H A9Ϸ77H@,42h5=%TbE6+ֺu> 63 %T<#M+:"rXs+m׿wRQ{vWɥ@=6TTV!…R=)ShP琠49 WȻFӡ=#sgt$a|6)  :&Iyr;l:&m$ ЉrٽP$mI#)SDyRMF cMu_kTH*vkORݣOSZpIEqIIjKwM"$PY|I+2gIi?V_:%\תwq$#"}sjO/)4$wERTسd:KL镩ny w$mNυc_Xv#E6)*[ *I[OAҌ$Xd̆7p8BORȇđ4jM+ifΣY2a9.ڮ1ISgeTTHZn:'MK޼gF8NmCQh€OxYyHTd&(f99{M卖3KAHt*Y>TTh׿)վAvV*$w8[*IQaM79ؽ),NR$*NRs =/NRoDI =u#B_ޥ8';YlߛOz^鈎^H)}˩S(NW{(!y B1F' ;ljXp%J=ʓ+Nl<'y2-RnKAi(N*N'!ؠ[/A *c}yÃ9׮#?_?S 2އXa{zNJsΕ!TˋvEz E@)4p$X)HE!txO.40ت`e^\#?_!Ep)7 VfӋO<}wΝ+04}<|Rk6/~m_M }0ݣjK"i_a)~:LJyo)_.ڳ)k.WGeT?_t>+ D$m}}P2%nNՂw=oIJM 2+8J z'M) v_@y8aL`JcRy=ȞW.^xŋܹr>J#)qyGSW|6޿sRy ]Φ4$ 2}6gw[?t<%4)H:{Y!{."WߧW.NRLl#)vh_+۫#im>I;jstWJR8fT62}M %~@ix}cc /,R9$M5I:>/l W2) <)Vf]RP~c*I/1O5]|sŚ٤trԮ$܄RڱVp_Iɞ+W[oM}RJ0۫#M"Z%SԓH{|jay(б?*ˏHx5"/V$^懞`y>i~YtØ5fcsQuwsWKc@ I]|J$za hJMMI_̄=Ѫ<_Ku1׏ p`]+I'm206u%Ieڎ z{Yhϝ+o{s7?G4R0 HccV+f tOV0>WNt\>yNrSJ|巎;꫃lsF)}~$h*N[|y͕Wވ;7/y1-w JOg1f8=G 7կ%^N_/5|??cB.b$MEppeӇ$ O*H80D6&'7"} з?Ǯz?!(ՠydWͪdɰ$|Wr^夒w} ՔCCVn*Ia~D^ۧ@d\OO_=~>d؝͝T(bΏh؍uv|xr~_;S7%U_!^W@n/Zp}?:.XMyj 7wuI%ǓI5 (i{$2_ I^#)D TWwv#ӥ";9wܯ}OoLÑq5JY\@fD?G]pH*$:;xtt@)̟1Ly+$E䛫JxPd(0#B؈L7G&*q]έT|/ښ`*֡N|  9HC*EdCCՁzc'~?Ypfƨy0:\_PX Ǒ`}ܮ}._~ojF "HWs^~cI \yc+Vl" pߣ7R=09UCj Y? `&>Gdʡ0SPI#z,xIҵCIJCf89ԉ$L~)# I'ot5џ d"?O_$ C]͑zNo}38P*4#@?χJq 񫞏TWwqsL?? Pz |t*$%G jTCHҿ ?I?|O|4Q2?[DPI:')`p8tB cǣ)"O)"x 0.'& ;n{pJnjXR I硺 u.ՓwGn/m|xl$qY@!醿a F`\͟;B $H(Vi Iv5Jp|}x|Hw;;;L h!_S{r@J:fa L~{GKE7I$$ʠHkv?: '%bs9S/ZsaGR'w8I%ꪟPs_S9=dgNKFqvw 6v\$) II~I -.X:_{9=CIJsHJER($5I'xIz =)#k~œQ$ŮJ.prDz I3j:4dtF'G7Jy)=:wnLG’].&i'6T)}@j+ IO׏'[7ShSnTȊqliCCܜDqL~OCHҟ"G1C&fha1I#8ya PBw&/6Oʈ)^eJ<ꐴn zTNA>t `4 z*P#h4gFC{Z2'2y|Pڧv̖OF@١,A/'Nk(NjjgGJ8/_*I55F{]0HjF0AR#$5 I`F0HjI`F(I`8$5Aҿ9:s`9j!%IENDB`cream-0.43/docs-html/screenshot1.html0000644000076400007660000000552411517421020020125 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    features

    Screenshot 1


    (click to return)

    This snapshot shows a number of default features available in a recent version of Cream.

    • Optional tabbed document interface (new with Vim version 7.0).
    • Spell check :: Questionable words are indicated with red curvy underlines.
    • Line folding :: Each set of folded lines is condensed to a single gray line.
    • Vertical selections :: Column mode enables editing on multiple lines at once.
    • Syntax highlighting :: Ten different schemes color-code components like strings, comments, and functions.
    • Bookmarking :: Indications appear in the left margin as blue arrows
    • Word Wrap :: Wrap text at the margin or allow it to pass beyond.
    • Line numbers :: Can be turned off.
    • Toolbar :: Conventional often-used commands.
    • Status bar :: Bottom line displays plenty of helpful information.
    cream-0.43/docs-html/index.html0000644000076400007660000000730211517421020016772 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    home

     

    Cream is a free text editor.

    A modern configuration of the powerful and famous Vim, Cream is for Microsoft Windows, GNU/Linux, and FreeBSD.

    cream-0.43/docs-html/css.php0000644000076400007660000001537611235042144016313 0ustar digitectlocaluser /* PHP code {{{1 NAME == "IE") { $font_size_large = "small"; $font_size_medium = "x-small"; $font_size_small = "xx-small"; $font_size_xsmall = "xx-small"; $font_size_xxsmall = "xx-small"; $ul_padding_left = "0"; } else { $font_size_large = "large"; $font_size_medium = "medium"; $font_size_small = "small"; $font_size_xsmall = "x-small"; $font_size_xxsmall = "xx-small"; $ul_padding_left = "1em"; } ?> */ /* Common {{{1 */ BODY { font-family: "Arial", "Helvetica", sans-serif; background-color: #eee; color: #fff; margin: 0; padding: 0; padding-top: 20px; font-size: small; ; } P,BR { font-size: small; ; } TD { vertical-align: top; font-size: small; ; } LI { font-size: small; ; margin-left: 0; } UL, OL { padding-left: 1em; ; } TT, PRE { font-family: "Andale Mono", "Courier New", "Courier", monospace; font-size: small; ; } CODE { font-family: "Andale Mono", "Courier New", "Courier", monospace; /*background-color: #f0f9fc;*/ white-space: nowrap; font-size: small; ; } DIV { font-size: small; ; } FORM, INPUT, BUTTON { margin-top: 0; margin-bottom: 0; height: 1.8em; } BLOCKQUOTE { margin-left: 1em; font-size: small; ; } HR { height: 1px; margin-top: 0; margin-bottom: 0; border-top: 0px; /* Mozilla work-around to eliminate "groove" */ } IMG {border: 0;} A:link {color: #fff; text-decoration: underline; font-weight:normal;} A:visited {color: #fff; text-decoration: underline; font-weight:normal;} A:hover {color: #fff; text-decoration: none; font-weight:normal;} A:active {color: #fff; text-decoration: none; font-weight:normal;} H1 { font-family: "Verdana", "DejaVu Sans", "Arial Bold", "Arial", "Helvetica", sans-serif; font-weight: bold; font-size: large; ; vertical-align: top; margin-top: 0; color: #234; } H2 { font-weight: bolder; font-style: italic; font-size: 140%; margin-top: 0; padding-top: 0; } H3 { font-weight: bold; font-size: 130%; margin-top: 1.1em; } H4 { font-weight: bold; font-style: italic; font-size: 120%; margin-top: 2em; margin-bottom: 0; } H5 { font-size: 110%; font-weight: bold; font-style: italic; margin-top: 0em; margin-bottom: 0; } H6 { font-size: 110%; font-weight: normal; font-style: italic; margin-left: 0.8em; margin-top: 1.3em; margin-bottom: 0; } /* Custom {{{1 */ .main { border: 2px solid #e6e6e6; background-color: #fff; width: 740; min-height: 550px; padding: 18px; padding-bottom: 5px; padding-top: 10px; } /* header */ .header { height: 28px; margin: 0px; padding: 5px; width: 100%; } .title { float: left; padding-left: 0; } .logo { vertical-align: middle; font-family: "Verdana", "DejaVu Sans", "Arial Bold", sans-serif; font-size: large; ; font-weight: bold; letter-spacing: 0.2em; padding: 5px; } .logo:link { background-color: transparent; color: #234; text-decoration: none;} .logo:visited { background-color: transparent; color: #234; text-decoration: none;} .logo:hover { background-color: #eee; color: #345; text-decoration: none;} .logo:active { background-color: #eee; color: #345; text-decoration: none;} .tagline { vertical-align: middle; padding-top: 1px; color: #679; font-size: small; ; font-weight: bold; } /* search */ .searchform { float: right; margin-top: 2px; padding-right: 10px; } .searchbtn { font-size: xx-small; ; height: 1.7em; vertical-align: middle; width: 25%; font-family: sans-serif; color: #234; margin-bottom: 2px; background: #fff; } .searchbox { font-size: xx-small; ; height: 1.7em; width: 70%; vertical-align: middle; color: #234; font-family: sans-serif; background-color: #fff; } /* 4square */ .home, .feat, .down, .about { margin: 1px; padding: 20px; border: 5px solid #fff; color: #fff; text-align: left; } .home { float: left; background-color: #234; } .feat { float: right; background-color:#882; } .down { float: left; background-color:#473; } .about { float: right; background-color:#754; } /* section titles */ .sectitleleft, .sectitleright { width: 100%; font-size: large; ; margin: 0; margin-top: 0; margin-bottom: 0; padding: 0; letter-spacing: 0.1em; } .sectitleleft { text-align: left; } .sectitleright { text-align: right; } A.sec { color: #fff; } A.sec:link { text-decoration: none; } A.sec:visited { text-decoration: none; } A.sec:hover { text-decoration: underline; } A.sec:active { text-decoration: underline; } A.secoff { color: #fff; font-weight: normal; font-size: small; ; letter-spacing: 0.1em; } A.secoff:link { text-decoration: none; } A.secoff:visited { text-decoration: none; } A.secoff:hover { text-decoration: underline; } A.secoff:active { text-decoration: underline; } /* footer */ .footer { width: 100%; vertical-align: middle; padding: 0; color: #679; } .sflogo { vertical-align: middle; } A.footer:link { color: #789; font-weight: normal; } A.footer:visited { color: #789; font-weight: normal; } A.footer:hover { color: #789; font-weight: normal; } A.footer:active { color: #789; font-weight: normal; } /* general markup */ .news-home, .news-about, .news-down { float: right; width: 300px; padding: 1em; margin-top: 1em; margin-left: 1em; margin-bottom: 1em; } .news-home { background-color: #345;} .news-about { background-color: #865;} .news-down { background-color: #584;} .nolead { margin-top: 0; } .lesslead { margin-top: -1em; } .medium { font-size: medium; ; } .small { font-size: small; ; } .xsmall { font-size: x-small; ; } .xxsmall { font-size: xx-small; ; } .byline { font-style: italic; font-size: small; ; text-align: right; /* matches H4 bottom margin */ margin-top: -1.3em; } /* 1}}} vim:foldmethod=marker:filetype=css */ cream-0.43/docs-html/favicon.ico0000644000076400007660000000217611156572442017140 0ustar digitectlocaluser h(  (_6F*c9G*c9G*c9G*c9G*c9G%G:49GcG9GcG9GcG9GcG9GcG9GcG( DUw1qA3wD3wD3wD3wD3wD"M9DUwDUwDUwDUwDUwDUw 1IDUw1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw0DUw1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw$DUw1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw DUw1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw DUw1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw DUw%*$+$+$+$+$+*GUGUGUGUGUGU A1 D3"D3"D3"D3"D3"%/)"""""" #"A1 D3"D3"D3"D3"D3"%/)""""""3-"A1 D3"D3"D3"D3"D3"%/)""""""9."A1 D3"D3"D3"D3"D3"%/)""""""9."A1 D3"D3"D3"D3"D3"%/)""""""9."H9*N>.M=-M=-M=-M=-,3-......<1"wh%~uy{TrƷrƷrƷrƷrƷ7t_"05@GYYYYuYvMYYYYm|Scream-0.43/docs-html/screenshot1-thumb.png0000644000076400007660000002325211156572442021076 0ustar digitectlocaluserPNG  IHDRņsPLTE %&$,.+786@B?IKH@S`4#s׍;5k6{ľBmKN5szW 9*dqjh Y r3Fc!GBJhH]'k>{o޼}{ylzfKy%;yy)gM׊_( ]=^V?Yu+Zy%孛(OK_{G<}G::'O< 9rԡ!_ziP}2_|_/o0Oڧw>l }*=Swjᄑ/޻;|zW>rj/RU;bὧSwrѓ[8Ç`%رE ٱcǖ{زc-;>k[oߺu lw~p}K/-u_ܷn߁7[wjع2hd4{> ,ۭM;^ ;^ ?Y$ݝn٤{mR ̓9s g^ⰹό-'>9Lj4$~ƒ0=VS ZP#*()E(l-߅բښʮk +kWV4bqHTV9VVPY\RYV+A̙#q u傚̞Lر3%8Uױ3EgJΜ) δAZ8ݿ@t怨d׮>P/_tH0 jkI ׊k 547tAP[$joo54]5 }E%5854tE]ij̏Lx5kD g5/׀0$Qg9gJ*7WHT_g Bư}`sRA) \~24`譮Z xE] 0>~> E6|F~+ ?_41xxϿGD5B梯}{~VA죙F v +6 T}<'lȀ0*-FJ?#Ȁh(*֕38Y SWJ%_}D2 zy|*ku f@_6dvmA!WOa/D]ׯ~npVUɃg>?4l 쳲Z ٚ8TSV~FT[ cښcC+?SYAQCYDT\% k*`]\&, C#aTs<01<p615n$ No5o`N|'5 "Ha8-P IjW 5AtGun HqCD ;2T-.YM[:Nj0IZZ 6[ry.ԝ RXI>N.7lk_QUVOXH)7(UWPVP'.T 6yk$v\,䭅jK* -R)&vEkS r9NހU:eFTzފXj5K]bjǥRz{]pyjM:.ԩI\'rR4Z-J jSNȡRf0@PnW: VklA `QPk9H05ArsWWC.',r;I5Q(ٖqєs7}gL}@= L 7!1qqe HIrg2͙:M&Gn}܍n+hԩG(iLȄm, 2~: f@Di46EМ5}4ꃚXT*9&}P B4-Drܷ A@L2 egWOs(bZ#Pr5R MO=66_]4M5^TxFYe 2VPڸWTRhb^#5q 'U~Epdzjr" ½id;Me@ hVD F5jBjBUZABHd$AT0PrO1pb۱iZŖ0K6`,l" \XVp^xHThGt<66~l x;`N8|sQ]%qXH;P&R( @ 'MD?a5*2FNP&lf{܁n'mID5=t@\w͛Bau󁖀^:;}\lO얞_1iqa2=݁:Spݸcmot{;`|OC r!], S@R=\g3z@,:}qqGR-`NZcLqP8 g=Iצz&ۭ :k!\ۄ7}&'Mn7 qY9hKQhH )xt7@4L&ȗ&HAP*F6BgzJ,8_"issY\%ơ- 7| HQjN.wnڴ80:$TE'aa Z$is@Zwn6}r;$֭[zgCpk MYHwe$_sw{< \t=tGߌ;sZJլHo-NH֙hv'6S^z@)ҝΎG=7=-x|oFMS͹TOҁ􉅞k-_=m!5h~h7w$[On','~ZI nGwZ>Ldj~4w;z |yz[(t SG`dupѻ;%u_K$g~wΗO~B;"Cd6aNs Á v4?m9ɗT᎝# 9 r=}aZIWE¥ШښlL\ jN]PSqGl--qп/=p"z}\= 2u{}iO?]?迗+ S@N?) b%(Tl <1vd l^.L]zQr";:VO>*HaN0 * Vʚ x:׷(8ADz,l_Y݇7O]MMߙGoޜA\zЩPq _o촖OC6otaߛN 30V^DLeh5'A2\LxгNV9d pbIUPBH0Rxe\"WbhT H. eF {h ^pxm|g=[mۦmW8AVH qI)g7j^DDZeP2HeV"ؑ~ =EN(M~h͉Ɯ ثb41l !}+)P3i< |ĝ;-%,;pLjF\AДE%#%8: sb=cع]}8|g~;KWbM^S3Wniݫ% ĝG$ʼLo O#4809z3}gYNk((dF aob;NM΅.ki0o;3oa`{}t;hbbt`f;7&qwtbr*B09?<.}Ȑ m\I$Y..ޜxw`UL2FK4hDȃs ~5I~!bOA1#xC Q^nw&-.58blfc`x,᝗[~n=>=}n @D(LP:m˞83|; gn 4*H E *Fg~0#ʰF^_@+X#1bc|Mnww#<qEHBf!.[S<3w6tl] ? rЄ?N]-nʗXJv,7k`;:;A`\9 {msd˫y;hD,8A':bpX# aFӱX xN0`'lk42?jBMMz4 S#&XGBkl WE~?p$Q$ $9?qDH(4=Տٍp5 ˆ#,'Oi#1TKIh j8\ LZ|[)왇CxC;-;1eiJriSԂL)jd/ 8)rZ`*44ee jP0 9Ɖ0׀rއ\OPDd{RqE!G.C1'"bIv^ϊX;/s9mNm(?bm鑦ަ[6}MO 'qԗmiXHT ,EBSopvkbjlόӽKc1Xp"(XDf9 h/p"x  kxn{=J90k<; (t0*gj8c\A|YW'TbZB6:TZ݆[UhA$փBP/]*WKjuB r'ꗗǜ;AujZApB. uA aSKI`Πt7&&%YgvsӦY= ~3֌Yٰt%rLx3 䶜\o /,,D*(*Ų[Vhh#:*VEq hȋaD\KT V4 p2PK*LH$a c^?CV0,)=@hd$ZY )5j%Ś 8IȔ^V6,5=UלQJKŲmC"WCbIqE$2$oY&",T Ee 1Xkk^RrA o;P.UZ JKC&$@^ +C8F$AEqk$ @D*XP] \ZSCI\Fk$WF14CFgQ;xBW;{چP{ l8'A0̏p© n*adt$VBI d m'ByIVKp-&RAZ9Ãm].Ǯere(Og쿽O f@^qCIENDB`cream-0.43/docs-html/keyboardshortcuts.html0000644000076400007660000005464711517421020021460 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    features

    Keyboard Shortcuts

    Cream keyboard shortcuts provide quick access to many of the important feature list items also available from menus. See the KEYBOARD.txt [ext.link] file for a card you can place over your keyboard's function keys for quick help.


    Menus
    Alt+(underlined menu char) (open menu)
    (arrow keys) Move menu selection
       
    Basic File Operations
    Ctrl+O File Open
    Ctrl+S Save File (update only)
    Ctrl+N New File
    Ctrl+F4 Close File
    Alt+F4 Exit
       
    Basic Moving
    (arrow keys) Move cursor around the screen by character
    Home / End Move cursor to the beginning / end of a line (Home goes to screen line beginning, then toggles between real line beginning and first character)
    PageUp / PageDown Scroll screen contents upwards / downward by page
       
    Ctrl+ArrowUp / ArrowDown Scroll screen upwards / downwards by line
    Ctrl+PageUp / PageDown Move cursor to screen top / bottom without scrolling
    Ctrl+Alt+PageUp / PageDown Move cursor to screen middle without scrolling
    Ctrl+Home / End Move to the top / bottom of the document
       
    Basic Selection
    Shift+ArrowLeft / Right Select text, by character
    Shift+ArrowUp / Down Select text, by line up / down
    Shift+Home / End Select text, to beginning / end of line
    Shift+PageUp / PageDown Select text, to top / bottom of screen
       
    Ctrl+Shift+ArrowLeft / Right Select text, by word left / right
    Ctrl+Shift+ArrowUp / Down Move to top / bottom of selection
    Ctrl+Shift+Home / End Select text, to beginning / end of document
    Ctrl+A Select text, all
       
    Shift+LeftMouse Select text, from cursor to click position
       
    Basic Editing
    Backspace Delete character behind cursor
    Shift+Backspace Delete word behind cursor
    Ctrl+Backspace Delete word behind cursor
       
    Ctrl+Z Undo
    Ctrl+Y Redo
       
    Ctrl+X (selection) Cut
    Ctrl+C (selection) Copy
    Ctrl+V (selection) Paste
       
    Ctrl+F Find (dialog)
    Ctrl+H Find/Replace (dialog)
       
    Ctrl+G Go to line number or % of file (dialog) (Unix may also need Shift)
       
    Ctrl+W Word Wrap (toggle)
    Ctrl+E Auto Wrap (toggle)
    Ctrl+Q Quick Wrap existing un-wrapped paragraph (select for multiple paragraphs)
    Ctrl+Q (x2) Quick Wrap (as above) except multiple spaces are also reduced to one. (Good for reformating and re-justifying at the same time.)
    Alt+Q (x2) Quick Un-Wrap existing wrapped paragraph (select for multiple paragraphs)
       
    Tab (selection) Indent text
    Shift+Tab (selection) Un-indent text
       
    Window/File Navigation
    Ctrl+Tab Window Next (multiple) / File Next Open (single)
    Ctrl+Shift+Tab Window Previous (multiple) / File Previous Open (single)
       
    Advanced Functions
    F1 Help
    Ctrl+F1 Help, specific topic
    Alt+F1 Help, list related topics
       
    Alt+F2 Bookmark, set (toggle on/off)
    F2 Bookmark, next
    Shift+F2 Bookmark, previous
    Alt+Shift+F2 Bookmark, clear all
       
    F3 Find next word under cursor
    Shift+F3 Find previous word under cursor
    Alt+F3 Find next word under cursor, case sensitive
    Alt+Shift+F3 Find previous word under cursor, case sensitive
       
    F4 Show "invisible" characters
       
    Shift+F4, character Insert character line (length of Wrap Width)
    Shift+F4 (x2), character Insert character line (length of line above)
       
    Ctrl+F4 Close File
    Alt+F4 Exit Program
       
    F5 Capitalize, Title Case (current word or selection)
    Shift+F5 Capitalize, UPPERCASE (current word or selection)
    Alt+F5 Capitalize, lowercase (current word or selection)
    Ctrl+F5 Capitalize, rEVERSE cASE (current word or selection)
       
    F6 Comment (current line or selection)
    Shift+F6 Uncomment (current line or sselection)
       
    F7 Spell check, next error
    Shift+F7 Spell check, previous error
    Alt+F7 Spell check, show errors (toggle)
    Ctrl+F7 Spell check, add word under cursor to user dictionary
       
    F8 Macro Play
    Shift+F8 Macro Record
       
    F9 Folds, open/close (toggle)
    F9 (with text selected) Folds, set
    Ctrl+F9 Folds, open all
    Ctrl+Shift+F9 Folds, close all
    Alt+F9 Folds, clear at cursor
    Alt+Shift+F9 Folds, clear all
       
    F10 (un-mapped, reserved)
       
    F11 Date/Time insert (opens menu)
    F11 (x2) Date/Time insert (last format used)
    Ctrl+F11 Calendar (toggle)
       
    F12 and combinations (reserved for user-defined Add-on mappings)
       
    Insert Character By Values
    Alt+, {number} Insert character by decimal value
    Ctrl+K {two characters} Insert character by digraph (See Insert menu for listing)
       
    Column Mode
    Alt+Shift+{motion key} Column mode
    Alt+Shift+LeftMouse Column mode, select from cursor position to click position
    Esc, {motion}, or Left Mouse click Exits column mode
       
    Completion
    Ctrl+Space Word completion, Search backward
    Ctrl+Shift+Space Word completion, Search forward
       
    Ctrl+Enter Omni completion (list forward)
    Ctrl+Shift+Enter Omni completion (list backward)
       
    Esc+Space Template completion (see Tools menu for listing)
       
    Terminal Menus
    F12 (Terminal only) Console menu (Esc twice to exit)
       
    Information
    Alt+. Values of character under cursor
    Alt+( Information/prototype pop up menu
       
    Tag Navigation (requires a working installation of exuberant ctags [ext.link] )
    Alt+ArrowDown Go to tag under cursor
    Alt+ArrowUp Close reference and return
    Alt+ArrowLeft/ArrowRight Navigate backwards and forward between visited tags
    Ctrl+Alt+ArrowDown Toggles Taglist for current file
       
    File/Link Navigation in Text
    Shift+Enter Open a file matching selection or text under cursor
    Open a URL matching selection or text under cursor in browser
       
    Vim's Normal Mode
    Ctrl+L Vim's "Normal mode" (Esc to exit)
    Ctrl+B Vim's "Normal mode", single command (Esc to exit)
    Ctrl+\,Ctrl+N Vim's "Normal mode", alternate (Esc to exit)
       
    cream-0.43/docs-html/external.gif0000644000076400007660000000010611156572442017317 0ustar digitectlocaluserGIF89a ! , iA;P'{WTi;cream-0.43/docs-html/screenshot3-thumb.png0000644000076400007660000001503411156572442021077 0ustar digitectlocaluserPNG  IHDR\PLTE!&=?<:HC-T58N]?M]5QdMLE=Sb:UiCRbDV`@Xr7_k?d>RWYVWUJ\gG]mN]b@`zE_tJ`pBb|O^oGavS^jDd}LbrX_fEe~^`]FfOeuHgDjUhrKkSjzQl_jw4qSnOohigckrmhgR}O^q|onfkorLxrnlfq}jry]xrtqttlfyov~{tmY~^~nzj|v{~y{x|{su|^ztl~ve}|zycz~wlv~|ȫºǿ¾ÿú»ƽžȿAV3 pHYs  tIME *0wIDATx[ U6O@1R nKZ64M8qS7&]YMLEm7nw]QzQ$MPMHUdYV9❣;GΙ9g$fw׉liwi̼o~vӦ-nr9͛67冭[?魃O~dֿz@#[bSPnSyҗ>u[6w[o?~s_߽>'/_o|-[l[n?-e޺ e_~g_ym[?zU+77m?o7?ěӦ[~ᗶFlwe 7h]wu7 mz_yp~6ѦzyWM/=ӃoxسB3kϿ'8u^>qؿt<ԓǞ4Of?|x۶'O>Cvn{3C~Gٝ}澻>{ۿ;~{7>瑇'̡y {ϡ#G {YN ^Ͽ4(xnҳgjkгk}j=2<}3}]N1AFǞ|E XϝxٍO36?xyAԞ|k !rg[]BΐN{R&DpWZ 37t+ݕkv}JԪ°G⭱7IgʘH8 ;1̄=,ba4V9^%B\^pL(,!oyVIPEbDMؗgv' MVq !vp2GCcEU҉v]ż b;:J-Vp/”˳!M<΀ 5EU`tѯz;"!Da(&FE zQ+h*XEK\R.;ݘMK]д-<-==G P q3ݞP*WŒLM9_"Ӂ)Ćՠt/Q$mU$kp ĂKr/pYHHQ$%d!E[’$X+jm$'J$$x,B*$1NJ1]("\b0GY:1Tk,i{\WC,7G(vZn"RB:d. J!СMRd|ǃ^!P8ca ($ .GZbXEƛP9ͬO j!(J)0;_)VR)訃 ab DYŚRlC$_k7ɨjk3Ԣ+a]d Xʗm'ZEks.(=vl{q^q] ⑺rSy{kɛănV_Ȧf[$pwqC^li&}Egfɇ#T@8:3\bBgXwI%۽W1wf=椞[׆Y2gdQv,PNX✓`H˜ZuyЖ _ qx.9E]+5\G3jIQ*].Tki[k18ӺϽtfՉhvȎK фw^fd2O2Vi'8(XY ꈋAMvNc0=$7qÀ V#+SH:դdތn,':S p$ i9QR1V2G< ^Xn*dJDzB,+Jgޟ) D.=-UrGrK %fKN#UHaDZi3"NYSR/*娢֌".ltQTpI)W+r_.Vi^(Ӵ\ LM'fm B"T1$lw؄RD:Ja<\Z T1% =_HFc"EVF[jDs/ 6QO.p<\HkvWj5jAṊRѮ$9Z;Xpz@gg`xE+HH)kVr8dIPyk1əT^H泲E6aV ,e?J@,ۧYw 2 k 3/sb&1r!LُS$.Xta嶙uCO:ExbQõPW t'=YE͸\Cn+p6;jI1Z/*ZQ ]R b2<W̬ȍb**&ZgZ>sj8.J41W٨+ ]S:fzumzlY}y@TH Nz>H_‘YlT.v ,J@#!U*eH|kW>Eπ`D)|y c%B0Ԯw pAڞ\0F#qki–LȬ=1ٔ]+Pws#0F&scI 52g-x]ؽ -,%lJJ ;/٬ c 87x{cfgGș5# !& (fF~UAI%Tpʬeܞ$"+!/LH"\8$Bb/+VW^-R/GitTȵBŠ 6P/TԩKbJ#*\l3s9e.M++C/V ZcH_gr fC 軗l\de\)wb2Ź6g1f"a9j^D)"GfW_$O$C0(!w62ݥ@iMTN Ff N)5I͵^c9oHA @$e,, 3KR_KEE^ `kH:S)WNL6VA(3jbmĴ8 ITW]xgJ1S^+L ʸ+|b4,HBN汐yE y)Ϝ?;GʜP,hqpN<4 f9O?Uܾ R?˞^+7fn'W"&ߐz||5C;8[OW=e7E3>ĸ:+XͶT*ŲkRI0=gkk0J ?(+]XիZ{.˪.w +!FMl Fb@ L:bڝ5/?Z~58}.b6Uv-YҥJ N3rkA|#j X7I&4:r(h'$9u:dId Mq-pA%X嶔YV2+ru4f}Mq\zTgJ'fODy]]IWmv:qj\]Σ%{Ȍ}Wh8(;˅ x3 =Y0?X!zIMwIS̜GU.*JP]_1W'ng٥>;8ΗSeA iN?bb+fex3ŞnBE ") 9Ij8)t@~ }p ./U_qu^l[JLIby̛T^ujm*7W%sGC݂I络^Ÿ&g_Y)D7)n.rAH` sJłEB!lR9w8 +#*G@$Y:˻\{+:}5u(#35p|tHfHyk#@}cy]#z 7Ffjxc +qyȸNuO+1MW |;΀;k[1#U𳸣I̧|swhEȢ2XrM2> X. 7l^60 GS вؖ^ ͵x'PO\)Rqxy]iVTi0BCNwr{QL{jZR~gBE fF }^_ :\rtPu Rױtr-Eǐ:_7䖧^4j+;bפTexf&!.Vqb Sc@Dѵ!&.vD?4?t2tAH%>= e\ݝ&" ei|) Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    features

    Status Line


    (click to return)

    Cream indicates a great deal of information in the status line but without distraction. Groupings of similar or related states are collected together. Items that are off are usually colored more softly in all themes. Special items, such as the expert mode and diff mode indicated here, are in more noticeable shades.

    cream-0.43/docs-html/features.html0000644000076400007660000001074411517421020017505 0ustar digitectlocaluser Cream :: a modern configuration of the Vim text editor
    : :   a modern configuration of the Vim text editor

    h

    features

    The lengthy feature list describes Cream's capabilities, all accessible through menus and keyboard shortcuts. Common questions asked by users and developers are answered on the frequently asked questions (FAQ) page.

    Screenshots

    Typical session:


    (click to enlarge)
      

    Advanced session:


    (click to enlarge)
      

    Simple session:


    (click to enlarge)

    d

    cream-0.43/docs-html/statusline-thumb.png0000644000076400007660000003422511156572442021035 0ustar digitectlocaluserPNG  IHDRwXbPLTE# !  "$"%+$&$)4')& +6)*($+2$.9,.+//(.0-11*1303425646858:7';;3':<9=><3&AC@DD;(.CECGG>FHEDHKHIGCJQKLJMMEMOLKPRSNMPRORSQSURWSRWYVICX[WT\c[\Y]_\b]\Xah_a^RJIOab`bcacdbhcbdecefdUSfgeghfhjgilhjmienumolnpmproqspiurtqtvsuwtvxueix{wt|z|x{}z}|~{rww|¶ɸμÿùĻĿȿieZbKGDH pHYs  tIME 72M IDATx}|urĹ6M\sG]۔ lǤUK$:"dX$ıeU ՅEJk1DQ$%tbY1@,#^ ^a2 ݙٷo|ߛ7onQ~V#+xoZm{6#=d_W_e}k?~?x~ûߛZ֊y1"-Ym7EwͬEIE9dx݊>oϬ;_S*q  ^$ߎJaOdWQ.wU(.~iy] ן./g_jbe x2%Rѷ#+NκYFLQ<ݼ5.O 7=˄_Z=[$X,COUx([niU ^e%/g% .Ԁrޯ W"lEf-@X؍q Zll-0#9k޻T/ CX n5IaEX_?Eaۑb-dHjh{[7<T(@7dlVV ^ kCgTBqy"$7놸k*̒8(^uسo)]"CۜT&E}3aa5 gYQб'|j' +aURtU6PŴh'_ޠVc?0 w9HbEd#^roW_mQ؟gfe=X[QMK,,WMsTR- c˃S3OE`hE*mp#: y8q6`eCDw}BOF 8AylGZ6i{P8m֊k5%gDf!Tr]sG{q|UsH{B9#O{"s]..]:oP}E%|Yp qUTb82󴷬h)n6j7{&}kzVQgO.م.i%h?ׅ I%+ # M`@#ٜb㶏?OD-h[=.adT srܒU0ȐpY-8LܵW=JY@}6O{o@lѲ: äUH6 &O1f.QT\wҚ E\ .B }b )xP!ͣw-X3t A*s 壠B|߃HtLԾԪ3&5|dH jED}!\xZ; }:4V߮Dl@J"ص]lc\`ۜ\#tb]ew9-ֆv>ڳu02:6gJTAwHYݽCY7nii99A2A(u,dFN#GPsrF]t2Kc/4ƀ9M0R,c8d>$|mUϼL0/{5B)5tv3:8{j+T( j+ѽMzk*;TE@n5)-|f!BKg5T=]疂[63̾D|v^Ը}7|J*4Tg"mœպMxƈSoRdi؃P3jXy0KݽQn[=*F x3;+5*gP30{|)py,##6JUSE)f\6OQuVN!U+wOo4i2=(F5ݬ|XkNN ЅǼ9V )57%Fd%kCezce&4yĿ8o ; 3VAU ԛSWؠ:Ggl)Nj$'esv~iUwR@8 y] v=u0ءY Cwhh^m]z\6CUOGnb 3sN$ERycOQb>Pe2'.l +q*[Ѫvh5ML1@^h5p}E޺|L&՛S1<-UʨA}C kk9))=53$.z=7V ;ɠEU%dA˨WUZ7Mdn \:\%9SeDʇHɨ\-ՒʾTuUB8Yb& %J})gss7ݑҌ Ӎ,e3R d*&i~O9ҭbF,|$eY@iܢjL{ե{f*&;@(j$/Hfycb";f7\с?9OsN7 |w"|A5&[>TܼVugyf/F ͈/GmEi-F\呇4L Z,D5o|8GbWzo ؛P[:Zdʧ|{K̛(E|]kE_%sV*5uTME53jnPuU0^V6֤IeF7Jz_LbmU-E!pxǷn/O"Dȹy.}*𖩵J؅zIgGmg^z\oi!OiaV&G7`.Lv7@:8 ECKcC^c U @5gNlKɃPU{bHa&`Dt,SS[gy+{`S)omfHZcM@sҗɢդ0a_iztOzl^ 1 ok*r%UdC~z!|SsLw}/6;9Ԭ q|iϲj4 ` Y jtE4KMg r0]l^u ʔݩfW[eLuTqZ ,W1˫j9Ua=[~crƞA .*Lt-= ҞBݥzSWUǀ3|~ifj'W+ \ nxJdCtU[4~ݽCvK[̄8Hg `5o$3V35Є˅-mU1 ԰| [wZ+ό-C£HtU/k zm?񤗅vQ,mCO]PK{ e tU&Ӧj) Jv&ĂM!QR)*t7"yf,]U`9~yM1 /S-5%j=x`t~_&oi,1 U iE}'$i%[WuD}& jF"xCo52JyG7e𖚠j3` Pnuh+I'dwS櫆-8"mfm[$1Xqs-v7Z*M]$0ƟA[bp%SAM:ܬ/i=#5:r;@4[E7^[m=Xs`VI/ޒ,!mkLXؘ|W'MMmadUguPVI   6Q*`_؀!m1Mw|EžBK>Wn)-]Y:s:gAŌe&9;^ hUqLUƃ8®aWm8^U)* p&X8wbV/kmuUn`#5]ފMR>/!1Ukh0DwHա,޻+7Tf<`*k Iwnr:6prw^,nY cei}ٺjST9nP~!J c^[q]VeHWJn]s{A=VȱF$mO$O(iy-,;E27CWͲLBëDqx6} ^(mT)4~ M?7<<׭ds7a^IKC>Vk C<aU2IozJl ]4i~'$G]u漢lmŝضr<%p ɘno1*c5eufR~! iJBQwߪ[?)1<6jCn>FY-sd]cжқY*ܬC1&@TZ'âm`U~q gp6ݕW~qy <>懲 H5E5OI9}%7$ʮ8+^\Aʯ򗥤Q%{y_k$=&g˶ʧfvLlfY6g|,~+B/Rsh3($cMH<~ DzLqd9U݂!x0pgl6 tVIXTׯz_nS~=%dF(!A=<6&q"gfv 92kȌ=lϣK\|/OJ2Pc@8#P3cT9-=Ic{kȺ)sxDLWg6g䒦.Q9;\W߈`;P# )ϏQ>cr[ '=r{ڱNw^qdDcagg5>Y4[ʻw{ׄ3{A{z)_䱣OeI}s},[fvFWA)3xV2l~6.F'&_dt0Wn)Bi"_DarD")g \VJnT)6m 4I9/ݹ.4bMSd&oj?ij M|!K$'K8cӟbؖ$eHHb?vpI)r $#_ Jw{LKAw&qcqC\'Lŏtp#d~⃃c Nbz}}cz1-}?kwFzfǣgcoC'ų'{DPPr2yCoK ڈcoіd8OOw˓o5:tϥxrc3qKsG2Vx7gĿ7Oϲ(Hn$76}(146F%ƤRꠔ1>xb61z$ I4I.%DfL&e<}o}Md_??X'XNAgOBcC ǦB(%Y#q4BCcLb'0# a+ nH?JNX8pFezDRkDž0@X$(D(}L{rpOLSch=I_N} }~81M>TnKJ[Lh$~ (/^A1MnY$$nN}B0b׫(-yz:AK0-%#ӘUF,`%3i$ƒdAS@f `팱C'b 2$$c`-mO'3$JܘU$IDAT%$R@aA/ I EIESC3}ʙ`V\@a0db[SqĔTtSk n,kL,cښݳN4=&{1A1MEXˬZ'02j&Hj U~< LX VR\NX凳RϥfUtҙ3֭nweez-fwG7k?w0u ,'&*kxf6"rvTZ{=)p<^Z՟Ns^/;؋?|V0Wg&i-.F{{2Ԇil4U׶sA0JAS!ߡʃIIJHëv=fJɹ -- uJȖ+̲reE]9In!wP(E7}| UHO<3i,1|m{E6CFvóHZ@AHzc.<R 'r-Nb+HIf\_"ttn[.QzY6 ]ڻ8d\=ߣEq\]x] 3~ ?)tMP>Y _x\DV銟]dzJ+jV\(ZO7ŷyG(v?R2/wz'cRnN{{ҏWۅTeq;%{>1LnAݥ\Բ`!":2s'{34S7ʃ^_Zr_jk>fnjmOsИs| Y h} ;|?<_3Ue]B|ntvHajH{B,y0A[O4&!,3CE}~up{j+dy9V?e P]m jlbI|qmz`꺑6jqW4d MA?VS!_#ޔ  dF A ٢,7K$0w 5Tz.EL%q;Q,jŻquЗXx K-/X[HFC|R`+˜? ݺav" y~Nv|6$` ?jf^B]8CYmiiOT~d|XLK'Y΄[ZJ_ r"v1(iSX,ٽ?5K3ij^5T녣:˯ZgA-oI%Rik@pv#7ƥ%bžﴇ5 H p ~n6Hejcn$vGА䳐Ό!=x5c(y.//E[?YCe=r-5Kx>Hf8H*Yzݠ` {02Oy+Nl鯩h;_|~ܦ5Co.~WҎGjά_?Tfkɛ)*C7!7CEXilISaʍc[ ;pZk> )7ySV $y0nkCLKmϪӯ,4a!Vf0:a%6`9R < C~LPPfE` szUt%fcv'9%@!0'a9iaw:cU;2-Z1'LRnd6.{F{9wV?0t)hX(ؚLR|[#+}(2~G5e2 \)d\r٘efrļrE֏ZTfC߹h9 t_\+/>HJwֹ/C<'^u j֘\i(-H'v|+ӕ=iAk&`Xc3-Y>0郃g[s˩~3h(PqIENDB`cream-0.43/cream-iso639.vim0000644000076400007660000020071511517300720015747 0ustar digitectlocaluser" " cream-iso639.vim -- Exchange ISO639 language names and abbreviations " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " " Updated: 2004-07-31 01:38:17-0400 " " Description: " Find ISO639 language abbreviations or name when passed the other. " " Source: " http://www.loc.gov/standards/iso639-2/langcodes.html " " " Usage: " " Cream_iso639(word, ...) " " o Test {word} for match of ISO639-compliant language name, 3- or " 2-letter abbreviation: " * Returns name if {word} matches either abbreviation. " * Returns 3-letter if {word} matches name. " * Returns 0 if no match is made. " o Use {optional} argument to force a given return: " * Returns 3-letter if {optional} is "3" and {word} matches name, 2- " or 3-letter. " * Returns 2-letter if {optional} is "2" and {word} matches name, 2- " or 3-letter. But if no 2-letter exists, the 3-letter is returned " if there is a match. " * Returns name if {optional} is "name" and {word} matches name, 2- " or 3-letter. " * Returns 0 if no match is made. " o Matching is case-insensitive. But return values are capitalized " according to the standard. (Name is title case, abbreviations are " lower case.) " o In a number of cases, ISO639-2 allows multiple descriptive names " for a language. " * When passed the matching abbreviation, the function will return " the preferred description (listed first in the ISO list). " * Conversely, any of the listed descriptions can be matched, not " just the preferred. " " Examples: " " Condition where 2- and 3-letter abbreviations exist a language: " " :echo Cream_iso639("abk") returns "Abkhazian" " :echo Cream_iso639("ab") returns "Abkhazian" " :echo Cream_iso639("Abkhazian") returns "abk" " " :echo Cream_iso639("Abkhazian", "3") returns "abk" " :echo Cream_iso639("abk", "3") returns "abk" " :echo Cream_iso639("ab", "3") returns "abk" " :echo Cream_iso639("Abkhazian", "2") returns "ab" " :echo Cream_iso639("abk", "2") returns "ab" " :echo Cream_iso639("ab", "2") returns "ab" " :echo Cream_iso639("Abkhazian", "name") returns "Abkhazian" " :echo Cream_iso639("abk", "name") returns "Abkhazian" " :echo Cream_iso639("ab", "name") returns "Abkhazian" " " Condition where a 2-letter abbreviation doesn't exist for language: " " :echo Cream_iso639("Achinese") returns "ace" " :echo Cream_iso639("ace") returns "Achinese" " :echo Cream_iso639("Achinese", "2") returns "ace" " :echo Cream_iso639("ace", "2") returns "ace" " " Name or abbreviation unmatched: " " :echo Cream_iso639("not-a-name") returns 0 " :echo Cream_iso639("not") returns 0 " " Cream_iso639() {{{1 function! Cream_iso639(word, ...) " test strings " handle empty string if a:word == "" return "" endif " set option if a:0 > 0 if a:1 == "2" \|| a:1 == "3" \|| a:1 == "name" let optn = a:1 else let optn = "" endif else let optn = "" endif let a = s:Cream_iso639_test(a:word, "Abkhazian", "abk", "ab", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Achinese", "ace", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Acoli", "ach", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Adangme", "ada", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Adyghe", "ady", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Adygei", "ady", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Afar", "aar", "aa", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Afrihili", "afh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Afrikaans", "afr", "af", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Afro-Asiatic", "afa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Akan", "aka", "ak", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Akkadian", "akk", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Albanian", "alb", "sq", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Albanian", "sqi", "sq", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Aleut", "ale", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Algonquian", "alg", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Altaic", "tut", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Amharic", "amh", "am", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Apache", "apa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Arabic", "ara", "ar", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Aragonese", "arg", "an", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Aramaic", "arc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Arapaho", "arp", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Araucanian", "arn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Arawak", "arw", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Armenian", "arm", "hy", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Armenian", "hye", "hy", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Artificial", "art", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Assamese", "asm", "as", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Asturian", "ast", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bable", "ast", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Athapascan", "ath", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Australian", "aus", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Austronesian", "map", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Avaric", "ava", "av", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Avestan", "ave", "ae", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Awadhi", "awa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Aymara", "aym", "ay", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Azerbaijani", "aze", "az", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Balinese", "ban", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Baltic", "bat", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Baluchi", "bal", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bambara", "bam", "bm", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bamileke", "bai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Banda", "bad", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bantu", "bnt", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Basa", "bas", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bashkir", "bak", "ba", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Basque", "baq", "eu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Basque", "eus", "eu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Batak", "btk", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Beja", "bej", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Belarusian", "bel", "be", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bemba", "bem", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bengali", "ben", "bn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Berber", "ber", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bhojpuri", "bho", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bihari", "bih", "bh", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bikol", "bik", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bini", "bin", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bislama", "bis", "bi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Blin", "byn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bilin", "byn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bosnian", "bos", "bs", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Braj", "bra", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Breton", "bre", "br", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Buginese", "bug", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bulgarian", "bul", "bg", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Buriat", "bua", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Burmese", "bur", "my", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Burmese", "mya", "my", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Caddo", "cad", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Carib", "car", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Catalan", "cat", "ca", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Valencian", "cat", "ca", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Caucasian", "cau", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Cebuano", "ceb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Celtic", "cel", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Central American Indian", "cai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chagatai", "chg", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chamic", "cmc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chamorro", "cha", "ch", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chechen", "che", "ce", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Cherokee", "chr", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Cheyenne", "chy", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chibcha", "chb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chichewa", "nya", "ny", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chewa", "nya", "ny", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nyanja", "nya", "ny", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chinese", "chi", "zh", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chinese", "zho", "zh", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chinook", "chn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chipewyan", "chp", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Choctaw", "cho", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Church Slavic", "chu", "cu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Old Slavonic", "chu", "cu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Church Slavonic", "chu", "cu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Old Bulgarian", "chu", "cu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Old Church Slavonic", "chu", "cu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chuukese", "chk", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chuvash", "chv", "cv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Classical Newari", "nwc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Old Newari", "nwc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Classical Nepal Bhasa", "nwc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Coptic", "cop", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Cornish", "cor", "kw", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Corsican", "cos", "co", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Cree", "cre", "cr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Creek", "mus", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Creoles and pidgins", "crp", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Creoles and pidgins, English-based", "cpe", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Creoles and pidgins, French-based", "cpf", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Creoles and pidgins, Portuguese-based", "cpp", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Crimean Tatar", "crh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Crimean Turkish", "crh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Croatian", "scr", "hr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Croatian", "hrv", "hr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Cushitic", "cus", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Czech", "cze", "cs", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Czech", "ces", "cs", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dakota", "dak", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Danish", "dan", "da", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dargwa", "dar", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dayak", "day", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Delaware", "del", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dinka", "din", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Divehi", "div", "dv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dogri", "doi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dogrib", "dgr", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dravidian", "dra", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Duala", "dua", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dutch, Middle", "dum", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dutch", "dut", "nl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dutch", "nld", "nl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Flemish", "dut", "nl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dyula", "dyu", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Dzongkha", "dzo", "dz", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Efik", "efi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Egyptian", "egy", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ekajuk", "eka", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Elamite", "elx", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "English", "eng", "en", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "English, Middle", "enm", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "English, Old", "ang", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Erzya", "myv", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Esperanto", "epo", "eo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Estonian", "est", "et", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ewe", "ewe", "ee", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ewondo", "ewo", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Fang", "fan", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Fanti", "fat", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Faroese", "fao", "fo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Fijian", "fij", "fj", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Finnish", "fin", "fi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Finno-Ugrian", "fiu", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Fon", "fon", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "French", "fre", "fr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "French", "fra", "fr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "French, Middle", "frm", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "French, Old", "fro", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Frisian", "fry", "fy", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Friulian", "fur", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Fulah", "ful", "ff", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ga", "gaa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gaelic", "gla", "gd", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Scottish Gaelic", "gla", "gd", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gallegan", "glg", "gl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ganda", "lug", "lg", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gayo", "gay", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gbaya", "gba", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Geez", "gez", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Georgian", "geo", "ka", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Georgian", "kat", "ka", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "German", "ger", "de", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "German", "deu", "de", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "German, Middle High", "gmh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "German, Old High", "goh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Germanic", "gem", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gilbertese", "gil", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gondi", "gon", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gorontalo", "gor", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gothic", "got", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Grebo", "grb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Greek, Ancient", "grc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Greek, Modern", "gre", "el", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Greek, Modern", "ell", "el", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Guarani", "grn", "gn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gujarati", "guj", "gu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gwich´in", "gwi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Haida", "hai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Haitian", "hat", "ht", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Haitian Creole", "hat", "ht", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hausa", "hau", "ha", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hawaiian", "haw", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hebrew", "heb", "he", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Herero", "her", "hz", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hiligaynon", "hil", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Himachali", "him", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hindi", "hin", "hi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hiri Motu", "hmo", "ho", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hittite", "hit", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hmong", "hmn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hungarian", "hun", "hu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Hupa", "hup", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Iban", "iba", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Icelandic", "ice", "is", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Icelandic", "isl", "is", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ido", "ido", "io", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Igbo", "ibo", "ig", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ijo", "ijo", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Iloko", "ilo", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Inari Sami", "smn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Indic", "inc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Indo-European", "ine", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Indonesian", "ind", "id", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ingush", "inh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Interlingua", "ina", "ia", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Interlingue", "ile", "ie", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Inuktitut", "iku", "iu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Inupiaq", "ipk", "ik", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Iranian", "ira", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Irish", "gle", "ga", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Irish, Middle", "mga", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Irish, Old", "sga", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Iroquoian", "iro", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Italian", "ita", "it", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Japanese", "jpn", "ja", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Javanese", "jav", "jv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Judeo-Arabic", "jrb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Judeo-Persian", "jpr", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kabardian", "kbd", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kabyle", "kab", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kachin", "kac", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kalaallisut", "kal", "kl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Greenlandic", "kal", "kl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kalmyk", "xal", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kamba", "kam", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kannada", "kan", "kn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kanuri", "kau", "kr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kara-Kalpak", "kaa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Karachay-Balkar", "krc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Karen", "kar", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kashmiri", "kas", "ks", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kashubian", "csb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kawi", "kaw", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kazakh", "kaz", "kk", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Khasi", "kha", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Khmer", "khm", "km", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Khoisan", "khi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Khotanese", "kho", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kikuyu", "kik", "ki", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Gikuyu", "kik", "ki", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kimbundu", "kmb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kinyarwanda", "kin", "rw", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kirghiz", "kir", "ky", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Klingon", "tlh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "tlhlngan-Hol", "tlh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Komi", "kom", "kv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kongo", "kon", "kg", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Konkani", "kok", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Korean", "kor", "ko", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kosraean", "kos", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kpelle", "kpe", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kru", "kro", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kuanyama", "kua", "kj", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kwanyama", "kua", "kj", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kumyk", "kum", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kurdish", "kur", "ku", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kurukh", "kru", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Kutenai", "kut", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ladino", "lad", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lahnda", "lah", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lamba", "lam", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lao", "lao", "lo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Latin", "lat", "la", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Latvian", "lav", "lv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lezghian", "lez", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Limburgan", "lim", "li", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Limburger", "lim", "li", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Limburgish", "lim", "li", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lingala", "lin", "ln", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lithuanian", "lit", "lt", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lojban", "jbo", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Low German", "nds", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Low Saxon", "nds", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "German, Low", "nds", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Saxon, Low", "nds", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lower Sorbian", "dsb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lozi", "loz", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Luba-Katanga", "lub", "lu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Luba-Lulua", "lua", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Luiseno", "lui", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lule Sami", "smj", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Lunda", "lun", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Luo", "luo", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "lushai", "lus", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Luxembourgish", "ltz", "lb", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Letzeburgesch", "ltz", "lb", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Macedonian", "mac", "mk", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Macedonian", "mkd", "mk", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Madurese", "mad", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Magahi", "mag", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Maithili", "mai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Makasar", "mak", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Malagasy", "mlg", "mg", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Malay", "may", "ms", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Malay", "msa", "ms", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Malayalam", "mal", "ml", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Maltese", "mlt", "mt", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Manchu", "mnc", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mandar", "mdr", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mandingo", "man", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Manipuri", "mni", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Manobo", "mno", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Manx", "glv", "gv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Maori", "mao", "mi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Maori", "mri", "mi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Marathi", "mar", "mr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mari", "chm", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Marshallese", "mah", "mh", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Marwari", "mwr", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Masai", "mas", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mayan", "myn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mende", "men", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Micmac", "mic", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Minangkabau", "min", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mohawk", "moh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Moksha", "mdf", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Moldavian", "mol", "mo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mon-Khmer", "mkh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mongo", "lol", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mongolian", "mon", "mn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Mossi", "mos", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Multiple", "mul", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Munda", "mun", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nahuatl", "nah", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nauru", "nau", "na", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Navajo", "nav", "nv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Navaho", "nav", "nv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ndebele, North", "nde", "nd", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "North Ndebele", "nde", "nd", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ndebele, South", "nbl", "nr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "South Ndebele", "nbl", "nr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ndonga", "ndo", "ng", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Neapolitan", "nap", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nepali", "nep", "ne", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Newari", "new", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nepal Bhasa", "new", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nias", "nia", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Niger-Kordofanian", "nic", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nilo-Saharan", "ssa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Niuean", "niu", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nogai", "nog", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Norse, Old", "non", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "North American Indian", "nai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Northern Sami", "sme", "se", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Norwegian", "nor", "no", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Norwegian Bokmål", "nob", "nb", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Bokmål, Norwegian", "nob", "nb", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Norwegian Nynorsk", "nno", "nn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nynorsk, Norwegian", "nno", "nn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nubian", "nub", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nyamwezi", "nym", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nyankole", "nyn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nyoro", "nyo", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Nzima", "nzi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Occitan", "oci", "oc", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Provençal", "oci", "oc", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ojibwa", "oji", "oj", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Oriya", "ori", "or", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Oromo", "orm", "om", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Osage", "osa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ossetian", "oss", "os", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ossetic", "oss", "os", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Otomian", "oto", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Pahlavi", "pal", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Palauan", "pau", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Pali", "pli", "pi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Pampanga", "pam", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Pangasinan", "pag", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Panjabi", "pan", "pa", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Punjabi", "pan", "pa", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Papiamento", "pap", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Papuan", "paa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Persian", "per", "fa", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Persian", "fas", "fa", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Persian, Old", "peo", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Philippine", "phi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Phoenician", "phn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Pohnpeian", "pon", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Polish", "pol", "pl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Portuguese", "por", "pt", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Prakrit", "pra", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Provençal, Old", "pro", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Pushto", "pus", "ps", optn) | if a != "0" | return a | endif " qaa-qtz reserved for local use let a = s:Cream_iso639_test(a:word, "Quechua", "que", "qu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Raeto-Romance", "roh", "rm", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Rajasthani", "raj", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Rapanui", "rap", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Rarotongan", "rar", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Romance", "roa", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Romanian", "rum", "ro", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Romanian", "ron", "ro", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Romany", "rom", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Rundi", "run", "rn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Russian", "rus", "ru", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Salishan", "sal", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Samaritan Aramaic", "sam", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sami", "smi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Samoan", "smo", "sm", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sandawe", "sad", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sango", "sag", "sg", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sanskrit", "san", "sa", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Santali", "sat", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sardinian", "srd", "sc", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sasak", "sas", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Scots", "sco", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Selkup", "sel", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Semitic", "sem", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Serbian", "scc", "sr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Serbian", "srp", "sr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Serer", "srr", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Shan", "shn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Shona", "sna", "sn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sichuan Yi", "iii", "ii", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sidamo", "sid", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sign Languages", "sgn", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Siksika", "bla", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sindhi", "snd", "sd", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sinhalese", "sin", "si", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sino-Tibetan", "sit", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Siouan", "sio", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Skolt Sami", "sms", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Slave", "den", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Athapascan", "den", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Slavic", "sla", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Slovak", "slo", "sk", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Slovak", "slk", "sk", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Slovenian", "slv", "sl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sogdian", "sog", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Somali", "som", "so", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Songhai", "son", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Soninke", "snk", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sorbian", "wen", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sotho, Northern", "nso", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sotho, Southern", "sot", "st", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "South American Indian", "sai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Southern Sami", "sma", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Spanish", "spa", "es", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Castilian", "spa", "es", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sukuma", "suk", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sumerian", "sux", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Sundanese", "sun", "su", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Susu", "sus", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Swahili", "swa", "sw", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Swati", "ssw", "ss", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Swedish", "swe", "sv", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Syriac", "syr", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tagalog", "tgl", "tl", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tahitian", "tah", "ty", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tai", "tai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tajik", "tgk", "tg", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tamashek", "tmh", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tamil", "tam", "ta", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tatar", "tat", "tt", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Telugu", "tel", "te", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tereno", "ter", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tetum", "tet", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Thai", "tha", "th", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tibetan", "tib", "bo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tibetan", "bod", "bo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tigre", "tig", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tigrinya", "tir", "ti", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Timne", "tem", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tiv", "tiv", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tlingit", "tli", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tok Pisin", "tpi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tokelau", "tkl", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tonga (Nyasa)", "tog", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tonga (Tonga Islands)", "ton", "to", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tsimshian", "tsi", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tsonga", "tso", "ts", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tswana", "tsn", "tn", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tumbuka", "tum", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tupi", "tup", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Turkish", "tur", "tr", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Turkish, Ottoman", "ota", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Turkmen", "tuk", "tk", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tuvalu", "tvl", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Tuvinian", "tyv", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Twi", "twi", "tw", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Udmurt", "udm", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ugaritic", "uga", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Uighur", "uig", "ug", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Ukrainian", "ukr", "uk", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Umbundu", "umb", "", optn) | if a != "0" | return a | endif " special let a = s:Cream_iso639_test(a:word, "Undetermined", "und", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Upper Sorbian", "hsb", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Urdu", "urd", "ur", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Uzbek", "uzb", "uz", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Vai", "vai", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Venda", "ven", "ve", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Vietnamese", "vie", "vi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Volapük", "vol", "vo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Votic", "vot", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Wakashan", "wak", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Walamo", "wal", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Walloon", "wln", "wa", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Waray", "war", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Washo", "was", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Welsh", "wel", "cy", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Welsh", "cym", "cy", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Wolof", "wol", "wo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Xhosa", "xho", "xh", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Yakut", "sah", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Yao", "yao", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Yapese", "yap", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Yiddish", "yid", "yi", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Yoruba", "yor", "yo", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Yupik", "ypk", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Zande", "znd", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Zapotec", "zap", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Zenaga", "zen", "", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Zhuang", "zha", "za", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Chuang", "zha", "za", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Zulu", "zul", "zu", optn) | if a != "0" | return a | endif let a = s:Cream_iso639_test(a:word, "Zuni", "zun", "", optn) | if a != "0" | return a | endif return 0 endfunction " s:Cream_iso639_test() {{{1 function! s:Cream_iso639_test(word, name, abb3, abb2, optn) " the brains of the operation :) if a:optn == "" if a:word ==? a:name return a:abb3 elseif a:word ==? a:abb3 return a:name elseif a:word ==? a:abb2 return a:name endif elseif a:optn == "name" if a:word ==? a:name \|| a:word ==? a:abb3 \|| a:word ==? a:abb2 return a:name endif elseif a:optn == "3" if a:word ==? a:name \|| a:word ==? a:abb3 \|| a:word ==? a:abb2 return a:abb3 endif elseif a:optn == "2" if a:word ==? a:name \|| a:word ==? a:abb3 \|| a:word ==? a:abb2 if a:abb2 != "" return a:abb2 else return a:abb3 endif endif endif return "0" endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-colors-navajo.vim0000644000076400007660000001236111517300716017473 0ustar digitectlocaluser"= " cream-colors-navajo.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " ---------------------------------------------------------------------- " Vim color file " Maintainer: R. Edward Ralston " Last Change: 2002-01-24 09:56:48 " URI: http://eralston.tripod.com/navajo.png " " This color scheme uses a "navajo-white" background " set background=light highlight clear if exists("syntax_on") syntax reset endif "let g:colors_name = "cream-navajo" " looks good on Linux "highlight Normal ctermfg=Black guifg=Black guibg=#b39674 "highlight Normal ctermfg=Black guifg=Black guibg=NavajoWhite3 " slightly brighter for w32 "+++ Cream: brighten still more "highlight Normal ctermfg=Black guifg=Black guibg=#ba9c80 highlight Normal ctermfg=Black guifg=Black guibg=#caac90 "+++ "+++ Cream: "highlight SpecialKey term=bold ctermfg=DarkBlue guifg=Blue highlight SpecialKey term=bold ctermfg=darkblue guifg=#404010 "highlight NonText term=bold ctermfg=DarkBlue cterm=bold gui=bold guifg=#808080 highlight NonText term=bold ctermfg=darkblue cterm=bold gui=bold guifg=#404010 "+++ highlight Directory term=bold ctermfg=DarkBlue guifg=Blue highlight ErrorMsg term=standout ctermfg=Gray ctermbg=DarkRed cterm=bold gui=bold guifg=White guibg=Red highlight IncSearch term=reverse cterm=reverse gui=reverse highlight Search term=reverse ctermbg=Black ctermfg=White cterm=reverse guibg=White highlight MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen highlight ModeMsg term=bold cterm=bold gui=bold highlight LineNr term=underline ctermfg=DarkCyan ctermbg=Gray guibg=#808080 gui=bold guifg=black "+++ Cream: defined as User1-4 "highlight StatusLineNC term=reverse cterm=reverse gui=bold guifg=LightRed guibg=#707070 "+++ highlight VertSplit term=reverse cterm=reverse gui=bold guifg=White guibg=#707070 highlight Title term=bold ctermfg=DarkMagenta gui=bold guifg=DarkMagenta "+++ Cream: "highlight Visual term=reverse cterm=reverse gui=reverse guifg=#c0c0c0 guibg=black highlight Visual term=reverse cterm=reverse gui=bold guifg=White guibg=#553388 "+++ highlight VisualNOS term=bold,underline cterm=bold,underline gui=reverse guifg=Grey guibg=white highlight WarningMsg term=standout ctermfg=DarkRed gui=bold guifg=Red highlight WildMenu term=standout ctermfg=Black ctermbg=DarkYellow guifg=Black guibg=Yellow highlight Folded term=standout ctermfg=DarkBlue ctermbg=Gray guifg=Black guibg=NONE guifg=#907050 highlight FoldColumn term=standout ctermfg=DarkBlue ctermbg=Gray guifg=DarkBlue guibg=#c0c0c0 highlight DiffAdd term=bold ctermbg=DarkBlue guibg=White highlight DiffChange term=bold ctermbg=DarkMagenta guibg=#edb5cd highlight DiffDelete term=bold ctermfg=DarkBlue ctermbg=6 cterm=bold gui=bold guifg=LightBlue guibg=#f6e8d0 highlight DiffText term=reverse ctermbg=DarkRed cterm=bold gui=bold guibg=#ff8060 highlight Cursor gui=reverse guifg=#404010 guibg=white highlight lCursor guifg=bg guibg=fg highlight Match term=bold,reverse ctermbg=Yellow ctermfg=Blue cterm=bold,reverse gui=bold,reverse guifg=yellow guibg=blue " Colors for syntax highlighting highlight Comment term=bold ctermfg=DarkBlue guifg=#181880 highlight Constant term=underline ctermfg=DarkRed guifg=#c00058 highlight Special term=bold ctermfg=DarkMagenta guifg=#404010 highlight Identifier term=underline ctermfg=DarkCyan cterm=NONE guifg=#106060 highlight Statement term=bold ctermfg=DarkRed cterm=bold gui=bold guifg=Brown highlight PreProc term=underline ctermfg=DarkMagenta guifg=DarkMagenta highlight Type term=underline ctermfg=DarkGreen gui=bold guifg=SeaGreen highlight Ignore ctermfg=Gray cterm=bold guifg=bg highlight Error term=reverse ctermfg=Gray ctermbg=DarkRed cterm=bold gui=bold guifg=White guibg=Red highlight Todo term=standout ctermfg=DarkBlue ctermbg=Yellow guifg=Blue guibg=Yellow "+++ Cream " statusline highlight User1 gui=bold guifg=#6666cc guibg=#ba9c80 highlight User2 gui=bold guifg=#181880 guibg=#ba9c80 highlight User3 gui=bold guifg=#ffffff guibg=#ba9c80 highlight User4 gui=bold guifg=#cc3366 guibg=#ba9c80 " bookmarks highlight Cream_ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold guifg=White guibg=#553388 gui=bold " spell check highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=black guibg=#ffcccc " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#eaccb0 " email highlight EQuote1 guifg=#0000cc highlight EQuote2 guifg=#3333cc highlight EQuote3 guifg=#6666cc highlight Sig guifg=#666666 "+++ cream-0.43/cream-devel.vim0000644000076400007660000000472711517300720016017 0ustar digitectlocaluser" " Filename: cream-devel.vim " " Description: Development related tools. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " if !exists("g:cream_dev") finish endif " TestCow() {{{1 function! TestCow(...) " Displays the values of any number of arguments passed. (Useful for " dumping an unknown list of variables without regard!) if a:0 > 0 let x = "" let i = 0 while exists("a:{i}") let x = x . "\n a:" . i . " = " . a:{i} let i = i+1 endwhile call confirm( \ x . "\n" . \ "\n", "&Ok", 1, "Info") endif endfunction " mappings {{{1 " minimize Vim " * Remember: we map Ctrl+Shift+V to start Vim in the window manager " * Note: destroys the German so we double it imap v :suspend imap V :suspend imap :suspend imap :suspend " Cream_source_self() {{{1 if !exists("*Cream_source_self") " Source the current file. (Function check wrapper ensures this works " even in the same file as this function definition.) function! Cream_source_self(mode) " source the current file as a Vim script if &filetype != "vim" call confirm( \ "Can only source Vim files.\n" . \ "\n", "&Ok", 1, "Info") return endif silent! update let n = Cream_source(expand("%")) if n == 1 echo "Source successful." else call confirm( \ "Source errored.\n" . \ "\n", "&Ok", 1, "Info") endif if a:mode == "v" normal gv endif endfunction imap :call Cream_source_self("i") vmap :call Cream_source_self("v") endif " 1}}} " vim:foldmethod=marker cream-0.43/cream-loremipsum.vim0000644000076400007660000002643611517300720017115 0ustar digitectlocaluser" " Filename: cream-loremipsum.vim " Updated: 2009-11-09, 09:11pm " " Cream -- An easy-to-use configuration of the famous Vim text editor " (http://cream.sourceforge.net) Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " (http://www.gnu.org/licenses/gpl.html) " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Lorem Ipsum: Text filler from the 1500's classic. " " Cream_loremipsum() {{{1 function! Cream_loremipsum() " Insert Latin at the cursor as user requests number of paragraphs. if !exists("s:cnt") let s:cnt = 1 endif " request let n = Inputdialog("Please enter the number of paragraphs to enter:", s:cnt) " do nothing on cancel if n == "{cancel}" return " warn only numbers allowed elseif match(n, '[^0-9]') != -1 call confirm( \ "Only numbers are allowed.\n" . \ "\n", "&Ok", 1, "Error") " quit if 0 elseif n == 0 return else " remember it let s:cnt = n endif let str = "" let i = 0 while i < n let str = str . Cream_loremipsum_getpara() " add returns if not at end if i-1 != n let str = str . "\n\n" endif let i = i + 1 endwhile let @x = str normal "xP endfunction " Cream_loremipsum_getpara() {{{1 function! Cream_loremipsum_getpara() " Return paragraph of 2-6 sentences. let para = "" let l = Urndm(2, 6) let i = 0 while i < l let para = para . Cream_loremipsum_getsent() . " " let i = i + 1 endwhile return substitute(para, ' $', '', '') endfunction " Cream_loremipsum_getsent() {{{1 function! Cream_loremipsum_getsent() " Return consecutive sentences of lorem ipsum. " init if !exists("g:CREAM_LOREMIPSUM") let g:CREAM_LOREMIPSUM = 1 " loop on twice the number we have elseif g:CREAM_LOREMIPSUM >= 14 let g:CREAM_LOREMIPSUM = 1 else let g:CREAM_LOREMIPSUM = g:CREAM_LOREMIPSUM + 1 endif let rnd = g:CREAM_LOREMIPSUM " Source: http://www.lipsum.com/ " The standard Lorem Ipsum passage, used since the 1500s if rnd == 1 | return "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." elseif rnd == 2 | return "Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." elseif rnd == 3 | return "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." elseif rnd == 4 | return "Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." " Section 1.10.32 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC elseif rnd == 5 | return "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo." elseif rnd == 6 | return "Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt." elseif rnd == 7 | return "Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem." elseif rnd == 8 | return "Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur?" elseif rnd == 9 | return "Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?" " Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC elseif rnd == 10 | return "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga." elseif rnd == 11 | return "Et harum quidem rerum facilis est et expedita distinctio." elseif rnd == 12 | return "Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus." elseif rnd == 13 | return "Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae." elseif rnd == 14 | return "Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat." endif endfunction " 1}}} " Cream Gibberish " " Description: Text filler from random characters. One of the dangers " of generating random text is that it might produce actual words. " This, in combination with a lengthy set of rules to get the text to " look valid mostly rules out using these for the purpose of filler " text. " Cream_gibberish() {{{1 function! Cream_gibberish(paragraphs) " {paragraphs} is the number of paragraphs to return. " initialize let s:lastchar = "" let s:lastword = "" let s:lastsent = "" let s:lastpara = "" let str = "" let i = 0 while i < a:paragraphs let str = str . s:Cream_getpara() . "\n\n" let i = i + 1 endwhile return str endfunction " s:Cream_getpara() {{{1 function! s:Cream_getpara() " Return paragraph of length 3-8 sentances. let para = "" let l = Urndm(3, 8) let i = 0 while i < l let para = s:Cream_getsent() . " " . para let i = i + 1 endwhile return para endfunction " s:Cream_getsent() {{{1 function! s:Cream_getsent() " Return sentence of length 5-24 words. let sent = "" let l = Urndm(5, 24) let i = 0 while i < l let sent = sent . " " . s:Cream_getword() " capitalize first word (and strip leading space ;) if i == 0 let sent = substitute(sent, '^ \(.\)', '\u\1', "") endif let i = i + 1 endwhile return sent . "." endfunction " s:Cream_getword() {{{1 function! s:Cream_getword() " Return word. " o Length 2-12 characters along a bell curve with an " average of 5. " o No characters repeating. " o " let word = "" let len = Urndm(1, 3) + Urndm(1, 5) + Urndm(0, 2) let i = 0 while i < len " rule check let valid = 0 while valid == 0 let prev = matchstr(word, '.$') let char = s:Cream_getchar() " don't let chars repeat if prev == char " rarely (1:3) let vowels repeat elseif s:Cream_isvowel(prev) == 1 && s:Cream_isvowel(char) == 1 && Urndm(1, 3) > 1 " rarely (1:3) let consonents repeat elseif s:Cream_isvowel(prev) == 0 && s:Cream_isvowel(char) == 0 && Urndm(1, 3) > 1 " rarely (1:6) let vowels begin words elseif i == 0 && s:Cream_isvowel(char) == 1 && Urndm(1, 6) > 1 " rarely (1:10) allow weird adjacencies elseif s:Cream_isweird(prev, char) == 1 && Urndm(1, 10) > 1 " rarely (1:5) end word with non-characteristic letter elseif ((i + 1) == len) && s:Cream_isbadendchar(char) == 1 && Urndm(1, 5) > 1 "" strip previous letter and de-increment "let word = substitute(word, '\(.*\).$', '\1', '') ""let i = i - 1 " try again let char = s:Cream_getchar() let valid = 1 else let valid = 1 endif endwhile let word = word . char let i = i + 1 endwhile return word endfunction " s:Cream_isvowel() {{{1 function! s:Cream_isvowel(char) if a:char =~ '[aeiou]' return 1 elseif a:char =~ '[^aeiou]' return 0 endif return -1 endfunction " s:Cream_isbadendchar() {{{1 function! s:Cream_isbadendchar(char) if a:char =~ '[aceijoquvz]' return 1 endif endfunction " s:Cream_isweird() {{{1 function! s:Cream_isweird(prev, char) " avoids unrealistic adjacencies if 1 == 2 | return 1 elseif a:prev == "n" && a:char == "l" | return 1 elseif a:prev == "b" if a:char == "c" \|| a:char == "d" \|| a:char == "f" \|| a:char == "g" \|| a:char == "h" \|| a:char == "j" \|| a:char == "k" \|| a:char == "l" \|| a:char == "m" \|| a:char == "n" \|| a:char == "p" \|| a:char == "q" \|| a:char == "s" \|| a:char == "t" \|| a:char == "v" \|| a:char == "w" \|| a:char == "x" \|| a:char == "z" return 1 endif elseif a:prev == "d" && a:char == "b" | return 1 elseif a:prev == "g" && a:char == "p" | return 1 elseif a:prev == "h" if a:char == "b" \|| a:char == "c" \|| a:char == "d" \|| a:char == "f" \|| a:char == "g" \|| a:char == "h" \|| a:char == "j" \|| a:char == "k" \|| a:char == "l" \|| a:char == "m" \|| a:char == "n" \|| a:char == "p" \|| a:char == "q" \|| a:char == "r" \|| a:char == "s" \|| a:char == "t" \|| a:char == "v" \|| a:char == "w" \|| a:char == "x" \|| a:char == "z" return 1 endif elseif a:prev == "k" if a:char == "b" \|| a:char == "c" \|| a:char == "d" \|| a:char == "f" \|| a:char == "g" \|| a:char == "h" \|| a:char == "j" \|| a:char == "k" \|| a:char == "m" \|| a:char == "p" \|| a:char == "q" \|| a:char == "s" \|| a:char == "t" \|| a:char == "v" \|| a:char == "w" \|| a:char == "x" \|| a:char == "z" return 1 endif elseif a:prev == "k" && a:char == "t" | return 1 elseif a:prev == "l" && a:char == "g" | return 1 elseif a:prev == "n" && a:char == "r" | return 1 elseif a:prev == "r" && a:char == "g" | return 1 elseif a:prev == "t" if a:char == "b" \|| a:char == "c" \|| a:char == "d" \|| a:char == "f" \|| a:char == "g" \|| a:char == "j" \|| a:char == "k" \|| a:char == "m" \|| a:char == "n" \|| a:char == "p" \|| a:char == "q" \|| a:char == "s" \|| a:char == "v" \|| a:char == "w" \|| a:char == "x" \|| a:char == "z" return 1 endif elseif a:prev == "v" && a:char == "m" | return 1 elseif a:prev == "y" && a:char == "g" | return 1 endif endfunction function! s:Cream_getchar() " Return character based on frequency in English. let rndm = Urndm(0, 10000) if rndm > 8883 | return "e" | endif if rndm > 8034 | return "a" | endif if rndm > 7276 | return "r" | endif if rndm > 6521 | return "i" | endif if rndm > 5805 | return "o" | endif if rndm > 5110 | return "t" | endif if rndm > 4444 | return "n" | endif if rndm > 3871 | return "s" | endif if rndm > 3322 | return "l" | endif if rndm > 2868 | return "c" | endif if rndm > 2505 | return "u" | endif if rndm > 2166 | return "d" | endif if rndm > 1850 | return "p" | endif if rndm > 1548 | return "m" | endif if rndm > 1248 | return "h" | endif if rndm > 1001 | return "g" | endif if rndm > 794 | return "b" | endif if rndm > 613 | return "f" | endif if rndm > 435 | return "y" | endif if rndm > 306 | return "w" | endif if rndm > 196 | return "k" | endif if rndm > 95 | return "v" | endif if rndm > 66 | return "x" | endif if rndm > 39 | return "z" | endif if rndm > 19 | return "j" | endif return "qu" endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream.desktop0000644000076400007660000000073711326226016015600 0ustar digitectlocaluser[Desktop Entry] Type=Application Version=0.9.4 Name=Cream GenericName=Text Editor Comment=Cream (for Vim) text editor MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; Exec=cream Icon=cream Terminal=0 XClassHintResName=VIM MapNotify=false Encoding=UTF-8 X-Desktop-File-Install-Version=0.4 Categories=Application;Utility; cream-0.43/cream-statusline.vim0000644000076400007660000002753111517300720017111 0ustar digitectlocaluser" " cream-statusline.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " o WARNING!! Statuslines prior to version 6.2.071 are unable to " handle more than 50 items. (An items is an "%" object, defined by " begin group, enclosee [, close group]). In fact, prior to some " version of 6.0.? this limit was even lower. " o Close of a highlighting group (%*) is not necessary--Vim always " assumes the beginning of the next ends the previous. " o Cream's statusline colors are dependent on colors definitions " elsewhere for User highlight groups 1-4, represented as "%N*" ... " "%*" corresponding to the highlight group "UserN" " o Changing highlighting groups dynamically in the status bar has far " too much overhead and is too slow. So we: " * Preset all the highlight groups (elsewhere) " * Pair two calls to two corresponding ON/OFF functions for *each* " evaluation " * Return a value for the actual condition (displayed) " * Return empty for reverse (isn't displayed) " o :set statusline= requires a very specific syntax and can not " accept a function since it is specially evaluated by Vim, probably " because it happens so often. Examples of illegal/non-functioning: " " set statusline=Cream_statusline() " execute "set statusline=" . Cream_statusline() " " It's the internal components of the statusline that continually " get re-evaluated, not the entire statusline. (&stl is not " continually executed, only the components *within*.) " initialize statusline on load (autocmd will handle state by retained " preference) set laststatus=2 " evaluation functions " path/file {{{1 function! Cream_statusline_path() call Cream_buffer_pathfile() " ignore path in gui (it's in titlebar) if has("gui_running") return " " endif " strip filename let path = fnamemodify(b:cream_pathfilename, ":h") " ensure trailing slash let path = Cream_path_addtrailingslash(path) return path endfunction " file state conditions function! Cream_statusline_filestate() let state = "" " test read-only state once if !exists("b:cream_pathfilename") || b:cream_pathfilename == "(Untitled)" let b:cream_readonly = 0 else let b:cream_readonly = filewritable(b:cream_pathfilename) endif " help file if &buftype == "help" return 'H' " writable elseif b:cream_readonly == 0 \ || &readonly || &buftype == "nowrite" return '-' " modified elseif &modified != 0 return '*' " unmodified else return ' ' endif endfunction function! Cream_statusline_filename() if !exists("b:cream_pathfilename") return "(Untitled)" elseif b:cream_pathfilename == "" return "(Untitled)" endif return fnamemodify(b:cream_pathfilename, ":t") endfunction " file properties {{{1 " grouped to preserve group count " fileformat (three characters only) function! Cream_statusline_fileformat() if &fileformat == "" return "--" else return &fileformat endif endfunction " fileencoding (three characters only) function! Cream_statusline_fileencoding() if &fileencoding == "" if &encoding != "" return &encoding else return "--" endif else return &fileencoding endif endfunction " file type function! Cream_statusline_filetype() if &filetype == "" return "--" else return &filetype endif endfunction function! Cream_statusline_fileinfo() return Cream_statusline_fileformat() . ":" . \ Cream_statusline_fileencoding() . ":" . \ Cream_statusline_filetype() endfunction " specials {{{1 " indicate expert mode function! Cream_statusline_expert() if exists("g:CREAM_EXPERTMODE") && g:CREAM_EXPERTMODE == 1 return "expert " endif return "" endfunction " diff mode function! Cream_statusline_diffmode() if exists("b:cream_diffmode") return "diff " endif return "" endfunction function! Cream_statusline_specials() " this function collects multiple special states together so that we " are able to minimize the number of items in the final statusline let myspecials = "" let myspecials = myspecials . Cream_statusline_expert() let myspecials = myspecials . Cream_statusline_diffmode() return myspecials endfunction " right side {{{1 " show invisibles function! Cream_statusline_showON() "if exists("g:LIST") && g:LIST == 1 if &list if &encoding == "latin1" "return "" return nr2char(182) elseif &encoding == "utf-8" \ && v:version >= 602 \ || v:version == 601 \ && has("patch469") " decimal 182 return nr2char(182) else return "$" endif else return "" endif endfunction function! Cream_statusline_showOFF() "if exists("g:LIST") && g:LIST == 1 if &list return "" else if &encoding == "latin1" "return "" return nr2char(182) elseif &encoding == "utf-8" \ && v:version >= 602 \ || v:version == 601 \ && has("patch469") " decimal 182 return nr2char(182) else return "$" endif endif endfunction " Word wrap function! Cream_statusline_wrapON() if &wrap return "wrap" else return "" endif endfunction function! Cream_statusline_wrapOFF() if &wrap return "" else return "wrap" endif endfunction " Auto Wrap function! Cream_statusline_autowrapON() if &textwidth return "auto " . &textwidth else return "" endif endfunction function! Cream_statusline_autowrapOFF() if &textwidth return "" else if exists("g:CREAM_AUTOWRAP_WIDTH") " use global, actual width is 0 return "auto " . g:CREAM_AUTOWRAP_WIDTH else return "auto " . &textwidth endif endif endfunction " wrap width function! Cream_statusline_wrap_width() " return wrap width setting " (don't check existance of g:CREAM_AUTOWRAP) "if exists("g:CREAM_AUTOWRAP_WIDTH") " return g:CREAM_AUTOWRAP_WIDTH "endif " respect Vim actual settings (modelines) return &textwidth endfunction " justification function! Cream_statusline_wrap_justifyON() " return justification mode if not "left" if !exists("g:cream_justify") return "" endif if g:cream_justify == "center" return "cntr" elseif g:cream_justify == "right" return "rght" elseif g:cream_justify == "full" return "full" else return "" endif endfunction function! Cream_statusline_wrap_justifyOFF() " return justification mode if not "left" if !exists("g:cream_justify") return "left" endif if g:cream_justify == "left" return "left" else return "" endif endfunction " tabs " &expandtab function! Cream_statusline_expandtabON() if &expandtab == 0 return "tabs" else return "" endif endfunction function! Cream_statusline_expandtabOFF() if &expandtab == 0 return "" else return "tabs" endif endfunction " tabstop and softtabstop function! Cream_statusline_tabstop() " show by Vim option, not Cream global (modelines) let str = "" . &tabstop " show softtabstop or shiftwidth if not equal tabstop if (&softtabstop && (&softtabstop != &tabstop)) \ || (&shiftwidth && (&shiftwidth != &tabstop)) if &softtabstop let str = str . ":sts" . &softtabstop endif if &shiftwidth != &tabstop let str = str . ":sw" . &shiftwidth endif endif return str endfunction " autoindent "function! Cream_statusline_autoindentON() " if exists("g:CREAM_AUTOINDENT") " if g:CREAM_AUTOINDENT == "1" " return "indt" " else " return "" " endif " else " " wrap is on if never initialized " return "wrap" " endif "endfunction "function! Cream_statusline_autoindentOFF() " if exists("g:CREAM_AUTOINDENT") " if g:CREAM_AUTOINDENT == "1" " return "" " else " return "indt" " endif " else " " autoindent is on if never initialized " return "" " endif "endfunction function! Cream_statusline_autoindentON() if &autoindent return "indt" else return "" endif endfunction function! Cream_statusline_autoindentOFF() if &autoindent return "" else return "indt" endif endfunction " mode (Insert/Visual/Select/Replace v. Normal) " ( see :help mode() for return strings) function! Cream_statusline_modeNO() let mymode = mode() if mymode ==? "i" return "" elseif mymode ==? "v" return "" elseif mymode ==? "s" return "" elseif mymode ==? "R" return "" elseif mymode == "" return "C" elseif mymode ==? "n" return "N" else return " " . mymode . " " endif endfunction "function! Cream_statusline_modeCOL() " let mymode = mode() " else " return "" " endif "endfunction function! Cream_statusline_modeOK() let mymode = mode() if mymode ==? "i" return "I" elseif mymode ==? "v" return "V" elseif mymode ==? "s" return "S" elseif mymode ==? "R" return "R" elseif mymode == "" return "" else return "" endif endfunction function! Cream_statusline_bufsize() let bufsize = line2byte(line("$") + 1) - 1 " prevent negative numbers (non-existant buffers) if bufsize < 0 let bufsize = 0 endif " add commas let remain = bufsize let bufsize = "" while strlen(remain) > 3 let bufsize = "," . strpart(remain, strlen(remain) - 3) . bufsize let remain = strpart(remain, 0, strlen(remain) - 3) endwhile let bufsize = remain . bufsize " too bad we can't use "" (nr2char(1068)) :) let char = "b" return bufsize . char endfunction " 1}}} " utility function ("real time") {{{1 function! Cream_cursor_pos(mode, cursor) " NOTE: Function must be global. if a:mode == "\" let mode = "V" elseif a:mode == "\" let mode = "S" else let mode = a:mode endif let b:cursor_{mode} = a:cursor return "" endfunction " 1}}} " set statusline {{{1 if v:version < 603 " limited number of fields set statusline= \%{Cream_cursor_pos(mode(),virtcol(\".\"))} \%2*%{Cream_statusline_filename()} \\ %3*%{Cream_statusline_filestate()} \%1*\|%{Cream_statusline_fileinfo()}\| \%{Cream_statusline_bufsize()}\ %= \%3*%{Cream_statusline_specials()} \%1*\| \%2*%{Cream_statusline_showON()} \%1*%{Cream_statusline_showOFF()}\| \%2*%{Cream_statusline_wrapON()} \%1*%{Cream_statusline_wrapOFF()}: \%2*%{Cream_statusline_autowrapON()} \%1*%{Cream_statusline_autowrapOFF()}: \%{Cream_statusline_wrap_width()}\| \%2*%{Cream_statusline_expandtabON()} \%1*%{Cream_statusline_expandtabOFF()}: \%{Cream_statusline_tabstop()}\| \%05(%l%),%03(%v%) \%2*\ %P else set statusline= \%{Cream_cursor_pos(mode(),virtcol(\".\"))} \%1*%{Cream_statusline_path()} \%2*%{Cream_statusline_filename()} \\ %3*%{Cream_statusline_filestate()} \%1*\|%{Cream_statusline_fileinfo()}\| \%{Cream_statusline_bufsize()}\ %= \%3*%{Cream_statusline_specials()} \%1*\| \%2*%{Cream_statusline_showON()} \%1*%{Cream_statusline_showOFF()}\| \%2*%{Cream_statusline_wrapON()} \%1*%{Cream_statusline_wrapOFF()}: \%2*%{Cream_statusline_autowrapON()} \%1*%{Cream_statusline_autowrapOFF()}: \%3*%{Cream_statusline_wrap_justifyON()} \%1*%{Cream_statusline_wrap_justifyOFF()}\| \%2*%{Cream_statusline_expandtabON()} \%1*%{Cream_statusline_expandtabOFF()}: \%{Cream_statusline_tabstop()}: \%2*%{Cream_statusline_autoindentON()} \%1*%{Cream_statusline_autoindentOFF()}\| \%4*%{Cream_statusline_modeNO()} \%1*%{Cream_statusline_modeOK()}\| \%05(%l%),%03(%v%) \%2*\ %P endif " 1}}} " vim:foldmethod=marker cream-0.43/EnhancedCommentify.vim0000644000076400007660000014453411321014142017365 0ustar digitectlocaluser"= " EnhancedCommentify.vim -- with mods by Cream " vim:foldmethod=marker:ts=8 " " Source: http://vim.sourceforge.net/scripts/script.php?script_id=23 " Cream Additions " Usage (summary) {{{1 " " EnhancedCommentify(overrideEL, mode [, startBlock, endBlock]) " " overrideEL -- Commentify empty lines. May be 'yes', 'no' or '' " for guessing. With UseSyntax option this value is " guessed for every invocation of the function. " However, if the passed value is not '', the given " value will override any checks. " mode -- Action to be executed. Specifies in what mode the " script is run: " comment => region gets commented " decomment => region gets decommented " guess => every line is checked wether it should " be commented or decommented. This is the " traditional mode. " first => blocks is commented or decommented based " on the very first line of the block. For single " lines, this is identical to 'guess' " startBlock -- number of line, where block starts (optional) " endBlock -- number of line, where block ends (optional) " " 1}}} " Vars {{{1 let g:EnhCommentifyIgnoreWS = 'No' let g:EnhCommentifyRespectIndent = 'Yes' let g:EnhCommentifyUseBlockIndent = 'Yes' let g:EnhCommentifyPretty = 'No' let g:EnhCommentifyFirstLineMode = 'No' let g:EnhCommentifyAlignRight = 'Yes' " we don't use this, but it ensures maps aren't created let g:EnhCommentifyUserBindings = 'Yes' " 1}}} " Functions " Cream_commentify() {{{1 function! Cream_commentify(mode) " comment selection or current line if none if a:mode == "v" normal gv " cursor in first column of last line implies not selected let mycol = col('.') let myline1 = line("'<") let myline2 = line("'>") if mycol == "1" let myline2 = myline2 - 1 endif else " use current line for start/stop let myline1 = line('.') let myline2 = line('.') endif " fix hang if empty (or only returns) selection if s:Cream_commentify_isempty(myline1, myline2) == 1 return endif call EnhancedCommentifyInitBuffer() call EnhancedCommentify("Yes", "comment", myline1, myline2) if a:mode == "v" normal gv endif endfunction " Cream_decommentify() {{{1 function! Cream_decommentify(mode) " de-comment selection or current line if none if a:mode == "v" normal gv " cursor in first column of last line implies not selected let mycol = col('.') let myline1 = line("'<") let myline2 = line("'>") if mycol == "1" let myline2 = myline2 - 1 endif else " use current line for start/stop let myline1 = line('.') let myline2 = line('.') endif " fix hang if empty (or only returns) selection if s:Cream_commentify_isempty(myline1, myline2) == 1 return endif call EnhancedCommentifyInitBuffer() call EnhancedCommentify("Yes", "decomment", myline1, myline2) if a:mode == "v" normal gv endif endfunction " Cream_commentify_noindent() {{{1 function! Cream_commentify_noindent(mode) " comment selection or current line if none, respect indent, first column if a:mode == "v" normal gv " cursor in first column of last line implies not selected let mycol = col('.') let myline1 = line("'<") let myline2 = line("'>") if mycol == "1" let myline2 = myline2 - 1 endif else " use current line for start/stop let myline1 = line('.') let myline2 = line('.') endif let b:ECrespectIndent = 0 let b:ECuseBlockIndent = 0 call EnhancedCommentifyInitBuffer() call EnhancedCommentify("yes", "comment", myline1, myline2) let b:ECuseBlockIndent = 1 let b:ECrespectIndent = 1 if a:mode == "v" normal gv endif endfunction " s:Cream_commentify_isempty() {{{1 function! s:Cream_commentify_isempty(line1, line2) " Return 1 if range {line1},{line2} inclusive of the current file " contains only linefeeds, return 0 if not. " determine which line is first if a:line2 < a:line1 let i = a:line2 let cnt = a:line1 else let i = a:line1 let cnt = a:line2 endif " cat lines together let str = "" while i <= cnt let str = str . getline(i) let i = i + 1 endwhile " if empty (other than line ends, tabs, spaces) if match(str, '[[:graph:]]') == -1 return 1 endif return 0 endfunction " 1}}} "--------------------------------------------------------------------- " EnhancedCommentify.vim " Maintainer: Meikel Brandmeyer " Version: 2.3 " Last Change: Wednesday, February 20th, 2008 " License: " Copyright (c) 2008 Meikel Brandmeyer, Frankfurt am Main " All rights reserved. " " Redistribution and use in source and binary form are permitted provided " that the following conditions are met: " " 1. Redistribition of source code must retain the above copyright " notice, this list of conditions and the following disclaimer. " " 2. Redistributions in binary form must reproduce the above copyright " notice, this list of conditions and the following disclaimer in the " documentation and/or other materials provided with the distribution. " " THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND ANY " EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR " PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE " LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR " CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF " SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS " INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN " CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) " ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF " THE POSSIBILITY OF SUCH DAMAGE. " Description: " This is a (well... more or less) simple script to comment lines in a program. " Currently supported languages are C, C++, PHP, the vim scripting " language, python, HTML, Perl, LISP, Tex, Shell, CAOS and others. " Bugfixes: " 2.3 " Fixed type 'apacha' -> 'apache' (thanks to Brian Neu) " Fixed nested comment escapes strings. (thanks to Samuel Ferencik) " Fixed broken keyboard mappings when wcm was set to . " (thanks to xpatriotx) " 2.2 " Fixed problem with UseSyntax (thanks to Pieter Naaijkens) " Fixed typo in ParseCommentsOp (commstr -> commStr). " Fixed support for ocaml (thanks to Zhang Le) " 2.1 " Fixed problems with alignement when a line contains tabs " Fixed (resp. cleaned up) issues with overrideEL (thanks to Steve Hall) " Fixed problems with javascript detection (thanks to Brian Neu) " Changed Buffer init to BufWinEnter in order to use the modelines. " 2.0 " Fixed invalid expression '\'' -> "'" (thanks to Zak Beck) " Setting AltOpen/AltClose to '' (ie. disabling it) would " insert '/*' resp. '*/' for character in a line (thanks to Ben Kibbey) " 1.8 " Backslashes in comment symbols should not be escaped. " typo (commensSymbol -> commentSymbol) (thanks to Steve Butts) " typo (== -> =) " Fixed hardwired '|+'-'+|' pair. " 1.7 " Lines were not correctly decommentified, when there was whitespace " at the beginning of the line. (thanks to Xiangjiang Ma) " Fixed error detecting '*sh' filetypes. " 1.3 " hlsearch was set unconditionally (thanks to Mary Ellen Foster) " made function silent (thanks to Mare Ellen Foster) " Changelog: " 2.3 " Added support for viki/deplate (thanks to Thomas Link) " Added support for xslt/xsd/mail (thanks to Stefano Zacchiroli) " Added callback-functionality to enable extensions without the " need of modification directly in the script. " 2.2 " Added possibility to override the modes, in which keybindings are " defined. " Keybindings may be defined local to every buffer now. " If a filetype is unknown, one can turn off the keybindings now. " 2.1 " Removed any cursor movement. The script should now be free of " side-effects. " The script now uses &commentstring to determine the right " comment strings. Fallback is still the ugly if-thingy. " Script can now interpret &comments in order to add a middle " string in blocks. " Added EnhancedCommentifySet for use by other scripts. (Necessary?) " Added MultiPartBlocks for languages with multipart-comments. " Added parsing for comments option if using MultiPartBlocks. " 2.0 " IMPORTANT: EnhancedCommentify is now licensed under BSD license " for distribution with Cream! However this shouldn't " change anything... " useBlockIndent does no longer depend on respectIndent. " Added code to cope with 'C' in '&cpo'. (thanks to Luc Hermitte " for pointing this out!) " Added EnhCommentifyIdentFrontOnly option. " All options are now handled on a per buffer basis. So options " can be overriden for different buffers. " 1.9 " Filetype is now recognized via regular expressions. " All known filetypes are (more or less) supported. " Decomments multipart-block comments. " Added RespectIndent, AlignRight and synID-guessing. " Switched to buffer variables. " 1.8 " Added Ada support. (thanks to Preben Randhol) " Added Latte support. " Added blocksupport and possibility to specify action (comment or " decomment). It's also possible to guess the action line by line or " using the first line of a block. " Thanks to Xiangjiang Ma and John Orr for the rich feedback on these " issues. " Decomments /*foo();*/, when PrettyComments is set. " Added 'vhdl' and 'verilog'. (thanks to Steve Butts) " 1.7 " Added different options to control behaviour of the plugin. " Changed default Keybindings to proper plugin settings. " 1.6 " Now supports 'm4', 'config', 'automake' " 'vb', 'aspvbs', 'plsql' (thanks to Zak Beck) " 1.5 " Now supports 'java', 'xml', 'jproperties'. (thanks to Scott Stirling) " 1.4 " Lines containing only whitespace are now considered empty. " Added Tcl support. " Multipart comments are now escaped with configurable alternative " strings. Prevents nesting errors (eg. /**/*/ in C) " 1.3 " Doesn't break lines like " foo(); /* bar */ " when doing commentify. " Install Details: " Simply drop this file into your $HOME/.vim/plugin directory. if exists("DidEnhancedCommentify") finish endif let DidEnhancedCommentify = 1 let s:savedCpo = &cpo set cpo-=C " Note: These must be defined here, since they are used during " initialisation. " " InitBooleanVariable(confVar, scriptVar, defaultVal) " confVar -- name of the configuration variable " scriptVar -- name of the variable to set " defaultVal -- default value " " Tests on existence of configuration variable and sets scriptVar " according to its contents. " function s:InitBooleanVariable(confVar, scriptVar, defaultVal) let regex = a:defaultVal ? 'no*' : 'ye*s*' if exists(a:confVar) && {a:confVar} =~? regex let {a:scriptVar} = !a:defaultVal else let {a:scriptVar} = a:defaultVal endif endfunction " " InitStringVariable(confVar, scriptVar, defaultVal) " confVar -- name of the configuration variable " scriptVar -- name of the variable to set " defaultVal -- default value " " Tests on existence of configuration variable and sets scriptVar " to its contents. " function s:InitStringVariable(confVar, scriptVar, defaultVal) if exists(a:confVar) execute "let ". a:scriptVar ." = ". a:confVar else let {a:scriptVar} = a:defaultVal endif endfunction " " InitScriptVariables(nameSpace) " nameSpace -- may be "g" for global or "b" for local " " Initialises the script variables. " function s:InitScriptVariables(nameSpace) let ns = a:nameSpace " just for abbreviation let lns = (ns == "g") ? "s" : "b" " 'local namespace' " Comment escape strings... call s:InitStringVariable(ns .":EnhCommentifyAltOpen", lns .":ECaltOpen", \ s:ECaltOpen) call s:InitStringVariable(ns .":EnhCommentifyAltClose", lns .":ECaltClose", \ s:ECaltClose) call s:InitBooleanVariable(ns .":EnhCommentifyIgnoreWS", lns .":ECignoreWS", \ s:ECignoreWS) " Adding a space between comment strings and code... if exists(ns .":EnhCommentifyPretty") if {ns}:EnhCommentifyPretty =~? 'ye*s*' let {lns}:ECprettyComments = ' ' let {lns}:ECprettyUnComments = ' \=' else let {lns}:ECprettyComments = '' let {lns}:ECprettyUnComments = '' endif else let {lns}:ECprettyComments = s:ECprettyComments let {lns}:ECprettyUnComments = s:ECprettyUnComments endif " Identification string settings... call s:InitStringVariable(ns .":EnhCommentifyIdentString", \ lns .":ECidentFront", s:ECidentFront) let {lns}:ECidentBack = \ (exists(ns .":EnhCommentifyIdentFrontOnly") \ && {ns}:EnhCommentifyIdentFrontOnly =~? 'ye*s*') \ ? '' \ : {lns}:ECidentFront " Wether to use syntax items... call s:InitBooleanVariable(ns .":EnhCommentifyUseSyntax", \ lns .":ECuseSyntax", s:ECuseSyntax) " Should the script respect line indentation, when inserting strings? call s:InitBooleanVariable(ns .":EnhCommentifyRespectIndent", \ lns .":ECrespectIndent", s:ECrespectIndent) " Keybindings... call s:InitBooleanVariable(ns .":EnhCommentifyUseAltKeys", \ lns .":ECuseAltKeys", s:ECuseAltKeys) call s:InitBooleanVariable(ns .":EnhCommentifyBindPerBuffer", \ lns .":ECbindPerBuffer", s:ECbindPerBuffer) call s:InitBooleanVariable(ns .":EnhCommentifyBindInNormal", \ lns .":ECbindInNormal", s:ECbindInNormal) call s:InitBooleanVariable(ns .":EnhCommentifyBindInInsert", \ lns .":ECbindInInsert", s:ECbindInInsert) call s:InitBooleanVariable(ns .":EnhCommentifyBindInVisual", \ lns .":ECbindInVisual", s:ECbindInVisual) call s:InitBooleanVariable(ns .":EnhCommentifyUserBindings", \ lns .":ECuserBindings", s:ECuserBindings) call s:InitBooleanVariable(ns .":EnhCommentifyTraditionalMode", \ lns .":ECtraditionalMode", s:ECtraditionalMode) call s:InitBooleanVariable(ns .":EnhCommentifyFirstLineMode", \ lns .":ECfirstLineMode", s:ECfirstLineMode) call s:InitBooleanVariable(ns .":EnhCommentifyUserMode", \ lns .":ECuserMode", s:ECuserMode) call s:InitBooleanVariable(ns .":EnhCommentifyBindUnknown", \ lns .":ECbindUnknown", s:ECbindUnknown) " Block stuff... call s:InitBooleanVariable(ns .":EnhCommentifyAlignRight", \ lns .":ECalignRight", s:ECalignRight) call s:InitBooleanVariable(ns .":EnhCommentifyUseBlockIndent", \ lns .":ECuseBlockIndent", s:ECuseBlockIndent) call s:InitBooleanVariable(ns .":EnhCommentifyMultiPartBlocks", \ lns .":ECuseMPBlock", s:ECuseMPBlock) call s:InitBooleanVariable(ns .":EnhCommentifyCommentsOp", \ lns .":ECuseCommentsOp", s:ECuseCommentsOp) let {lns}:ECsaveWhite = ({lns}:ECrespectIndent \ || {lns}:ECignoreWS || {lns}:ECuseBlockIndent) \ ? '\(\s*\)' \ : '' if !{lns}:ECrespectIndent let {lns}:ECuseBlockIndent = 0 endif if {lns}:ECrespectIndent let {lns}:ECrespectWhite = '\1' let {lns}:ECignoreWhite = '' elseif {lns}:ECignoreWS let {lns}:ECrespectWhite = '' let {lns}:ECignoreWhite = '\1' else let {lns}:ECrespectWhite = '' let {lns}:ECignoreWhite = '' endif " Using comments option, doesn't make sense without useMPBlock "if lns == 'b' && b:ECuseCommentsOp " let b:ECuseMPBlock = 1 "endif endfunction " " EnhancedCommentifySet(option, value, ...) " option -- which option " value -- value which will be asigned to the option " " The purpose of this function is mainly to act as an interface to the " outer world. It hides the internally used variables. " function EnhancedCommentifySet(option, value) if a:option == 'AltOpen' let oldval = b:ECaltOpen let b:ECaltOpen = a:value elseif a:option == 'AltClose' let oldval = b:ECaltClose let b:ECaltClose = a:value elseif a:option == 'IdentString' let oldval = b:ECidentFront let b:ECidentFront = a:value elseif a:option == 'IdentFrontOnly' let oldval = (b:ECidentBack == '') ? 'Yes' : 'No' let b:ECidentBack = (a:value =~? 'ye*s*') ? '' : b:ECidentFront elseif a:option == 'RespectIndent' let oldval = b:ECrespectIndent let b:ECrespectIndent = (a:value =~? 'ye*s*') ? 1 : 0 elseif a:option == 'IgnoreWS' let oldval = b:ECignoreWS let b:ECignoreWS = (a:value =~? 'ye*s*') ? 1 : 0 elseif a:option == 'Pretty' let oldval = (b:ECprettyComments == ' ') ? 'Yes' : 'No' if a:value =~? 'ye*s*' let b:ECprettyComments = ' ' let b:ECprettyUnComments = ' \=' else let b:ECprettyComments = '' let b:ECprettyUnComments = '' endif elseif a:option == 'MultiPartBlocks' let oldval = b:ECuseMPBlock let b:ECuseMPBlock = (a:value =~? 'ye*s*') ? 1 : 0 elseif a:option == 'CommentsOp' let oldval = b:ECuseCommentsOp let b:ECuseCommentsOp = (a:value =~? 'ye*s*') ? 1 : 0 elseif a:option == 'UseBlockIndent' let oldval = b:ECuseBlockIndent let b:ECuseBlockIndent = (a:value =~? 'ye*s*') ? 1 : 0 elseif a:option == 'AlignRight' let oldval = b:ECalignRight let b:ECalignRight = (a:value =~? 'ye*s*') ? 1 : 0 elseif a:option == 'UseSyntax' let oldval = b:ECuseSyntax let b:ECuseSyntax = (a:value =~? 'ye*s*') ? 1 : 0 else if (has("dialog_gui") && has("gui_running")) call confirm("EnhancedCommentifySet: Unknwon option '" \ . option . "'") else echohl ErrorMsg echo "EnhancedCommentifySet: Unknown option '". option ."'" echohl None endif endif if oldval == 1 let oldval = 'Yes' elseif oldval == 0 let oldval = 'No' endif return oldval endfunction " Initial settings. " " Setting the default options resp. taking user preferences. if !exists("g:EnhCommentifyUserMode") \ && !exists("g:EnhCommentifyFirstLineMode") \ && !exists("g:EnhCommentifyTraditionalMode") \ && !exists("g:EnhCommentifyUserBindings") let g:EnhCommentifyTraditionalMode = 'Yes' endif " These will be the default settings for the script: let s:ECaltOpen = "|+" let s:ECaltClose = "+|" let s:ECignoreWS = 1 let s:ECprettyComments = '' let s:ECprettyUnComments = '' let s:ECidentFront = '' let s:ECuseSyntax = 0 let s:ECrespectIndent = 0 let s:ECalignRight = 0 let s:ECuseBlockIndent = 0 let s:ECuseMPBlock = 0 let s:ECuseCommentsOp = 0 let s:ECuseAltKeys = 0 let s:ECbindPerBuffer = 0 let s:ECbindInNormal = 1 let s:ECbindInInsert = 1 let s:ECbindInVisual = 1 let s:ECuserBindings = 0 let s:ECtraditionalMode = 0 let s:ECfirstLineMode = 0 let s:ECuserMode = 1 let s:ECbindUnknown = 1 " Now initialise the global defaults with the preferences set " by the user in his .vimrc. Settings local to a buffer will be " done later on, when the script is first called in a buffer. " call s:InitScriptVariables("g") " Globally used variables with some initialisation. " FIXME: explain what they are good for " let s:Action = 'guess' let s:firstOfBlock = 1 let s:blockAction = 'comment' let s:blockIndentRegex = '' let s:blockIndent = 0 let s:inBlock = 0 let s:tabConvert = '' let s:overrideEmptyLines = 0 let s:emptyLines = 'no' let s:maxLen = 0 function EnhancedCommentifyInitBuffer() if !exists("b:ECdidBufferInit") call s:InitScriptVariables("b") if !exists("b:EnhCommentifyFallbackTest") let b:EnhCommentifyFallbackTest = 0 endif call s:GetFileTypeSettings(&ft) call s:CheckPossibleEmbedding(&ft) " " If the filetype is not supported and the user wants us to, we do not " add keybindings. " if s:ECbindPerBuffer if b:ECcommentOpen != "" || b:ECbindUnknown call s:SetKeybindings("l") endif endif let b:ECdidBufferInit = 1 let b:ECsyntax = &ft endif endfunction autocmd BufWinEnter,BufNewFile * call EnhancedCommentifyInitBuffer() " " EnhancedCommentify(emptyLines, action, ...) " overrideEL -- commentify empty lines " may be 'yes', 'no' or '' for guessing " action -- action which should be executed: " * guess: " toggle commetification (old behaviour) " * comment: " comment lines " * decomment: " decomment lines " * first: " use first line of block to determine action " a:1, a:2 -- first and last line of block, which should be " processed. " " Commentifies the current line. " function EnhancedCommentify(overrideEL, action, ...) if a:overrideEL != '' let s:overrideEmptyLines = 1 endif " Now do the buffer initialisation. Every buffer will get " it's pendant to a global variable (eg. s:ECalignRight -> b:ECalignRight). " The local variable is actually used, whereas the global variable " holds the defaults from the user's .vimrc. In this way the settings " can be overriden for single buffers. " " NOTE: Buffer init is done by autocommands now. " let b:ECemptyLines = a:overrideEL " The language is not supported. if b:ECcommentOpen == '' if (has("dialog_gui") && has("gui_running")) call confirm("This filetype is currently _not_ supported!\n" \ ."Please consider contacting the author in order" \ ." to add this filetype.", "", 1, "Error") else echohl ErrorMsg echo "This filetype is currently _not_ supported!" echo "Please consider contacting the author in order to add" echo "this filetype in future releases!" echohl None endif return endif let lnum = line(".") " Now some initialisations... let s:Action = a:action " FIXME: Is there really _no_ function to simplify this??? " (Maybe something like 'let foo = 8x" "'?) if s:tabConvert == '' && strlen(s:tabConvert) != &tabstop let s:tabConvert = '' let i = 0 while i < &tabstop let s:tabConvert = s:tabConvert .' ' let i = i + 1 endwhile endif if a:0 == 2 let s:startBlock = a:1 let s:i = a:1 let s:endBlock = a:2 let s:inBlock = 1 else let s:startBlock = lnum let s:i = lnum let s:endBlock = lnum let s:inBlock = 0 endif if b:ECuseSyntax && b:ECpossibleEmbedding let column = indent(s:startBlock) + 1 if !&expandtab let rem = column % &tabstop let column = ((column - rem) / &tabstop) + rem endif call s:CheckSyntax(s:startBlock, column) endif " Get the indent of the less indented line of the block. if s:inBlock && (b:ECuseBlockIndent || b:ECalignRight) call s:DoBlockComputations(s:startBlock, s:endBlock) endif while s:i <= s:endBlock let lineString = getline(s:i) let lineString = s:TabsToSpaces(lineString) " If we should comment "empty" lines, we have to add " the correct indent, if we use blockIndent. if b:ECemptyLines =~? 'ye*s*' \ && b:ECuseBlockIndent \ && lineString =~ "^\s*$" let i = 0 while i < s:blockIndent let lineString = " " . lineString let i = i + 1 endwhile endif " Don't comment empty lines. if lineString !~ "^\s*$" \ || b:ECemptyLines =~? 'ye*s*' if b:ECcommentClose != '' let lineString = s:CommentifyMultiPart(lineString, \ b:ECcommentOpen, \ b:ECcommentClose, \ b:ECcommentMiddle) else let lineString = s:CommentifySinglePart(lineString, \ b:ECcommentOpen) endif endif " Revert the above: If the line is "empty" and we " used blockIndent, we remove the spaces. " FIXME: Why does "^\s*$" not work? if b:ECemptyLines =~? 'ye*s*' \ && b:ECuseBlockIndent \ && lineString =~ "^" . s:blockIndentRegex ."\s*$" let lineString = \ substitute(lineString, s:blockIndentRegex, \ '', '') endif let lineString = s:SpacesToTabs(lineString) call setline(s:i, lineString) let s:i = s:i + 1 let s:firstOfBlock = 0 endwhile let s:firstOfBlock = 1 endfunction " " DoBlockComputations(start, end) " start -- number of first line " end -- number of last line " " This function does some computations which are necessary for useBlockIndent " and alignRight. ie. find smallest indent and longest line. " function s:DoBlockComputations(start, end) let i = a:start let len = 0 let amount = 100000 " this should be enough ... while i <= a:end if b:ECuseBlockIndent && getline(i) !~ '^\s*$' let cur = indent(i) if cur < amount let amount = cur endif endif if b:ECalignRight let cur = s:GetLineLen(s:TabsToSpaces(getline(i)), \ s:GetLineLen(b:ECcommentOpen, 0) \ + strlen(b:ECprettyComments)) if b:ECuseMPBlock let cur = cur + s:GetLineLen(b:ECcommentOpen, 0) \ + strlen(b:ECprettyComments) endif if len < cur let len = cur endif endif let i = i + 1 endwhile if b:ECuseBlockIndent if amount > 0 let regex = '\( \{'. amount .'}\)' else let regex = '' endif let s:blockIndentRegex = regex let s:blockIndent = amount endif if b:ECalignRight let s:maxLen = len endif endfunction " " CheckSyntax(line, column) " line -- line of line " column -- column of line " Check what syntax is active during call of main function. First hit " wins. If the filetype changes during the block, we ignore that. " Adjust the filetype if necessary. " function s:CheckSyntax(line, column) let ft = "" let synFiletype = synIDattr(synID(a:line, a:column, 1), "name") " FIXME: This feature currently relies on a certain format " of the names of syntax items: the filetype must be prepended " in lowwer case letters, followed by at least one upper case " letter. if match(synFiletype, '\l\+\u') == 0 let ft = substitute(synFiletype, '^\(\l\+\)\u.*$', '\1', "") endif if ft == "" execute "let specialCase = ". b:EnhCommentifyFallbackTest if specialCase let ft = b:EnhCommentifyFallbackValue else " Fallback: If nothing holds, use normal filetype! let ft = &ft endif endif " Nothing changed! if ft == b:ECsyntax return endif let b:ECsyntax = ft call s:GetFileTypeSettings(ft) endfunction " " GetFileTypeSettings(ft) " ft -- filetype " " This functions sets some buffer-variables, which control the comment " strings and 'empty lines'-handling. " function s:GetFileTypeSettings(ft) let fileType = a:ft " If we find nothing appropriate this is the default. let b:ECcommentOpen = '' let b:ECcommentClose = '' if exists("g:EnhCommentifyCallbackExists") call EnhCommentifyCallback(fileType) " Check whether the callback did yield a result. " If so we use it. The user nows, what he's doing. if b:ECcommentOpen != '' return endif endif " I learned about the commentstring option. Let's use it. " For now we ignore it, if it is "/*%s*/". This is the " default. We cannot check wether this is default or C or " something other like CSS, etc. We have to wait, until the " filetypes adopt this option. if &commentstring != "/*%s*/" && !b:ECuseSyntax let b:ECcommentOpen = \ substitute(&commentstring, '%s.*', "", "") let b:ECcommentClose = \ substitute(&commentstring, '.*%s', "", "") " Multipart comments: elseif fileType =~ '^\(c\|b\|css\|csc\|cupl\|indent\|jam\|lex\|lifelines\|'. \ 'lite\|nqc\|phtml\|progress\|rexx\|rpl\|sas\|sdl\|sl\|'. \ 'strace\|xpm\|yacc\)$' let b:ECcommentOpen = '/*' let b:ECcommentClose = '*/' elseif fileType =~ '^\(html\|xhtml\|xml\|xslt\|xsd\|dtd\|sgmllnx\)$' let b:ECcommentOpen = '' elseif fileType =~ '^\(sgml\|smil\)$' let b:ECcommentOpen = '' elseif fileType == 'atlas' let b:ECcommentOpen = 'C' let b:ECcommentClose = '$' elseif fileType =~ '^\(catalog\|sgmldecl\)$' let b:ECcommentOpen = '--' let b:ECcommentClose = '--' elseif fileType == 'dtml' let b:ECcommentOpen = '' let b:ECcommentClose = '' elseif fileType == 'htmlos' let b:ECcommentOpen = '#' let b:ECcommentClose = '/#' elseif fileType =~ '^\(jgraph\|lotos\|mma\|modula2\|modula3\|pascal\|'. \ 'ocaml\|sml\)$' let b:ECcommentOpen = '(*' let b:ECcommentClose = '*)' elseif fileType == 'jsp' let b:ECcommentOpen = '<%--' let b:ECcommentClose = '--%>' elseif fileType == 'model' let b:ECcommentOpen = '$' let b:ECcommentClose = '$' elseif fileType == 'st' let b:ECcommentOpen = '"' let b:ECcommentClose = '"' elseif fileType =~ '^\(tssgm\|tssop\)$' let b:ECcommentOpen = 'comment = "' let b:ECcommentClose = '"' " Singlepart comments: elseif fileType =~ '^\(ox\|cpp\|php\|java\|verilog\|acedb\|ch\|clean\|'. \ 'clipper\|cs\|dot\|dylan\|hercules\|idl\|ishd\|javascript\|'. \ 'kscript\|mel\|named\|openroad\|pccts\|pfmain\|pike\|'. \ 'pilrc\|plm\|pov\|rc\|scilab\|specman\|tads\|tsalt\|uc\|'. \ 'xkb\)$' let b:ECcommentOpen = '//' let b:ECcommentClose = '' elseif fileType =~ '^\(vim\|abel\)$' let b:ECcommentOpen = '"' let b:ECcommentClose = '' elseif fileType =~ '^\(lisp\|scheme\|scsh\|amiga\|asm\|asm68k\|bindzone\|'. \ 'def\|dns\|dosini\|dracula\|dsl\|idlang\|iss\|jess\|kix\|'. \ 'masm\|monk\|nasm\|ncf\|omnimark\|pic\|povini\|rebol\|'. \ 'registry\|samba\|skill\|smith\|tags\|tasm\|tf\|winbatch\|'. \ 'wvdial\|z8a\)$' let b:ECcommentOpen = ';' let b:ECcommentClose = '' elseif fileType =~ '^\(python\|perl\|[^w]*sh$\|tcl\|jproperties\|make\|'. \ 'robots\|apache\|apachestyle\|awk\|bc\|cfg\|cl\|conf\|'. \ 'crontab\|diff\|ecd\|elmfilt\|eterm\|expect\|exports\|'. \ 'fgl\|fvwm\|gdb\|gnuplot\|gtkrc\|hb\|hog\|ia64\|icon\|'. \ 'inittab\|lftp\|lilo\|lout\|lss\|lynx\|maple\|mush\|'. \ 'muttrc\|nsis\|ora\|pcap\|pine\|po\|procmail\|'. \ 'psf\|ptcap\|r\|radiance\|ratpoison\|readline\remind\|'. \ 'ruby\|screen\|sed\|sm\|snnsnet\|snnspat\|snnsres\|spec\|'. \ 'squid\|terminfo\|tidy\|tli\|tsscl\|vgrindefs\|vrml\|'. \ 'wget\|wml\|xf86conf\|xmath\)$' let b:ECcommentOpen = '#' let b:ECcommentClose = '' elseif fileType == 'webmacro' let b:ECcommentOpen = '##' let b:ECcommentClose = '' elseif fileType == 'ppwiz' let b:ECcommentOpen = ';;' let b:ECcommentClose = '' elseif fileType == 'latte' let b:ECcommentOpen = '\\;' let b:ECcommentClose = '' elseif fileType =~ '^\(tex\|abc\|erlang\|ist\|lprolog\|matlab\|mf\|'. \ 'postscr\|ppd\|prolog\|simula\|slang\|slrnrc\|slrnsc\|'. \ 'texmf\|viki\|virata\)$' let b:ECcommentOpen = '%' let b:ECcommentClose = '' elseif fileType =~ '^\(caos\|cterm\|form\|foxpro\|sicad\|snobol4\)$' let b:ECcommentOpen = '*' let b:ECcommentClose = '' elseif fileType =~ '^\(m4\|config\|automake\)$' let b:ECcommentOpen = 'dnl ' let b:ECcommentClose = '' elseif fileType =~ '^\(vb\|aspvbs\|ave\|basic\|elf\|lscript\)$' let b:ECcommentOpen = "'" let b:ECcommentClose = '' elseif fileType =~ '^\(plsql\|vhdl\|ahdl\|ada\|asn\|csp\|eiffel\|gdmo\|'. \ 'haskell\|lace\|lua\|mib\|sather\|sql\|sqlforms\|sqlj\|'. \ 'stp\)$' let b:ECcommentOpen = '--' let b:ECcommentClose = '' elseif fileType == 'abaqus' let b:ECcommentOpen = '**' let b:ECcommentClose = '' elseif fileType =~ '^\(aml\|natural\|vsejcl\)$' let b:ECcommentOpen = '/*' let b:ECcommentClose = '' elseif fileType == 'ampl' let b:ECcommentOpen = '\\#' let b:ECcommentClose = '' elseif fileType == 'bdf' let b:ECcommentOpen = 'COMMENT ' let b:ECcommentClose = '' elseif fileType == 'btm' let b:ECcommentOpen = '::' let b:ECcommentClose = '' elseif fileType == 'dcl' let b:ECcommentOpen = '$!' let b:ECcommentClose = '' elseif fileType == 'dosbatch' let b:ECcommentOpen = 'rem ' let b:ECcommentClose = '' elseif fileType == 'focexec' let b:ECcommentOpen = '-*' let b:ECcommentClose = '' elseif fileType == 'forth' let b:ECcommentOpen = '\\ ' let b:ECcommentClose = '' elseif fileType =~ '^\(fortran\|inform\|sqr\|uil\|xdefaults\|'. \ 'xmodmap\|xpm2\)$' let b:ECcommentOpen = '!' let b:ECcommentClose = '' elseif fileType == 'gp' let b:ECcommentOpen = '\\\\' let b:ECcommentClose = '' elseif fileType =~ '^\(master\|nastran\|sinda\|spice\|tak\|trasys\)$' let b:ECcommentOpen = '$' let b:ECcommentClose = '' elseif fileType == 'nroff' || fileType == 'groff' let b:ECcommentOpen = ".\\\\\"" let b:ECcommentClose = '' elseif fileType == 'opl' let b:ECcommentOpen = 'REM ' let b:ECcommentClose = '' elseif fileType == 'texinfo' let b:ECcommentOpen = '@c ' let b:ECcommentClose = '' elseif fileType == 'mail' let b:ECcommentOpen = '>' let b:ECcommentClose = '' endif if b:ECuseCommentsOp let b:ECcommentMiddle = \ s:ParseCommentsOp(b:ECcommentOpen, b:ECcommentClose) if b:ECcommentMiddle == '' let b:ECuseCommentsOp = 0 endif else let b:ECcommentMiddle = '' endif if !s:overrideEmptyLines call s:CommentEmptyLines(fileType) endif endfunction " " ParseCommentsOp(commentOpen, commentClose) " commentOpen -- comment-open string " commentClose-- comment-close string " " Try to extract the middle comment string from &comments. First hit wins. " If nothing is found '' is returned. " function s:ParseCommentsOp(commentOpen, commentClose) let commStr = &comments let offset = 0 let commentMiddle = '' while commStr != '' " " First decompose &omments into consecutive s-, m- and e-parts. " let s = stridx(commStr, 's') if s == -1 return '' endif let commStr = strpart(commStr, s) let comma = stridx(commStr, ',') if comma == -1 return '' endif let sPart = strpart(commStr, 0, comma) let commStr = strpart(commStr, comma) let m = stridx(commStr, 'm') if m == -1 return '' endif let commStr = strpart(commStr, m) let comma = stridx(commStr, ',') if comma == -1 return '' endif let mPart = strpart(commStr, 0, comma) let commStr = strpart(commStr, comma) let e = stridx(commStr, 'e') if e == -1 return '' endif let commStr = strpart(commStr, e) let comma = stridx(commStr, ',') if comma == -1 let comma = strlen(commStr) endif let ePart = strpart(commStr, 0, comma) let commStr = strpart(commStr, comma) " " Now check wether this is what we want: " Are the comment string the same? " let sColon = stridx(sPart, ':') let eColon = stridx(ePart, ':') if sColon == -1 || eColon == -1 return '' endif if strpart(sPart, sColon + 1) != a:commentOpen \ || strpart(ePart, eColon + 1) != a:commentClose continue endif let mColon = stridx(mPart, ':') if mColon == -1 return '' endif let commentMiddle = strpart(mPart, mColon + 1) " " Check for any alignement. " let i = 1 while sPart[i] != ':' if sPart[i] == 'r' let offset = strlen(a:commentOpen) - strlen(commentMiddle) break elseif sPart[i] == 'l' let offset = 0 break elseif s:isDigit(sPart[i]) let j = 1 while s:isDigit(sPart[i + j]) let j = j + 1 endwhile let offset = 1 * strpart(sPart, i, j) break endif let i = i + 1 endwhile if offset == 0 let i = 1 while ePart[i] != ':' if ePart[i] == 'r' let offset = strlen(a:commentClose) - strlen(commentMiddle) break elseif ePart[i] == 'l' let offset = 0 break elseif s:isDigit(ePart[i]) let j = 1 while s:isDigit(ePart[i + j]) let j = j + 1 endwhile let offset = 1 * strpart(ePart, i, j) break endif let i = i + 1 endwhile endif while offset > 0 let commentMiddle = " " . commentMiddle let offset = offset - 1 endwhile break endwhile return commentMiddle endfunction " " isDigit(char) " " Nomen est Omen. " function s:isDigit(char) let r = 0 let charVal = char2nr(a:char) if charVal >= 48 && charVal <= 57 let r = 1 endif return r endfunction " " CommentEmptyLines(ft) " ft -- filetype of current buffer " " Decides, if empty lines should be commentified or not. Add the filetype, " you want to change, to the apropriate if-clause. " function s:CommentEmptyLines(ft) " FIXME: Quick hack (tm)! if 0 " Add special filetypes here. elseif b:ECcommentClose == '' let b:ECemptyLines = 'yes' else let b:ECemptyLines = 'no' endif endfunction " " CheckPossibleEmbedding(ft) " ft -- the filetype of current buffer " " Check wether it makes sense to allow checking for the synIDs. " Eg. C will never have embedded code... " function s:CheckPossibleEmbedding(ft) if a:ft =~ '^\(php\|vim\|latte\|html\)$' let b:ECpossibleEmbedding = 1 else " Since getting the synID is slow, we set the default to 'no'! " There are also some 'broken' languages like the filetype for " autoconf's configure.in's ('config'). let b:ECpossibleEmbedding = 0 endif endfunction " " CommentifyMultiPart(lineString, commentStart, commentEnd, action) " lineString -- line to commentify " commentStart -- comment-start string, eg '/*' " commentEnd -- comment-end string, eg. '*/' " commentMiddle -- comment-middle string, eg. ' *' " " This function commentifies code of languages, which have multipart " comment strings, eg. '/*' - '*/' of C. " function s:CommentifyMultiPart(lineString, commentStart, \ commentEnd, commentMiddle) if s:Action == 'guess' || s:Action == 'first' || b:ECuseMPBlock let todo = s:DecideWhatToDo(a:lineString, a:commentStart, a:commentEnd) else let todo = s:Action endif if todo == 'decomment' return s:UnCommentify(a:lineString, a:commentStart, \ a:commentEnd, a:commentMiddle) else return s:Commentify(a:lineString, a:commentStart, \ a:commentEnd, a:commentMiddle) endif endfunction " " CommentifySinglePart(lineString, commentSymbol) " lineString -- line to commentify " commentSymbol -- comment string, eg '#' " " This function is used for all languages, whose comment strings " consist only of one string at the beginning of a line. " function s:CommentifySinglePart(lineString, commentSymbol) if s:Action == 'guess' || s:Action == 'first' let todo = s:DecideWhatToDo(a:lineString, a:commentSymbol) else let todo = s:Action endif if todo == 'decomment' return s:UnCommentify(a:lineString, a:commentSymbol) else return s:Commentify(a:lineString, a:commentSymbol) endif endfunction " " Escape(lineString, commentStart, commentEnd) " " Escape already present symbols. " function s:Escape(lineString, commentStart, commentEnd) let line = a:lineString if b:ECaltOpen != '' let line = substitute(line, s:EscapeString(a:commentStart), \ b:ECaltOpen, "g") endif if b:ECaltClose != '' let line = substitute(line, s:EscapeString(a:commentEnd), \ b:ECaltClose, "g") endif return line endfunction " " UnEscape(lineString, commentStart, commentEnd) " " Unescape already present escape symbols. " function s:UnEscape(lineString, commentStart, commentEnd) let line = a:lineString " We translate only the first and the last occurrence " of this resp. escape string. Commenting a line several " times and decommenting it again breaks things. if b:ECaltOpen != '' let line = substitute(line, s:EscapeString(b:ECaltOpen), \ a:commentStart, "") endif if b:ECaltClose != '' let esAltClose = s:EscapeString(b:ECaltClose) let line = substitute(line, esAltClose \ . "\\(.*" . esAltClose . "\\)\\@!", \ a:commentEnd, "") endif return line endfunction " " Commentify(lineString, commentSymbol, [commentEnd]) " lineString -- the line in work " commentSymbol -- string to insert at the beginning of the line " commentEnd -- string to insert at the end of the line " may be omitted " " This function inserts the start- (and if given the end-) string of the " comment in the current line. " function s:Commentify(lineString, commentSymbol, ...) let line = a:lineString let j = 0 " If a end string is present, insert it too. if a:0 > 0 " First we have to escape any comment already contained in the line, " since (at least for C) comments are not allowed to nest. let line = s:Escape(line, a:commentSymbol, a:1) if b:ECuseCommentsOp && b:ECuseMPBlock \ && a:0 > 1 \ && s:i > s:startBlock let line = substitute(line, s:LookFor('commentmiddle'), \ s:SubstituteWith('commentmiddle', a:2), "") endif if !b:ECuseMPBlock || (b:ECuseMPBlock && s:i == s:endBlock) " Align the closing part to the right. if b:ECalignRight && s:inBlock let len = s:GetLineLen(line, strlen(a:commentSymbol) \ + strlen(b:ECprettyComments)) while j < s:maxLen - len let line = line .' ' let j = j + 1 endwhile endif let line = substitute(line, s:LookFor('commentend'), \ s:SubstituteWith('commentend', a:1), "") endif endif " insert the comment symbol if !b:ECuseMPBlock || a:0 == 0 || (b:ECuseMPBlock && s:i == s:startBlock) let line = substitute(line, s:LookFor('commentstart'), \ s:SubstituteWith('commentstart', a:commentSymbol), "") endif return line endfunction " " UnCommentify(lineString, commentSymbol, [commentEnd]) " lineString -- the line in work " commentSymbol -- string to remove at the beginning of the line " commentEnd -- string to remove at the end of the line " may be omitted " " This function removes the start- (and if given the end-) string of the " comment in the current line. " function s:UnCommentify(lineString, commentSymbol, ...) let line = a:lineString " remove the first comment symbol found on a line if a:0 == 0 || !b:ECuseMPBlock || (b:ECuseMPBlock && s:i == s:startBlock) let line = substitute(line, s:LookFor('decommentstart', \ a:commentSymbol), \ s:SubstituteWith('decommentstart'), "") endif " If a end string is present, we have to remove it, too. if a:0 > 0 " First, we remove the trailing comment symbol. if !b:ECuseMPBlock || (b:ECuseMPBlock && s:i == s:endBlock) let line = substitute(line, s:LookFor('decommentend', a:1), \ s:SubstituteWith('decommentend'), "") " Remove any trailing whitespace, if we used alignRight. if b:ECalignRight let line = substitute(line, ' *$', '', "") endif endif " Maybe we added a middle string. Remove it here. if b:ECuseCommentsOp && b:ECuseMPBlock \ && a:0 > 1 \ && s:i > s:startBlock let line = substitute(line, s:LookFor('decommentmiddle', a:2), \ s:SubstituteWith('decommentmiddle'), "") endif " Remove escaped inner comments. let line = s:UnEscape(line, a:commentSymbol, a:1) endif return line endfunction " " GetLineLen(line, offset) " line -- line of which length should be computed " offset -- maybe a shift of the line to the right " " Expands '\t' to it's tabstop value. " function s:GetLineLen(line, offset) let len = a:offset let i = 0 while a:line[i] != "" if a:line[i] == "\t" let len = (((len / &tabstop) + 1) * &tabstop) else let len = len + 1 endif let i = i + 1 endwhile return len endfunction " " EscapeString(string) " string -- string to process " " Escapes characters in 'string', which have some function in " regular expressions, with a '\'. " " Returns the escaped string. " function s:EscapeString(string) return escape(a:string, "*{}[]$^-") endfunction " " LookFor(what, ...) " what -- what type of regular expression " * checkstart: " * checkend: " check for comment at start/end of line " * commentstart: " * commentend: " insert comment strings " * decommentstart: " * decommentend: " remove comment strings " a:1 -- comment string " function s:LookFor(what, ...) if b:ECuseBlockIndent && s:inBlock let handleWhitespace = s:blockIndentRegex else let handleWhitespace = b:ECsaveWhite endif if a:what == 'checkstart' let regex = '^'. b:ECsaveWhite . s:EscapeString(a:1) \ . s:EscapeString(b:ECidentFront) elseif a:what == 'checkend' let regex = s:EscapeString(b:ECidentBack) \ . s:EscapeString(a:1) . b:ECsaveWhite . '$' elseif a:what == 'commentstart' let regex = '^'. handleWhitespace elseif a:what == 'commentmiddle' let regex = '^'. handleWhitespace elseif a:what == 'commentend' let regex = '$' elseif a:what == 'decommentstart' let regex = '^'. b:ECsaveWhite . s:EscapeString(a:1) \ . s:EscapeString(b:ECidentFront) . b:ECprettyUnComments elseif a:what == 'decommentmiddle' let regex = '^'. b:ECsaveWhite . s:EscapeString(a:1) \ . s:EscapeString(b:ECidentFront) . b:ECprettyUnComments elseif a:what == 'decommentend' let regex = b:ECprettyUnComments . s:EscapeString(b:ECidentBack) \ . s:EscapeString(a:1) . b:ECsaveWhite .'$' endif return regex endfunction " " SubstituteWith(what, ...) " what -- what type of regular expression " * commentstart: " * commentend: " insert comment strings " * decommentstart: " * decommentend: " remove comment strings " a:1 -- comment string " function s:SubstituteWith(what, ...) if a:what == 'commentstart' \ || a:what == 'commentmiddle' \ || a:what == 'commentend' let commentSymbol = a:1 else let commentSymbol = '' endif if b:ECuseBlockIndent && s:inBlock let handleWhitespace = '\1' . commentSymbol else let handleWhitespace = b:ECrespectWhite . commentSymbol \ . b:ECignoreWhite endif if a:what == 'commentstart' let regex = handleWhitespace . b:ECidentFront \ . b:ECprettyComments elseif a:what == 'commentmiddle' let regex = handleWhitespace . b:ECidentFront \ . b:ECprettyComments elseif a:what == 'commentend' let regex = b:ECprettyComments . b:ECidentBack . a:1 elseif a:what == 'decommentstart' \ || a:what == 'decommentmiddle' \ || a:what == 'decommentend' let regex = handleWhitespace endif return regex endfunction " " " DecideWhatToDo(lineString, commentStart, ...) " lineString -- first line of block " commentStart -- comment start symbol " a:1 -- comment end symbol " function s:DecideWhatToDo(lineString, commentStart, ...) " If we checked already, we return our previous result. if !s:firstOfBlock \ && (s:Action == 'first' \ || (b:ECuseMPBlock && s:inBlock && a:0)) return s:blockAction endif let s:blockAction = 'comment' if s:inBlock && a:0 && b:ECuseMPBlock let first = getline(s:startBlock) let last = getline(s:endBlock) if first =~ s:LookFor('checkstart', a:commentStart) \ && first !~ s:LookFor('checkend', a:1) \ && last !~ s:LookFor('checkstart', a:commentStart) \ && last =~ s:LookFor('checkend', a:1) let s:blockAction = 'decomment' endif return s:blockAction endif if a:lineString =~ s:LookFor('checkstart', a:commentStart) let s:blockAction = 'decomment' endif if a:0 if a:lineString !~ s:LookFor('checkend', a:1) let s:blockAction = 'comment' endif endif let s:firstOfBlock = 0 return s:blockAction endfunction " " TabsToSpaces(str) " str -- string to convert " " Convert leading tabs of given string to spaces. " function s:TabsToSpaces(str) let string = a:str " FIXME: Can we use something like retab? I don't think so, " because retab changes every whitespace in the line, but we " wan't to modify only the leading spaces. Is this a problem? while string =~ '^\( *\)\t' let string = substitute(string, '^\( *\)\t', '\1'. s:tabConvert, "") endwhile return string endfunction " " SpacesToTabs(str) " str -- string to convert " " Convert leading spaces of given string to tabs. " function s:SpacesToTabs(str) let string = a:str if !&expandtab while string =~ '^\(\t*\)'. s:tabConvert let string = substitute(string, '^\(\t*\)'. s:tabConvert, \ '\1\t', "") endwhile endif return string endfunction " " EnhCommentifyFallback4Embedded(test, fallback) " test -- test for the special case " fallback -- filetype instead of normal fallback " " This function is global. It should be called from filetype " plugins like php, where the normal fallback behaviour may " not work. One may use 'synFiletype' to reference the guessed " filetype via synID. " function EnhCommentifyFallback4Embedded(test, fallback) let b:EnhCommentifyFallbackTest = a:test let b:EnhCommentifyFallbackValue = a:fallback endfunction " " Keyboard mappings. " noremap Comment \ :call EnhancedCommentify('', 'comment') noremap DeComment \ :call EnhancedCommentify('', 'decomment') noremap Traditional \ :call EnhancedCommentify('', 'guess') noremap FirstLine \ :call EnhancedCommentify('', 'first') noremap VisualComment \ :call EnhancedCommentify('', 'comment', \ line("'<"), line("'>")) noremap VisualDeComment \ :call EnhancedCommentify('', 'decomment', \ line("'<"), line("'>")) noremap VisualTraditional \ :call EnhancedCommentify('', 'guess', \ line("'<"), line("'>")) noremap VisualFirstLine \ :call EnhancedCommentify('', 'first', \ line("'<"), line("'>")) " " Finally set keybindings. " " SetKeybindings(where) " where -- "l" for local to the buffer, "g" for global " function s:SetKeybindings(where) if a:where == "l" let where = "" let ns = "b" else let where = "" let ns = "s" endif execute "let userBindings = ". ns .":ECuserBindings" execute "let useAltKeys = ". ns .":ECuseAltKeys" execute "let traditionalMode = ". ns .":ECtraditionalMode" execute "let firstLineMode = ". ns .":ECfirstLineMode" execute "let bindInNormal = ". ns .":ECbindInNormal" execute "let bindInInsert = ". ns .":ECbindInInsert" execute "let bindInVisual = ". ns .":ECbindInVisual" if userBindings " " *** Put your personal bindings here! *** " else if useAltKeys let s:c = '' let s:x = '' let s:C = '' let s:X = '' else let s:c = 'c' let s:x = 'x' let s:C = 'C' let s:X = 'X' endif if traditionalMode let s:Method = 'Traditional' elseif firstLineMode let s:Method = 'FirstLine' else let s:Method = 'Comment' " Decomment must be defined here. Everything else is mapped below. if bindInNormal execute 'nmap '. where .' '. s:C \ .' DeCommentj' execute 'nmap '. where .' '. s:X \ .' DeComment' endif if bindInInsert execute 'imap '. where .' '. s:C \ .' DeCommentji' execute 'imap '. where .' '. s:X \ .' DeCommenti' endif if bindInVisual execute 'vmap '. where .' '. s:C \ .' VisualDeCommentj' execute 'vmap '. where .' '. s:X \ .' VisualDeComment' endif endif if bindInNormal execute 'nmap '. where .' '. s:c \ .' '. s:Method .'j' execute 'nmap '. where .' '. s:x \ .' '. s:Method endif if bindInInsert execute 'imap '. where .' '. s:c \ .' '. s:Method .'ji' execute 'imap '. where .' '. s:x \ .' '. s:Method endif if bindInVisual execute 'vmap '. s:c \ .' Visual'. s:Method .'j' execute 'vmap '. where .' '. s:x \ .' Visual'. s:Method endif endif endfunction if !s:ECbindPerBuffer call s:SetKeybindings("g") endif let &cpo = s:savedCpo " vim: set sts=4 sw=4 ts=8 : cream-0.43/cream.ico0000644000076400007660000006040611156572440014706 0ustar digitectlocaluser@@ (BF  nB S h\(@                                                    &X2/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?/n?:9Gd?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn?Nn+)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD@ j>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw0)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA)>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 2)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 5 "F )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 5*)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 5-)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 50 )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 53 @)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 53)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 53 )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 53  S)`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63  )`73wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wDA.>MlDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 63   # * * * * * * * * * * * * * * * * * * * * * * * * #0 # ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) '3  3% 3  5'B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!B2!  rr!!!!!!!!!!!!!!!!!!!!!!!! (3-  6(D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"# ut"""""""""""""""""""""""" 3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2%=FDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 0q.l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw 1.l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw2 .l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw43.l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4 v.l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4 .l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4 .l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4 .l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4 .l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4 .l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4 .l>3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD3wD#\2>>DUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUwDUw4  ###########"!$$$$$$$$$$$$ + =-C2"C2"C2"C2"C2"C2"C2"C2"C2"C2"C2"2$B:""""""""""""1 =.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""18 =.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""DD =.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE =.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE*=.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE,=.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE,=.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE,=.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE,=.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE,=.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE,=.D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"D3"3$;;""""""""""""EE,F9,XI:WH9WH9WH9WH9WH9WH9WH9WH9WH9WH9J<02299::::::::::PP,\RH zkuwwwwwwwwwwgXMGyzwwwwwwwwwwwM,ocW*klw}}}}}}}}}}]f}3\clllllllllljG(05@i[jiyYg/"?(0 (^6q/n?/n?/n?/n?/n?/n?/n?/n?.l> 6;?On?On?On?On?On?On?On?On?On-;+f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw 1}+f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw2+f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw, +f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw+C+f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw+h+f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw+h+f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw+h+f:{3wD3wD3wD3wD3wD3wD3wD3wD2uC93DUwDUwDUwDUwDUwDUwDUwDUwDUw+hK'hO&P&P&P&P&P&P&P&O&-#&0O&0O&0O&0O&0O&0O&0O&0O&0O(h4'a3,3,3,3,3,3,3,3,3, /$flflflflflflflflfl'h:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-"""""""""(-h:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-""""""""":9 g:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-""""""""">:% [:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-""""""""">:/g:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-""""""""">:/g:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-""""""""">:/g:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-""""""""">:/g:+uD3"D3"D3"D3"D3"D3"D3"D3"D3".-""""""""">:/g;."eSC4RC3RC3RC3RC3RC3RC3RB3RB3.-344444444 D@/g xiSq␀qqqqqqqteYJ|pppppppp</gF>74:I zyMrh|||||||x$R1f06@05?16A16A16A16A16A16A16A+09)=.)>/+?0*@0+A1,B1,B2,C3&;+(  (_6F*c9G*c9G*c9G*c9G*c9G%G:49GcG9GcG9GcG9GcG9GcG9GcG(  1qA3wD3wD3wD3wD3wD"M9DUwDUwDUwDUwDUwDUw 1I 1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw01qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw$ 1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw 1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw 1qA3wD3wD3wD3wD3wD!M8DUwDUwDUwDUwDUwDUw %*$+$+$+$+$+*GUGUGUGUGUGU A1 D3"D3"D3"D3"D3"%/)"""""" # A1 D3"D3"D3"D3"D3"%/)""""""3-A1 D3"D3"D3"D3"D3"%/)""""""9.#A1 D3"D3"D3"D3"D3"%/)""""""9."A1 D3"D3"D3"D3"D3"%/)""""""9.#H9*N>.M=-M=-M=-M=-,3-......<1 wh%~uy{TrƷrƷrƷrƷrƷ7t_-#05@GYYYYuYvMYYYYm|SAcIcream-0.43/cream-colors-inkpot.vim0000644000076400007660000002205311156572440017524 0ustar digitectlocaluser" Vim color file " Name: inkpot.vim " Maintainer: Ciaran McCreesh " This should work in the GUI, rxvt-unicode (88 colour mode) and xterm (256 " colour mode). It won't work in 8/16 colour terminals. set background=dark hi clear if exists("syntax_on") syntax reset endif let colors_name = "inkpot" " map a urxvt cube number to an xterm-256 cube number fun! M(a) return strpart("0135", a:a, 1) + 0 endfun " map a urxvt colour to an xterm-256 colour fun! X(a) if &t_Co == 88 return a:a else if a:a == 8 return 237 elseif a:a < 16 return a:a elseif a:a > 79 return 232 + (3 * (a:a - 80)) else let l:b = a:a - 16 let l:x = l:b % 4 let l:y = (l:b / 4) % 4 let l:z = (l:b / 16) return 16 + M(l:x) + (6 * M(l:y)) + (36 * M(l:z)) endif endif endfun if has("gui_running") hi Normal gui=NONE guifg=#cfbfad guibg=#1e1e27 hi IncSearch gui=BOLD guifg=#303030 guibg=#cd8b60 hi Search gui=NONE guifg=#303030 guibg=#cd8b60 hi ErrorMsg gui=BOLD guifg=#ffffff guibg=#ce4e4e hi WarningMsg gui=BOLD guifg=#ffffff guibg=#ce8e4e hi ModeMsg gui=BOLD guifg=#7e7eae guibg=NONE hi MoreMsg gui=BOLD guifg=#7e7eae guibg=NONE hi Question gui=BOLD guifg=#ffcd00 guibg=NONE hi StatusLine gui=BOLD guifg=#b9b9b9 guibg=#3e3e5e hi StatusLineNC gui=NONE guifg=#b9b9b9 guibg=#3e3e5e hi VertSplit gui=NONE guifg=#b9b9b9 guibg=#3e3e5e hi WildMenu gui=BOLD guifg=#eeeeee guibg=#6e6eaf hi MBENormal guifg=#cfbfad guibg=#2e2e3f hi MBEChanged guifg=#eeeeee guibg=#2e2e3f hi MBEVisibleNormal guifg=#cfcfcd guibg=#4e4e8f hi MBEVisibleChanged guifg=#eeeeee guibg=#4e4e8f hi DiffText gui=NONE guifg=#ffffcd guibg=#4a2a4a hi DiffChange gui=NONE guifg=#ffffcd guibg=#306b8f hi DiffDelete gui=NONE guifg=#ffffcd guibg=#6d3030 hi DiffAdd gui=NONE guifg=#ffffcd guibg=#306d30 hi Cursor gui=NONE guifg=#404040 guibg=#8b8bff hi lCursor gui=NONE guifg=#404040 guibg=#8f8bff hi CursorIM gui=NONE guifg=#404040 guibg=#8b8bff hi Folded gui=NONE guifg=#cfcfcd guibg=#4b208f hi FoldColumn gui=NONE guifg=#8b8bcd guibg=#2e2e2e hi Directory gui=NONE guifg=#00ff8b guibg=NONE hi LineNr gui=NONE guifg=#8b8bcd guibg=#2e2e2e hi NonText gui=BOLD guifg=#8b8bcd guibg=NONE hi SpecialKey gui=BOLD guifg=#ab60ed guibg=NONE hi Title gui=BOLD guifg=#af4f4b guibg=#1e1e27 hi Visual gui=NONE guifg=#eeeeee guibg=#4e4e8f hi Comment gui=NONE guifg=#cd8b00 guibg=NONE hi Constant gui=NONE guifg=#ffcd8b guibg=NONE hi String gui=NONE guifg=#ffcd8b guibg=#404040 hi Error gui=NONE guifg=#ffffff guibg=#6e2e2e hi Identifier gui=NONE guifg=#ff8bff guibg=NONE hi Ignore gui=NONE guifg=#8b8bcd guibg=NONE hi Number gui=NONE guifg=#f0ad6d guibg=NONE hi PreProc gui=NONE guifg=#409090 guibg=NONE hi Special gui=NONE guifg=#c080d0 guibg=NONE hi Statement gui=NONE guifg=#808bed guibg=NONE hi Todo gui=BOLD guifg=#303030 guibg=#d0a060 hi Type gui=NONE guifg=#ff8bff guibg=NONE hi Underlined gui=BOLD guifg=#ffffcd guibg=NONE hi TaglistTagName gui=BOLD guifg=#808bed guibg=NONE if v:version >= 700 hi Pmenu gui=NONE guifg=#eeeeee guibg=#4e4e8f hi PmenuSel gui=BOLD guifg=#eeeeee guibg=#2e2e3f hi PmenuSbar gui=BOLD guifg=#eeeeee guibg=#6e6eaf hi PmenuThumb gui=BOLD guifg=#eeeeee guibg=#6e6eaf hi SpellBad gui=undercurl guisp=#cc6666 hi SpellRare gui=undercurl guisp=#cc66cc hi SpellLocal gui=undercurl guisp=#cccc66 hi SpellCap gui=undercurl guisp=#66cccc endif else exec "hi Normal cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(80) exec "hi IncSearch cterm=BOLD ctermfg=" . X(80) . " ctermbg=" . X(73) exec "hi Search cterm=NONE ctermfg=" . X(80) . " ctermbg=" . X(73) exec "hi ErrorMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(48) exec "hi WarningMsg cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(68) exec "hi ModeMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" exec "hi MoreMsg cterm=BOLD ctermfg=" . X(38) . " ctermbg=" . "NONE" exec "hi Question cterm=BOLD ctermfg=" . X(52) . " ctermbg=" . "NONE" exec "hi StatusLine cterm=BOLD ctermfg=" . X(85) . " ctermbg=" . X(81) exec "hi StatusLineNC cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) exec "hi VertSplit cterm=NONE ctermfg=" . X(84) . " ctermbg=" . X(81) exec "hi WildMenu cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) exec "hi MBENormal ctermfg=" . X(85) . " ctermbg=" . X(81) exec "hi MBEChanged ctermfg=" . X(87) . " ctermbg=" . X(81) exec "hi MBEVisibleNormal ctermfg=" . X(85) . " ctermbg=" . X(82) exec "hi MBEVisibleChanged ctermfg=" . X(87) . " ctermbg=" . X(82) exec "hi DiffText cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(34) exec "hi DiffChange cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(17) exec "hi DiffDelete cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) exec "hi DiffAdd cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(20) exec "hi Cursor cterm=NONE ctermfg=" . X(80) . " ctermbg=" . X(38) exec "hi lCursor cterm=NONE ctermfg=" . X(80) . " ctermbg=" . X(38) exec "hi CursorIM cterm=NONE ctermfg=" . X(80) . " ctermbg=" . X(38) exec "hi Folded cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(35) exec "hi FoldColumn cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) exec "hi Directory cterm=NONE ctermfg=" . X(28) . " ctermbg=" . "NONE" exec "hi LineNr cterm=NONE ctermfg=" . X(39) . " ctermbg=" . X(80) exec "hi NonText cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" exec "hi SpecialKey cterm=BOLD ctermfg=" . X(55) . " ctermbg=" . "NONE" exec "hi Title cterm=BOLD ctermfg=" . X(48) . " ctermbg=" . "NONE" exec "hi Visual cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(38) exec "hi Comment cterm=NONE ctermfg=" . X(52) . " ctermbg=" . "NONE" exec "hi Constant cterm=NONE ctermfg=" . X(73) . " ctermbg=" . "NONE" exec "hi String cterm=NONE ctermfg=" . X(73) . " ctermbg=" . X(81) exec "hi Error cterm=NONE ctermfg=" . X(79) . " ctermbg=" . X(32) exec "hi Identifier cterm=NONE ctermfg=" . X(53) . " ctermbg=" . "NONE" exec "hi Ignore cterm=NONE ctermfg=" . X(22) . " ctermbg=" . "NONE" exec "hi Number cterm=NONE ctermfg=" . X(69) . " ctermbg=" . "NONE" exec "hi PreProc cterm=NONE ctermfg=" . X(25) . " ctermbg=" . "NONE" exec "hi Special cterm=NONE ctermfg=" . X(55) . " ctermbg=" . "NONE" exec "hi Statement cterm=NONE ctermfg=" . X(27) . " ctermbg=" . "NONE" exec "hi Todo cterm=BOLD ctermfg=" . X(16) . " ctermbg=" . X(57) exec "hi Type cterm=NONE ctermfg=" . X(71) . " ctermbg=" . "NONE" exec "hi Underlined cterm=BOLD ctermfg=" . X(77) . " ctermbg=" . "NONE" exec "hi TaglistTagName cterm=BOLD ctermfg=" . X(39) . " ctermbg=" . "NONE" if v:version >= 700 exec "hi Pmenu cterm=NONE ctermfg=" . X(87) . " ctermbg=" . X(82) exec "hi PmenuSel cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(38) exec "hi PmenuSbar cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) exec "hi PmenuThumb cterm=BOLD ctermfg=" . X(87) . " ctermbg=" . X(39) exec "hi SpellBad cterm=NONE ctermbg=" . X(32) exec "hi SpellRare cterm=NONE ctermbg=" . X(33) exec "hi SpellLocal cterm=NONE ctermbg=" . X(36) exec "hi SpellCap cterm=NONE ctermbg=" . X(21) endif endif "+++ Cream: " statusline highlight User1 gui=NONE guifg=#7777aa guibg=#2e2e3f highlight User2 gui=BOLD guifg=#b9b9b9 guibg=#2e2e3f highlight User3 gui=BOLD guifg=#d0a060 guibg=#2e2e3f highlight User4 gui=BOLD guifg=#cc00ff guibg=#2e2e3f " bookmarks highlight Cream_ShowMarksHL ctermfg=blue cterm=bold gui=BOLD guifg=#bb8bff highlight SignColumn ctermfg=blue cterm=bold gui=BOLD guibg=#1e1e27 " spell check highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=honeydew2 guibg=#602030 " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#585868 guifg=#ffffcc " email highlight EQuote1 guifg=#ccccff highlight EQuote2 guifg=#9999ff highlight EQuote3 guifg=#3333ff highlight Sig guifg=#999999 "+++ cream-0.43/cream-lib.vim0000644000076400007660000043303011517300720015457 0ustar digitectlocaluser" " Filename: cream-lib " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License " GNU General Public License (GPL) {{{1 " " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. [ " http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA " 02111-1307, USA. " " 1}}} " General " Path and Files {{{1 function! Cream_browse_pathfile() " uses dialog to return a path/filename let mypathfile = browse(0, "Select file", getcwd(), '*.*') " remove filename let mypathfile = fnamemodify(mypathfile, ":p") " handle spaces let mypathfile = escape(mypathfile, ' \') return mypathfile endfunction function! Cream_browse_path(...) " Return a directory (full path) via dialog (back/slashes and escaping " not guaranteed to be correct for system call). " o Returns "" on cancel or error. " o Verifies return is a directory. " o Does not verify return is writable. " o Argument 1: optional start path " o Argument 2: (requires arg 1) optional file filter " NOTE: THIS FUNCTION IS GOING TO BECOME OBSOLETE WITH " THE INTRODUCTION OF browsedir(). ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " a:0 = \"" . a:0 . "\"\n" . " \ " a:1 = \"" . a:1 . "\"\n" . " \ " a:2 = \"" . a:2 . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") " if n != 1 " return "endif ""*** if a:0 > 0 if a:0 == 1 "call confirm( " \ "Error: Incorrect number of arguments passed to Cream_browse_path().\n" . " \ "\n" . " \ "Quitting...\n" . " \ "\n", "&Ok", 1, "Info") "return "" let initpath = a:1 let filefilter = "*.*" else let initpath = a:1 let filefilter = a:2 endif else let initpath = getcwd() let filefilter = "*.*" endif " TODO: filters broken. "if exists("g:browsefilter") " unlet g:browsefilter "endif "let g:browsefilter = "Directories\t*\*;*\*\nVim Files\t*.vim;*.vim\nAll Files\t*.*;*.*\n" "let g:browsefilter = "Directories\t*\\*;*\\*\nVim Files\t*.vim;*.vim\nAll Files\t*.*;*.*\n" "let g:browsefilter = "Directories (*.)\nVim Files (*.vim)\nAll Files (*.*)\n" "let g:browsefilter = "Bob Files\t*.bob\nVim Files\t*.vim\nAll Files\t*.*\n" "let g:browsefilter = "Directories\t*.\nVim Files\t*.vim\nAll Files\t*.*\n" let mypath = browse(0, Cream_str("0000004"), initpath, filefilter) " cancel or error, return empty if mypath == "" return "" endif ""*** DEBUG: "if exists("g:cream_dev") " let n = confirm( " \ "DEBUG: in Cream_browse_path()\n" . " \ " mypath = \"" . mypath . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") " if n != 1 " return " endif "endif ""*** " expand to full path, subtract filename let mypath = fnamemodify(mypath, ":p:h") " handle escaping and spaces if Cream_has("ms") let mypath = substitute(mypath, '/', '\', 'g') else let mypath = escape(mypath, ' \') endif " append final slash back let mypath = mypath . "/" " test and return if isdirectory(mypath) != 0 return mypath else if exists("g:cream_dev") " failed call Cream_error_warning("Cream Devel: Cream_browse_path() failed to find object.") endif return "" endif endfunction function! Cream_get_dir_above(mypath) " returns a directory one level above value or empty if doesn't exist " remove filename let mystr = fnamemodify(a:mypath, ":h") " remove lowest subdirectory let mystr = fnamemodify(mystr, ":h") if !Cream_has("ms") " handle spaces let mystr = escape(mystr, ' \') endif " append final slash let mystr = mystr . "/" " test and return if isdirectory(mystr) != 0 return mystr else if exists("g:cream_dev") " failed call Cream_error_warning("Cream_get_dir_above() failed to get directory") endif return 0 endif endfunction function! Cream_getfilelist(path) " Return a file list based on path, including wildcards. The number of " newlines equals the number of files. If no file matches {path}, "" " is returned. " Notes: " o Separator between file names returned is a newline ("\n"). A " trailing newline is added if doesn't exist. " o Wildcard "*" for filename won't return files beginning with dot. " (Must use ".*" to obtain.) " o To optain directories, trail with "*/" " o Regexp support is available, e.g., to restrict extensions " beginning with "b" and "r", pass "*.[^br]*". " get file list let myfiles = glob(a:path) . "\n" " change paths to forward slashes to avoid escaping if Cream_has("ms") return substitute(myfiles, '\\', '/', 'g') endif " (from explorer.vim) " Add the dot files now, making sure "." is not included! "let myfiles = substitute(glob(g:rmpath), "[^\n]*/./\\=\n", '' , '') " ensure a return at the end if not empty if myfiles != "" && myfiles !~ '\n$' let myfiles = myfiles . "\n" endif return myfiles endfunction function! Cream_path_addtrailingslash(path) " Confirms {path} has a trailing slash appropriate for the system. let path = a:path if path !~ '/$' && path !~ '\$' if Cream_has("ms") let path = path . '\' else let path = path . '/' endif endif return path endfunction function! Cream_get_creamrc() if filereadable($CREAM . "creamrc") > 0 return $CREAM . "creamrc" else call Cream_error_warning("Cream_get_creamrc() failed to find vimrc") endif endfunction function! Cream_cmd_on_files(path, cmd) " do a particular command within the files in a series of paths " * If file is not modified as a result of the operation, it is closed " without saving. "let myfiles = glob(a:path) "" change paths to forward slashes to avoid escaping "if Cream_has("ms") " let myfiles = substitute(myfiles, '\\', '/', 'g') "endif "" ensure last has ending "if strlen(myfiles) > 0 " let myfiles = myfiles . "\n" "endif let myfiles = Cream_getfilelist(a:path) let i = 0 let max = MvNumberOfElements(myfiles, "\n") while i < max " get file let myfile = MvElementAt(myfiles, "\n", i) " save options {{{2 " turn off redraw let mylazyredraw = &lazyredraw set lazyredraw " turn off swap let myswapfile = &swapfile set noswapfile " turn off undo let myundolevels = &undolevels set undolevels=-1 " ignore autocmds let myeventignore = &eventignore set eventignore=all " unload buffers let myhidden = &hidden set nohidden " 2}}} " progress indication let mycmdheight = &cmdheight set cmdheight=2 echo " " . Cream_str("0000005") . ": " . i . " of " . max . " (" . ((i*100) / max) . "%)" let &cmdheight = mycmdheight " open file execute "silent! edit! " . myfile " do it! execute a:cmd if &modified == 1 " save file execute "silent! write! " . myfile endif " close file (delete from buffer as is our preference ;) execute "silent! bwipeout!" " restore options {{{2 let &lazyredraw = mylazyredraw let &swapfile = myswapfile let &undolevels = myundolevels let &eventignore = myeventignore let &hidden = myhidden " 2}}} let i = i + 1 endwhile endfunction function! Cream_str_tofile(str, filename) " Write any {str} to {filename}. Filename that does not exist will be " created. " OPTION 1 """" save options """" turn off redraw """let lazyredraw = &lazyredraw """set lazyredraw """" turn off swap """let swapfile = &swapfile """set noswapfile """" turn off undo """let undolevels = &undolevels """set undolevels=-1 """" ignore autocmds """let eventignore = &eventignore """set eventignore=all """" unload buffers """let hidden = &hidden """set nohidden """ """" open file """execute "silent! edit! " . a:filename """let bufnr = bufnr("%") """" do it! """let @x = a:str """put x """" save file """execute "silent! write! " . a:filename """" close file (delete from buffer as is our preference ;) """execute "silent! bwipeout! " . bufnr """ """" restore options """let &lazyredraw = lazyredraw """let &swapfile = swapfile """let &undolevels = undolevels """let &eventignore = eventignore """let &hidden = hidden " OPTION 2 let @x = a:str execute "redir > " . a:filename silent! echo @x redir END " verify if filewritable(a:filename) != 1 call confirm( \ "Error in Cream_str_tofile(): filename passed:\n" . \ "\n" . \ " a:filename = \"" . a:filename . "\"\n" . \ "\n" . \ "not created.\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif endif endfunction function! Cream_appendext(pathfile, ext) " save a file with an appended extension (good for temp files) " * return -1 if unable " append extension let myfilename = a:pathfile . "." . a:ext " open file as new buffer, if doesn't exist if filereadable(myfilename) == "TRUE" execute "saveas " . myfilename return else call confirm("Can not continue, a file named \"" . myfilename . "\" already exists here.", "&" . Cream_str("0000001"), 1, "Warning") return -1 endif endfunction function! Cream_buffers_pathfile() " Initialize all buffers' b:cream_pathfilename var. " page through each buffer let i = 0 while i <= bufnr('$') let i = i + 1 if Cream_buffer_isspecial(i) == 0 \ && Cream_buffer_isnewunmod(i) == 0 if bufexists(i) let bufname = Cream_path_fullsystem(fnamemodify(bufname(i), ':p')) call setbufvar(i, "cream_pathfilename", bufname) endif endif endwhile endfunction function! Cream_buffer_pathfile() " Determine b:cream_pathfilename for the current buffer. (Used for " display in statusline and window title.) " o Set as text " o Proper according to the platform. " verify if !exists("b:cream_nr") call Cream_buffer_nr() endif if !exists("b:cream_pathfilename") || b:cream_pathfilename == "" let b:cream_pathfilename = Cream_path_fullsystem(expand('%:p')) " is directory if isdirectory(b:cream_pathfilename) let b:cream_pathfilename = "" " doesn't exist elseif bufexists(b:cream_nr) == 0 let b:cream_pathfilename = "[doesn't exist]" endif endif " keep testing if doesn't exist (in case SaveAs) if b:cream_pathfilename == "[doesn't exist]" if bufexists(b:cream_nr) != 0 let b:cream_pathfilename = Cream_path_fullsystem(expand('%:p')) endif endif endfunction function! Cream_buffer_nr() " Determine's the current buffer's number. if !exists("b:cream_nr") let b:cream_nr = bufnr("%") endif endfunction " Path and Files, User {{{1 function! Cream_load_user() " loads cream-user if present " Note: Cream_userdir() must be called prior to here to establish " g:cream_user if available (currently handled in autocmds). " load system cream-user call Cream_source($CREAM . "cream-user.vim") " load $HOME's cream-user if exists("g:cream_user") call Cream_source(g:cream_user . "cream-user.vim") endif endfunction " Debug and Error Handling {{{1 "function! Cream_debug() "" insert debug template " let mystr = "" " let mystr = mystr . "\"*** DEBUG:\n" " let mystr = mystr . "let n = confirm(\n" " let mystr = mystr . "\t\\ \"DEBUG:\\n\" .\n" " let mystr = mystr . "\t\\ \" myvar = \" . myvar . \"\\n\" .\n" " let mystr = mystr . "\t\\ \"\\n\", \"&Ok\\n&Cancel\", 1, \"Info\")\n" " let mystr = mystr . "if n != 1\n" " let mystr = mystr . "\treturn\n" " let mystr = mystr . "endif\n" " let mystr = mystr . "\"***\n" " let mystr = mystr . "\n" " let @x = mystr " normal "xp "endfunction function! Debug(...) " Handle debug requests " * accepts any number of quoted variables, and displays name and value let myarg = "DEBUG:\n\n" let i = 1 while exists("a:" . i) execute "let myarg = myarg . \" " . a:{i} . " = \" . " . a:{i} " . \"\n\"" let i = i + 1 endwhile if has("gui_runnning") && has("dialog_gui") call confirm(myarg, "&Ok", 1) else echo myarg endif endfunction function! Cream_error_notice(myerror) if has("dialog_gui") call confirm("Notice:\n" . a:myerror, "&Ok", 1, "Info") else echo "----------------------------------------------------------------------" echo "Notice:" echo a:myerror echo "----------------------------------------------------------------------" endif endfunction function! Cream_error_warning(myerror) if has("dialog_gui") call confirm("Warning:\n" . a:myerror, "&Ok", 1, "Error") else echo "----------------------------------------------------------------------" echo "Warning:" echo a:myerror echo "----------------------------------------------------------------------" endif endfunction function! Cream_error_critical(myerror) if has("dialog_gui") call confirm("Critical:\n" . a:myerror, "&Ok", 1, "Warning") else echo "----------------------------------------------------------------------" echo "Critical:" echo a:myerror echo "----------------------------------------------------------------------" endif endfunction " 1}}} " Help {{{1 function! Cream_help(...) " open a $CREAM docs-html/{file} in the default browser " If {...} is empty, use keyboardshortcuts.html. let file = "" " try argument if a:0 > 0 let file = Cream_path_fullsystem($CREAM . 'docs-html/' . a:1) endif if filereadable(file) != 1 " if argument, warn invalid if a:0 > 0 " no command found, exit call confirm( \ "Invalid document looked up, using default.\n" . \ "\n", "&Ok", 1, "Info") endif let file = Cream_path_fullsystem($CREAM . 'docs-html/keyboardshortcuts.html') endif return Cream_file_open_defaultapp(file) endfunction function! Cream_help_find(...) " help control if a:0 > 0 let myhelp = a:1 " toggle open/closed (only close if on first page, help.txt) " try to find it let i = 1 while i <= bufnr("$") " move to it if Cream_buffer_ishelp(i) == 1 \&& fnamemodify(bufname(i), ":t") == "help.txt" " goto "help.txt" call MoveCursorToWindow(bufwinnr(i)) bwipeout! return endif let i = i + 1 endwhile else let mymsg = \ "Enter a command or word to find help on:\n" . \ "\n" . \ "Prepend i_ for Input mode commands (e.g.: i_CTRL-X)\n" . \ "Prepend c_ for command-line editing commands (e.g.: c_)\n" . \ "Prepend ' for an option name (e.g.: 'shiftwidth')\n" let myhelp = inputdialog(mymsg) " if empty, quit without confirmation if myhelp == "" return endif endif " window management " don't pop help from a special, unless it's help if Cream_buffer_isspecial() == 1 \&& Cream_buffer_ishelp() == 0 call Cream_TryAnotherWindow() endif let v:errmsg = "" silent! execute "help " . myhelp " indicate error in dialog if v:errmsg != "" call confirm(v:errmsg, "&Ok", 1, "Info") return endif " remember help height during the session let g:cream_help_size = winheight(0) " window management " remove all hidden help buffers (do before setup, since Vim's " :help command won't remove a previously open) call Cream_help_hidden_remove() " get help buffer number (current) let mybufnr = bufnr("%") call Cream_window_setup() " restore cursor to help buffer's (new) window call MoveCursorToWindow(bufwinnr(mybufnr)) endfunction function! Cream_help_hidden_remove() " remove all hidden help buffers (do this after we open ours so we " know it's hidden ;) let mybufnr = bufnr("%") let i = 1 while i <= bufnr('$') if Cream_buffer_ishelp(i) == 1 \&& bufwinnr(i) == -1 execute "bwipeout! " . i endif let i = i + 1 endwhile endfunction function! Cream_help_listtopics() let mymsg = \ "Enter a command or word to list help topics:\n" . \ "(results will be listed below the statusbar)\n" \ "\n" let myhelp = inputdialog(mymsg) if myhelp != "" let v:errmsg = "" execute "normal :help " . myhelp . "\" if v:errmsg != "" "+++ Cream: add dialog feedback if has("dialog_gui") call confirm(v:errmsg, "&Ok", 1) else echo v:errmsg endif "+++ endif endif call Cream_help_find() endfunction function! Cream_help_tags() " Re-define helptags of all .txt files in the current buffer's " directory. (See :helptags.) "set filetype=help execute "helptags " . expand("%:p:h") "set filetype=txt filetype detect endfunction " About Splash/License {{{1 function! Cream_splash() if has("gui_running") let str = \ "\n" . \ " Cream (for Vim) \n" . \ "\n" . \ " http://cream.sourceforge.net \n" . \ " " . g:cream_mail . " \n" . \ "\n" . \ "\n" . \ " Version: " . g:cream_version_str . " \n" . \ " " . g:cream_updated . " \n" . \ " * * * \n" . \ "\n" . \ " Vim version: " . Cream_version("string") . " \n" . \ "\n" let n = confirm( \ str . \ "\n", "&Ok", 3, "Info") endif endfunction function! Cream_license() " split open $CREAM/docs/COPYING.txt read-only call Cream_file_new() execute "read " . $CREAM . "docs/COPYING.txt" set nomodified endfunction " Features Cream_has(){{{1 function! Cream_has(property) " return 1 if Cream has feature, 0 if not, -1 on error " o See cases below for allowable arguments " a tags file exists if a:property == "tagsfile" if filereadable(expand("%:p:h") . "/tags") == 1 return 1 endif " app tags (or variant) exists " Note: Gentoo Linux properly appends "ctags" with "exuberant-" elseif a:property == "tags" if executable("ctags") == 1 \|| executable("exuberant-ctags") == 1 \|| executable("tags") == 1 return 1 endif " on a Microsoft system elseif a:property == "ms" " function defined in genutils.vim return OnMS() endif return 0 endfunction " Vim file lists {{{1 function! Cream_vim_syntax_list() " returns alphabetized list of syntax/*.vim, separated by "\n" " TODO: Use this prototype to return any file list from path. let mypath = $VIMRUNTIME . '/syntax/' if v:version >= 602 && Cream_has("ms") " BUGFIX: glob needs an "OS-friendly" path let myrt = fnamemodify(mypath, ":8") endif let myfiles = glob(mypath . "*.vim") " self-determine preceding path (as determined by glob() above) let str = matchstr(myfiles, '.\{-1,}syntax.\ze..\{-1,}\.vim') let myfiles = substitute(myfiles, escape(str, '~'), "", "g") let myfiles = substitute(myfiles, '\.vim', "", "g") return myfiles endfunction " Get filetypes {{{1 function! Cream_get_filetypes() " get a list of all potential Vim filetypes by parsing the output of " "autocmd filetypedetect" " " Hack: We're opening a temp buffer and processing the redirected " output. Not sure to sort, substitute, and uniq a var. " save cmdheight let mych = &cmdheight set cmdheight=8 set shortmess=stOTI " get list of filetype autocommands redir @x silent! autocmd filetypedetect redir END " restore cmdheight let &cmdheight = mych " open temp buffer silent! enew silent! put x " put all 'setf [:alnum:] at line beginnings silent! %substitute/^\s*.*\(setf\s\+[A-Za-z0-9]\+\)/\1\r/gei " remove all lines not beginning 'setf' silent! %substitute/^\(setf\)\@!.*$//gei " remove all initial 'setf ' silent! %substitute/^setf\s\+//gei " remove all empty lines silent! %substitute/\n\n\+/\r/gei " sort file silent! call BISort2(0, line("$")) " unselect normal i " remove initial empty line silent! %substitute/^\n//gei " uniq silent! call Uniq(0, line("$")) " select all silent! call Cream_select_all("endvisual") " yank normal "xy " close buffer silent! bwipeout! return @x endfunction " Strings, dialogs, and i18n {{{1 function! Cream_confirm() " endfunction function! Cream_echo() endfunction function! Cream_inputdialog(prompt, default) endfunction function! Cream_str(id) " Returns string number {id}, utilizing a translation for the current " language if it exists or, otherwise, the default. " " Example string function, found in lang/strings_us_en.utf-8.vim " " function! Cream_str_en_us_0000001() " return "This is string 0000001" " endfunction if !exists("g:CREAM_I18N_COUNTRY") let g:CREAM_I18N_COUNTRY = "us" endif if !exists("g:CREAM_I18N_LANG") let g:CREAM_I18N_LANG = "en" endif let str = "*Cream_str_" . g:CREAM_I18N_COUNTRY . g:CREAM_I18N_LANG if exists(str) let functionname = "Cream_str_" . g:CREAM_I18N_COUNTRY . "_" . g:CREAM_I18N_LANG . "_" . a:id . "()" else let functionname = "Cream_str_en_us_" . a:id . "()" endif return functionname endfunction " Inputdialog() {{{1 function! Inputdialog(prompt, default) " Wraps Vim's "inputdialog()" function to accommodate Vim versions " prior to 6.2 which are unable to distinguish between a returned " Cancel value or an empty string value. When Vim version < 6.2, the " user is first prompted to distingish the two. " " Returns: " " string When return value is not empty " "" When determins the user wants an empty value " "{cancel}" When determins the user wants to cancel " if version >= 602 return inputdialog(a:prompt, a:default, "{cancel}") endif let myreturn = inputdialog(a:prompt, a:default) if myreturn == "" let n = confirm( \ "Leave Empty or Cancel?\n" . \ "\n" . \ "(Vim versions prior to 6.2 can't tell\n", \ "between an empty value and cancel.)\n", \ "&Leave\ Empty\n&Cancel", 2) if n != 1 return "{cancel}" else return "" endif endif return myreturn endfunction " 1}}} " File open, close " Last buffer restore {{{1 function! Cream_start() " obsolete endfunction function! Cream_last_buffer_restore() " Recall name of last current buffer and restore. " Note: Cream_exit ensures remembered file is not special " Refresh tabs after all buffer restoration is complete. Do this " prior to making the last buffer current so it doesn't disappear " down the road! call Cream_tabpages_refresh() " see if last buffer name was saved in Cream_exit() last session if exists("g:CREAM_LAST_BUFFER") " only open if exists (able to be written) if filewritable(g:CREAM_LAST_BUFFER) == 1 " NOTE: Must use name, number changes on restart. if bufexists(g:CREAM_LAST_BUFFER) if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 call Cream_tab_goto(bufnr(g:CREAM_LAST_BUFFER)) else execute "buffer! " . g:CREAM_LAST_BUFFER endif else " Don't warn if unable to find! (This could be " experienced from any number of means, such as with a " second instance.) endif endif endif " TODO: Technically, this is startup fix stuff, but this routine " would only occur at startup. " endfunction function! Cream_last_buffer_toggle() " toggle restoration of last buffer behavior " default (restore) is not existing (or 0), don't restore == 1 if exists("g:CREAM_LAST_BUFFER_FORGET") unlet g:CREAM_LAST_BUFFER_FORGET else let g:CREAM_LAST_BUFFER_FORGET = 1 endif call Cream_menu_settings_preferences() endfunction " Var Management {{{1 function! Cream_var_manage() " variable management " * handle obsolete memorized global variable names " * correct variable types if !exists("g:CREAM_VARFIX_022") " v.12 and prior " -------------- " last buffer if exists("g:LAST_BUFFER") let g:CREAM_LAST_BUFFER = g:LAST_BUFFER unlet g:LAST_BUFFER endif " ReplaceMultifile if exists("g:RMFIND") let g:CREAM_RMFIND = g:RMFIND unlet g:RMFIND endif if exists("g:RMREPL") let g:CREAM_RMREPL = g:RMREPL unlet g:RMREPL endif if exists("g:RMPATH") let g:CREAM_RMPATH = g:RMPATH unlet g:RMPATH endif " MRU (Most recent used file menu) if exists("g:MRU_MENU") let g:CREAM_MRU_MENU = g:MRU_MENU unlet g:MRU_MENU endif if exists("g:MRU_MAX") let g:CREAM_MRU_MAX = g:MRU_MAX unlet g:MRU_MAX endif if exists("g:MRU_BUF_COUNT") let g:CREAM_MRU_BUF_COUNT = g:MRU_BUF_COUNT unlet g:MRU_BUF_COUNT endif if exists("g:MRU_MENU_PRIO") let g:CREAM_MRU_MENU_PRIO = g:MRU_MENU_PRIO unlet g:MRU_MENU_PRIO endif if exists('g:CREAM_MRU_MENU_PRIO') unlet g:CREAM_MRU_MENU_PRIO endif " individual buffers, now obsolete (1 through arbitrary 30) if exists("g:CREAM_MRU_MAX") let i = 0 while i < 30 "call Debug("i") if exists("g:MRU_BUFFER" . i) execute "let g:CREAM_MRU_BUFFER" . i . " = g:MRU_BUFFER" . i execute "unlet g:MRU_BUFFER" . i endif let i = i + 1 endwhile endif if exists('g:CREAM_MRU_MAX') unlet g:CREAM_MRU_MAX endif " v.13 " ---- " update language variable (only english existed) if exists("g:CREAM_SPELL_LANG") if g:CREAM_SPELL_LANG == "eng" let g:CREAM_SPELL_LANG = "eng,m;" endif endif " v.14 " ---- " version case change if exists('g:Cream_version') unlet g:Cream_version endif " show invisibles if exists('g:CREAM_LIST') unlet g:CREAM_LIST endif " migrate to distinguishing between platforms so multiple can be " supported [08 Sep 2002 v0.15] if exists("g:CREAM_COLS") let g:CREAM_COLS_{myos} = g:CREAM_COLS unlet g:CREAM_COLS endif if exists("g:CREAM_LINES") let g:CREAM_LINES_{myos} = g:CREAM_LINES unlet g:CREAM_LINES endif if exists("g:CREAM_WINPOSX") let g:CREAM_WINPOSX_{myos} = g:CREAM_WINPOSX unlet g:CREAM_WINPOSX endif if exists("g:CREAM_WINPOSY") let g:CREAM_WINPOSY_{myos} = g:CREAM_WINPOSY unlet g:CREAM_WINPOSY endif if exists("g:CREAM_FONT") let g:CREAM_FONT_{myos} = g:CREAM_FONT unlet g:CREAM_FONT endif " v.16 " ---- " convert var types (string to num) and initialize to 0 " type(), 0 if Number, 1 if String if exists("g:CREAM_WRAP") let g:CREAM_WRAP = g:CREAM_WRAP + 0 " change off state from -1 to 0 if g:CREAM_WRAP == -1 let g:CREAM_WRAP = 0 endif endif if exists("g:CREAM_AUTOWRAP") let g:CREAM_AUTOWRAP = g:CREAM_AUTOWRAP + 0 " change off state from -1 to 0 if g:CREAM_AUTOWRAP == -1 let g:CREAM_AUTOWRAP = 0 endif endif if exists("g:CREAM_AUTOWRAP_WIDTH") let g:CREAM_AUTOWRAP_WIDTH = g:CREAM_AUTOWRAP_WIDTH + 0 endif if exists("g:CREAM_TABSTOP") if type(g:CREAM_TABSTOP) == 1 " change to number let g:CREAM_TABSTOP = g:CREAM_TABSTOP + 0 endif endif if exists("g:CREAM_AUTOINDENT") let g:CREAM_AUTOINDENT = g:CREAM_AUTOINDENT + 0 " change off state from -1 to 0 if g:CREAM_AUTOINDENT == -1 let g:CREAM_AUTOINDENT = 0 endif endif if exists("g:CREAM_LINENUMBERS") let g:CREAM_LINENUMBERS = g:CREAM_LINENUMBERS + 0 endif if exists("g:LIST") let g:LIST = g:LIST + 0 endif if exists("g:CREAM_TOOLBAR") let g:CREAM_TOOLBAR = g:CREAM_TOOLBAR + 0 endif if exists("g:CREAM_EXPERTMODE") if type(g:CREAM_EXPERTMODE) == 1 " change state from "on-off" to "1-0" if g:CREAM_EXPERTMODE == "on" let g:CREAM_EXPERTMODE = 1 elseif g:CREAM_EXPERTMODE == "off" let g:CREAM_EXPERTMODE = 0 endif endif let g:CREAM_EXPERTMODE = g:CREAM_EXPERTMODE + 0 endif if exists("g:CREAM_SPELL_MULTIDICT") let g:CREAM_SPELL_MULTIDICT = g:CREAM_SPELL_MULTIDICT + 0 endif if exists("g:CREAM_SINGLESERVER") let g:CREAM_SINGLESERVER = g:CREAM_SINGLESERVER + 0 endif if exists("g:CREAM_SEARCH_HIGHLIGHT") let g:CREAM_SEARCH_HIGHLIGHT = g:CREAM_SEARCH_HIGHLIGHT + 0 endif " find if exists("g:CREAM_FCASE") let g:CREAM_FCASE = g:CREAM_FCASE + 0 " fix -1 state (make 0) if g:CREAM_FCASE == -1 let g:CREAM_FCASE = 0 endif endif if exists("g:CREAM_FREGEXP") let g:CREAM_FREGEXP = g:CREAM_FREGEXP + 0 " fix -1 state (make 0) if g:CREAM_FREGEXP == -1 let g:CREAM_FREGEXP = 0 endif endif " replace if exists("g:CREAM_RCASE") let g:CREAM_RCASE = g:CREAM_RCASE + 0 " fix -1 state (make 0) if g:CREAM_RCASE == -1 let g:CREAM_RCASE = 0 endif endif if exists("g:CREAM_RREGEXP") let g:CREAM_RREGEXP = g:CREAM_RREGEXP + 0 " fix -1 state (make 0) if g:CREAM_RREGEXP == -1 let g:CREAM_RREGEXP = 0 endif endif if exists("g:CREAM_RONEBYONE") let g:CREAM_RONEBYONE = g:CREAM_RONEBYONE + 0 " fix -1 state (make 0) if g:CREAM_RONEBYONE == -1 let g:CREAM_RONEBYONE = 0 endif endif " replace multi-file if exists("g:CREAM_RMCASE") let g:CREAM_RMCASE = g:CREAM_RMCASE + 0 " fix -1 state (make 0) if g:CREAM_RMCASE == -1 let g:CREAM_RMCASE = 0 endif endif if exists("g:CREAM_RMREGEXP") let g:CREAM_RMREGEXP = g:CREAM_RMREGEXP + 0 " fix -1 state (make 0) if g:CREAM_RMREGEXP == -1 let g:CREAM_RMREGEXP = 0 endif endif "...................................................................... " Hmm... not sure how long these have been obsolete if exists("g:CREAM_HI_SEL") unlet g:CREAM_HI_SEL endif if exists("g:CREAM_SHIFTWIDTH") unlet g:CREAM_SHIFTWIDTH endif " v.18 " ---- " this never in production if exists("g:CREAM_POP") unlet g:CREAM_POP endif " v.21 " ---- " never utilized if exists("g:CREAM_TAGLIST") unlet g:CREAM_TAGLIST endif " v.22 " ---- if exists("g:CREAM_FONT_COLUMNS") let myos = Cream_getoscode() let g:CREAM_FONT_COLUMNS_{myos} = g:CREAM_FONT_COLUMNS unlet g:CREAM_FONT_COLUMNS endif " array style/structure changes for addon mappings let i = 0 while i < 8 " if first item exists and is a string if exists("g:CREAM_ADDON_MAPS{i}") \ && type(g:CREAM_ADDON_MAPS{i}) == 1 " set new globals to old values let g:CREAM_ADDON_MAPS{i + 1}_{1} = MvElementAt(g:CREAM_ADDON_MAPS{i}, "\t", 0) let g:CREAM_ADDON_MAPS{i + 1}_{2} = MvElementAt(g:CREAM_ADDON_MAPS{i}, "\t", 1) let g:CREAM_ADDON_MAPS{i + 1}_{3} = MvElementAt(g:CREAM_ADDON_MAPS{i}, "\t", 2) " remove old globals "if i != 0 unlet g:CREAM_ADDON_MAPS{i} "else " " trick to get past init filter at " " Cream_addon_maps_init() so we get a count there " let g:CREAM_ADDON_MAPS{i} = -1 "endif else break endif let i = i + 1 endwhile " don't do this again let g:CREAM_VARFIX_022 = 1 endif if !exists("g:CREAM_VARFIX_029") " v.29 " ---- if exists("g:CREAM_AUTOWRAP_WIDTH") let g:CREAM_AUTOWRAP_WIDTH = g:CREAM_AUTOWRAP_WIDTH + 0 endif " don't do this again let g:CREAM_VARFIX_029 = 1 endif if !exists("g:CREAM_VARFIX_031") " v.31 " ---- " fix spelling dictionary dialect name changes if exists("g:CREAM_SPELL_LANG") let g:CREAM_SPELL_LANG = substitute(g:CREAM_SPELL_LANG, ',us', ',US', 'g') let g:CREAM_SPELL_LANG = substitute(g:CREAM_SPELL_LANG, ',ca', ',CA', 'g') let g:CREAM_SPELL_LANG = substitute(g:CREAM_SPELL_LANG, ',br', ',GB', 'g') endif " don't do this again let g:CREAM_VARFIX_031 = 1 endif " v.34 " ---- " type fix if exists("g:CREAM_TOOLBAR") && g:CREAM_TOOLBAR == "1" let g:CREAM_TOOLBAR = 1 endif endfunction " Buffer Enter fix {{{1 " fix normal mode hang on buffer enter (fixed in patch 6.0.254) "*** Broken *** function! Cream_bufenter_fix() if version <= 600 execute "normal \" endif endfunction " New {{{1 function! Cream_file_new() " opens new buffer in current window " if already in new, stop if Cream_buffer_isnewunmod() == 1 return endif " window management (prohibit from a special) if Cream_buffer_isspecial() == 1 call Cream_TryAnotherWindow() " if already in new, stop if Cream_buffer_isnewunmod() == 1 return endif endif " why would we need to confirm this? "confirm enew if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 tabnew else enew endif " not needed, handled by BufNew autocmd call "" refresh buffer menu "call BMShow() endfunction " Open/Edit {{{1 function! Cream_file_open(...) " open file using dialog " * optional argument is file to be opened (without dialog) " * disallow opening in Calendar window " * disallow opening in Opsplorer window " window management (not from a special) if Cream_buffer_isspecial(bufnr("%")) call Cream_TryAnotherWindow() endif " if argument passed if a:0 == 0 " open dialog if exists("g:CREAM_CWD") let mydir = g:CREAM_CWD else "" TODO: did Vim behavior change? (empty works pre-7) " let mydir = getcwd() "if Cream_has("ms") " let mydir = "" "else " if exists("b:cream_pathfilename") " let mydir = fnamemodify(expand(b:cream_pathfilename), ":p:h") . '/' " else " let mydir = "" " endif "endif " we've fixed automatic directory changing elsewhere, this " should always open to the cwd. let mydir = getcwd() endif ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " mydir = " . mydir . "\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** let myfile = browse(0, "Select file", mydir, "") " To open file in path of current buffer "let myfile = browse(0, "Select file", fnamemodify(bufname("%"), ":p:h"), "") else let myfile = a:1 endif " ignore Cancel return if myfile == "" return endif " make sure we can edit! if filewritable(myfile) == 2 call confirm( \ "Can not edit a directory!\n" . \ "\n", "&Ok", 1, "Info") return elseif filereadable(myfile) == 0 let n = confirm( \ "File \"" . myfile . "\"\n" . \ "does not exist, create it?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif elseif filewritable(myfile) == 0 let n = confirm( \ "Warning!\n\n" . \ "File is not writable (read-only, permissions, etc.). Open anyway?\n" . \ "\n", "&Ok\n&Cancel", 1, "Warning") if n != 1 return endif endif " hook for user functionality if exists("*Cream_hook_open") let fname = Cream_path_fullsystem(myfile) let test = Cream_hook_open(fname) if test == -1 " stop return -1 endif endif " escape spaces let myfile = escape(myfile, ' #%<') " if using tabs if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 " if new-unmod if Cream_buffer_isnewunmod() " open in current window execute "edit " . myfile else " new tab execute "tabedit " . myfile endif else " open in current window execute "edit " . myfile endif " refresh syntax highlighting call Cream_filetype() endfunction function! Cream_file_open_readonly(...) " similar to open() except file is made readonly " window management (not from a special) if Cream_buffer_isspecial(bufnr("%")) call Cream_TryAnotherWindow() endif " if argument passed if a:0 == 0 " open dialog let myfile = browse(0, "Select file", "", '') else let myfile = a:1 endif " ignore Cancel return if myfile == "" return endif " make sure we can edit! if filewritable(myfile) == 2 call confirm( \ "Can not edit a directory!\n" . \ "\n", "&Ok", 1, "Info") return endif if filereadable(myfile) == 0 call confirm( \ "Error: File does not exist!\n" . \ "\n", "&Ok", 1, "Error") return endif " escape spaces let myfile = escape(myfile, ' ') " open in current window if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 " if new-unmod if Cream_buffer_isnewunmod() " open in current window execute "view " . myfile else " new tab execute "tab view " . myfile endif else execute "view " . myfile endif " refresh syntax highlighting call Cream_filetype() endfunction function! Cream_session_new() " start new session (and over-ride single server mode temporarily) " TODO: OBSOLETE, we no longer permit multiple sessions. (2007-05-16) " solve buffer not found errors from second session startup let g:CREAM_LAST_BUFFER = "" " write the viminfo so it's remembered! wviminfo! " don't use if not initialized if !exists("g:CREAM_SINGLESERVER") if Cream_has("ms") execute 'silent! !start gvim --servername "CREAM" -U NONE -u "\$VIMRUNTIME/cream/creamrc"' else execute 'silent! !gvim --servername "CREAM" -U NONE -u "\$VIMRUNTIME/cream/creamrc"' endif else " TODO: There's a complex bug here: the new session will not " have the same settings as this session. But the last session " to close will determine the preferences of future sessions. " This will result in: " o Omissions of Recent File menu entries " o Settings toggled " " Solutions: " o Warn the user? " o => On close, message any existing sessions with the new " info. (talk about complicated) " o Immediately write setting changes back to viminfo? " * Any session beginning with a name other than "CREAM" " should register with the rest? " Set up viminfo for new session. " " so new session doesn't re-merge (see Cream_singleserver()) let g:CREAM_SERVER_OVERRIDE = 1 " disable swapfiles set noswapfile " disable window pos (so not over current session) call Cream_screen_unlet() " forget current buffers if !exists("g:CREAM_LAST_BUFFER_FORGET") || g:CREAM_LAST_BUFFER_FORGET == 1 let lastbuf = 1 let g:CREAM_LAST_BUFFER_FORGET = 1 if exists("g:CREAM_LAST_BUFFER") unlet g:CREAM_LAST_BUFFER endif set viminfo-=% endif " write viminfo wviminfo! " restore last buffer remember state if exists("lastbuf") let g:CREAM_LAST_BUFFER_FORGET = 1 let &viminfo = &viminfo . ",%" "let g:CREAM_LAST_BUFFER = 1 endif " restore GUI set call Cream_screen_get() " remove global shield unlet g:CREAM_SERVER_OVERRIDE " add four random digits to server name so unique let myserver = "CREAM" . strpart(localtime(), 6) " open the new session if Cream_has("ms") execute 'silent! !start gvim --servername "' . myserver . '" -U NONE -u "\$VIMRUNTIME/cream/creamrc"' else execute 'silent! !gvim --servername "' . myserver . '" -U NONE -u "\$VIMRUNTIME/cream/creamrc"' endif endif endfunction function! Cream_cwd() " maintain current working directory (called via autocmd) if exists("g:CREAM_CWD") execute 'cd "' . g:CREAM_CWD . '"' else if exists("b:cream_pathfilename") " need quotes on unix for unescaped filenames (escaping is harder) if Cream_has("ms") execute 'cd ' . \ fnamemodify(expand(b:cream_pathfilename), ":p:h") else execute 'cd ' . \ escape(fnamemodify(expand(b:cream_pathfilename), ":p:h"), ' \') endif endif endif endfunction " File open under cursor {{{1 function! Cream_file_open_undercursor(mode) " open the file under the cursor. " * guess where it is if not full path " * future options to open related (.h from .c, etc.) " get full name " with selection, we won't guess (much) if a:mode == "v" normal gv normal "xy " trim off accidental leading whitespace let myfile = Cream_trim(@x) " URL if Cream_isURL(myfile) let isURL = 1 " filename elseif filereadable(myfile) " filename, try file in existing path elseif filereadable(expand("%:p:h") . "/" . myfile) let myfile = expand("%:p:h") . "/" . myfile " further guesses here... else endif " use word under cursor (if file doesn't exist, we might try " a little harder in the area, but not much--tell user we can't " find spaces or odd characters.) elseif a:mode == "i" " OPTION 1 "" try word under cursor "let myfile = expand("") " "" URL ( http://cream.sf.net ) "if match(myfile, "http://", 0) == 0 " let isURL = 1 "elseif match(expand(""), "http://", 0) == 0 " let myfile = expand("") " let isURL = 1 "" filename "elseif filereadable(myfile) " "" filename, try harder "elseif filereadable(expand("")) " let myfile = expand("") "" filename, try word under cursor, with path "elseif filereadable(expand("%:p:h") . "/" . expand("")) " let myfile = expand("%:p:h") . "/" . expand("") "" filename, try harder, with path "elseif filereadable(expand("%:p:h") . "/" . expand("")) " let myfile = expand("%:p:h") . "/" . expand("") " "" filename, try *really* hard "else " " add period as valid part of cword (already part of cWORD) " set iskeyword+=. " " let myfile = expand("") " if filereadable(myfile) " " good, continue " " try word with path " elseif filereadable(expand("%:p:h") . "/" . expand("")) " let myfile = expand("%:p:h") . "/" . expand("") " endif " " set iskeyword-=. "endif " OPTION 2 let myfile = expand("") " URL if Cream_isURL(myfile) let isURL = 1 endif endif " ACTIONS if exists("isURL") call Cream_file_open_defaultapp(myfile) return " validate (return if file unreadable) elseif filereadable(myfile) == 0 if a:mode == "v" call confirm( \ "Unable to find a file to open matching the selection.\n" . \ "\n", "&Ok", 1, "Info") normal gv elseif a:mode == "i" call confirm( \ "Unable to find a file to open matching the word under the cursor.\n" . \ "\n", "&Ok", 1, "Info") endif return endif " open validated file call Cream_file_open(myfile) " refresh buffer menu call BMShow() endfunction function! Cream_isURL(str) if match(a:str, "http://", 0) == 0 return 1 elseif match(a:str, "www.", 0) == 0 return 1 endif endfunction " Saving {{{1 function! Cream_save() " save no matter what " if new file if expand("%") == "" if has("browse") browse confirm write else confirm write endif set filetype= call Cream_filetype() else confirm write endif " refresh buffer menu call BMShow() endfunction function! Cream_saveas(...) " general SaveAs function " o Unloads original file without saving " o Optional argument {...} can be path-filename to save to without " prompting user for path-filename. " " NOTE: If saveas is successful, new buffer name will have old buffer " number while old buffer name will have a new buffer number. " remember original buffer let origbufnr = bufnr("%") " unnamed buffers will have the cwd as their name, condition here let origbufname = Cream_path_fullsystem(bufname(origbufnr)) " track if this is a new file or not let isnewunmod = Cream_buffer_isnewunmod() let isnewmod = Cream_buffer_isnewmod() " if passed arg and head of it exists if a:0 == 1 let pathname == Cream_path_fullsystem(a:1) endif if exists("pathname") if Cream_pathexists(pathname) " save as new file *name* execute "confirm saveas! " . pathname endif else " prompt user for path/filename if has("browse") browse confirm saveas else confirm saveas endif endif " get new buffer's number let newbufnr_new = bufnr("%") " get original buffer's new number let origbufnr_new = bufnr(origbufname) "----------------------------------------------------------------- " unnamed saveas success if isnewmod == 1 && &modified == 0 \|| isnewunmod == 1 && bufname(bufnr("%")) != "" " vim leaves a bunch of unnamed around call Cream_buffers_delete_untitled() " buffer was new " (don't try to delete old buffer) return " unnamed saveas canceled (failed?) elseif isnewmod == 1 && &modified == 1 \|| isnewunmod == 1 && bufname(bufnr("%")) != "" return endif " make new file name current (*has old buffer number*) execute "buffer " . origbufnr " remove original file (*now with new number*) *without saving* if origbufnr_new != -1 call Cream_bwipeout(origbufnr_new) endif " REFRESH... " buf name if exists("b:cream_pathfilename") unlet b:cream_pathfilename endif " highlighting if exists("g:CREAM_SYNTAX") && g:CREAM_SYNTAX == 1 syntax enable endif " spell check highlighting if on if exists("b:cream_spell") && b:cream_spell == "1" call Cream_spellcheck() endif " MRU menu (BufEnter autocmd doesn't pick up?) call MRUAddToList() " buffer menu call BMShow() " windows/tabs call Cream_window_setup() "" TODO: hmmm... beginning 7.2.60 the new tab is not refreshed for some reason "redraw! "" weird, it takes twice "redraw! call Cream_filetype() endfunction function! Cream_saveall() " function so buffer menu can be refreshed " we silence command line warning, so warn with dialog if Cream_NumberOfBuffers("newmod") > 0 call confirm( \ "Modified buffers exist that are not yet saved as files. " . \ "SaveAs in \"[untitled]\" windows to keep your work." . \ "\n", "&Ok", 1, "Warning") endif silent! execute "wall" call BMShow() endfunction function! Cream_update(mode) " save only when changes " * we don't use the :update command because it can't prompt to SaveAs " an un-named file if &modified == 1 call Cream_save() endif if a:mode == "v" " reselect normal gv endif " refresh buffer menu call BMShow() endfunction function! Cream_save_confirm() " confirm save any modified current document " " Returns: " -1 if user cancelled in some fashion (meaning "STOP!") " 1 if doc saved, chose not to save, or doc not modified " save if modified if &modified == 1 " unnamed file if Cream_buffer_isnewmod() == 1 "*** Developer: We want to track Vim dialogs against Cream's if exists("g:cream_dev") let mychoice = confirm("Cream: Save changes as a new document?", "&Yes\n&No\n&Cancel", 1) else let mychoice = confirm("Save changes as a new document?", "&Yes\n&No\n&Cancel", 1) endif "*** else "*** Developer: We want to track Vim dialogs against Cream's let filename = fnamemodify(expand("%"), ":p") if Cream_has("ms") let filename = substitute(filename, '/', '\', 'g') endif if exists("g:cream_dev") let mychoice = confirm("Cream: Save changes to\n \"" . filename . "\" ?\n", "&Yes\n&No\n&Cancel", 1) else let mychoice = confirm("Save changes to\n \"" . filename . "\" ?\n", "&Yes\n&No\n&Cancel", 1) endif "*** endif " yes, save if mychoice == 1 " unnamed file if Cream_buffer_isnewmod() == 1 if has("browse") " get path-filename via dialog "let n = browse("", "", getcwd(), "") "" if nothing was returned (error or cancel) "if n == "" " return -1 "endif browse saveas " if still not saved, error if Cream_buffer_isnewmod() == 1 return -1 endif else call confirm( \ "Please :saveas before closing." . \ "\n", "&Ok", 1, "Warning") return -1 endif else write endif " no: don't save changes! elseif mychoice == 2 " nothing " cancel or error: do nothing else return -1 endif " refresh buffer menu call BMShow() endif return 1 endfunction " Close {{{1 function! Cream_close() " * Provide options to close unsaved buffers " * Confirm unnamed files " * Drop into other open files rather than the unlisted "[No File]" " confirm the save let n = Cream_save_confirm() " required save cancelled or error if n == -1 return 0 endif " hook for user functionality if exists("*Cream_hook_close") let fname = Cream_path_fullsystem(expand("%")) let test = Cream_hook_close(fname) if test == -1 " stop return -1 endif endif " window management--if help, removal *all* help buffers, even " hidden ones if Cream_buffer_ishelp() let washelp = 1 endif " wipeout buffer (delete) call Cream_bwipeout() if exists("washelp") call Cream_help_hidden_remove() endif " vim leaves a bunch of unnamed around call Cream_buffers_delete_untitled() " not necessary, done by focusgained autocmd "" reset tabs "call Cream_tabpages_refresh() " refresh buffer menu call BMShow() return 1 endfunction function! Cream_close_all() let buffercount = Cream_NumberOfBuffers("all") let i = 0 while i < buffercount let return = Cream_close() if return != 1 " user quit at one file, stop closing call BMShow() return 0 endif let i = i + 1 endwhile " refresh buffer menu call BMShow() return 1 endfunction " Exit {{{1 function! Cream_exit() " * Remember last current buffer for restoration " * Existing buffers are retained (default nature of Vim) " * Quit Vim, confirm unsaved buffers with changes " only do once! (This function called directly by menu, but also " by autocmd in the case of a window manager exit, etc. We just " want to do it one time in the first case.) if exists("g:Cream_exit") return endif " remember something that's already showing (not just open) call Cream_TryAnotherWindow() " don't do this on exit, we fix it all on startup """" kill off any non-memorable buffers """call Cream_buffers_delete_special() """call Cream_buffers_delete_untitled() " get current buffer let mybufnr = bufnr("%") " confirm save all modifieds; upon cancel of the confirm, exit " doesn't happen. (Was responsible for not-able-to-exit bug where " cancel aborts the close all, but check variable is still set!) let i = 1 while i <= bufnr('$') if getbufvar(i, "&modified") == 1 \&& Cream_buffer_isspecial(i) == 0 execute "buffer " . i let valid = Cream_save_confirm() if valid == -1 " save cancelled or error--go back to original buffer execute "buffer " . mybufnr return endif endif let i = i + 1 endwhile " avoid modified new (already elected not to save it) call Cream_TryAnotherWindow("nonewmod") " get current buffer filename (if not special, newmod or new unmod) " Note: We do this post save, to avoid saving modified un-named if Cream_buffer_isspecial(bufnr("%")) != 1 \&& Cream_buffer_isnewunmod(bufnr("%")) != 1 \&& Cream_buffer_isnewmod(bufnr("%")) != 1 let g:CREAM_LAST_BUFFER = fnamemodify(bufname("%"), ":p") else if exists("g:CREAM_LAST_BUFFER") unlet g:CREAM_LAST_BUFFER endif endif " get screen position and size if has("gui_running") call Cream_screen_get() endif " manage MRU menu call MRUVimLeavePre() " close calendar and remember state (do after confirmations so it " can be maintained if there are cancel/problems above.) call Cream_calendar_exit() " don't save buffer state based on preference if exists("g:CREAM_LAST_BUFFER_FORGET") && g:CREAM_LAST_BUFFER_FORGET == 1 " close all buffers let myreturn = Cream_close_all() if myreturn != 1 " user quit somewhere during close process, stop return 0 endif if exists("g:CREAM_LAST_BUFFER") unlet g:CREAM_LAST_BUFFER endif endif " penultimate: post-everything but the preserving viminfo write let g:Cream_exit = 1 " yes, we're really doing this (can't confirm--if "no" chosen " above, would see it twice) " * must be last to correctly write viminfo qall! endfunction function! Cream_save_exit() " save all files and exit silent! call Cream_saveall() silent! call Cream_exit() endfunction " 1}}} " Editing {{{1 " Cut/Copy/Paste {{{1 function! Cream_cut(mode) " cut selection to universal clipboard ("+) if a:mode == "v" normal gv normal "+x endif endfunction function! Cream_copy(mode) " copy selection to universal clipboard ("+) if a:mode == "v" normal gv normal "+y normal gv endif endfunction ""---------------------------------------------------------------------- "" Source: mswin.vim "" "" Pasting blockwise and linewise selections is not possible in Insert "" and Visual mode without the +virtualedit feature. They are pasted as "" if they were characterwise instead. "if has("virtualedit") " nnoremap Paste :call Paste() " function! Paste() " let myve = &virtualedit " set virtualedit=all " normal `^"+gPi " let &virtualedit = myve " endfunction " imap xPastegi " vmap "-cPaste "else " nnoremap Paste "=@+.'xy'gPFx"_2x " imap xPaste"_s " vmap "-cgixPaste"_x "endif "vmap "imap ""---------------------------------------------------------------------- function! Cream_paste(mode) " paste selection from universal clipboard ("+) if a:mode == "v" normal gv normal "+P " correct position normal l " don't re-select, sizes may differ elseif a:mode == "i" " fix win32 paste from app call setreg('+', @+, 'c') let myvirtualedit = &virtualedit set virtualedit=all normal `^"+gP let &virtualedit = myvirtualedit endif endfunction " Undo and Redo {{{1 function! Cream_undo(mode) undo if a:mode == "v" normal gv endif endfunction function! Cream_redo(mode) redo if a:mode == "v" normal gv endif endfunction " Delete {{{1 function! Cream_delete(mode) " for pop up menu item if a:mode == "v" normal gv normal x endif endfunction " Indent/Unindent {{{1 function! Cream_indent(mode) if a:mode == "v" normal gv normal > normal gv endif endfunction function! Cream_unindent(mode) if a:mode == "v" normal gv normal < normal gv elseif a:mode == "i" let mypos = Cream_pos() " select line and unindent normal V normal < execute mypos " now adjust for shift let i = 0 let myline = line('.') while i < &tabstop normal h " oops, go back to current line if we jumped up if line('.') < myline normal l endif let i = i + 1 endwhile " select one char so " * user can see a selection is in place " * if tab is used immediately following this routine believes " the whole line is selected rather than inserting a single " tab normal vl if mode() == "v" " change to select mode execute "normal \" endif endif endfunction " Word Count {{{1 function! Cream_count_word(mode) if a:mode == "i" " remember position let mypos = Cream_pos() let myword = expand('') elseif a:mode == "v" " use selection normal gv normal "xy let myword = @x else let myword = "" endif let pattern = inputdialog("Enter a word to count within the \ncurrent document... (case sensitive)", myword) if pattern != '' " test " search if search(pattern, 'w') > 0 let @/ = pattern " capture states let mymodified = &modified let myreport = &report " report all changes set report=0 " capture output of substitution redir @x "execute 'g/' . pattern . '/s//&/g' execute '%substitute/\<' . pattern . '\>/' . pattern . '/geI' "execute '%substitute/' . pattern . '/' . pattern . '/geI' redir END " restore states let &modified = mymodified let &report = myreport " remove initial leading linefeed let str = @x let str = strpart(str, 1) " the initial search above tells us it will be found "" parse output "if match(str, "Pattern") > 0 " " word doesn't exist " let cnt = 0 "else let thepos = match(str, ' ') let cnt = strpart(str, 0, thepos) "let cnt = matchstr(str, '^\d\+') " if highlighting on, match it to show on the screen if g:CREAM_SEARCH_HIGHLIGHT == 1 execute '/\<' . pattern . '\>' "execute '/' . pattern . '' endif "endif " if highlighting not on, explain benefit to user if g:CREAM_SEARCH_HIGHLIGHT == 0 call confirm( \ "\"" . pattern . "\" occurs " . cnt . " times." . "\n" . \ "\n" . \ "(Turn on Settings...Highlight Find to see occurances.)\n" . \ "\n", "&Ok", 1, "Info") else call confirm( \ "\"" . pattern . "\" occurs " . cnt . " times." . "\n" . \ "\n", "&Ok", 1, "Info") redraw! endif else call confirm( \ "\"" . pattern . "\" not found.\n" . \ "\n", "&Ok", 1, "Info") endif endif if a:mode == "i" " recall position execute mypos elseif a:mode == "v" normal gv endif endfunction function! Cream_count_words(mode) if a:mode == "i" " remember position let mypos = Cream_pos() endif " TODO: if a:mode == "v", just count in selection if a:mode == "v" normal gv let cnttype = "selection" else let cnttype = "file" endif " (approach by Piet Delport) execute "silent normal! g\" if a:mode == "v" let lines = matchstr(v:statusmsg, '\zs\d\+\ze of \d\+ Line') + 0 let words = matchstr(v:statusmsg, '\zs\d\+\ze of \d\+ Word') + 0 let chars = matchstr(v:statusmsg, '\zs\d\+\ze of \d\+ Byte') + 0 else let lines = matchstr(v:statusmsg, 'Line \d\+ of \zs\d\+') + 0 let words = matchstr(v:statusmsg, 'Word \d\+ of \zs\d\+') + 0 let chars = matchstr(v:statusmsg, 'Byte \d\+ of \zs\d\+') + 0 endif " subtract NL/CRs if &fileformat == "dos" let chars = chars - (lines * 2) else let chars = chars - lines endif " word length comment if words > (chars / 5) let wordlencomment = " (These words are shorter than average.)\n" elseif words < (chars / 5) let wordlencomment = " (These words are longer than average.)\n" else let wordlencomment = "" endif " strings if words == 0 let strpages = "" elseif words < 250 let strpages = "Less than one page\n" elseif words == 250 let strpages = "Exactly one typical 250-word page\n" elseif words > 250 && words < 500 let strpages = "Between one and two typical 250-word pages\n" else let avgwordm = Cream_format_number_commas(((chars / 5) / 250)) let avgwordt = Cream_format_number_commas(((chars / 5) / 400)) let strpages = avgwordm . " average 250-word manuscript pages\n" . \ avgwordt . " average 400-word technical pages\n" endif let str = Cream_format_number_commas(words) . " actual words\n" . \ Cream_format_number_commas((chars / 5)) . " average 5-letter words\n" . \ wordlencomment . \ "\n" . \ Cream_format_number_commas(chars) . " characters including spaces and tabs\n" . \ "\n" . \ strpages " display results let n = confirm( \ "This " . cnttype . " has:" . "\n" . \ "\n" . \ str . \ "\n", "Copy and Close\n&Close", 2, "Info") if n == 1 let @+ = str endif if a:mode == "i" " recall position execute mypos elseif a:mode == "v" normal gv endif endfunction " 1}}} " Formatting and text handling " String Handling {{{1 function! Cream_get_char_undercursor() " return character under cursor silent! redir @c silent! ascii silent! redir END return @c[2] endfunction function! Cream_str_pad(str, len) " Format {str} with preceeding spaces to length {len}. let str = a:str while strlen(str) < a:len let str = " " . str endwhile return str endfunction " Formatting {{{1 function! Cream_whitespace_trim_leading(mode, ...) " default is current document " (optional) argument, returns argument trimmed if a:0 > 0 return substitute(a:1, '\(^\|\n\)\zs\s\+', '', 'g') elseif a:mode == "v" normal gv normal "xy let @x = substitute(@x, '\(^\|\n\)\zs\s\+', '', 'g') " stupid hack to fix Vim if virtcol('.') == 1 normal h endif normal gv normal "xp elseif a:mode == "i" let mypos = Cream_pos() execute ':%substitute/^\s\+//ge' execute mypos endif endfunction function! Cream_whitespace_trim_trailing(mode, ...) " default is current document " (optional) argument, returns argument trimmed if a:0 > 0 return substitute(a:1, '\s\+\ze\($\|\n\)', '', 'g') elseif a:mode == "v" normal gv normal "xy let @x = substitute(@x, '\s\+\ze\($\|\n\)', '', 'g') " stupid hack to fix Vim if virtcol('.') == 1 normal h endif normal gv normal "xp elseif a:mode == "i" let mypos = Cream_pos() " test if sig line exists execute "0" if search('^-- $') > 0 let flag = 1 endif execute ':%substitute/\s\+$//ge' if exists("flag") " prompt user if should recover let n = confirm( \ "Email signature seperator lines (\"-- \") were detected in\n" . \ "this file. Would you like to recover their trailing space?" . \ "\n", "&Yes\n&No", 1, "Warning") if n == 1 execute ':%substitute/^--$/-- /ge' endif endif execute mypos endif endfunction function! Cream_whitespace_trim(mode, ...) " trim both leading and trailing whitespace " default is current document " (optional) argument, returns argument trimmed if a:0 > 0 let tmp = a:1 let tmp = Cream_whitespace_trim_leading("i", tmp) let tmp = Cream_whitespace_trim_trailing("i", tmp) return tmp elseif a:mode == "v" normal gv normal "xy let @x = Cream_whitespace_trim_leading("i", @x) let @x = Cream_whitespace_trim_trailing("i", @x) " stupid hack to fix Vim if virtcol('.') == 1 normal h endif normal gv normal "xp elseif a:mode == "i" call Cream_whitespace_trim_leading("i") call Cream_whitespace_trim_trailing("i") endif endfunction function! Cream_emptyline_collapse() " collapse all empty lines to 1 let mypos = Cream_pos() "silent! execute ':%substitute/\n\s*\n*$/\r/ge' "silent! execute ':%substitute/\n*$/\r/ge' silent! execute ':%substitute/\n\s\+$/\r/ge' silent! execute ':%substitute/\n\+$/\r/ge' execute mypos endfunction function! Cream_emptyline_delete() " deletes all empty lines let mypos = Cream_pos() silent! execute ':%substitute/\n\s*\n*$//ge' execute mypos endfunction function! Cream_joinlines(mode) " join selected lines if a:mode != "v" return endif normal gv let n = confirm( \ "Maintain spaces between each line?\n" . \ "\n", "&Yes\n&No\n&Cancel", 2, "Info") if n == 1 " preserve spaces normal J elseif n == 2 " don't preserve spaces normal gJ else return endif endfunction function! Cream_vimscript_compress() " Compress a Vim script by removing comments and leading whitespace. " verify vim filetype if &filetype != "vim" call confirm( \ "This isn't a Vim file. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif " confirm destruction let n = confirm( \ "Strip comments and leading/trailing whitespace?\n" . \ "\n", "&Ok", 1, "Info") if n != 1 return endif " strip whitespace call Cream_whitespace_trim("i") " delete lines beginning with a comment silent %substitute/^".*$//ge " delete empty lines call Cream_emptyline_delete() endfunction " File Format {{{1 function! Cream_fileformat(...) " set &fileformat based on argument: " dos " unix " mac " get current file format let ffold = &fileformat " bypass dialog to get desired fileformat if argument passed if a:0 == 1 let ffnew = a:1 " don't mod file if already correct if ffnew ==? ffold return endif else " set default choice if ffold == "unix" let mychoice = 1 elseif ffold == "dos" let mychoice = 2 elseif ffold == "mac" let mychoice = 3 else let mychoice = 4 endif " change to new let n = confirm( \"Convert file from current " . toupper(ffold) . " format to...\n", \"&Unix\n&DOS/Windows\n&Apple\n&Cancel", mychoice, "Question") if n == 1 let ffnew = "unix" elseif n == 2 let ffnew = "dos" elseif n == 3 let ffnew = "mac" else return endif endif " change current buffer's fileformat based on selection if ffnew ==? "unix" set fileformat=unix elseif ffnew ==? "dos" set fileformat=dos execute ":%substitute/" . nr2char(13) . "$//ge" elseif ffnew ==? "mac" set fileformat=mac endif endfunction " Encoding {{{1 " Cream_filetypes_list() function! Cream_convert_encoding(encoding) " convert the current document's encoding to that passed " Example: :call ConvertEncoding("latin1") ""................................................................. "" method 1 "" select all "normal gg "normal gH "execute "normal \" "normal G "" cut "normal "xx "" convert "let @x = iconv(@x, &encoding, a:encoding) "" change document's encoding (must follow above) "execute "set encoding=" . a:encoding "" paste back the conversion "normal "xP "................................................................. " method 2 execute "set fileencoding=" . a:encoding endfunction function! Cream_fileencoding_set(encoding) " see :help encoding-values execute "set encoding=" . a:encoding execute "set fileencoding=" . a:encoding " reload keymaps call Cream_source($CREAM . "cream-keys.vim") " reload menus call Cream_menus() call MRURefreshMenu() call BMShow() endfunction " Tabs (&expandtab) {{{1 function! Cream_expandtab_init() if exists("g:CREAM_EXPANDTAB") && g:CREAM_EXPANDTAB == 1 set expandtab else set noexpandtab let g:CREAM_EXPANDTAB = 0 endif endfunction function! Cream_expandtab_toggle(mode) if exists("g:CREAM_EXPANDTAB") if g:CREAM_EXPANDTAB == 1 set noexpandtab let g:CREAM_EXPANDTAB = 0 else set expandtab let g:CREAM_EXPANDTAB = 1 endif else " error endif call Cream_menu_settings_expandtab() if a:mode == "v" normal gv endif endfunction " Retab {{{1 function! Cream_retab() " replace all existing tabs with spaces according to current tabstop settings " save expandtab let myexpandtab = &expandtab " turn on set expandtab silent! retab " restore let &expandtab = myexpandtab endfunction " 1}}} " Motion, selection " Positioning {{{1 function! Cream_pos(...) " return current position in the form of an executable command " Origins: Benji Fisher's foo.vim, available at " http://vim.sourceforge.net "let mymark = "normal " . line(".") . "G" . virtcol(".") . "|" "execute mymark "return mymark " current pos let curpos = line(".") . "G" . virtcol(".") . "|" " mark statement let mymark = "normal " " go to screen top normal H let mymark = mymark . line(".") . "G" " go to screen bottom normal L let mymark = mymark . line(".") . "G" " go back to curpos execute "normal " . curpos " cat top/bottom screen marks to curpos let mymark = mymark . curpos execute mymark return mymark endfunction " Motion {{{1 function! Cream_motion_doctop() normal gg0 endfunction function! Cream_motion_docbottom() normal G$ endfunction function! Cream_motion_windowtop() normal H endfunction function! Cream_motion_windowbottom() normal L endfunction function! Cream_motion_windowmiddle() normal M endfunction function! Cream_delete_v() " deletes selection (in Visual mode) normal gvd endfunction function! Cream_motion_home() " Original Concept: http://www.derwok.de/downloads/index.html " get current column let oldcol = col('.') " go to first non-white normal g^ " get current column, new let newcol = col('.') " if already were at first-non-white, toggle if (oldcol == newcol) " if we're on the first line, stop, otherwise toggle if (&wrap == 1) && (newcol > Cream_linewidth()) " stop else "execute "normal gI\" normal gI let lastcol = col('.') " already were at first col? if (newcol == lastcol) " fix being stuck on second column if a one character line if (newcol == oldcol) " terminate, ensure at beginning normal i else " toggle back to first non-white normal g^ endif else " toggle to first col "execute "normal gI\" normal gI endif endif endif endfunction function! Cream_linewidth() " calculate text width (not &columns, winwidth(0), col('$'), " virtcol('$') according to state of signs, fold columns, and line " numbers. let foldcolumn = &foldcolumn if Cream_ShowMarks_Exist() == 1 let signs = 2 else let signs = 0 endif if &number == 1 let number = 8 else let number = 0 endif return winwidth(0) - signs - foldcolumn - number endfunction function! Cream_map_end() " get current pos let oldcol = virtcol('.') " go to last screen column normal g$ " Hack: fix that doesn't allow ending up after last char " with wrap off (2004-04-23) if &wrap == 0 " if line is shorter than screen if virtcol('$') < Cream_linewidth() " fix position normal $ " if we were already at screen line end elseif oldcol >= virtcol('.') " move farther normal $ else " nothing, first g$ did what we wanted endif else " if already at screen end, go to line end if oldcol >= virtcol('.') normal $ endif endif endfunction function! Cream_up(mode) " if popup menu is visible, move in menu if pumvisible() return "\" endif if a:mode == "i" normal gk elseif a:mode == "v" "...................................................................... " option 1 " don't reselect, we've already got one! normal gv " get positions let lin1 = line(".") let col1 = virtcol(".") let pos1 = Cream_pos() normal o let lin2 = line(".") let col2 = virtcol(".") let pos2 = Cream_pos() normal o " drop to normal mode execute "normal \\" " adjust only if multi-line if lin1 > lin2 execute pos2 elseif lin1 < lin2 execute pos1 elseif col1 > col2 execute pos2 elseif col2 > col1 execute pos1 endif "...................................................................... " option 2 endif endfunction function! Cream_down(mode) " if popup menu is visible, move in menu if pumvisible() return "\" endif if a:mode == "i" normal gj elseif a:mode == "v" " don't reselect, we've already got one! normal gv " get positions let lin1 = line(".") let col1 = virtcol(".") let pos1 = Cream_pos() normal o let lin2 = line(".") let col2 = virtcol(".") let pos2 = Cream_pos() normal o " drop to normal mode execute "normal \\" " adjust only if multi-line if lin1 < lin2 execute pos2 elseif lin1 > lin2 execute pos1 elseif col1 > col2 execute pos1 elseif col2 > col1 execute pos2 endif endif endfunction function! Cream_scroll_down(...) " scroll screen up one line but maintain cursor position " if visual mode (argument "v") if a:0 != 0 if a:1 == "v" " reselect selection normal gv " move left one (bug fix) and scroll execute "normal \\" " re-select normal gv else call confirm( \ "Error: Invalid argument passed to Cream_scroll_down(). Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif " if insert mode else " scroll up, go down one execute "normal \\" endif endfunction function! Cream_scroll_up(...) "execute "normal \\" " scroll screen down one line but maintain cursor position " if visual mode (argument "v") if a:0 != 0 if a:1 == "v" " reselect selection normal gv " move left one (bug fix) and scroll execute "normal \\" " re-select normal gv else call confirm( \ "Error: Invalid argument passed to Cream_scroll_down(). Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif " if insert mode else " scroll up, go down one execute "normal \\" endif endfunction function! Cream_pageup() " PageUp -- ensure motion to top if in first page " NOTE: we use Ctrl+U instead of Ctrl+B since that became our key " to the universe! execute "normal \\" normal H endfunction function! Cream_pagedown() " PageUp -- ensure motion to top if in first page execute "normal \" normal L endfunction " Selection {{{1 function! Cream_select_all(...) " Notes: An optional argument "endvisual" can be passed to force the " function to end in visual mode and prevent the function from " returning to select mode. " important: drop existing selection if current normal i normal gg normal gH " change to visual mode execute "normal \" normal G " return to select if we weren't passed an argument or the " argument isn't "endvisual" if a:0 == 0 \|| a:0 > 1 && a:1 ==? "endvisual" " change to select mode execute "normal \" endif endfunction function! Cream_map_shift_home(mode) " toggles selection back and forth between first column and first " non-whitespace column " * Requires arguement "i" or "v" (for Insert or Visual mode) if a:mode == "i" normal v normal g^ " go to other end of selection normal o " while not at last insert position while col(".") < col("'^") " go right (usually only once) normal l endwhile " go back to front end of selection normal o " change to select mode execute "normal \" elseif a:mode == "v" " reselect normal gv " capture position let oldcol = col(".") " go to first screen line position normal g0 " get current column, new let newcol = col(".") " already were at first column if (oldcol == newcol) " back up to first char normal g^ endif endif endfunction function! Cream_map_shift_end() " get current column let oldcol = col(".") " go to last non-white normal v normal g$ " get current column, new let newcol = col(".") " already were at last non-white? if (oldcol == newcol) " go to first col normal $ let lastcol = col(".") " already were at last col? if (newcol == lastcol) " go back to last non-white normal g$ else " go to last col normal $ endif endif " we want select mode if still in visual so typing replaces if mode() == "v" execute "normal \" endif endfunction function! Cream_map_shift_up(mode) " accepts mode argument "i" or "v" if a:mode == "i" " this is a huge hack to remedy the fact that "normal vgk" omits " selection of the final char if beginning from the last pos of " a line, mostly because of the intro. normal v normal gk normal gj normal o normal gk " we want select mode if still in visual so typing replaces if mode() == "v" execute "normal \" endif elseif a:mode == "v" " reselect normal gv normal gk endif endfunction function! Cream_map_shift_down(mode) " accepts mode argument "i" or "v" if a:mode == "i" " same hack as Cream_map_shift_up() normal v normal gj normal gk normal o normal gj " we want select mode if still in visual so typing replaces if mode() == "v" execute "normal \" endif elseif a:mode == "v" normal gv normal gj endif endfunction function! Cream_map_shift_pageup(mode) " accepts mode argument "i" or "v" if a:mode == "i" normal vH elseif a:mode == "v" " reselect normal gv execute "normal \" endif endfunction function! Cream_map_shift_pagedown(mode) " accepts mode argument "i" or "v" if a:mode == "i" normal vL elseif a:mode == "v" " reselect normal gv execute "normal \" endif endfunction function! Cream_visual_swappos(direction) " from visual mode, go to end of selection specified " * arguments "up" and "dn" normal gv " get pos let myline = line('.') let mycol = col('.') " swap normal o " get pos, new let mylinenew = line('.') let mycolnew = col('.') if a:direction ==? "up" if myline > mylinenew elseif myline < mylinenew " swap back (original was less) normal o " equal else " check columns (selection only on one line) if mycol < mycolnew normal o endif endif elseif a:direction ==? "dn" if myline < mylinenew elseif myline > mylinenew " swap back (original was less) normal o " equal else " check columns (selection only on one line) if mycol > mycolnew normal o endif endif endif endfunction " Replace mode {{{1 " Note: This is botched by the Ctrl+B key to the universe. """function! Cream_replacemode() """" used by key to replace tabs without moving positions """ """ " initialize """ if !exists("g:cream_replacemode") """ let g:cream_replacemode = 1 """ " toggle state """ else """ if g:cream_replacemode == 1 """ let g:cream_replacemode = 0 """ else """ let g:cream_replacemode = 1 """ endif """ endif """ """ " condition based on state """ if g:cream_replacemode == 1 """ " start replace mode """ if &modified == 1 """ return "x\\gR\" """ else """ " need to compensate for the insert x pos stuff... """ return "x\\gR\\:set nomodified\gR" """ endif """ else """ " end replace mode """ return "\i" """ endif """ """endfunction function! Cream_replacemode_demap() execute "imap :call Cream_replacemode_remap()gR" endfunction function! Cream_replacemode_remap() execute "imap :call Cream_replacemode_demap()i" endfunction "1}}} " Navigationy things " Tags {{{1 " Tag jumping function! Cream_tag_backward() " go to previous tag if !Cream_has("tagsfile") if !Cream_has("tags") call s:Cream_tag_warn() endif return endif "if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 " silent! tab pop "else silent! pop "endif call Cream_window_setup() endfunction function! Cream_tag_forward() " go to next tag forward if !Cream_has("tagsfile") if !Cream_has("tags") call s:Cream_tag_warn() endif return endif "if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 " silent! tab tag "else silent! tag "endif call Cream_window_setup() endfunction function! Cream_tag_goto() " go to tag under cursor let bufnr = bufnr("%") let curpos = line(".") . "G" . virtcol(".") if !Cream_has("tagsfile") if !Cream_has("tags") call s:Cream_tag_warn() else call confirm( \ "No tags file found.\n" . \ "(For more information on tags, see http://ctags.sf.net.)\n" . \ "\n", "&Ok", 1, "Info") endif return endif let mytag = expand("") "if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 " execute "silent! tab tag " . mytag "else execute "silent! tag " . mytag "endif " see if we moved if bufnr("%") == bufnr if curpos == line(".") . "G" . virtcol(".") " warn no tag found under cursor call confirm( \ "No tag found under cursor.\n" . \ "\n", "&Ok", 1, "Info") endif else " only do this if buffer number changed call Cream_window_setup() endif endfunction function! s:Cream_tag_warn() call confirm( \ "This feature requires a working installation of ctags.\n" . \ "Please see http://ctags.sf.net for more details. \n" . \ "\n", "&Ok", 1, "Info") endfunction function! Cream_tag_backclose() " close and go back if !Cream_has("tagsfile") && \ getbufvar("%", "&filetype") != "help" return endif " get current buffer let mybufno = bufnr("%") "" if un-modified, delete buffer "if !&modified " " TODO: This area looks suspiciously duplicate of file " " functions elsewhere... " " unnamed file? " if Cream_buffer_isnewunmod() == 1 " let mychoice = confirm("Save changes as a new document?", "&Yes\n&No\n&Cancel", 1) " else " let mychoice = confirm("Save changes to \"" . expand("%:p") . "\"?", "&Yes\n&No\n&Cancel", 1) " endif " if mychoice == 1 " " if an unnamed file, saveas first " if Cream_buffer_isnewunmod() == 1 " " browse confirm w " let n = browse("", "", getcwd(), "") " if n = "" " return " endif " else " write " endif " elseif mychoice == 2 " " no: don't save changes! " else " " cancel or error: do nothing " return " endif "endif " TODO: if the tag is in the same file, we close our current file! " go back (in same window) silent! pop " remember let bufnr = bufnr("%") " If tag and jump are different files, handle separate tabs. " Otherwise, we're done. if mybufno != bufnr " come back silent! tag " now go to tab containing that buffer call Cream_tab_goto(bufnr) " go back to tag silent! pop " delete referenced buffer if not this file if mybufno != bufnr("%") " close only if unmodified if getbufvar(mybufno, "&modified") == 0 execute "bwipeout! " . mybufno endif " refresh buffer list call BMShow() endif endif endfunction function! Cream_Tlist_toggle() " window management wrapper for :Tlist " test if open let i = 1 while i <= bufnr('$') if bufname(i) == "__Tag_List__" let open = 1 endif let i = i + 1 endwhile " open if not if !exists("open") "let s:tlist_part_of_winmanager = 1 "let g:tlist_bufhidden = 1 if !Cream_has("tags") call s:Cream_tag_warn() return endif " notify external window management call Tlist_Set_App("cream") "call Tlist_Update_File_Tags(fnamemodify(expand("%"), ":p"), &filetype) " call command, not function! execute ":Tlist" " remember what buffer we're in (not window! it will change) let mybufnr = bufnr("%") " reset window configuration call Cream_window_setup() " restore cursor to original current buffer's new window call MoveCursorToWindow(bufwinnr(mybufnr)) " close it else " remember current buffer/window let mybufnr = bufnr("%") let i = 1 while i <= bufnr('$') if bufname(i) == "__Tag_List__" " close execute "bwipeout! " . i break endif let i = i + 1 endwhile " return to orig buffer's window let mywinnr = bufwinnr(bufname(mybufnr)) if mywinnr > 0 call MoveCursorToWindow(mywinnr) endif endif endfunction function! Cream_Tlist_prototype() " Return the current function's prototype without opening the list " window. " if list doesn't exist, initialize "if !exists("b:tlist_tag_count") "\|| b:tlist_tag_count == 0 " " regenerate tags " let b:tlist_tag_count = 0 " call setbufvar(bufnr("%"), 'tlist_sort_type', 'order') " call s:Tlist_Process_File(fnamemodify(expand("%"), ":p"), &filetype) "endif call Tlist_Update_File_Tags(fnamemodify(expand("%"), ":p"), &filetype) "let g:Tlist_Process_File_Always = 1 return Tlist_Get_Tag_Prototype_By_Line() endfunction " Goto {{{1 function! Cream_goto() " go to line number or % of file let m = 1 while m == 1 " set default empty, unless repeating if !exists("n") let n = "" endif let n = inputdialog("Enter line number to go to.\n(End with \"%\" to go to percentage in file.)", n) " remove spaces let n = substitute(n, " ", "", "g") " validate " invalid if contains anything but number and "%" if match(n, "[^0-9%]") > -1 let m = confirm("Only numbers and trailing \"%\" allowed.", "&Ok\n&Cancel", 1, "Info") if m != 1 return endif else break endif endwhile " if contains "%" go to percentage if match(n, "%") != -1 " invalid if "%" not at end if strpart(n, strlen(n) - 1, 1) != "%" call confirm("\"%\" must be last character.", "&Ok", 1, "Info") return else " goto percent execute "normal " . n . "%" endif else " goto line number execute "normal :" . n . "\" endif endfunction " Folding {{{1 function! Cream_fold(direction) " fold toggle (or go to next above/below) let myfold = foldlevel(line('.')) " in fold, toggle if myfold != 0 normal za " not in fold else " get initial pos let myline = line(".") " go up to previous ("up" argument) if a:direction == "up" " move to end of previous fold normal zk " go down to next else " move to start of next fold normal zj endif " if no movement, report if myline == line(".") call confirm( \ "This document contains no folds. To use the folding feature:\n" . \ "\n" . \ "* Select text and press F9 to create a fold.\n" . \ "* Use Alt+F9 to clear a fold at the cursor.\n" . \ "\n" . \ "See the help document \"Keyboard Shortcuts\" at F9 for additional folding features. \n" . \ "\n", "&Ok", 1, "Info") endif endif endfunction function! Cream_fold_set(mode) if a:mode != "v" return endif normal gv " Note: We'd love to remove foldmethod=marker here and restore on " the other side, but it doesn't seem to work. normal zf " why would we re-select? Don't. "normal gv endfunction function! Cream_fold_openall() normal zr endfunction function! Cream_fold_closeall() normal zM endfunction function! Cream_fold_delete() normal zd endfunction function! Cream_fold_deleteall() normal zE endfunction function! Cream_fold_init() " called by autocmd VimEnter to automatically open the current fold if foldlevel(line('.')) > 0 let mypos = Cream_pos() normal za execute mypos endif endfunction " Backspace {{{1 function! Cream_map_key_backspace(...) " * Shift+Backspace deletes word (see help for difference between " "word" and "WORD") " * Ctrl+Backspace deletes WORD " this is stupid. Vim can't keep track of position when at line end let oldcol = col('.') let colend = col('$') let oldline = line('.') if exists("a:1") if a:1 == "WORD" let myword = "W" else let myword = "w" endif else let myword = "w" endif " select previous word if oldcol == 1 " 1. at line beginning normal X else normal g^ " if we're already at the beginning of a line if oldcol == col('.') "call confirm("at begin/white", "&Ok") " 2. delete whitespace to beginning of line normal h execute "normal \" execute "normal \" " delete normal x execute "normal X" else " go back to original position while col('.') < oldcol execute "normal l" endwhile "*** evaluation fails, we never get here :( " " can't detect this (stupid / position loss at line end) " if oldcol == colend " "call confirm("else, end", "&Ok") " " 3. at line end " " end of line hoses " normal l " while line('.') > oldline " normal h " endwhile " execute "normal hva" . myword " " delete " normal x " else "*** "call confirm("else, NOT end", "&Ok") " 4. everywhere else execute "normal va" . myword " delete normal x endif endif endfunction " 1}}} " Search " Find/Replace {{{1 " Note: Both these functions are pointless: " o We map directly to :promptfind and :promptrepl to preserve their " multi-modal nature. " o :promptfind and :promptrepl appear to use '\V' by default, as " discussed in list thread on 2004-10-27. function! Cream_find_native() " Dialog Find, using Vim's native find dialog. let mymagic = &magic set nomagic "try silent! promptfind " catch /^Vim\%((\a\+)\)\=:E486/ " call confirm( " \ "Pattern not found.\n" . " \ "\n", "&Ok", 1, "Info") " finally " call confirm( " \ "Pattern found.\n" . " \ "\n", "&Ok", 1, "Info") "endtry let &magic = mymagic endfunction function! Cream_replace_native() " Dialog Find, using Vim's native find dialog. let mymagic = &magic set nomagic silent! promptrepl let &magic = mymagic endfunction " Find Under Cursor {{{1 " Note: From visual mode, selection is extended to next find. function! Cream_findunder(mode) let myincsearch = &incsearch set noincsearch if a:mode == "v" normal gv normal "xy " test if exists if search(@x) != 0 " highlight it normal v let i = 0 while i < strlen(@x) normal l let i = i + 1 endwhile endif else silent normal * endif let &incsearch = myincsearch endfunction function! Cream_findunder_reverse(mode) if a:mode == "v" normal gv normal "xy " test if exists if search(@x, "b") != 0 " highlight it normal v let i = 0 while i < strlen(@x) normal l let i = i + 1 endwhile endif else silent normal # endif endfunction function! Cream_findunder_case(mode) let myhls = &hlsearch let myic = &ignorecase set hlsearch set noignorecase if a:mode == "v" normal gv normal "xy " test if exists if search(@x) != 0 " highlight it normal v let i = 0 while i < strlen(@x) normal l let i = i + 1 endwhile endif else silent normal * endif let &ignorecase = myic let &hlsearch = myhls endfunction function! Cream_findunder_case_reverse(mode) let myhls = &hlsearch let myic = &ignorecase set hlsearch set noignorecase if a:mode == "v" normal gv normal "xy " test if exists if search(@x, "b") != 0 " highlight it normal v let i = 0 while i < strlen(@x) normal l let i = i + 1 endwhile endif else silent normal # endif let &ignorecase = myic let &hlsearch = myhls endfunction " Search Highlighting {{{1 " search highlighting function! Cream_search_highlight_init() " initialize search highlighting if !exists("g:CREAM_SEARCH_HIGHLIGHT") " initially off set nohlsearch let g:CREAM_SEARCH_HIGHLIGHT = 0 else if g:CREAM_SEARCH_HIGHLIGHT == 1 set hlsearch else set nohlsearch endif endif endfunction function! Cream_search_highlight_toggle() " toggle search highlighting if exists("g:CREAM_SEARCH_HIGHLIGHT") if g:CREAM_SEARCH_HIGHLIGHT == 0 set hlsearch let g:CREAM_SEARCH_HIGHLIGHT = 1 elseif g:CREAM_SEARCH_HIGHLIGHT == 1 set nohlsearch let g:CREAM_SEARCH_HIGHLIGHT = 0 endif else call Cream_error_warning("Error: global uninitialized in Cream_search_highlight_toggle()") endif call Cream_menu_settings_highlightsearch() endfunction function! Cream_search_highlight_reset() " Reset search highlight to nothing. " TODO: Vim bug, this won't work from within a function. nohlsearch endfunction " 1}}} " Wrap " Word Wrap (Line wrap; wrap words at window margin) {{{1 " * By default, wrap is on, global variable g:CREAM_WRAP remembers session to " session " * Potentially, wrap could be turned on globally after being turned off in a " buffer and states could get confused. Account for both. function! Cream_wrap_init() " initialize wrap (for statusline) " don't change state in special buffers " opsplorer if bufname("%") == "_opsplorer" return endif " calendar if bufname("%") == "__Calendar" return endif " tag list if bufname("%") == "__Tag_List__" return endif " used before if exists("g:CREAM_WRAP") if g:CREAM_WRAP == 1 set wrap set guioptions-=b else set nowrap "execute "set lines=" . (&lines - 2) set guioptions+=b endif else " initialize on set wrap set guioptions-=b let g:CREAM_WRAP = 1 endif endfunction function! Cream_wrap(mode) " toggle word wrap if g:CREAM_WRAP == 1 let g:CREAM_WRAP = 0 set nowrap " save position on Windows if Cream_has("ms") call Cream_screen_get() endif " make window shorter execute "set lines=" . (&lines - 2) " add horiz. scroll bar set guioptions+=b " restore position on Windows if Cream_has("ms") call Cream_screen_init() endif else let g:CREAM_WRAP = 1 set wrap " save position on Windows if Cream_has("ms") call Cream_screen_get() endif " make window longer execute "set lines=" . (&lines + 2) " remove horiz. scroll bar set guioptions-=b " restore position on Windows if Cream_has("ms") call Cream_screen_init() endif endif call Cream_menu_settings_wordwrap() if a:mode == "v" normal gv endif endfunction " Auto Wrap (break lines automatically while typing) {{{1 function! Cream_autowrap_init() " initialize autowrap (for statusline) " don't change state in special buffers " opsplorer if bufname("%") == "_opsplorer" return endif " calendar if bufname("%") == "__Calendar" return endif " initialize wrap width if !exists("g:CREAM_AUTOWRAP_WIDTH") let g:CREAM_AUTOWRAP_WIDTH = 80 endif " used before if exists("g:CREAM_AUTOWRAP") if g:CREAM_AUTOWRAP == 1 execute "set textwidth=" . g:CREAM_AUTOWRAP_WIDTH set expandtab let g:CREAM_EXPANDTAB = 1 else set textwidth=0 set noexpandtab let g:CREAM_EXPANDTAB = 0 endif else " initialize off (use wrap settings) set textwidth=0 set noexpandtab let g:CREAM_AUTOWRAP = 0 let g:CREAM_EXPANDTAB = 0 endif endfunction function! Cream_autowrap(mode) " toggle autowrap " * Autowrap is currently global (buffer specific will mean a global for each buffer!) " * Dependent upon formatoptions-=tcrqn being set elsewhere! if g:CREAM_AUTOWRAP == 1 let g:CREAM_AUTOWRAP = 0 set textwidth=0 set noexpandtab let g:CREAM_EXPANDTAB = 0 else let g:CREAM_AUTOWRAP = 1 execute "set textwidth=" . g:CREAM_AUTOWRAP_WIDTH set expandtab let g:CREAM_EXPANDTAB = 1 endif call Cream_menu_settings_autowrap() if a:mode == "v" normal gv endif endfunction " Wrap Width {{{1 function! Cream_autowrap_setwidth() " Dialog to set g:CREAM_AUTOWRAP_WIDTH (textwidth) " NOTE: g:CREAM_AUTOWRAP_WIDTH is initialized at Cream_autowrap_init() " o Turns autowrap on (or resets) if used let n = Inputdialog("Set new wrap width for autowrap (when on):", g:CREAM_AUTOWRAP_WIDTH) " do nothing on cancel if n == "{cancel}" return " warn only numbers allowed elseif match(n, '[^0-9]') != -1 call confirm( \ "Only numbers are allowed.\n" . \ "\n", "&Ok", 1, "Error") " warn can not set to 0 elseif n == 0 call confirm( \ "Can not set to 0.", "&Ok", 1) " set else let g:CREAM_AUTOWRAP_WIDTH = n + 0 " turn on let g:CREAM_AUTOWRAP = 1 execute "set textwidth=" . g:CREAM_AUTOWRAP_WIDTH set expandtab " update column highlighting " NOTE: Super hack. We do this twice since this feature uses a " simple match (not a syntax highlighting group) so it must be " toggled on and off to reset. call Cream_highlight_columns(g:CREAM_AUTOWRAP_WIDTH) call Cream_highlight_columns(g:CREAM_AUTOWRAP_WIDTH) endif endfunction " Quick Wrap (Re-format existing text) {{{1 function! Cream_quickwrap(mode) " re-formats text " remember let mytextwidth = &textwidth let myautoindent = &autoindent let mysmartindent = &smartindent let myexpandtab = &expandtab " sets execute "set textwidth=" . g:CREAM_AUTOWRAP_WIDTH set autoindent set nosmartindent set expandtab let mypos = Cream_pos() " select if a:mode ==? "i" " select inner paragraph normal vip "" go to end (simplifies calcs) "normal '> " get range ( marks "'<" and "'>" are pre-function!) let myfirstline = line(".") normal o let mylastline = line(".") normal o elseif a:mode ==? "v" normal gv let myfirstline = line("'<") let mylastline = line("'>") else return -1 endif " flipped, put first range value first if mylastline < myfirstline let tmp = myfirstline let myfirstline = mylastline let mylastline = tmp else if virtcol('.') == 1 let atend = 1 endif endif " initialize justify (instance specific) if !exists("g:cream_justify") let g:cream_justify = "left" endif " condition wrap of content with numbered list " retain &formatoptions let myformatoptions = &formatoptions " Note: we still have a selection... yank it to register normal "xy normal gv if match(@x, '^[ \t]*\d\+[\.\:\)\]\}]\{1}[ \t]\+') != -1 set formatoptions+=n else set formatoptions-=n endif " clear register let @x = "" " wrap if g:cream_justify ==? "left" call s:Cream_wrap_left(myfirstline . "," . mylastline) elseif g:cream_justify ==? "center" call s:Cream_wrap_center(myfirstline . "," . mylastline) elseif g:cream_justify ==? "right" call s:Cream_wrap_right(myfirstline . "," . mylastline) elseif g:cream_justify ==? "full" execute myfirstline . "," . mylastline . "call Justify('tw', 3)" "else " call confirm( " \ "Error: Incorrect justification value in Cream_quickwrap()\n" . " \ "\n", "&Ok", 1, "Info") " return endif " restore &formatoptions let &formatoptions = myformatoptions " recover if a:mode ==? "i" "*** BROKEN: "startinsert "normal i "*** execute "normal \" " position execute mypos else execute mypos " selection normal gv endif " restore let &textwidth = mytextwidth let &autoindent = myautoindent let &smartindent = mysmartindent let &expandtab = myexpandtab endfunction function! s:Cream_wrap_left(range) " remove extra inner spaces if requested twice if Cream_delay() == 1 execute "silent! " . a:range . 'substitute/\(^[\s]\+\)\@!\(\S\+\) \+/\2 /gei' endif " format normal gq endfunction function! s:Cream_wrap_center(range) " remove extra inner spaces if requested twice if Cream_delay() == 1 execute "silent! " . a:range . 'substitute/\(^[\s]\+\)\@!\(\S\+\) \+/\2 /gei' endif " format execute "silent! " . a:range . "center" endfunction function! s:Cream_wrap_right(range) " remove extra inner spaces if requested twice if Cream_delay() == 1 execute "silent! " . a:range . 'substitute/\(^[\s]\+\)\@!\(\S\+\) \+/\2 /gei' endif " format execute "silent! " . a:range . "right" endfunction function! Cream_delay() " returns 1 if has been called before within two seconds " init timing if !exists("g:delaytime") let g:delaytime = localtime() return 0 endif " only eliminate spaces if called twice within two seconds if localtime() - g:delaytime < 2 let myreturn = 1 else let myreturn = 0 endif " record new time let g:delaytime = localtime() return myreturn + 0 endfunction function! Cream_quickwrap_set(mode, justification) " sets justification type and then quick wraps if selection (mode == "v") " insert mode: set mode, don't justify (user should quick wrap) if a:mode ==? "i" let g:cream_justify = a:justification return " visual mode: temp set mode, justify elseif a:mode ==? "v" " save environment if exists("g:cream_justify") let myjustify = g:cream_justify else let myjustify = "left" endif let g:cream_justify = a:justification call Cream_quickwrap(a:mode) let g:cream_justify = myjustify endif endfunction " Quick UnWrap {{{1 function! Cream_quickunwrap(mode) " remember let mytextwidth = &textwidth " set textwidth ridiculously high (100 lines of 100 chars) set textwidth=10000 " main if a:mode == "i" let mypos = Cream_pos() " select inner paragraph normal vip elseif a:mode == "v" normal gv else return -1 endif normal gq if a:mode == "i" execute mypos elseif a:mode == "v" normal gv endif " restore let &textwidth = mytextwidth endfunction " 1}}} " GUI " GUI functions {{{1 " font function! Cream_font_init() if !has("gui_running") return -1 endif let myos = Cream_getoscode() " set font based on global if exists("g:CREAM_FONT_" . myos) " had a problem with guifont being set to * in an error. "*** this fixed in patch 6.1.296 *** if g:CREAM_FONT_{myos} != "*" "execute "set guifont=" . g:CREAM_FONT_{myos} "execute "set printfont=" . g:CREAM_FONT_{myos} " fix fonts with spaces in names let g:CREAM_FONT_{myos} = substitute(g:CREAM_FONT_{myos}, " ", "\ ", "g") let &guifont = g:CREAM_FONT_{myos} let &printfont = g:CREAM_FONT_{myos} else " clean out possible error value unlet g:CREAM_FONT_{myos} endif else " Don't prompt to initialize font... use default. let g:CREAM_FONT_{myos} = "" endif endfunction function! Cream_font_set() if !has("gui_running") return -1 endif let myos = Cream_getoscode() " save screen pos " HACK: set guifont=* moves screen on WinXP call Cream_screen_get() silent! set guifont=* " if still empty or a "*", user may have cancelled; do nothing if &guifont == "*" \|| g:CREAM_FONT_{myos} == "" && &guifont == "" " do nothing else let g:CREAM_FONT_{myos} = &guifont endif " restore screen pos " HACK: set guifont=* moves screen on WinXP call Cream_screen_init() return endfunction " window positioning function! Cream_screen_init() " * Dynamically set based on previous settings " * Remembers and restores winposition, columns and lines stored in global " variables written to viminfo " * Must follow Cream_font_init() so that columns and lines are accurate based " on font size. if !has("gui_running") return -1 endif let myos = Cream_getoscode() " initialize if !exists("g:CREAM_COLS_" . myos) let g:CREAM_COLS_{myos} = 80 endif if !exists("g:CREAM_LINES_" . myos) let g:CREAM_LINES_{myos} = 30 endif if !exists("g:CREAM_WINPOSX_" . myos) " don't set to 0, let window manager decide let g:CREAM_WINPOSX_{myos} = "" endif if !exists("g:CREAM_WINPOSY_" . myos) " don't set to 0, let window manager decide let g:CREAM_WINPOSY_{myos} = "" endif " set if exists("g:CREAM_WINPOS") && g:CREAM_WINPOS == 1 execute "set columns=" . g:CREAM_COLS_{myos} execute "set lines=" . g:CREAM_LINES_{myos} execute "winpos " . g:CREAM_WINPOSX_{myos} . " " . g:CREAM_WINPOSY_{myos} endif endfunction function! Cream_screen_get() " used by Cream_exit() to retain window position and size if !has("gui_running") return -1 endif let myos = Cream_getoscode() let g:CREAM_COLS_{myos} = &columns let g:CREAM_LINES_{myos} = &lines let g:CREAM_WINPOSX_{myos} = getwinposx() " filter error condition if g:CREAM_WINPOSX_{myos} < 0 let g:CREAM_WINPOSX_{myos} = 0 endif let g:CREAM_WINPOSY_{myos} = getwinposy() " filter error condition if g:CREAM_WINPOSY_{myos} < 0 let g:CREAM_WINPOSY_{myos} = 0 endif endfunction function! Cream_screen_unlet() " Used by singleserver to unset window position and size. if !has("gui_running") return -1 endif let myos = Cream_getoscode() unlet g:CREAM_COLS_{myos} unlet g:CREAM_LINES_{myos} unlet g:CREAM_WINPOSX_{myos} unlet g:CREAM_WINPOSY_{myos} endfunction " window positioning preference (on/off) function! Cream_winpos_init() " initialize window positioning if !exists("g:CREAM_WINPOS") " initiallize on let g:CREAM_WINPOS = 1 endif endfunction function! Cream_winpos_toggle() " toggle window positioning if exists("g:CREAM_WINPOS") if g:CREAM_WINPOS == 0 let g:CREAM_WINPOS = 1 else let g:CREAM_WINPOS = 0 endif else call Cream_error_warning("Error: global uninitialized in Cream_winpos_toggle()") endif " update the menu item call Cream_menu_settings_preferences() endfunction " Mouse {{{1 function! Cream_mouse_middle_init() " initialize middle mouse button to one of two behavior styles if exists("g:CREAM_MOUSE_XSTYLE") && g:CREAM_MOUSE_XSTYLE == 1 " X-compatible paste (paste "* [selection] register) set guioptions+=a silent! iunmap silent! vunmap vnoremap else " "normal" middle mouse behavior set guioptions-=a imap vmap imap <2-MiddleMouse> vmap <2-MiddleMouse> endif endfunction function! Cream_mouse_middle_toggle() " toggles middle mouse button between one of two behavior styles if exists("g:CREAM_MOUSE_XSTYLE") && g:CREAM_MOUSE_XSTYLE == 1 unlet g:CREAM_MOUSE_XSTYLE else let g:CREAM_MOUSE_XSTYLE = 1 endif call Cream_mouse_middle_init() call Cream_menu_settings_preferences() endfunction " 1}}} " Settings " Tabstop settings {{{1 " tabstop AND shift width (force the same) function! Cream_tabstop_init() " Initialize tab settings, called via autocmd each BufEnter. " don't change if in help file if &filetype == "help" return 1 endif if exists("g:CREAM_TABSTOP") execute "set tabstop=" . g:CREAM_TABSTOP else " never initialized before set tabstop=4 let g:CREAM_TABSTOP = 4 endif if exists("g:CREAM_SOFTTABSTOP") execute "set shiftwidth=" . g:CREAM_SOFTTABSTOP execute "set softtabstop=" . g:CREAM_SOFTTABSTOP else " use tabstop execute "set shiftwidth=" . g:CREAM_TABSTOP execute "set softtabstop=" . g:CREAM_TABSTOP endif endfunction function! Cream_tabstop() " Set tabstop and associated via dialog (and Cream global variables). if !exists("g:CREAM_TABSTOP") let n = Inputdialog("Enter tabstop width:", 4) else let n = Inputdialog("Enter tabstop width:", g:CREAM_TABSTOP) endif " cancel if n == "{cancel}" return " empty or 0 elseif n == "" || n == "0" " if empty if !exists("g:CREAM_TABSTOP") " previous setting didn't exist, auto set to 4 if global didn't previously exist call confirm("Setting to default (4).", "&Ok", 1) call Cream_tabstop_init() else " previous setting existed, just use it call confirm("0 not allowed, defaulting to previous setting (" . g:CREAM_TABSTOP . ")", "&Ok", 1) endif " non-digits elseif n =~ '\D' call confirm( \ "Only number values accepted.\n" . \ "\n", "&Ok", 1, "Info") return " use new setting (allows "stupid" settings, ie, 1000) else let g:CREAM_TABSTOP = n execute "set tabstop=" . g:CREAM_TABSTOP if exists("g:CREAM_SOFTTABSTOP") execute "set shiftwidth=" . g:CREAM_SOFTTABSTOP execute "set softtabstop=" . g:CREAM_SOFTTABSTOP else execute "set shiftwidth=" . g:CREAM_TABSTOP execute "set softtabstop=" . g:CREAM_TABSTOP endif endif return g:CREAM_TABSTOP endfunction function! Cream_softtabstop() " Set softtabstop and shiftwidth via dialog (and Cream global variables) let introstr = "Soft tabstop allows new editing to use different \n" . \ "tabstop settings than existing text. Enter your new \n" . \ "tab width below, the main tabstop setting will \n" . \ "maintain existing text at the old tab spacing.\n" . \ "\n" . \ "To turn off soft tabstop, enter 0 or an empty box.\n" . \ "\n" if !exists("g:CREAM_SOFTTABSTOP") let n = Inputdialog(introstr, 4) else let n = Inputdialog(introstr, g:CREAM_SOFTTABSTOP) endif " cancel if n == "{cancel}" return " empty or 0 elseif n == "" || n == "0" if exists("g:CREAM_SOFTTABSTOP") unlet g:CREAM_SOFTTABSTOP call Cream_tabstop_init() endif " non-digits elseif n =~ '\D' call confirm( \ "Only number values accepted.\n" . \ "\n", "&Ok", 1, "Info") return " use new setting else let g:CREAM_SOFTTABSTOP = n execute "set shiftwidth=" . g:CREAM_SOFTTABSTOP execute "set softtabstop=" . g:CREAM_SOFTTABSTOP endif endfunction " Auto Indentation {{{1 " autoindent function! Cream_autoindent_init() " initialize autoindent (according to whatever on/off state currently " exists) " don't change state in special buffers " opsplorer if bufname("%") == "_opsplorer" return endif " calendar if bufname("%") == "__Calendar" return endif if !exists("g:CREAM_AUTOINDENT") " initially on call s:Cream_indent_on() else if g:CREAM_AUTOINDENT == 1 call s:Cream_indent_on() else call s:Cream_indent_off() endif endif endfunction function! Cream_autoindent_toggle() " toggle autoindent if exists("g:CREAM_AUTOINDENT") if g:CREAM_AUTOINDENT == 0 call s:Cream_indent_on() elseif g:CREAM_AUTOINDENT == 1 call s:Cream_indent_off() endif else call Cream_error_warning("Error: global uninitialized in Cream_autoindent_toggle()") endif call Cream_menu_settings_autoindent() endfunction function! s:Cream_indent_on() if exists("did_indent_on") unlet did_indent_on endif if exists("b:did_indent") unlet b:did_indent endif filetype indent on let g:CREAM_AUTOINDENT = 1 if &indentexpr == "" setlocal autoindent "setlocal smartindent endif endfunction function! s:Cream_indent_off() setlocal noautoindent "setlocal nosmartindent filetype indent off let g:CREAM_AUTOINDENT = 0 endfunction " Line numbers {{{1 function! Cream_linenumbers_init() " initialize line numbers if !exists("g:CREAM_LINENUMBERS") " initiallize on set number let g:CREAM_LINENUMBERS = 1 else if g:CREAM_LINENUMBERS == 1 set number else set nonumber endif endif endfunction function! Cream_linenumbers_init_buffer() " initialize line numbers upon entering buffer if g:CREAM_LINENUMBERS == 1 " turn on in buffer set number let b:cream_linenumbers = 1 else " turn off in buffer if exists("b:cream_linenumbers") let b:cream_linenumbers = 0 endif set nonumber endif endfunction function! Cream_linenumbers_toggle() " toggle line numbers if exists("g:CREAM_LINENUMBERS") if g:CREAM_LINENUMBERS == 0 set number let g:CREAM_LINENUMBERS = 1 elseif g:CREAM_LINENUMBERS == 1 set nonumber let g:CREAM_LINENUMBERS = 0 endif else call Cream_error_warning("Error: global uninitialized in Cream_linenumbers_toggle()") endif call Cream_menu_settings_linenumbers() endfunction " Syntax highlighting {{{1 function! Cream_syntax_init() " initialize syntax highlighting if !exists("g:CREAM_SYNTAX") " initialize on syntax on let g:CREAM_SYNTAX = 1 else if g:CREAM_SYNTAX == 1 " no need to initialize (besides, it hoses custom " highlighting in current file on startup) "syntax on else syntax off endif endif endfunction function! Cream_syntax_toggle(mode) " toggle syntax highlighting if exists("g:CREAM_SYNTAX") if g:CREAM_SYNTAX == 0 syntax on let g:CREAM_SYNTAX = 1 call Cream_filetype() elseif g:CREAM_SYNTAX == 1 syntax off let g:CREAM_SYNTAX = 0 endif else call Cream_error_warning("Error: global uninitialized in Cream_syntax_toggle()") endif if a:mode == "v" normal gv endif call Cream_menu_settings_syntax() endfunction " Highlight current line {{{1 function! Cream_highlight_currentline_init() " Initialize current line highlighting, Vim 7.0+, called by autocmd. if exists("g:CREAM_HIGHLIGHT_CURRENTLINE") if &cursorline == 0 set cursorline endif else if &cursorline == 1 set nocursorline endif endif endfunction function! Cream_winline_start(linewidth) " return start of current screen line let len = virtcol('$') let pos = virtcol('.') " if line shorter than window, only one screen line if len <= a:linewidth return 1 endif " if position is less than line width, on first line if pos <= a:linewidth return 1 endif " we're beyond the first screen line let i = 1 while i < pos + 1 let i = i + a:linewidth endwhile return i - a:linewidth endfunction function! Cream_highlight_currentline_toggle() if exists("g:CREAM_HIGHLIGHT_CURRENTLINE") unlet g:CREAM_HIGHLIGHT_CURRENTLINE set nocursorline else let g:CREAM_HIGHLIGHT_CURRENTLINE = 1 set cursorline endif call Cream_menu_settings_highlightcurrentline() endfunction " Highlight columns {{{1 function! Cream_highlight_columns(column) " toggle highlighting of column {column} and beyond if !exists("b:cream_col_highlight") let b:cream_col_highlight = 1 else unlet b:cream_col_highlight endif "let b:cream_col_highlight =! b:cream_col_highlight if exists("b:cream_col_highlight") highlight! link ColumnBeyond Todo execute 'match ColumnBeyond /.\%>' . (a:column+1) . 'v/' else match none endif call Cream_menu_settings_highlightwrapwidth() endfunction " Toolbar toggle {{{1 " NOTE: Cream_toolbar_init() is in cream-settings.vim! function! Cream_toolbar_toggle() " toggle toolbar (initialization in cream-menu.vim " initialize if !exists("g:CREAM_TOOLBAR") let g:CREAM_TOOLBAR = 1 endif " reverse current status if g:CREAM_TOOLBAR == 1 set guioptions-=T " no toolbar let g:CREAM_TOOLBAR = 0 else set guioptions+=T " toolbar let g:CREAM_TOOLBAR = 1 endif call Cream_menu_settings_preferences() endfunction " Statusline toggle {{{1 function! Cream_statusline_init() " initialize statusline state if !exists("g:CREAM_STATUSLINE") " initialize on set laststatus=2 let g:CREAM_STATUSLINE = 1 else if g:CREAM_STATUSLINE == 1 set laststatus=2 else set laststatus=0 endif endif endfunction function! Cream_statusline_toggle() " toggle syntax highlighting if exists("g:CREAM_STATUSLINE") if g:CREAM_STATUSLINE == 0 set laststatus=2 let g:CREAM_STATUSLINE = 1 elseif g:CREAM_STATUSLINE == 1 set laststatus=0 let g:CREAM_STATUSLINE = 0 endif else call Cream_error_warning("Error: global uninitialized in Cream_statusline_toggle()") endif call Cream_menu_settings_preferences() endfunction " Bracket matching {{{1 " initialize environment function! Cream_bracketmatch_init() set matchtime=1 if !exists("g:CREAM_BRACKETMATCH") " initially on set showmatch let g:CREAM_BRACKETMATCH = 1 else if g:CREAM_BRACKETMATCH == 1 set showmatch else set noshowmatch endif endif endfunction " toggle on/off function! Cream_bracketmatch_toggle() if exists("g:CREAM_BRACKETMATCH") if g:CREAM_BRACKETMATCH == 0 set showmatch let g:CREAM_BRACKETMATCH = 1 elseif g:CREAM_BRACKETMATCH == 1 set noshowmatch let g:CREAM_BRACKETMATCH = 0 endif else call confirm( \"Error: global uninitialized in Cream_bracketmatch_toggle()", "&Ok", 1, "Error") endif call Cream_menu_settings_preferences() endfunction " Errorbells {{{1 function! Cream_errorbells_off(...) " control Vim's audio and visual warnings " * Arguments: " "beep": turn off just beeping " "flash": turn off just flashing " (empty): both off " * Must be initialized after the GUI starts! " off if a:0 == 0 let myeb = "" else let myeb = a:1 endif if myeb ==? "flash" " audibly beep on error messages set errorbells " Screen flash on error (See also 't_vb') set novisualbell set t_vb= elseif myeb ==? "beep" " audibly beep on error messages set noerrorbells " Screen flash on error (See also 't_vb') set visualbell set t_vb& elseif myeb ==? "" " audibly beep on error messages set noerrorbells " Screen flash on error (See also 't_vb') set visualbell set t_vb= endif endfunction " Keymap {{{1 function! Cream_keymap(map) " change the setting of &keymap let g:CREAM_KEYMAP = a:map execute "set keymap=" . g:CREAM_KEYMAP " refresh menu to indicate new setting call Cream_menu_settings_preferences() endfunction function! Cream_keymap_init() " initialize &keymap if !exists("g:CREAM_KEYMAP") let g:CREAM_KEYMAP = "" else execute "set keymap=" . g:CREAM_KEYMAP endif endfunction " 1}}} " Inserts " Char Inserts {{{1 " Insert Digraph function! Cream_digraph_insert() " only available from insert mode "********************************************************************* " The insertion of digraphs does not occur via function! Since the " native keystroke is only available via insertmode, we're " unable to functionalize it. "********************************************************************* "normal i "execute "i\IE" endfunction " List Digraphs function! Cream_digraph_list() let str = \ "\n" . \ " The following digraph list is in the format:\n" . \ "\n" . \ " At @ 64\n" . \ "\n" . \ " where first two letters (\"digraph\") are typed to insert the following \n" . \ " character. The trailing digits indicate that character's decimal value.\n" . \ "\n" . \ " Note that proper display is dependant on operating system, font, and \n" . \ " file encoding. Characters beyond decimal 126 are generally unreliable.\n" . \ "\n" echo str digraphs endfunction function! Cream_insert_char() " Insert a char at cursor based on decimal, hex, or octal value. Uses " inputdialog for prompt. " get string representing value let x = Inputdialog("Input decimal value of character to insert:\n" . \ "(preceed with \"0x\" for hexidecimal, \"0\" for octal)\n" . \ "", "") " convert to char let @x = nr2char(x) " TODO: work around errant code for map if x == "174" let @x = "®" endif " get pos let line = line('.') let vcol = virtcol('.') " insert char if vcol == col('$') - 1 normal "xgp else normal "xgP endif endfunction function! Cream_allchars_list() " only use for > ascii if &encoding != "latin1" echo "\n" echo " (Use [Enter] to scroll by line, [Space] by page, or [Esc] to close.)" echo "\n" endif echo Cream_ascii_table() " limitations let min = 32 if &encoding == "latin1" echo "\n" echo " Set another file encoding (e.g. Unicode UTF-8) to test characters " echo " beyond decimal 255." echo "\n" return else let max = 65375 endif let str = "" " display setup echo "\n" echo " All characters available on this computer up to " . max . " places \n" echo " are listed below by HEXIDECIMAL VALUE. (Proper display is dependant on \n" echo " the current encoding and font.)" echo "\n" let numlen = strlen(Nr2Hex(max)) let num = "" if &columns < 80 let wid = &columns / 2 else let wid = 21 " 37 endif let i = 0 while min+i < max if i % (wid - strlen(max)) == 0 " headings if i == 0 || (i+16) % 256 == 0 echo " _________________________________________________" echo " 0 1 2 3 4 5 6 7 8 9 a b c d e f " echo " ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯" endif echo str let num = min+i " do in hex if bigger than decimal (:help i_CTRL-V_digit) if max > 255 let num = Nr2Hex(num) endif " pad let num = Cream_str_pad(num, numlen) let str = num . ": " endif let str = str . nr2char(min+i) . " " let i = i + 1 endwhile " print any remainder echo str endfunction " Date/Time {{{1 function! Cream_insert_datetime(...) " Insert the date/time at the cursor. If {...} is 1, use dialog to " select format. Otherwise, use default/last picked. " " Formatting References: " o http://www.saqqara.demon.co.uk/datefmt.htm " o http://www.opengroup.org/onlinepubs/7908799/xsh/strftime.html " o http://www.cl.cam.ac.uk/~mgk25/iso-time.html " o http://www.w3.org/TR/NOTE-datetime " retain existing dialog button display orientation let sav_go = &guioptions " make vertical set guioptions+=v " set default pick if no previous preference if !exists("g:CREAM_DATETIME_STYLE") let g:CREAM_DATETIME_STYLE = 1 endif if a:0 == 1 \ && a:1 == 1 " let button text equal current values let mybuttons = \ substitute(strftime('%d %B %Y'), '^0*', '', 'g') . "\n" . \ substitute(strftime('%d %b %Y'), '^0*', '', 'g') . "\n" . \ strftime('%Y %B %d') . "\n" . \ strftime('%Y %b %d') . "\n" . \ strftime('%Y-%b-%d') . "\n" . \ strftime("%Y-%m-%d") . "\n" . \ strftime("%Y-%m-%d, %I:%M") . tolower(strftime("%p")) . "\n" . \ strftime("%Y-%m-%d, %H:%M") . "\n" . \ strftime("%Y-%m-%d %H:%M:%S") . "\n" . \ strftime("%Y-%m-%d %H:%M:%S") . Cream_timezone() . "\n" . \ strftime("%Y%m%dT%H%M%S") . Cream_timezone() . "\n" . \ "&Cancel" let n = confirm( \ "Select the date/time format to insert: \n" . \ "\n" . \ "\n", mybuttons, g:CREAM_DATETIME_STYLE, "Info") else let n = g:CREAM_DATETIME_STYLE endif if n == 1 " 14 February 2003 (minus leading 0's) let mytime = substitute(strftime('%d %B %Y'), '^0*', '', 'g') elseif n == 2 " 14 Feb 2003 (minus leading 0's) let mytime = substitute(strftime('%d %b %Y'), '^0*', '', 'g') elseif n == 3 " 2003 February 14 let mytime = strftime('%Y %B %d') elseif n == 4 " 2003 Mar 14 let mytime = strftime("%Y %b %d") elseif n == 5 " 2003-Mar-14 let mytime = strftime("%Y-%b-%d") elseif n == 6 " 2003-03-14 let mytime = strftime("%Y-%m-%d") elseif n == 7 " 2003-02-14, 10:28pm let mytime = strftime("%Y-%m-%d, %I:%M") . tolower(strftime("%p")) elseif n == 8 " 2003-02-14, 22:28 let mytime = strftime("%Y-%m-%d, %H:%M") elseif n == 9 " 2003-02-14 22:28:14 let mytime = strftime("%Y-%m-%d %H:%M:%S") elseif n == 10 " 2003-02-14 22:28:23-0500 let mytime = strftime("%Y-%m-%d %H:%M:%S") . Cream_timezone() elseif n == 11 " 20030214T102823-0500 let mytime = strftime("%Y%m%dT%H%M%S") . Cream_timezone() else endif " restore gui buttons let &guioptions = sav_go " insert register "i" (condition on col position) if exists("mytime") let @i = mytime if virtcol('.') == virtcol('$') - 1 execute "normal a" . @i normal $ else execute "normal i" . @i normal l endif " remember selection if 0 < n && n < 11 let g:CREAM_DATETIME_STYLE = n endif endif endfunction " Character Lines {{{1 function! Cream_charline(...) " insert character line, full width " accepting argument allows function to be called with a supplied " character as the argument if exists("a:1") let mychar = a:1 else let mychar = nr2char(getchar()) endif " insert character &textwidth number of times *minus the current " position* let mylen = g:CREAM_AUTOWRAP_WIDTH - virtcol('.') call Cream_charline_insert(mychar, mylen) endfunction function! Cream_charline_insert(str, len) " insert a:str a:len number of times let i = 0 while i < a:len execute "normal a" . a:str let i = i + 1 endwhile normal $ endfunction function! Cream_charline_prompt() " a wrapper for Cream_charline() to prompt the user let n = confirm( \ "Enter any character after Continue to insert it as a line. \n" . \ "(Use the keyboard shortcut to avoid this prompt.)\n" . \ "\n", "Continue...\n&Cancel", 1, "Info") if n != 1 return endif call Cream_charline() endfunction function! Cream_charline_lineabove(...) " insert character line the length of the line above " set width based on line above " get str let mystr = getline(line(".") - 1) " substitute tabs for spaces let i = 0 let mytab = "" while i < &tabstop let mytab = mytab . " " let i = i + 1 endwhile let mystr = substitute(mystr, '\t', mytab, 'g') let mylen = strlen(mystr) " accepting argument allows function to be called with a supplied " character as the argument if exists("a:1") let mychar = a:1 else let mychar = nr2char(getchar()) endif " insert character mylen number of times *minus the current " position* let i = 0 " let pad equal 1 unless at line end let mystr = getline('.') let mystr = substitute(mystr, '\t', mytab, 'g') if virtcol('.') != strlen(mystr) let mypad = 1 else let mypad = 0 endif " calculate length let mylen = mylen - virtcol('.') + mypad call Cream_charline_insert(mychar, mylen) endfunction function! Cream_charline_lineabove_prompt() " a wrapper for Cream_charline_lineabove() to prompt the user let n = confirm( \ "Enter any character after Continue to insert it as a line the \n" . \ "length of the line above.\n" . \ "(Use the keyboard shortcut Ctrl+Shift+F4 to avoid this prompt. )\n" . \ "\n", "Continue...\n&Cancel", 1, "Info") if n != 1 return endif call Cream_charline_lineabove() endfunction " 1}}} " Other " Character codes {{{1 function! Cream_char_codes(mode) " display character codes " position if a:mode == "v" "normal gv "elseif a:mode == "i" " normal h endif redir @x normal ga redir END let str = @x let chr = matchstr(str, '.\ze> ') let dec = matchstr(str, '\d\+,\@=') let hex = matchstr(str, '\(Hex \)\@<=\x\+') let oct = matchstr(str, '\(Octal \)\@<=\o\+') if dec == 9 let chr = "(tab)" elseif dec == 10 let chr = "(line feed)" elseif dec == 13 let chr = "(carriage return)" elseif dec == 32 let chr = "(space)" elseif chr == "" call confirm( \ "No character found.\n" . \ "\n", "&Ok", 1, "Info") return endif " windows if chr == "&" && Cream_has("ms") let chr = "&&" endif call confirm( \ "character: " . chr . " \n" . \ "\n" . \ " dec: " . dec . "\n" . \ " hex: " . hex . "\n" . \ " oct: " . oct . "\n" . \ "\n", "&Ok", 1, "Info") endfunction " Version {{{1 function! Cream_version(form) " returns version, subversion, and/or patch number: " arguments: " "version" -- return numerical version number: "6" " "subversion" -- return numerical subversion number: "2" " "patchlevel" -- return numerical patch level number: "57" " "string" -- return version in string form: "6.2.71" " " find version (everything prior to last two digits) let myversion = strpart(v:version, 0, strlen(v:version) - 2) + 0 " find sub-version (last two digits of version) let mysubversion = strpart(v:version, strlen(v:version) - 2) + 0 " find patch level " which will be their problem ;) " Note: This function works only in Vim 6.2 or after since " has("patch##") was introduced in patch 6.1.384. let mypatchlevel = 0 if v:version < 602 " hack :version output redir @x silent! version redir END let mypos1 = matchend(@x, "Included patches: ") if mypos1 != -1 " get pos of line end following let mypos2 = match(@x, "\n", mypos1) " get entire patch level string let tmp = strpart(@x, mypos1, mypos2 - mypos1) " count digits at end (the last numbers in this string are " the highest patch) (add 1, it's 0-based) let cnt = match(tmp, '\d*$') + 1 " strip down to only those let mypatchlevel = strpart(tmp, strlen(tmp) - cnt) else let mypatchlevel = "0" endif else " loop through 999 (some people skip patches, let i = 0 while i < 1000 if has("patch" . i) let mypatchlevel = i endif let i = i + 1 endwhile endif " find string version let mystring = myversion . "." . mysubversion . "." . mypatchlevel ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " myversion = \"" . myversion . "\"\n" . " \ " mysubversion = \"" . mysubversion . "\"\n" . " \ " mypatchlevel = \"" . mypatchlevel . "\"\n" . " \ " mystring = \"" . mystring . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** if a:form == "version" return myversion elseif a:form == "subversion" return mysubversion elseif a:form == "patchlevel" return mypatchlevel elseif a:form == "string" return mystring else call confirm( \ "Error: Invalid argument passed to Cream_version()\n" . \ "\n", "&Ok", 1, "Info") return -1 endif endfunction " OS code {{{1 " establish os for variable function! Cream_getoscode() " return a mneumonic code for the OS in use if Cream_has("ms") return "WIN" elseif has("unix") return "UNIX" else return "OTHER" endif endfunction " Date, Time, Timezone {{{1 function! Cream_timezone() " Return the current timezone value (system dependent). " o Override with g:CREAM_TIMEZONE. " o Otherwise, most system return strftime("%Z"). " o If system (Windows) does not have strftime("%Z"), empty string "" " is returned. if exists("g:CREAM_TIMEZONE") let timezone = g:CREAM_TIMEZONE else let timezone = strftime("%Z") endif return timezone endfunction function! Cream_daysinyear() " returns leap year status, 0 for false, 1 for true let leap = "" let myyear = strftime("%Y") if myyear % 400 != 0 if myyear % 100 != 0 if myyear % 4 != 0 let leap = 364 else let leap = 365 endif else let leap = 364 endif else let leap = 365 endif return leap endfunction function! Cream_time_convertformat(mode, from, to, ...) " o converts a time format to another " o returns a string " o {...} is the string to be converted (overrides selection in "v" mode) if a:mode == "v" normal gv normal "xy let str = @x endif if a:0 > 0 let str = a:1 endif " convert to seconds (number, not string!) let seconds = "" if a:from == "24" if strlen(str) != 4 call confirm( \ "Error in Cream_time_convertformat().\n" . \ "24-hour times expected to be 4 digits long.\n" . \ "\n", "&Ok", 1, "Info") return endif " get minutes let minutes = matchstr(str, '\d\d$') " strip leading 0 to avoid octal mis-interpretation if match(minutes, '^0') != -1 let minutes = matchstr(minutes, '\d$') endif " get hours let hours = matchstr(str, '^\d\+\ze\d\d') " strip leading 0 to avoid octal mis-interpretation if match(hours, '^0') != -1 let hours = matchstr(hours, '\d$') endif " convert hours and minutes to minutes let minutes = ((hours + 0) * 60) + (minutes + 0) " convert to seconds, string let seconds = minutes * 60 elseif a:from == "minutes" let seconds = str * 60 else call confirm( \ "Unhandled \"from\" time format in Cream_time_convertformat().\n" . \ "\n", "&Ok", 1, "Info") return endif " convert from seconds let time = "" if a:to == "seconds" let time = seconds elseif a:to == "minutes" let time = seconds / 60 elseif a:to == "24" " convert to minutes let time = seconds / 60 " obtain minutes remainder let minutes = time % 60 " pad to two digits while strlen(minutes) < 2 let minutes = "0" . minutes endwhile let hours = time / 60 let time = hours . minutes else call confirm( \ "Unhandled \"to\" time format in Cream_time_convertformat().\n" . \ "\n", "&Ok", 1, "Info") return endif ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " str = \"" . str . "\"\n" . " \ " a:from = \"" . a:from . "\"\n" . " \ " a:to = \"" . a:to . "\"\n" . " \ " seconds = \"" . seconds . "\"\n" . " \ " time = \"" . time . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** if a:mode == "v" let @x = time normal gv normal "xp else " convert to string return strpart(time, 0) endif endfunction " Math {{{1 function! Cream_isfactor(dividend, divisor) " Return 1 if {divisor} is a factor of {dividend}, 0 if not. if a:dividend < a:divisor return 0 elseif a:dividend == a:divisor return 1 endif let i = 1 while 1 " raise divisor to power let divisor_n = a:divisor let j = 1 while j < i let divisor_n = (divisor_n * a:divisor) let j = j + 1 endwhile let modu = a:dividend % divisor_n " if we get to number before non-0 if modu == a:dividend return 1 elseif modu == 0 " still factor, continue else " nope return 0 endif let i = i + 1 endwhile endfunction " Evaluate &statusline/&printheader {{{1 function! Cream_statusline_eval(option) " evaluate &statusline or &printheader value and return an equivelent string if a:option != "statusline" && a:option != "stl" \ && a:option != "printheader" && a:option != "pheader" " invalid return endif execute "let str = &" . a:option " wrap/hide if match(str, "%<") != -1 let str = substitute(str, "%<", '', '') endif " path if match(str, "%f") != -1 let str = substitute(str, "%f", fnamemodify(expand("%"), ":p:h"), 'g') endif " filename if match(str, "%h") != -1 let str = substitute(str, "%h", fnamemodify(expand("%"), ":p:t"), 'g') endif " split left/right if match(str, "%=") != -1 let str = substitute(str, "%=", ' ', '') endif " page numbers if match(str, "%N") != -1 let str = substitute(str, "%N", '1', '') endif " modified if match(str, "%m") != -1 if &modified let str = substitute(str, "%m", ' [+]', '') else let str = substitute(str, "%m", ' ', '') endif endif return str endfunction " Diff Mode {{{1 " called by setting diffexpr=MyDiff() only if has("win32") function! MyDiff() if has("win32") let opt = "-a --binary " if &diffopt =~ "icase" | let opt = opt . "-i " | endif if &diffopt =~ "iwhite" | let opt = opt . "-b " | endif let myfname_in = substitute(v:fname_in, '/', '\', 'g') let myfname_new = substitute(v:fname_new, '/', '\', 'g') let myfname_out = substitute(v:fname_out, '/', '\', 'g') let myVIMRUNTIME = substitute($VIMRUNTIME, '/', '\', 'g') silent execute '!"' . myVIMRUNTIME . '\diff" ' . opt . \ myfname_in . ' ' . myfname_new . ' > ' . myfname_out endif endfunction function! Cream_diffmode_toggle() " toggles diff mode (detects existing state) " * diff mode is *not* retained session to session " * diff mode is *buffer-specific* " * g:cream_diffmode exists if on in any buffer if !exists("b:cream_diffmode") " Win95 error trap let myshellslash = &shellslash set noshellslash " turn on call Cream_diffmode(1) let &shellslash = myshellslash let b:cream_diffmode = 1 " keep track of how many diff mode buffers there are if !exists("g:cream_diffmode") let g:cream_diffmode = 1 else let g:cream_diffmode = g:cream_diffmode + 1 endif else " turn off call Cream_diffmode(0) unlet b:cream_diffmode " keep track of how many diff mode buffers there are let g:cream_diffmode = g:cream_diffmode - 1 if g:cream_diffmode == 0 unlet g:cream_diffmode endif endif endfunction function! Cream_diffmode(state) " turns diff mode on (1) or off (0) " abstracted from Cream_diffmode_toggle() so that autocmd can call " here for new buffers (behind the scenes conformance ;) if a:state == 1 diffthis "" same as using :diffthis "set diff "set scrollbind "set scrollopt=hor "set nowrap "set foldmethod=diff "set foldcolumn=2 let g:CREAM_WRAP = 0 elseif a:state == 0 " diffthis off set nodiff set noscrollbind set scrollopt=ver,jump "set nowrap set foldmethod=manual set foldcolumn=0 "let g:CREAM_WRAP = 0 endif endfunction function! Cream_diffmode_update() " update diff state if exists("b:cream_diffmode") diffupdate endif endfunction " Trim word {{{1 function! Cream_trim(word) " trim whitespace off both ends of the argument return substitute(a:word, '^\s*\(\S*\)\s*$', '\1', 'g') endfunction " Sort and Uniq {{{1 " Line Sort (BISort2) " Source: Piet Delport, vim@vim.org list, 2003-05-01 function! BISort2(start, end) " Sort a selection. Required to be in visual mode. " " Note: The four "toupper()" statements make this sort case-insenstive. " Remove for case-sensitive. if col("'>") == 1 let fix = 1 "call confirm( " \ "FIX!\n" . " \ "\n", "&Ok", 1, "Info") else let fix = 0 endif let i = a:start - 1 while i <= a:end - fix " find insertion point via binary search let i_val = getline(i) let lo = a:start let hi = i while lo < hi let mid = (lo + hi) / 2 let mid_val = getline(mid) if toupper(i_val) < toupper(mid_val) let hi = mid else let lo = mid + 1 if toupper(i_val) == toupper(mid_val) | break | endif endif endwhile " do insert if lo < i exec i.'d_' call append(lo - 1, i_val) endif let i = i + 1 endwhile "normal gv endfunction command! -nargs=0 -range BISort2 call BISort2(, ) function! BISort2Reverse(start, end) call BISort2(a:start, a:end) call Invert(a:start, a:end) endfunction command! -nargs=0 -range BISort2Reverse call BISort2Reverse(, ) function! Invert(start, end) if col("'>") == 1 let fix = 1 else let fix = 0 endif let i = a:end while i >= a:start - fix let i_val = getline(i) exec i.'d_' call append(a:end - 1, i_val) let i = i - 1 endwhile endfunction command! -nargs=0 -range Invert call Invert(, ) " Source: genutils.vim (included with Cream) " Note: Functions are declared local in genutils. (These are global.) function! CmpByString(line1, line2, direction) if a:line1 < a:line2 return -a:direction elseif a:line1 > a:line2 return a:direction else return 0 endif endfunction function! CmpByNumber(line1, line2, direction) let num1 = a:line1 + 0 let num2 = a:line2 + 0 if num1 < num2 return -a:direction elseif num1 > num2 return a:direction else return 0 endif endfunction ""*** obsoleted by above *** "function! Cream_sort_compare(idx1, idx2) "" return the index (1 or 2) for which of two arguments come first "" alphabetically "" * An empty value will be returned as first, too. " " let i = 0 " while i < strlen(a:idx1) " let myval1 = strpart(a:idx1, i, 1) " let myval2 = strpart(a:idx2, i, 1) " if char2nr(myval1) == char2nr(myval2) " let i = i + 1 " continue " elseif char2nr(myval2) > char2nr(myval1) " return 1 " else " return 2 " endif " let i = i + 1 " endwhile " " " two are equal for the length of a:idx1 " if strlen(a:idx2) > strlen(a:idx1) " " 2 is longer, so after " return 2 " else " " equal! " return 0 " endif " "endfunction function! Cream_uniq(mode) " call function to uniq a selection if a:mode != "v" return endif "normal gv " cursor in first column of last line implies not selected let mycol = col('.') let myline1 = line("'<") let myline2 = line("'>") if mycol == "1" let myline2 = myline2 - 1 endif let n = confirm( \ "Uniq only works on sorted lines. Do you want to sort the selection first?\n" . \ "\n", "&Yes\n&No\n&Cancel", 1, "Info") if n == 1 call BISort2(myline1, myline2) elseif n == 2 " do nothing, proceed with uniq else return endif call Uniq(myline1, myline2) " DON'T RESELECT! Lines deleted so it can't be the same. endfunction " Note: we use this as a library function, see Cream_uniq() for the " call. " " Author: Jean Jordaan " Source: http://groups.yahoo.com/group/vim/message/16444 " Date: Mon Feb 26, 2001 5:34 am " Subject: Some functions to read mailing list digests with Vim. " function! Uniq(...) range " use arguments if two passed if a:0 == 2 let a = a:1 let z = a:2 " use range else let a = a:firstline let z = a:lastline endif while (a <= z) let str1 = getline(a) let str2 = getline(a+1) if (str1 == str2) execute a . "delete" let z = z - 1 else let a = a + 1 endif endwhile endfunction " :Uniq takes a range of sorted lines and discards duplicates. command! -nargs=0 -range Uniq ,call Uniq() " Completion {{{1 function! Cream_complete_forward() return "\" endfunction function! Cream_complete_backward() return "\" endfunction function! Cream_complete_omni_forward() if pumvisible() return "\" endif if &omnifunc != "" return "\\" else return "" endif endfunction function! Cream_complete_omni_backward() if pumvisible() return "\" endif if &omnifunc != "" return "\\" else return "" endif endfunction " Progress Bars {{{1 function! ProgressBar(percent, string, char, barlen) " Draw a progress bar in the command line similar to: " " Loading file... [#################### ] 55% " " Example Call: " " call ProgressBar(55, "Loading file...", "#", 0) " " Arguments: " {percent} -- percent of bar complete " {string} -- leading description string (empty acceptable) " {char} -- character to use as bar (suggest "#", "|" or "*") " {barlen} -- bar length in columns, use 0 to use window width " " establish bar length (if no value passed) if a:barlen == 0 "____________window width__leading string___"["__"] "_63%_ margin let barlen = winwidth(0) - strlen(a:string) - 1 - 2 - 3 - 2 else let barlen = a:barlen endif " define progress let chrs = barlen * a:percent / 100 " define progress to go let chrx = barlen * (100 - a:percent) / 100 " bar, initial string and start line let bar = a:string . "[" " bar, progress while chrs let bar = bar . a:char let chrs = chrs - 1 endwhile " bar, progress to go while chrx let bar = bar . " " let chrx = chrx - 1 endwhile " bar, end line let bar = bar . "] " " bar, extra space if single digit if a:percent < 10 let bar = bar . " " endif " bar, percentage let bar = bar . a:percent . "%" " clear command line execute "normal \\:\" " Yikes, this changes window/buffers, saves, other blechy stuff. "execute "normal \:\" " capture cmdheight let cmdheight = &cmdheight " setting to 2+ avoids 'Press Enter...' if cmdheight < 2 let &cmdheight = 2 endif " show on command line echon bar " restore cmdheight let &cmdheight = cmdheight endfunction "function! ProgressBarBuffer(string, progress, char, barlen) "" draw a progress bar *in a blank buffer* based on a percentage "" * WARNING: Draws in a previously opened and current empty buffer! "" ALL CONTENTS OF THE CURRENT BUFFER WILL BE DELETED!! "" * (a:string) -- string preceding bar "" * (a:progress) -- percentage of completion "" * (a:char) -- character used to draw the bar "" * (a:barlen) -- bar length (in chars) " " " loop to get current bar length " let mybar = "" " let i = 0 " while i < a:barlen " " bar characters " if i < (a:progress * a:barlen) / 100 " let mybar = mybar . a:char " " remaining spaces " else " let mybar = mybar . " " " endif " let i = i + 1 " endwhile " " " set echo string " let @x = a:string . "|" . mybar . "| " . a:progress . "%" " " " delete everything in buffer " " go to top, linewise select " normal gggH " " we need to change modes if in select " if mode() == "s" || mode() == "S" " execute "normal \" " endif " " go to bottom, delete " execute "normal G\" " " paste new bar " normal "xp " " redraw screen (and refresh background to remove cursor) " redraw! " "endfunction " Variable Type Conversions {{{1 function! Hex2Nr(hex) " return the decimal value of a Hex string "execute "return 0x" . a:hex let val = ("0x" . a:hex) + 0 "while strlen(val) < 2 " let val = "0" . val "endwhile return val endfunction function! Nr2Hex(nr) " return the Hex string of a number " Inspiration: :help eval-examples let n = a:nr let r = "" while n let r = '0123456789ABCDEF'[n % 16] . r let n = n / 16 endwhile " return a real 0, not empty! if r == "" return "0" else " ensure value padded to two digits while strlen(r) < 2 let r = "0" . r endwhile return tolower(r) endif endfunction function! String2Hex(str) " convert each character in a string to a two character Hex string " Inspiration: from :help eval-examples let out = '' let i = 0 while i < strlen(a:str) let mychar = Nr2Hex(char2nr(a:str[i])) " pad to two characters while strlen(mychar) < 2 let mychar = "0" . mychar endwhile let out = out . mychar let i = i + 1 endwhile return out endfunction function! Hex2String(hex, ...) " convert each two character pair in a string to a character " allows optional argument "silent" to avoid printing error let hex = a:hex " strip whitespace and ctrl chars let hex = substitute(hex, '[ [:cntrl:]]', '', 'g') " ensure pairs of chars if strlen(hex) % 2 != 0 if a:0 == 0 || a:1 != "silent" call confirm( \ "Error in Hex2String(), unable to process unpaired values.\n" . \ "Found: decimal " . "" . "\n" . \ "\n", "&Ok", 1, "Info") endif return a:hex endif let out = '' let i = 0 while i < strlen(hex) " char assumed to be two digits, but only use last if first is 0 if hex[i] == "0" let mychar = hex[i + 1] else let mychar = hex[i] . hex[i + 1] endif let out = out . nr2char(Hex2Nr(mychar)) let i = i + 2 endwhile return out endfunction function! Cream_nonoctal(str) " Returns number from string stripped of leading 0's (potentially " mis-interpreted as octal). "return substitute(a:str, '\(^\|\n\|\s\)\zs0\+', '', 'g') " Alternate: strip leading 0's in a word return substitute(a:str, '\<0\+', '', 'g') + 0 endfunction function! Cream_str2dec_pad(str) " convert a string to a string of decimal numbers, padded to three " registers ( "7" => "007") let newstr = a:str let mypos = 0 let i = 0 let mylength = strlen(newstr) * 3 while mypos < mylength " get first part let mystrfirst = strpart(newstr, 0, mypos) " get middle part (always one char) let mystrmiddle = strpart(newstr, mypos, 1) " get last part let mystrlast = strpart(newstr, mypos + 1) " convert to decimal let mystrmiddle = char2nr(mystrmiddle) " expand to three characters while strlen(mystrmiddle) < 3 let mystrmiddle = "0" . mystrmiddle endwhile " concatenate let newstr = mystrfirst . mystrmiddle . mystrlast " find new pos let mypos = mypos + 3 endwhile return newstr endfunction function! Cream_dec2str_pad(dec) " convert a string of decimal numbers, padded to three registers, to a " string, see Cream_str2dec_pad() ( "007" => "7") let newstr = a:dec " strip all non-digits let newstr = substitute(newstr, "\\D", '', 'g') ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " newstr = \"" . newstr . "\"\n" . " \ " a:dec = \"" . a:dec . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** " un-3 digit ascii, char by char let mylen = strlen(newstr) let mypos = 0 while mypos < mylen " get first part let mystrfirst = strpart(newstr, 0, mypos) " get middle part (always four chars) let mystrmiddle = strpart(newstr, mypos, 3) " get last part let mystrlast = strpart(newstr, mypos + 3) " strip leading "0"s "let tmp1 = "" while strpart(mystrmiddle, 0, 1) == "0" let mystrmiddle = strpart(mystrmiddle, 1) "let tmp1 = mystrmiddle endwhile " convert to char "let tmp2 = mystrmiddle + 0 let mystrmiddle = nr2char(mystrmiddle) ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " mystrfirst = \"" . mystrfirst . "\"\n" . " \ " tmp1 = \"" . tmp1 . "\"\n" . " \ " tmp2 = \"" . tmp2 . "\"\n" . " \ " mystrmiddle = \"" . mystrmiddle . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** " concatenate let newstr = mystrfirst . mystrmiddle . mystrlast " find new pos let mypos = mypos + 1 endwhile return newstr endfunction function! Cream_str2nr_sum(str) " convert a string to a number, the equivelent of each character's " decimal value summed. let nr = 0 let i = 0 while i < strlen(a:str) let nr = nr + char2nr(strpart(a:str, i, 1)) let i = i + 1 endwhile return nr endfunction function! Cream_format_number_commas(str) " Add commas to a string every three characters. ("75300242" => "75,300,242") " don't process less than 4 if strlen(a:str) < 4 return a:str endif let tmp = a:str let str = "" while strlen(tmp) > 3 " last three chars let str = "," . matchstr(tmp, '...$') . str " chew off 3 at a time let tmp = substitute(tmp, '...$', '', "") endwhile " tack on remaining let str = tmp . str return str endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream.svg0000644000076400007660000004020611156572440014727 0ustar digitectlocaluser image/svg+xml cream-0.43/cream-lib-win-tab-buf.vim0000644000076400007660000007571511517300720017604 0ustar digitectlocaluser" " Filename: cream-lib-win-tab-buf.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Window and buffer related functions " " We refer to windows in the following fashion: " " +---+---+---+--------------+ " | | | | : : | " | | | | : : | " | | | | Primary | " | Specials | : : | " | | | | : : | " | | | +--------------+ " | | | | | " | | | | Help | " | | | | | " +---+---+---+--------------+ " " Note that Help is also considered a Special. " " Cream_nextwindow() {{{1 function! Cream_nextwindow() " go to next valid window or tab (if multiple) or buffer (if not) " multiple windows: change windows if NumberOfWindows() > 1 execute "wincmd w" " if unnamed, unmodified buffer, go to next if others exist if Cream_buffer_isnewunmod() == 1 \&& Cream_NumberOfBuffers("neither") > 0 call Cream_TryAnotherBuffer() endif " single window: change tabs or buffers else " try tabs first if tabpagenr('$') > 1 tabnext " if current is unnamed, unmodified buffer, go to next (Once! " If more than 1 exist, the user created one this session.) if bufname("%") == "" && &modified == 0 tabnext endif else bnext " if current is unnamed, unmodified buffer, go to next (Once! " If more than 1 exist, the user created one this session.) if bufname("%") == "" && &modified == 0 bnext endif endif endif endfunction " Cream_prevwindow() {{{1 function! Cream_prevwindow() " go to next valid window or tab (if multiple) or buffer (if not) " multiple windows: change windows if NumberOfWindows() > 1 execute "wincmd W" " if unnamed, unmodified buffer, go to next if others exist if Cream_buffer_isnewunmod() == 1 \&& Cream_NumberOfBuffers("neither") > 0 call Cream_TryAnotherBuffer() endif " single window: change buffers else " try tabs first if tabpagenr('$') > 1 tabprevious " if current is unnamed, unmodified buffer, go to next (Once! " If more than 1 exist, the user created one this session.) if bufname("%") == "" && &modified == 0 tabprevious endif else bprevious " if current is unnamed, unmodified buffer, go to next (Once! " If more than 1 exist, the user created one this session.) if bufname("%") == "" && &modified == 0 bprevious endif endif endif endfunction " Cream_buffer_edit() {{{1 function! Cream_buffer_edit(bufnum) " test current window is not special (calendar, help) before edit " a buffer in it. If it is, we try to switch to a "valid" window " first. " Arguments: buffer number to be edited " ignore specials call Cream_TryAnotherWindow() if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 " go to each tab, test if matches a:bufnum (assumes only one " buffer per tab) let tabcnt = tabpagenr("$") let i = 1 while i <= tabcnt " quit if current if bufnr("%") == a:bufnum break endif tabnext let i = i + 1 endwhile else execute "buffer " . a:bufnum endif endfunction " Cream_TryAnotherWindow() {{{1 function! Cream_TryAnotherWindow(...) " try to go to another window if current is special " optional agument "nonewmod" avoids unnamed modified too let trys = 0 let attempts = Cream_NumberOfWindows("neither") while trys <= attempts let trys = trys + 1 if Cream_buffer_isspecial() == 1 \|| Cream_buffer_isnewunmod() == 1 \|| a:0 > 0 && a:1 == "nonewmod" && Cream_buffer_isnewmod() == 1 call Cream_nextwindow() continue else " found a non-special buffer break endif endwhile endfunction " Cream_TryAnotherBuffer() {{{1 function! Cream_TryAnotherBuffer() " go to another buffer (in same window) if current is special or new let trys = 0 let attempts = Cream_buffer_isspecial("specialct") + Cream_NumberOfBuffers("new") while trys <= attempts let trys = trys + 1 if Cream_buffer_isspecial() == 1 \|| Cream_buffer_isnewunmod() == 1 bnext continue else " found a non-special buffer break endif endwhile endfunction " Cream_buffer_isspecial() {{{1 function! Cream_buffer_isspecial(...) " returns 1 if "special" buffer, 0 if not argument is buffer number " aguments: " empty == "%" " number = [bufnr] " "specialct" = number of special buffers " verify call Cream_buffer_nr() " use current if no buffer number passed if a:0 == 0 let mybufnr = b:cream_nr elseif a:1 == "specialct" return 6 elseif a:1 == "tempbufname" return "_cream_temp_buffer_" else let mybufnr = a:1 endif " true "special" if bufname(mybufnr) == "_opsplorer" \|| bufname(mybufnr) == "__Calendar" \|| bufname(mybufnr) == "__Tag_List__" \|| bufname(mybufnr) == "-- EasyHtml --" " TODO: Only for old file explorer. Removed since it has to poll " file/directory just to test (slow over long connection). "\|| isdirectory(bufname(mybufnr)) return 1 endif " help if Cream_buffer_ishelp(mybufnr) == 1 return 1 endif return 0 endfunction " Cream_buffer_isnewunmod() {{{1 function! Cream_buffer_isnewunmod(...) " returns 1 if new, unmodified buffer, 0 if not " argument is buffer number " use current if no buffer number passed if a:0 == 0 let mybufnr = bufnr("%") else let mybufnr = a:1 endif if bufname(mybufnr) == "" \&& getbufvar(mybufnr, "&modified") == 0 \&& bufexists(mybufnr) == 1 return 1 " no earthly idea why this is here elseif bufexists(mybufnr) == 0 return -1 endif return 0 endfunction " Cream_buffer_isnewmod() {{{1 function! Cream_buffer_isnewmod(...) " returns 1 if new, unmodified buffer, 0 if not " argument is buffer number " use current if no buffer number passed if a:0 == 0 let mybufnr = bufnr("%") else let mybufnr = a:1 endif if bufname(mybufnr) == "" \&& getbufvar(mybufnr, "&modified") == 1 \&& bufexists(mybufnr) == 1 return 1 elseif bufexists(mybufnr) == 0 return -1 endif return 0 endfunction " Cream_buffer_ishelp() {{{1 function! Cream_buffer_ishelp(...) " returns 1 if "help" buffer, 0 if not argument is buffer number " aguments: " empty == "%" " number = [bufnr] " verify call Cream_buffer_nr() " use current if no buffer number passed if a:0 == 0 let mybufnr = b:cream_nr else let mybufnr = a:1 endif if bufexists(mybufnr) == 0 return -1 elseif getbufvar(mybufnr, "&buftype") == "help" return 1 endif return 0 endfunction " NumberOfBuffers() {{{1 function! NumberOfBuffers() " return number of existing buffers " *** This should be part of genutils--it's not Cream-specific *** let i = 0 let j = 0 while i < bufnr('$') let i = i + 1 if bufexists(bufnr("%")) let j = j + 1 endif endwhile return j endfunction " Cream_NumberOfWindows() {{{1 function! Cream_NumberOfWindows(filter) " return the number of Cream windows (buffers currently open/shown) " filtered per argument " (see also NumberOfWindows() ) let i = 1 let j = 0 if a:filter == "special" while winbufnr(i) != -1 if Cream_buffer_isspecial(winbufnr(i)) == 1 let j = j + 1 endif let i = i + 1 endwhile elseif a:filter == "nospecial" while winbufnr(i) != -1 if Cream_buffer_isspecial(winbufnr(i)) == 0 let j = j + 1 endif let i = i + 1 endwhile elseif a:filter == "new" while winbufnr(i) != -1 if Cream_buffer_isnewunmod(winbufnr(i)) == 1 let j = j + 1 endif let i = i + 1 endwhile elseif a:filter == "nonew" while winbufnr(i) != -1 if Cream_buffer_isnewunmod(winbufnr(i)) == 0 let j = j + 1 endif let i = i + 1 endwhile elseif a:filter == "newmod" while i < bufnr('$') let i = i + 1 if Cream_buffer_isnewmod(winbufnr(i)) == 1 let j = j + 1 endif endwhile elseif a:filter == "newunmod" while i < bufnr('$') let i = i + 1 if Cream_buffer_isnewunmod(winbufnr(i)) == 1 let j = j + 1 endif endwhile elseif a:filter == "neither" while winbufnr(i) != -1 " only count if isn't special if Cream_buffer_isspecial(winbufnr(i)) == 0 \&& Cream_buffer_isnewunmod(winbufnr(i)) == 0 let j = j + 1 endif let i = i + 1 endwhile elseif a:filter == "all" while winbufnr(i) != -1 let j = j + 1 let i = i + 1 endwhile else " bad argument let j = 0 endif return j endfunction " Cream_NumberOfBuffers() {{{1 function! Cream_NumberOfBuffers(filter) " return number of buffers filtered per argument let i = 0 let j = 0 if a:filter == "special" while i < bufnr('$') let i = i + 1 if Cream_buffer_isspecial(i) == 1 let j = j + 1 endif endwhile elseif a:filter == "nospecial" while i < bufnr('$') let i = i + 1 if Cream_buffer_isspecial(i) == 0 let j = j + 1 endif endwhile elseif a:filter == "new" while i < bufnr('$') let i = i + 1 if Cream_buffer_isnewunmod(i) == 1 let j = j + 1 endif endwhile elseif a:filter == "nonew" while winbufnr(i) != -1 if Cream_buffer_isnewunmod(i) == 0 let j = j + 1 endif let i = i + 1 endwhile elseif a:filter == "newmod" while i < bufnr('$') let i = i + 1 if Cream_buffer_isnewmod(i) == 1 let j = j + 1 endif endwhile elseif a:filter == "newunmod" while i < bufnr('$') let i = i + 1 if Cream_buffer_isnewunmod(i) == 1 let j = j + 1 endif endwhile elseif a:filter == "neither" while i < bufnr('$') let i = i + 1 if Cream_buffer_isspecial(i) == 0 \&& Cream_buffer_isnewunmod(i) == 0 let j = j + 1 endif endwhile elseif a:filter == "all" while i < bufnr('$') let i = i + 1 if bufnr(i) != -1 let j = j + 1 endif endwhile else " bad argument let j = 0 endif return j endfunction " Cream_bwipeout() {{{1 function! Cream_bwipeout(...) " handle special window/buffer conditions when closing current buffer " *** File save verification must occur before here!! *** " * Optional argument is buffer number to be removed " * Window management here is laissez-faire. (Wrap functions " elsewhere.) " * Buffer managment simply tries to not end in special or new if a:0 == 0 let mybufnr = bufnr("%") else if bufexists(a:1) == 0 call confirm( \ "Error: Buffer number passed to Cream_bwipeout() \n" . \ " doesn't exist. No action taken.\n" . \ "\n", "&Ok", 1, "Info") return endif let mybufnr = a:1 endif " no special buffers "...................................................................... " current is single new--alone if Cream_NumberOfBuffers("all") == 1 \&& Cream_buffer_isnewunmod() == 1 " do nothing return endif "...................................................................... " no special buffers, just normal(s) (and possibly new ones) if Cream_NumberOfBuffers("special") == 0 " simple close--Vim handles merging of existing windows execute "bwipeout! " . mybufnr call Cream_TryAnotherWindow() " setup remaining call Cream_window_setup() return endif " special buffer current (by definition, multiple windows) "...................................................................... " current buffer is special if Cream_buffer_isspecial() == 1 if bufname(mybufnr) == "__Calendar" " unset calendar environment if exists("g:CREAM_CALENDAR") unlet g:CREAM_CALENDAR endif endif " other special buffer conditions here... " go to next named window/buffer call Cream_nextwindow() " close special window/buffer w/out save execute "bwipeout! " . mybufnr " only try if we have at least one non-new/special (otherwise, " we could bounce into one of the specials we're trying to " manage!) if Cream_NumberOfWindows("neither") > 0 call Cream_TryAnotherWindow() endif " setup remaining call Cream_window_setup() return endif " special buffer(s), none current "...................................................................... " current is single new--adjacent to special(s) if Cream_buffer_isnewunmod() == 1 \&& Cream_NumberOfWindows("special") > 0 \&& Cream_NumberOfBuffers("neither") == 0 " do nothing return endif "...................................................................... " current is single *not* new--adjacent to special(s) " (start new file in current window) " * Remember: we've already handled current buffer == special above if Cream_buffer_isnewunmod() == 0 \&& Cream_NumberOfWindows("special") > 0 \&& Cream_NumberOfBuffers("neither") == 1 if Cream_NumberOfBuffers("new") == 0 " start a new buffer in same window (":enew") call Cream_file_new() else " move to new buffer let i = 0 while i < bufnr('$') if Cream_buffer_isnewunmod(i) == 1 execute "buffer " . i break endif let i = i + 1 endwhile endif " then close old buffer execute "bwipeout! " . mybufnr "call Cream_TryAnotherWindow() " setup remaining call Cream_window_setup() return endif "...................................................................... " multiple buffers, all windowed if Cream_NumberOfBuffers("all") <= Cream_NumberOfWindows("all") " let Vim manage windows execute "bwipeout! " . mybufnr call Cream_TryAnotherWindow() " setup remaining call Cream_window_setup() return endif "...................................................................... " multiple buffers, some un-windowed if Cream_NumberOfBuffers("all") > Cream_NumberOfWindows("all") " place next unshown buffer in same window " iterate through buffers, check each if windowed let i = 1 while i <= bufnr('$') " if buffer exists, isn't special, and isn't the " current buffer(!) if bufexists(i) != 0 \&& Cream_buffer_isspecial(i) == 0 \&& Cream_buffer_isnewunmod(i) == 0 \&& bufnr(i) != bufnr("%") " is hidden "\&& bufwinnr(i) == -1 " edit it here execute "buffer " . i " then close old buffer execute "bwipeout! " . mybufnr " stop break endif let i = i + 1 endwhile call Cream_TryAnotherWindow() " setup remaining call Cream_window_setup() return endif "*** DEBUG: call confirm( \ "Whoops! Unexpectedly dropped through Cream_bwipeout()!\n" . \ "(Window and buffer management didn't happen.)\n" . \ "\n", "&Ok", 1, "Info") "*** endfunction " Cream_buffers_delete_untitled() {{{1 function! Cream_buffers_delete_untitled() " wipeout all unnamed, unmodified (Untitled) buffers " get out of any special (including Untitled) call Cream_TryAnotherBuffer() " remember let mybufnr = bufnr("%") let i = 0 while i < bufnr('$') let i = i + 1 if Cream_buffer_isnewunmod(i) == 1 " ignore current buffer if i != mybufnr " delete execute "bwipeout! " . i endif endif endwhile " recall if wasn't deleted if exists("mybufnr") execute "buffer " . mybufnr endif endfunction " Cream_buffers_delete_special() {{{1 function! Cream_buffers_delete_special() " wipeout special buffers "" not in a special "call Cream_TryAnotherBuffer() " remember let mybufnr = bufnr("%") let i = 0 while i < bufnr('$') let i = i + 1 if Cream_buffer_isspecial(i) == 1 " forget current if untitled if mybufnr == i unlet mybufnr endif " delete execute "bwipeout! " . i endif endwhile " recall if wasn't deleted if exists("mybufnr") execute "buffer " . mybufnr endif endfunction " Cream_window_setup() {{{1 function! Cream_window_setup() " general window management, called whenever something opened or closed " turn on equal settings, must be on to specify others(?!) let myequalalways = &equalalways set equalalways " get current window (could be special) let mybuf = bufnr("%") " manage tabs from here, too. if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 call Cream_tabpages_refresh() endif " go to a non-special window (temp, won't be changed below) call Cream_TryAnotherWindow() "" get current (temp) non-special window "let buftemp = bufnr("%") " arrange special windows call Cream_window_setup_special() " restore cursor to original buffer's window call MoveCursorToWindow(bufwinnr(mybuf)) " restore equal split preference let &equalalways = myequalalways endfunction " Cream_window_setup_special() {{{1 function! Cream_window_setup_special() " set all "special" windows to pre-defined locations around a single " primary (working) window. " * Special windows are vertical, to the left (see order below) " * Help window is horizontal below primary window " * Primary window(s) remain untouched " " Strategy: Close everything but non-new/specials, then re-open them. call Cream_window_hide_specials() " parse through each buffer placing specials as found let bufnr = -1 " help (do first so is below all normal windows if horizontal tile) let i = 1 while i <= bufnr('$') if getbufvar(i, "&buftype") == "help" let bufnr = i " re-open in correct position/size execute "botright sbuffer " . bufnr if exists("g:cream_help_size") execute "resize " . g:cream_help_size else execute "resize " . 20 endif endif let i = i + 1 endwhile " easyhtml let bufnr = FindBufferForName("-- EasyHtml --") if bufnr != -1 " re-open in correct position/size execute "topleft vertical sbuffer " . bufnr let mybuf1 = bufnr setlocal nowrap setlocal nonumber endif " taglist let bufnr = FindBufferForName("__Tag_List__") if bufnr != -1 "" always split from the same window (our temp) "execute "call MoveCursorToWindow(bufwinnr(" . buftemp . "))" " re-open in correct position/size execute "topleft vertical sbuffer " . bufnr let mybuf2 = bufnr setlocal nowrap setlocal nonumber endif " calendar let bufnr = FindBufferForName("__Calendar") if bufnr != -1 " re-open in correct position/size execute "topleft vertical sbuffer " . bufnr let mybuf3 = bufnr setlocal nowrap setlocal nonumber endif " explorer -- this is going to be obsolete, let's pass " " opsplorer let bufnr = FindBufferForName("_opsplorer") if bufnr != -1 " re-open in correct position/size execute "topleft vertical sbuffer " . bufnr let mybuf4 = bufnr setlocal nowrap setlocal nonumber endif " resize (after all have been opened) if exists("mybuf4") call MoveCursorToWindow(bufwinnr(mybuf4)) topleft vertical resize 25 endif if exists("mybuf3") call MoveCursorToWindow(bufwinnr(mybuf3)) topleft vertical resize 22 endif if exists("mybuf2") call MoveCursorToWindow(bufwinnr(mybuf2)) topleft vertical resize 30 endif if exists("mybuf1") call MoveCursorToWindow(bufwinnr(mybuf1)) topleft vertical resize 25 endif endfunction " Cream_window_hide() {{{1 function! Cream_window_hide(bufnr) " hide all windows matching bufnr " argument: second (optional) is 1 if special, 0 if normal " * cursor drop controled by Vim, wrapper should manage " * buffer name is actually accepted, too, but a bad idea " turn off equal settings so special widths are retained let myequalalways = &equalalways set equalalways " no buffer by this number exists, but isn't help if bufexists(a:bufnr) == 0 \&& Cream_buffer_ishelp(a:bufnr) != 1 return endif " no window associated if bufwinnr(a:bufnr) == -1 return endif " go to it's window call MoveCursorToWindow(bufwinnr(a:bufnr)) ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " a:bufnr = \"" . a:bufnr . "\"\n" . " \ " bufwinnr(a:bufnr) = \"" . bufwinnr(a:bufnr) . "\"\n" . " \ " bufnr(\"%\") = \"" . bufnr("%") . "\"\n" . " \ " bufname(\"%\") = \"" . bufname("%") . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** " hide if currently open hide ""*** DEBUG: "let n = confirm( " \ "DEBUG: (post hide)\n" . " \ " a:bufnr = \"" . a:bufnr . "\"\n" . " \ " bufwinnr(a:bufnr) = \"" . bufwinnr(a:bufnr) . "\"\n" . " \ " bufnr(\"%\") = \"" . bufnr("%") . "\"\n" . " \ " bufname(\"%\") = \"" . bufname("%") . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** " restore equal split preference let &equalalways = myequalalways endfunction " Cream_window_hide_specials() {{{1 function! Cream_window_hide_specials() " hide all special windows let myct = bufnr("$") let i = 1 while i <= myct if Cream_buffer_isspecial(i) == 1 " hide call Cream_window_hide(i) endif let i = i + 1 endwhile endfunction " Cream_window_setup_tile() {{{1 function! Cream_window_setup_tile(layout) " set up non-special buffer windows in tile mode in the (current) " primary pane " * Argument is orientation: "vertical" or "horizontal" " * Assumes the current pane is alone! " * Assumes specials set elsewhere " * Sorts according to buffer number " only do it if more than one non-special (solves div by 0 " problem, too) let bufct = Cream_NumberOfBuffers("neither") if bufct <= 1 return endif " get out of specials call Cream_TryAnotherWindow() " remember current buffer let mybufnr = bufnr("%") "*** TEST: if we leave them open, Vim will account for them in spacing decisions. " hide specials call Cream_window_hide_specials() "*** " do not start with new unmod as current call Cream_TryAnotherBuffer() " make lowest non-special exposed buffer current *and only* let i = 1 while i <= bufnr("$") " non-special, non-new, must exist in a window in case " other non-specials are hidden if bufexists(i) > 0 \&& Cream_buffer_isspecial(i) == 0 \&& Cream_buffer_isnewunmod(i) == 0 "*** don't understand why it has to be shown, we're changing " it to an :only window anyway. *** "\&& bufwinnr(i) != -1 execute "buffer " . i let startbufnr = i break endif let i = i + 1 endwhile " couldn't find non-special buffer in a window if !exists("startbufnr") " equal to current let startbufnr = 0 endif " make a single window only " capture environment let mysplitright = &splitright let mysplitbelow = &splitbelow " turn on equal settings let myequalalways = &equalalways set equalalways " split if a:layout ==? "vertical" " split right set splitright set nosplitbelow " split primary window into equal portions " width equals primary win divided by no. of non-special bufs let mywidth = winwidth(0) / bufct elseif a:layout ==? "horizontal" " split below set nosplitright set splitbelow " split primary window into equal portions " height equals primary win divided by no. of non-special bufs let mywidth = winheight(0) / bufct endif " split off buffers, highest first let i = bufnr("$") while i > 0 " non-special, non-new only if bufexists(i) > 0 \&& Cream_buffer_isspecial(i) == 0 \&& Cream_buffer_isnewunmod(i) == 0 \&& i != startbufnr if a:layout ==? "vertical" execute "topleft vertical sbuffer " . i execute mywidth . "wincmd \|" elseif a:layout ==? "horizontal" execute "botright sbuffer " . i execute mywidth . "wincmd _" endif " move back to original window call MoveCursorToWindow(bufwinnr(startbufnr)) endif let i = i - 1 endwhile " restore equal split preference let &equalalways = myequalalways " restore environment let &splitright = mysplitright let &splitbelow = mysplitbelow " arrange windows call Cream_window_setup() " go to the original window (could be special) call MoveCursorToWindow(bufwinnr(mybufnr)) endfunction " Cream_window_setup_maximize() {{{1 function! Cream_window_setup_maximize() " ":only" ruins specials setup... handle. " don't maximize specials if Cream_buffer_isspecial(bufnr("%")) call confirm( \ "Can't maximize a special window.\n" . \ "\n", "&Ok", 1, "Info") return endif " already maximized if only one non-special exists if Cream_NumberOfWindows("neither") == 1 call confirm( \ "Can't maximize any further.\n" . \ "\n", "&Ok", 1, "Info") return endif " make only only " arrange specials call Cream_window_setup() endfunction " Cream_window_setup_minimize() {{{1 function! Cream_window_setup_minimize() " ":hide" can ruin specials setup... handle. " don't minimize specials if Cream_buffer_isspecial(bufnr("%")) call confirm( \ "Can't minimize a special window.\n" . \ "\n", "&Ok", 1, "Info") return endif " already minimized if only one non-special exists if Cream_NumberOfWindows("nospecial") == 1 call confirm( \ "Can't minimize the last window.\n" . \ "\n", "&Ok", 1, "Info") return endif " :hide hide " arrange specials call Cream_window_setup() endfunction "}}}1 " Window width/heights {{{1 function! Cream_window_equal() wincmd = endfunction function! Cream_window_height_max() wincmd _ endfunction function! Cream_window_height_min() "wincmd 1_ "execute 'normal z1' resize 1 endfunction function! Cream_window_width_max() wincmd | endfunction function! Cream_window_width_min() wincmd 1| endfunction " }}}1 " Window splits {{{1 function! Cream_window_new_ver() vnew endfunction function! Cream_window_new_hor() new endfunction function! Cream_window_split_exist_ver() wincmd v endfunction function! Cream_window_split_exist_hor() wincmd s endfunction " 1}}} " Tab pages " Cream_tabpages_init() {{{1 function! Cream_tabpages_init() " Initialize tab state. " uninitialized (no tabs exist to manage) if !exists("g:CREAM_TABPAGES") let g:CREAM_TABPAGES = 0 " convert multiple tabs to one elseif g:CREAM_TABPAGES == 0 set guioptions-=e set showtabline=0 " multiple could exist, convert to tabs elseif g:CREAM_TABPAGES == 1 " set 1: avoid default titles on startup call Cream_tabpages_labels() set guioptions+=e set sessionoptions+=tabpages set showtabline=2 " set 2: refresh tab line call Cream_tabpages_labels() if Cream_NumberOfBuffers("neither") > 0 """" get out of specials before refreshing """call Cream_TryAnotherWindow() " don't tab untitled or special call Cream_buffers_delete_untitled() " TODO: manage these in the current tab, don't delete call Cream_buffers_delete_special() endif endif endfunction " Cream_tabpages_toggle() {{{1 function! Cream_tabpages_toggle() " Turn the tab bar on and off. if exists("g:CREAM_TABPAGES") if g:CREAM_TABPAGES == 0 let g:CREAM_TABPAGES = 1 call Cream_tabpages_init() elseif g:CREAM_TABPAGES == 1 let g:CREAM_TABPAGES = 0 call Cream_tabpages_init() endif endif call Cream_menu_settings_preferences() endfunction " Cream_tabpages_labels() {{{1 function! Cream_tabpages_labels() set guitablabel=%{Cream_statusline_filename()}%{Cream_tabpages_filestate()} endfunction " Cream_tabpages_filestate() {{{1 function! Cream_tabpages_filestate() " Return tab label file modified state. " Note: Unlike similar function for statusline, this function ignores " everything but modified state. if &modified != 0 return '*' else return '' endif endfunction " Cream_tabpages_refresh() {{{1 function! Cream_tabpages_refresh() " ensure one buffer per tab and refresh titles " remember current buffer let mybuf = bufnr("%") " start fresh "" get out of any specials "call Cream_TryAnotherBuffer() " kill off non-memorable buffers now hidden call Cream_buffers_delete_untitled() " make sure we haven't deleted it already if !bufexists(mybuf) return endif " close all tabs but one (silence if we only have one) silent! tabonly! " make first tab the first buffer bfirst " open a new tab for each non-special buffer let i = bufnr("%") while i < bufnr('$') let i = i + 1 if Cream_buffer_isspecial(i) != 1 \&& Cream_buffer_isnewunmod(i) != 1 \&& bufexists(i) " Broken, cannot ":tabedit bufnr" "execute "tabedit " . bufname(i) " TODO: The next two lines create a bunch of " hidden untitled buffers which we hack-fix following. tabedit execute "buffer " . i endif endwhile " kill off non-memorable buffers now hidden call Cream_buffers_delete_untitled() " restore current buffer call Cream_tab_goto(mybuf) " TODO: need window/tab/highlighting refresh? redraw! endfunction " Cream_tab_goto(bufnr) {{{1 function! Cream_tab_goto(bufnr) " Make tab active that contains {buffer}. " skip if not turned on if !exists("g:CREAM_TABPAGES") || g:CREAM_TABPAGES == 0 return endif let i = 1 while i <= tabpagenr('$') " we match, stop if bufnr("%") == a:bufnr break endif tabnext let i = i + 1 endwhile endfunction """function! Cream_tabnr(bufnr) """" Return the tab number containing {bufnr}. """ """ " TODO: cleanup: Is there anyway to do this without paging all the """ " tabs twice?! """ """ " remember this buffer(tab) """ let mybufnr = bufnr("%") """ " go to bufnr """ call Cream_tab_goto(a:bufnr) """ " remember bufnr """ let bufnr = bufnr("%") """ " restore original tab """ call Cream_tab_goto(mybufnr) """ return bufnr """ """endfunction " Cream_tabs_focusgained() {{{1 function! Cream_tabs_focusgained() " fix when buffer externally added to session if !exists("g:CREAM_FOCUS_BUFNR") return endif " quit if no new buffer (old and new the same) if g:CREAM_FOCUS_BUFNR == bufnr("%") return endif " one buffer per tab call Cream_window_setup() " put this new tab after the previous current tab execute "tabmove " . tabpagenr() endfunction " Cream_tabs_focuslost() {{{1 function! Cream_tabs_focuslost() " remember current buffer when focus lost let g:CREAM_FOCUS_BUFNR = bufnr("%") endfunction " Cream_tab_move_left() {{{1 function! Cream_tab_move_left() " Move the current tab one tab to the left in a circular fashion " i.e. if the tab is already at the leftmost position, move it all " the way over to the right again. if tabpagenr() == 1 execute "tabmove " . tabpagenr("$") else execute "tabmove " . (tabpagenr()-2) endif " Re-sync the tabs with the file buffers call Cream_window_setup() endfunction " Cream_tab_move_right() {{{1 function! Cream_tab_move_right() " Move the current tab one tab to the right in a circular fashion " i.e. if the tab is already at the rightmost position, move it " all the way over to the left again. if tabpagenr() == tabpagenr("$") tabmove 0 else execute "tabmove " . tabpagenr() endif " Re-sync the tabs with the file buffers call Cream_window_setup() endfunction " Cream_tab_move_first() {{{1 function! Cream_tab_move_first() " Make the current tab first (move it to the far left) " nothing if already there if tabpagenr() == 1 return endif tabmove 0 " Re-sync the tabs with the file buffers call Cream_window_setup() endfunction " Cream_tab_move_last() {{{1 function! Cream_tab_move_last() " Make the current tab last (move it to the far right) " nothing if already there if tabpagenr() == tabpagenr("$") return endif tabmove " Re-sync the tabs with the file buffers call Cream_window_setup() endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-colors-chocolateliquor.vim0000644000076400007660000000420711156572440021416 0ustar digitectlocaluser" Vim color file " Maintainer: Gerald S. Williams " Last Change: 2003 Apr 17 " This started as a dark version (perhaps opposite is a better term) of " PapayaWhip, but took on a life of its own. Easy on the eyes, but still " has good contrast. Not bad on a color terminal, either (of course, on " my color terms, Black == #3f1f1f and White == PapayaWhip :-P ). " " Only values that differ from defaults are specified. set background=dark hi clear if exists("syntax_on") syntax reset endif "let g:colors_name = "ChocolateLiquor" hi Normal guibg=#3f1f1f guifg=PapayaWhip ctermfg=White "hi NonText guifg=Brown ctermfg=Brown hi LineNr guibg=#1f0f0f guifg=Brown2 hi DiffDelete guibg=DarkRed guifg=White ctermbg=DarkRed ctermfg=White hi DiffAdd guibg=DarkGreen guifg=White ctermbg=DarkGreen ctermfg=White hi DiffText gui=NONE guibg=DarkCyan guifg=Yellow ctermbg=DarkCyan ctermfg=Yellow hi DiffChange guibg=DarkCyan guifg=White ctermbg=DarkCyan ctermfg=White hi Constant ctermfg=Red hi Comment guifg=LightBlue3 hi PreProc guifg=Plum ctermfg=Magenta hi StatusLine guibg=White guifg=Sienna4 cterm=NONE ctermfg=Gray ctermbg=Brown hi StatusLineNC gui=NONE guifg=Black guibg=Gray ctermbg=Black ctermfg=Gray hi VertSplit guifg=Gray hi Search guibg=Gold3 ctermfg=White hi Type gui=NONE guifg=DarkSeaGreen2 hi Statement gui=NONE guifg=Gold3 "+++ Cream: " invisible characters highlight NonText guifg=#cc6666 guibg=#331313 gui=none highlight SpecialKey guifg=#cc6666 guibg=#3f1f1f gui=none " statusline highlight User1 gui=bold guifg=#998833 guibg=#0c0c0c highlight User2 gui=bold guifg=#ccbb99 guibg=#0c0c0c highlight User3 gui=bold guifg=#ffffaa guibg=#0c0c0c highlight User4 gui=bold guifg=#00cccc guibg=#0c0c0c " bookmarks highlight Cream_ShowMarksHL gui=bold guifg=#ffffaa guibg=#000000 ctermfg=blue ctermbg=lightblue cterm=bold " spell check highlight BadWord gui=bold guifg=#000000 guibg=#665555 ctermfg=black ctermbg=lightblue " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#6f3f3f " email highlight EQuote1 guifg=#ccaa99 highlight EQuote2 guifg=#bb7766 highlight EQuote3 guifg=#995544 highlight Sig guifg=#cc6666 "+++ cream-0.43/cream-replacemulti.vim0000644000076400007660000006103611517300720017402 0ustar digitectlocaluser" " Filename: cream-replacemulti.vim " Updated: 2005-01-20 22:32:47-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: {{{1 " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: {{{1 " " This script replaces text across multiple files. It is a pure Vim " implementation and does not depend on external utilties that do " similar things (like sed, grep, cat, or Find). As such, it is " cross-platform and has been tested on both Windows95/XP and Linux. " " Replace Multi is intended to be used in the GUI version of Vim, " gVim. It presents a rather hackish dialog to take user input for the " Find, Replace, and Path components and present options for Case " Sensitivity and the use of Vim's Regular Expressions. (Some day in " the future it might be adapted to work from the command line without " a dialog.) " " In testing, Replace Multi performed a replacment operation on 1000 " small files in 25 seconds. (2.80Ghz Windows XP machine with 1Gb of " RAM.) Obviously various Vim and system settings could vary greatly, " but as a benchmark this is about 40 files/second. " " ToDos: {{{1 " " Other (potential) bells and whistles to be added: " * Actual testing of non-alpha/numeric characters. ;) " * Search subdirectories option " * Provide a commandline version " * Prevent files from showing up on Recent File or Buffers menu " " 1}}} " " Dependencies: " ******************************************************************** " This script depends on Multivals, available from: " http://www.vim.org/script.php?script_id=171. " ******************************************************************** " " Cream_replacemulti() {{{1 function! Cream_replacemulti() " Main function " save guioptions environment let myguioptions = &guioptions " do not use a vertical layout for dialog buttons set guioptions-=v " initialize variables if don't exist (however, remember if they do!) if !exists("g:CREAM_RMFIND") let g:CREAM_RMFIND = 'Find Me!' endif if !exists("g:CREAM_RMREPL") let g:CREAM_RMREPL = 'Replace Me!' endif " let's always get the current directory and don't remember previous(good idea?) " * Would be good if we could somehow have another button on the " inputdialog() box for path that reads "Get Current", but this function " doesn't have this feature (yet). if !exists("g:CREAM_RMPATH") " hmmm... buggy "let g:CREAM_RMPATH = Cream_path_fullsystem(getcwd(), "unix") " try this... if exists("$CREAM") let g:CREAM_RMPATH = Cream_path_fullsystem(expand("%:p:h"), "unix") else let g:CREAM_RMPATH = s:Cream_path_fullsystem(expand("%:p:h"), "unix") endif endif " option: case sensitive? (1=yes, 0=no) if !exists("g:CREAM_RMCASE") " initialize on let g:CREAM_RMCASE = 0 endif " option: regular expressions? (1=yes, 0=no) if !exists("g:CREAM_RMREGEXP") " initialize off let g:CREAM_RMREGEXP = 0 endif "*** No more warning "" beta warning "call confirm( " \ "NOTICE:\n" . " \ "\n" . " \ "This tool is still beta quality. Use at your own risk!\n" . " \ "\n" . " \ "(But please forward us any bugs you find!)\n", " \ "&Ok", 1, "Warning") "*** " get find, replace and path/filename info (verifying that Find and Path " aren't empty, too) let valid = 0 while valid == 0 " get find, replace and path/filename info let myreturn = s:Cream_replacemulti_request(g:CREAM_RMFIND, g:CREAM_RMREPL, g:CREAM_RMPATH) " if quit code returned if myreturn == 2 break " verify criticals aren't empty (user pressed 'ok') elseif myreturn == 1 let valid = s:Cream_replacemulti_verify() endif endwhile " if not quit code, continue if myreturn != 2 " warning let myproceed = s:Cream_replacemulti_warning() ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " g:CREAM_RMFIND = " . g:CREAM_RMFIND . "\n" . " \ " g:CREAM_RMREPL = " . g:CREAM_RMREPL . "\n" . " \ " g:CREAM_RMPATH = " . g:CREAM_RMPATH . "\n" . " \ " myreturn = " . myreturn . "\n" . " \ " myproceed = " . myproceed . "\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** if myproceed != 0 " DO FIND/REPLACE! (Critical file states are verified within.) if valid == 1 call s:Cream_replacemulti_doit() else return endif else " do nothing return endif endif " restore guioptions execute "set guioptions=" . myguioptions endfunction " s:Cream_replacemulti_warning() {{{1 function! s:Cream_replacemulti_warning() " simple death/destruction warning, last chance to bail let msg = "Warning! This action is about modify the contents of\n" . \ "multiple files based on the previous dialog's settings.\n" let msg = msg . "\n" let msg = msg . " Continue?" let mychoice = confirm(msg, "&Ok\n&Cancel", 1, "Info") if mychoice == 0 return elseif mychoice == 1 return 1 elseif mychoice == 2 return else " error call confirm("Error in s:Cream_replacemulti_warning(). Unexpected result.", "&Ok", 1, "Error") endif endfunction " s:Cream_replacemulti_request() {{{1 function! s:Cream_replacemulti_request(myfind, myrepl, mypath) " Dialog to obtain user information (find, replace, path/filename) " * returns 0 for not finished (so can be recalled) " * returns 1 for finished " * returns 2 for quit " escape ampersand with second ampersand in dialog box " * JUST for display " * Just for Windows if has("win32") \|| has("win16") \|| has("win95") \|| has("dos16") \|| has("dos32") let myfind_fixed = substitute(a:myfind, "&", "&&", "g") let myrepl_fixed = substitute(a:myrepl, "&", "&&", "g") else let myfind_fixed = a:myfind let myrepl_fixed = a:myrepl endif let mychoice = 0 let msg = "INSTRUCTIONS:\n" let msg = msg . "* Enter the literal find and replace text below.\n" let msg = msg . "* Use \"\\n\" to represent new lines and \"\\t\" for tabs.\n" let msg = msg . "* Use wildcards as needed when entering path and filename.\n" let msg = msg . "* Please read the Vim help to understand regular expressions (:help regexp)\n" let msg = msg . "\n" let msg = msg . "\n" let msg = msg . "FIND: " . myfind_fixed . " \n" let msg = msg . "\n" let msg = msg . "REPLACE: " . myrepl_fixed . " \n" let msg = msg . "\n" let msg = msg . "PATH and FILENAME(S): " . a:mypath . " \n" let msg = msg . "\n" let msg = msg . "\n" let msg = msg . "OPTIONS:\n" if g:CREAM_RMCASE == 1 let msg = msg . " [X] Yes [_] No Case Sensitive\n" else let msg = msg . " [_] Yes [X] No Case Sensitive\n" endif if g:CREAM_RMREGEXP == 1 let msg = msg . " [X] Yes [_] No Regular Expressions\n" else let msg = msg . " [_] Yes [X] No Regular Expressions\n" endif let msg = msg . "\n" let mychoice = confirm(msg, "&Find\n&Replace\n&Path/Filename\nOp&tions\n&Ok\n&Cancel", 1, "Info") if mychoice == 0 " quit via Esc, window close, etc. (OS specific) return 2 elseif mychoice == 1 " call dialog to get find string call s:Cream_replacemulti_find(g:CREAM_RMFIND) return elseif mychoice == 2 " call dialog to get replace string call s:Cream_replacemulti_repl(g:CREAM_RMREPL) return elseif mychoice == 3 " call dialog to get path string call s:Cream_replacemulti_path(g:CREAM_RMPATH) return elseif mychoice == 4 " call dialog to set options. Continue to show until Ok(1) or Cancel(2) let valid = '0' while valid == '0' " let user set options let myreturn = s:Cream_replacemulti_options() " if Ok or Cancel, go back to main dialog if myreturn == 1 || myreturn == 2 let valid = 1 endif endwhile return elseif mychoice == 5 " user thinks ok, return positive for actual verification return 1 elseif mychoice == 6 " quit return 2 endif call confirm("Error in s:Cream_replacemulti_request(). Unexpected result.", "&Ok", "Error") return 2 endfunction " Get input through dialog " * Would be nice to detect Ok or Cancel here. (Cancel returns an empty string.) " * These stupid spaces are to work around a Windows GUI problem: Input is only " allowed to be as long as the actual input box. Therefore, we're widening the " dialog box so the input box is wider. ;) " s:Cream_replacemulti_find() {{{1 function! s:Cream_replacemulti_find(myfind) let myfind = inputdialog("Please enter a string to find... " . \" " . \" " . \" " . \" ", a:myfind) " if user cancels, returns empty. Don't allow. if myfind != "" let g:CREAM_RMFIND = myfind endif return endfunction " s:Cream_replacemulti_repl() {{{1 function! s:Cream_replacemulti_repl(myrepl) let myrepl = inputdialog("Please enter a string to replace..." . \" " . \" " . \" " . \" ", a:myrepl) " allow empty return, but verify not a cancel if myrepl == "" let mychoice = confirm( \ "Replace was found empty.\n" . \ "\n" . \ "(This is legal, but was it your intention?)\n", \ "&Leave\ empty\n&No,\ put\ back\ what\ I\ had", 2, "Question") if mychoice == 2 " leave global as is else let g:CREAM_RMREPL = "" endif else let g:CREAM_RMREPL = myrepl endif return endfunction " s:Cream_replacemulti_path() {{{1 function! s:Cream_replacemulti_path(mypath) let mypath = inputdialog("Please enter a path and filename... (Wildcards allowed.)" . \" " . \" " . \" " . \" ", a:mypath) " if user cancels, returns empty. Don't allow. if mypath != "" let g:CREAM_RMPATH = mypath endif return endfunction " s:Cream_replacemulti_options() {{{1 function! s:Cream_replacemulti_options() let mychoice = 0 let msg = "Options:\n" let msg = msg . "\n" let msg = msg . "\n" if g:CREAM_RMCASE == 1 let strcase = "X" else let strcase = "_" endif if g:CREAM_RMREGEXP == 1 let strregexp = "X" else let strregexp = "_" endif let msg = msg . " [" . strcase . "] Case Sensitive\n" let msg = msg . " [" . strregexp . "] Regular Expressions\n" let msg = msg . "\n" let mychoice = confirm(msg, "Case\ Sensitive\nRegular\ Expressions\n&Ok", 1, "Info") if mychoice == 0 " quit via Esc, window close, etc. (OS specific) return 2 elseif mychoice == 1 " case sensitive if g:CREAM_RMCASE == 1 let g:CREAM_RMCASE = 0 else let g:CREAM_RMCASE = 1 endif return elseif mychoice == 2 " regular expressions if g:CREAM_RMREGEXP == 1 let g:CREAM_RMREGEXP = 0 else let g:CREAM_RMREGEXP = 1 endif return elseif mychoice == 3 " ok return 1 endif return endfunction " s:Cream_replacemulti_verify() {{{1 function! s:Cream_replacemulti_verify() " Verify that Find and Path not empty (although Replace can be) " * Returns '1' when valid if g:CREAM_RMFIND == '' call confirm("Find may not be empty.", "&Ok", "Warning") return elseif g:CREAM_RMPATH == '' call confirm("Path/Filename may not be empty.", "&Ok", "Warning") return else return 1 endif endfunction " s:Cream_replacemulti_doit() {{{1 function! s:Cream_replacemulti_doit() " Main find/replace function. Also validates files and state " get files {{{2 let myfiles = "" " get file list " Note: Wildcard "*" for filename won't return files beginning with dot. " (Must use ".*" to obtain.) if exists("$CREAM") let myfiles = Cream_path_fullsystem(glob(g:CREAM_RMPATH), "unix") else let myfiles = s:Cream_path_fullsystem(glob(g:CREAM_RMPATH), "unix") endif " (from explorer.vim) " Add the dot files now, making sure "." is not included! "let myfiles = substitute(Cream_path_fullsystem(glob(g:rmpath), "unix"), "[^\n]*/./\\=\n", '' , '') " add a blank line at the end if myfiles != "" && myfiles !~ '\n$' let myfiles = myfiles . "\n" endif " " create file list {{{2 ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " myfiles:\n" . " \ myfiles . "\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** " count files (big assumption: number of newlines == number of files!) let filecount = MvNumberOfElements(myfiles, "\n") " initialize variables let newline = "\n" let mypos = 0 let myposnew = 0 let i = 0 " iterate through files (do while newline still found in listing) while myposnew != -1 let myposnew = match(myfiles, newline, mypos) "*** DEBUG: "let temp = confirm("DEBUG:\n" . " \" filecount = " . filecount . "\n" . " \" strlen(newline) = " . strlen(newline) . "\n" . " \" mypos = " . mypos . "\n" . " \" myposnew = " . myposnew . "\n" . " \" i = " . i " \, "&Ok\n&Cancel") "if temp == 2 " break "endif "*** if myposnew != -1 let i = i + 1 " get string let myfile{i} = strpart(myfiles, mypos, myposnew - mypos) " advance position to just after recently found newline let mypos = myposnew + strlen(newline) "*** DEBUG: "call confirm("DEBUG:\n File " . i . ": " . "|" . myfile{i} . "|", "&Ok") "*** else break endif endwhile " list file count and file names if less than 25 if filecount > 25 let mychoice = confirm( \" Total number of files: " . filecount . "\n" . \"\n", "&Ok\n&Cancel", 1, "Info") else let mychoice = confirm( \" Total number of files: " . filecount . "\n" . \"\n" . \" Files to be modified... \n" . myfiles . "\n" . \"\n", "&Ok\n&Cancel", 1, "Info") endif " Prompt: continue? if mychoice != 1 let filecount = 0 let myabort = 1 endif " " find/replace in files (validating files prior to operation) {{{2 if filecount == 0 if exists("myabort") call confirm("Operation aborted.", "&Ok", "Info") else call confirm("No files were found to act upon!", "&Ok", "Info") endif return endif " strings " * use local variable to maintain global strings " * work around ridiculous differences between {pattern} and {string} let myfind = g:CREAM_RMFIND let myrepl = g:CREAM_RMREPL " capture current magic state let mymagic = &magic " turn off if mymagic == "1" set nomagic endif " case-sensitive if g:CREAM_RMCASE == 1 let mycase = "I" else let mycase = "i" endif " regular expressions if g:CREAM_RMREGEXP == 1 let myregexp = "" set magic else let myregexp = "\\V" set nomagic " escape strings " escape all backslashes " * This effectively eliminates ALL magical special pattern " meanings! Only those patterns "unescaped" at the next step " become effective. (Diehards are gonna kill us for this.) let myfind = substitute(myfind, '\\', '\\\\', 'g') let myrepl = substitute(myrepl, '\\', '\\\\', 'g') " un-escape desired escapes " * Anything not recovered here is escaped forever ;) let myfind = substitute(myfind, '\\\\n', '\\n', 'g') let myfind = substitute(myfind, '\\\\t', '\\t', 'g') let myrepl = substitute(myrepl, '\\\\n', '\\n', 'g') let myrepl = substitute(myrepl, '\\\\t', '\\t', 'g') " escape slashes so as not to thwart the :s command below! let myfind = substitute(myfind, '/', '\\/', 'g') let myrepl = substitute(myrepl, '/', '\\/', 'g') " replace string requires returns instead of newlines let myrepl = substitute(myrepl, '\\n', '\\r', 'g') endif " save options {{{2 " turn off redraw let mylazyredraw = &lazyredraw set lazyredraw " turn off swap let myswapfile = &swapfile set noswapfile " turn off undo let myundolevels = &undolevels set undolevels=-1 " ignore autocmds let myeventignore = &eventignore set eventignore=all " unload buffers let myhidden = &hidden set nohidden " Edit, Replace, Write, close {{{2 " (the main point!) " " * Force edit/replace/write/close here (we should have already " picked up errors in validation) " * We do NOT allow regexp at the moment. Thus, " - magic is turned off " - substitution uses \V (see :help \V) " - ALL escaped characters are disallowed, save 2 ("\n" and " "\t") This is accomplished by escaping all the backslashes " and then un-escaping just those two. " initialize iterations let i = 0 " initialize errorlog let myerrorlog = "" " iterate while less than the total file count while i < filecount let i = i + 1 ""*** Don't validate, too slow " " validate " "let myerror = s:Cream_replacemulti_validate(myfile{i}) " let myerror = "" " "*** " " proceed if empty (valid) " if myerror == "" " cmdheight for echo let mycmdheight = &cmdheight set cmdheight=2 echo " Progress: " . i . " of " . filecount . " (" . ((i*100) / filecount) . "%)" let &cmdheight = mycmdheight " open file execute "silent! edit! " . myfile{i} " find/replace ( :s/{pattern}/{string}/{options} ) " * {command} " % -- globally across the file " * {pattern} " \V -- eliminates magic (ALL specials must be escaped, most " of which we thwarted above, MWUHAHAHA!!) " * {string} " * {options} " g -- global " e -- skip over minor errors (like "not found") " I -- don't ignore case " i -- ignore case " condition based on options let mycmd = ':silent! %s/' . myregexp . myfind . '/' . myrepl . '/ge' . mycase "*** DEBUG: "let mychoice = confirm("DEBUG:\n mycmd = " . mycmd, "&Ok\n&Cancel", 1) "if mychoice == 1 "endif " do it! execute mycmd "*** " save only if modified if &modified == "1" " save file execute "silent! write! " . myfile{i} endif " close file (delete from buffer as is our preference ;) execute "silent! bwipeout!" " else " "*** DEBUG: " "call confirm("DEBUG:\n Bypassing operation on file:\n\n " . myfile{i}, "&Ok") " "*** " " log error if not valid " let myerrorlog = myerrorlog . myerror " endif "*** end validation endwhile " restore options {{{2 " restore let &lazyredraw = mylazyredraw let &swapfile = myswapfile let &undolevels = myundolevels let &eventignore = myeventignore let &hidden = myhidden " return magic state if mymagic == "1" set magic else set nomagic endif unlet mymagic ""*** DEBUG "" iterate only the first few files "let g:bob = 1 "if g:bob < 3 " let msg = "DEBUG: (operation completed)\n" " let msg = msg . " Find: " . myfind . "\n" " let msg = msg . " \n" " let msg = msg . " Replace: " . myrepl . "\n" " let msg = msg . " \n" " let msg = msg . " Filename: " . myfile{i} . " \n" " let msg = msg . " \n" " let msg = msg . " \n" "call confirm(msg, "&Ok", 1) "endif "let g:bob = g:bob + 1 ""*** if myerrorlog != "" call confirm("Difficulties were encountered during the operation:\n\n" . myerrorlog, "&Ok", "Error") endif " 2}}} endfunction " s:Cream_replacemulti_validate() {{{1 function! s:Cream_replacemulti_validate(filename) " Validate a file for editing " * Returns empty if valid " * Returns string describing error if not valid " * Argument must include full path " log error in this string (always returned; so if empty, valid) let errorlog = "" "...................................................................... " do tests " is writable? let test1 = filewritable(a:filename) " has DOS binary extension? if has("dos16") || \ has("dos32") || \ has("win16") || \ has("win32") let test2 = match(a:filename, "exe", strlen(a:filename) - 3) " if return no match if test2 == '-1' " try 'com' let test2 = match(a:filename, "com", strlen(a:filename) - 3) " if yes, make return code different to distinguish if test2 != '-1' " found, return error code let test2 = '1' else let test2 = '0' endif else " assign error code let test2 = '-1' endif else let test2 = '0' endif " file is currently a buffer [distinguish buflisted() and bufloaded()] " * bufexists() returns 0 if doesn't exist, buffer number if does let test3 = bufexists(a:filename) "...................................................................... " log errors (if any) if test1 == '0' || test1 == '2' || \ test2 == '1' || test2 == '-1' || \ test3 != '0' " if an error, start with the file name let errorlog = errorlog . "\n" . a:filename . ":\n" " filewritable if test1 == '0' || test1 == '2' let errorlog = errorlog . " * Not writable -- " if test1 == '0' let errorlog = errorlog . "Unable to write file (perhaps read-only or all ready open?)\n" elseif test1 == '2' let errorlog = errorlog . "Filename is a directory\n" endif endif " has DOS binary extension if test2 == '1' || test2 == '-1' let errorlog = errorlog . " * Window program file (binary) -- " if test2 == '-1' let errorlog = errorlog . ".exe file\n" elseif test2 == '1' let errorlog = errorlog . ".com file\n" endif endif " is an existing buffer if test3 != '0' let errorlog = errorlog . " * Buffer currently open " endif endif "*** DEBUG: "if errorlog != "" " call confirm("DEBUG:\n Cream_multireplace_validate(), errorlog:\n" . errorlog, "&Ok") "endif "*** return errorlog endfunction " 1}}} " ******************************************************************** " Localised duplicate Cream functions " " Functions below are localised versions of global library functions " duplicated here for portability of this script outside of the Cream " environment. " ******************************************************************** " s:Cream_path_fullsystem() {{{1 function! s:Cream_path_fullsystem(path, ...) " Return a completely expanded and valid path for the current system " from string {path}. " o Path does not have to exist, although generally invalid formats " will not usually be properly expanded (e.g., backslash path separators " on Unix). " o Both files and directories may be processed. (Paths will not be " returned with a trailing path separator.) " o Preserves Windows UNC server name preceding "\\". " o {optional} argument can be used to override system settings: " * "win" forces return in Windows format as possible: " - No drive letter is added (none can be assumed) " * "unix" forces return to Unix format as possible: " - Windows drive letter is not removed " " format type " forced with argument if a:0 == 1 if a:1 == "win" let format = "win" elseif a:1 == "unix" let format = "unix" endif endif " detected if not forced if !exists("format") if Cream_has("ms") let format = "win" else let format = "unix" endif endif " expand to full path let path = fnamemodify(a:path, ":p") " make Windows format (assume is Unix) if format == "win" " remove escaping of spaces let path = substitute(path, '\\ ', ' ', "g") " convert forward slashes to backslashes let path = substitute(path, '/', '\', "g") " make Unix format (assume is Windows) else "" strip drive letter "let path = substitute(path, '^\a:', '', '') " convert backslashes to forward slashes let path = substitute(path, '\', '/', "g") " escape spaces (but not twice) let path = substitute(path, '[/\\]* ', '\\ ', "g") endif " remove duplicate separators let path = substitute(path, '\\\+', '\', "g") let path = substitute(path, '/\+', '/', "g") " remove trailing separators let path = substitute(path, '[/\\]*$', '', "") " maintain Windows UNC servername if s:Cream_path_isunc(a:path) let path = substitute(path, '^\', '\\\\', "") let path = substitute(path, '^/', '\\\\', "") endif return path endfunction " s:Cream_path_isunc() {{{1 function! s:Cream_path_isunc(path) " Returns 1 if {path} is in Windows UNC format, 0 if not. if match(a:path, '^\\\\') != -1 || match(a:path, '^//') != -1 return 1 endif endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-menu-window-buffer.vim0000644000076400007660000002121511517300720020427 0ustar digitectlocaluser" " cream-menu-window-buffer.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Source: " o Origin: Extracted and modifified from the Vim 6.0 menu.vim " buffers. " o 2002-08-28: Verified against Vim 6.1, no changes. " o 2002-09-19: Removed all cruft and abandoned hope of ever " syncronizing with Vim's buffer menu again. (That's a good thing ;) " wait with building the menu until after loading 'session' files. " Makes startup faster. let s:bmenu_wait = 1 " always reset let g:bmenu_priority = '80.900' " Truncate a long path to fit it in a menu item. if !exists("g:bmenu_max_pathlen") let g:bmenu_max_pathlen = 35 endif " BMShow() {{{1 function! BMShow(...) " Create the buffer menu (delete an existing one first). let s:bmenu_wait = 1 "let s:bmenu_short = 0 let s:bmenu_count = 0 " do not show actual buffer numbers, we don't care. Instead, number consecutively. let s:mynum = 0 " remove the entire Window menu, restore, THEN add buffers silent! unmenu &Window silent! unmenu! &Window " replace existing window menu (non-buffer portion) call Cream_menu_window() " figure out how many buffers there are "" TODO: don't force short style, need to count and determine prior "let s:bmenu_short = 0 " count from 1 let buf = 1 let i = 0 while buf <= bufnr('$') "let buf = buf + 1 let i = i + 1 if bufexists(buf) \&& !isdirectory(bufname(buf)) \&& Cream_buffer_isspecial() == 0 " allow unlisted to pass through so we can call it '(Untitled)' if modified "\&& buflisted(bufname(buf)) != 0 let s:bmenu_count = s:bmenu_count + 1 call s:BMFilename(bufname(buf), i) "call BMFilename(Cream_path_fullsystem(bufname(buf)), i) endif let buf = buf + 1 endwhile "if s:bmenu_count <= &menuitems " let s:bmenu_short = 0 "endif let s:bmenu_wait = 0 " TODO: moved to cream-autocmd 2006-02-14 "augroup buffer_list " autocmd! " "autocmd BufCreate,BufFilePost * call BMAdd() " " necessary to recount menu items and refresh indicated status " "autocmd BufWinEnter * call BMShow() " " TODO: why isn't this in cream-autocmd ? " autocmd BufWinEnter,BufEnter,BufNew,WinEnter * call BMShow() "augroup END endfunction "" s:BMAdd() {{{1 "function! s:BMAdd() " if s:bmenu_wait == 0 " " when adding too many buffers, redraw in short format " if s:bmenu_count == &menuitems " "\ && s:bmenu_short == 0 " call BMShow() " else " call s:BMFilename(expand(""), expand("")) " let s:bmenu_count = s:bmenu_count + 1 " endif " endif "endfunction " s:BMHash() {{{1 function! s:BMHash(name) " Make name all upper case, so that chars are between 32 and 96 let nm = substitute(a:name, ".*", '\U\0', "") if has("ebcdic") " HACK: Replace all non alphabetics with 'Z' just to make it work for now. let nm = substitute(nm, "[^A-Z]", 'Z', "g") let sp = char2nr('A') - 1 else let sp = char2nr(' ') endif " convert first six chars into a number for sorting: return (char2nr(nm[0]) - sp) * 0x800000 + (char2nr(nm[1]) - sp) * 0x20000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x80 + (char2nr(nm[4]) - sp) * 0x20 + (char2nr(nm[5]) - sp) endfunction "" s:BMHash2() {{{1 "function! s:BMHash2(name) "" list overload alphabetization scheme "" * Only called if s:bmenu_short != 0 " " let nm = substitute(a:name, ".", '\L\0', "") " " Not exactly right for EBCDIC... " if nm[0] < 'a' || nm[0] > 'z' " return '&others.' " elseif nm[0] <= 'd' " return '&abcd.' " elseif nm[0] <= 'h' " return '&efgh.' " elseif nm[0] <= 'l' " return '&ijkl.' " elseif nm[0] <= 'p' " return '&mnop.' " elseif nm[0] <= 't' " return '&qrst.' " else " return '&u-z.' " endif "endfunction " s:BMFilename() {{{1 function! s:BMFilename(bufname, bufnum) " insert a buffer name into the buffer menu " can't use "a:" arg in "if" statement for some reason let mybufname = a:bufname let mybufnum = a:bufnum " test if we want to list it if s:Cream_buffer_islistable(mybufname, mybufnum) == "0" return endif let munge = s:BMMunge(mybufname, mybufnum) let hash = s:BMHash(munge) " consecutively number buffers " indicate modified buffers if getbufvar(mybufnum, "&modified") == 1 let mymod = "*" else let mymod = '\ \ ' endif " indicate current buffer let curbufnr = bufnr("%") if has("win32") if curbufnr == mybufnum let mycurrent = nr2char(187) " requires 2 spaces (in else) to balance else let mycurrent = '\ \ ' endif elseif &encoding == "latin1" \ || &encoding == "utf-8" if curbufnr == mybufnum let mycurrent = nr2char(187) " requires 2 spaces (in else) to balance else let mycurrent = '\ \ ' endif else if curbufnr == mybufnum let mycurrent = '>' " requires 5 spaces (in else) to balance else let mycurrent = '\ \ ' endif endif " if unnamed and modified, name '(Untitled)' if munge == "" \&& getbufvar(mybufnum, "&modified") == 1 let munge = '[untitled]' endif if munge != "" " use false count number, not actual buffer number let s:mynum = s:mynum + 1 " put space before single digits (to align with two-digit numbers) if s:mynum < 10 let mymenunum = mycurrent . '\ \ &' . s:mynum . mymod else let mymenunum = mycurrent . '' . s:mynum . mymod endif "if s:bmenu_short == 0 let name = 'anoremenu ' . g:bmenu_priority . '.' . s:mynum . ' &Window.' . mymenunum . munge "else " let name = 'anoremenu ' . g:bmenu_priority . '.' . s:mynum . ' &Window.' . mymenunum . s:BMHash2(munge) . munge "endif " add menu name to edit command, check not in special execute name . ' :call Cream_buffer_edit(' . mybufnum . ')' else " do nothing (don't add menu and don't increment) endif " set 'cpo' to include the let cpo_save = &cpo set cpo&vim endfunction " s:Cream_buffer_islistable() {{{1 function! s:Cream_buffer_islistable(bufname, bufnr) " return 0 if we don't want to list the buffer name " TODO: Don't we have another function to do this? " can't use "a:" arg in "if" statement for some reason let myname = a:bufname let mynr = a:bufnr " ignore unlisted, unmodified buffer if !buflisted(bufname(myname)) \&& getbufvar(mynr, "&modified") == 0 return 0 endif "" ignore help file "if getbufvar(bufname(myname), "&buftype") == "help" " return 0 "endif " "" OBSOLETE """ ignore if a directory (explorer) ""if isdirectory(myname) "" return 0 ""endif " "" ignore opsplorer "let tempname = fnamemodify(myname, ":t") "if myname == "_opsplorer" " return 0 "endif " "" ignore calendar "if myname == "__Calendar" " return 0 "endif " "" ignore calendar "if myname == "__Tag_List__" " return 0 "endif " "" ignore calendar "if myname == "-- EasyHtml --" " return 0 "endif if Cream_buffer_isspecial(mynr) return 0 endif return myname endfunction " s:BMMunge() {{{1 function! s:BMMunge(fname, bnum) " Return menu item name for given buffer let name = a:fname if name == '' return "" else " TODO: why do this? " change to relative to home directory if possible let name = Cream_path_fullsystem(name) let name = fnamemodify(name, ':p:~') endif " get file name alone let name2 = fnamemodify(name, ':t') let name = name2 . "\t" . s:BMTruncName(fnamemodify(name,':h')) let name = escape(name, "\\. \t|") let name = substitute(name, "\n", "^@", "g") return name endfunction " s:BMTruncName() {{{1 function! s:BMTruncName(fname) let name = a:fname if g:bmenu_max_pathlen < 5 let name = "" else let len = strlen(name) if len > g:bmenu_max_pathlen let amount = (g:bmenu_max_pathlen / 2) - 2 let left = strpart(name, 0, amount) let amount = g:bmenu_max_pathlen - amount - 3 let right = strpart(name, len - amount, amount) let name = left . '...' . right endif endif return name endfunction " 1}}} " vim:foldmethod=marker cream-0.43/help/0000755000076400007660000000000011517421112014033 5ustar digitectlocalusercream-0.43/help/EnhancedCommentify.txt0000644000076400007660000004113511321014312020331 0ustar digitectlocaluser ENHANCED COMMENTIFY *EnhancedCommentify* This is the online help to EnhancedCommentify-script for Vim. It provides a convenient way to comment/decomment lines of code in source files. Currently several languages are supported (eg. Vim, C(++), Ada, Perl, Python and many more), but it is really easy to add other languages. (see 'Adding new languages') ============================================================================== CONTENTS 1. The main function |EnhComm-EnhCommentify| 2. Changing behaviour (options) |EnhComm-Options| 3. Adding new languages |EnhComm-NewLanguages| 4. Changing the keybindings |EnhComm-Keybindings| 5. Adding fallbacks |EnhComm-Fallbacks| 6. Support |EnhComm-Support| 7. Credits |EnhComm-Credits| 8. Known problems |EnhComm-Bugs| ============================================================================== 1. The main function *EnhComm-EnhCommentify* *EnhancedCommentify()* The function which does the main work is called EnhancedCommentify(). It may also be called from outside the script. It takes two to four arguments. EnhancedCommentify(overrideEL, mode [, startBlock, endBlock]) overrideEL -- may be 'yes', 'no' or ''. With UseSyntax option this value is guessed for every invocation of the function. However, if the passed value is not '', the given value will ocerride any checks. mode -- may be 'comment', 'decomment', 'guess' or 'first'. Specifies in what mode the script is run. comment => region gets commented decomment => region gets decommented guess => every line is checked wether it should be commented or decommented. This is the traditional mode. first => blocks is commented or decommented based on the very first line of the block. For single lines, this is identical to 'guess' startBlock -- number of line, where block starts (optional) endBlock -- number of line, where block ends (optional) If startBlock and endBlock are omitted, the function operates on the current line. Examples: > EnhancedCommentify('yes', 'guess') EnhancedCommentify('no', 'decomment', 55, 137) < The first call operates on the current line in the traditional way. Empty lines are also processed. The second call ignores empty lines and decomments all lines from line 55 up to line 137 inclusive. ============================================================================== 2. Changing behaviour (options) *EnhComm-Options* All options are boolean except those marked with a (*). Boolean variables may hold 'yes' or 'no' in any case or abbreviation. So in some sense the variables aren't really of boolean type: they are always strings. So don't forget the quotation marks! Examples: > let g:EnhCommentifyUseAltKeys = 'yes' let g:EnhCommentifyTraditionalMode = 'N' < 'g:EnhCommentifyAltOpen' string (default '|+') (*) Defines the alternative placeholder for the opening string of multipart comments. 'g:EnhCommentifyAltClose' string (default '+|') (*) Same for closing string. Example: > /* This is a problem in C. */ < If the above line would be commented again, it would produce this wrong code: > /*/* This is a problem in C. */*/ < The script recognises this problem and removes the inner comment strings replacing them with the given alternative "escape" strings. In the default configuration you get > /*|+ This is a problem in C. +|*/ < which is fine. When decommenting the line, the alternative strings are replaced with the original comment strings. These two options have no meaning for languages, which have only singlepart comment strings (like Perl or Scheme). 'g:EnhCommentifyIdentString' string (default '') (*) Add this identity string to every comment made by the script. This looks ugly and introduces non-standard comments, but solves several problems (see |EnhComm-Bugs|). Setting this option makes only sense in combination with 'g:EnhCommentifyTraditionalMode'. Examples: The default setting would comment lines like this one > /*foo();*/ < Setting g:EnhCommentifyIdentString to '+' would result in > /*+foo();+*/ < 'g:EnhCommentifyRespectIndent' string (default 'No') Respect the indent of a line. The comment leader is inserted correctly indented, not at the beginning of the line. Examples: g:EnhCommentifyRespectIndent = 'No' > if (bar) { /* foo();*/ } < g:EnhCommentifyRespectIndent = 'Yes' > if (bar) { /*foo();*/ } < 'g:EnhCommentifyIgnoreWS' string (default: 'Yes') Ignore whitespace at the beginning of the line. This decomments indented lines. This option has no effect when setting g:EnhCommentifyRespectIndent to 'Yes'. 'g:EnhCommentifyPretty' string (default: 'No') Add a whitespace between comment strings and code. Mainly for readability. Comments without this space may still be decommented. Examples: g:EnhCommentifyPretty = 'No' > /*foo();*/ < g:EnhCommentifyPretty = 'Yes' > /* foo(); */ < 'g:EnhCommentifyBindPerBuffer' string (default: 'No') Make keybindings local to buffer. 'g:EnhCommentifyBindUnknown' string (default: 'Yes') If the filetype is not known, don't add keybindings. This option has no meaning, when g:EnhCommentifyBindPerBuffer is set to 'No'. 'g:EnhCommentifyBindInNormal' string (default: 'Yes') 'g:EnhCommentifyBindInInsert' 'g:EnhCommentifyBindInVisual' Add keybindings in normal/insert/visual mode. 'g:EnhCommentifyUseAltKeys' string (default: 'No') Use alternative keybindings. instead of X. This may cause trouble on some terminals. Eg. aterm has to be used with 'meta8: true' in the Xresources. This option has no meaning, when g:EnhCommentifyUserBindings is set to 'Yes'. 'g:EnhCommentifyTraditionalMode' string (default: 'Yes') The traditional commentify mode. Check for every line what action should be performed. This option has no meaning, when g:EnhCommentifyUserBindings is set to 'Yes'. 'g:EnhCommentifyFirstLineMode' string (default: 'No') The decision, which action (commenting/decommenting) is performed for a visual block, is based on the first line of this block. This option has no meaning, when one of g:EnhCommentifyUserBindings or g:EnhCommentifyTraditionalMode is set to 'Yes'. 'g:EnhCommentifyUserMode' string (default: 'No') If this option is set to yes, the scripts lets you decide what to do. Then there are several two different keybindings active, one for commenting, one for decommenting. (see |EnhComm-Keybindings|) This option has no effect if any of these options is set to 'yes': - g:EnhCommentifyTraditionalMode - g:EnhCommentifyFirstLineMode - g:EnhCommentifyUserBindings 'g:EnhCommentifyUserBindings' string (default: 'No') This option allows you to choose your own keybindings, without much trouble. Please see below (|EnhComm-Keybindings|) for more details. 'g:EnhCommentifyUseBlockIndent' string (default: 'No') It's a bit difficult to explain, what this option does, so here are some examples (The numbers are just line numbers!): > 1if (foo) { 2 bar(); 3 baz(); 4} else { 5 bar(); 6 baz(); 7} < Commenting lines 1 to 7 in a visual block will give: > /*if (foo) {*/ /* bar();*/ /* baz();*/ /*} else {*/ /* bar();*/ /* baz();*/ /*}*/ < Or commenting lines 3 to 5 will give: > if (foo) { bar(); /* baz();*/ /*} else {*/ /* bar();*/ baz(); } < lines 2 to 3: > if (foo) { /*bar();*/ /*baz();*/ } else { bar(); baz(); } < However you should think about activating g:EnhCommentifyIgnoreWS, if you do not use g:EnhCommentifyRespectIndent or you won't be able to decomment lines, which are commented with this method, if they have leading whitespace! 'g:EnhCommentifyMultiPartBlocks'string (default: 'No') When using a language with multipart-comments commenting a visual block will result in the whole block commented in unit, not line by line. let g:EnhCommentifyMultiPartBlocks = 'yes' > /*if (foo) { frobnicate(baz); }*/ < 'g:EnhCommentifyCommentsOp' string (default: 'No') !!! EXPERIMENTAL !!! When set the comments option is parsed. This is currently only used for the above option in order to set the middle part of the comment. let g:EnhCommentifyCommentsOp = 'yes' > /*if (foo) { * frobnicate(baz); *}*/ < 'g:EnhCommentifyAlignRight' string (default: 'No') When commenting a visual block align the right hand side comment strings. Examples: let g:EnhCommentifyAlignRight = 'no' > /*if (foo) {*/ /* frobnicate(baz);*/ /*}*/ < let g:EnhCommentifyAlignRight = 'yes' > /*if (foo) { */ /* frobnicate(baz);*/ /*} */ < 'g:EnhCommentifyUseSyntax' string (default: 'No') With this option set, the script tries to figure out which filetype to use for every block by using the synID of the block. This improves handling of embedded languages eg. CSS in HTML, Perl in VimL... But be aware, that this feature currently relies on a special form of the names of the syntax items. So it might not work with every syntax file (see |EnhComm-Bugs|). It also calls synID only once for every block! So the first line is significant. Be aware, that "cross" commenting might cause problems. Examples: > 1

    a header

    2 7link < Commenting line 1 will give: > link < Commenting line 4 will give: >

    a header

    link < You don't have to change anything. The filetype is still 'html'. However marking the whole paragraph in one visual block and commenting it, will result in the following: > < BTW: Don't expect any sense or correctness of code in these examples. ============================================================================== 3. Adding new languages *EnhComm-NewLanguages* Since 2.3 there is the possibility to use some callback function to handle unrecognised filetypes. This is a substitute to steps a)-d) below. Just add a function called "EnhCommentifyCallback" and set "g:EnhCommentifyCallbackExists" to some value. > function EnhCommentifyCallback(ft) if a:ft == 'foo' let b:ECcommentOpen = 'bar' let b:ECcommentClose = 'baz' endif endfunction let g:EnhCommentifyCallbackExists = 'Yes' < Optionally the steps e) and f) still apply. Of course the old way still works: a) Open the script. b) Go to the GetFileTypeSettings() function. c) Now you should see the large "if"-tree. > if fileType =~ '^\(c\|css\|...' let b:ECcommentOpen = '/*' let b:ECcommentClose = '*/' elseif ... < d) There are two buffer-local variables, which hold the different comment strings. > if fileType =~ '^\(c\|css\|...' let b:ECcommentOpen = '/*' let b:ECcommentClose = '*/' elseif fileType == 'foo' let b:ECcommentOpen = 'bar' let b:ECcommentClose = 'baz' elseif ... < If the new language has only one comment string (like '#' in Perl), we simply leave the CommentClose variable empty (''). That's it! Optionally you can also take step e) and f) in order to complete the setup, but this is not necessary. e) Go to the CommentEmptyLines() function and add the new language to the apropriate "if"-clause. The first will cause empty lines to be processed also. The second make the script ignore empty lines for this filetype. (My rule of thumb: single part comment strings => "yes", multi part comment strings => "no") The default is to ignore empty lines. f) Some syntax-files are "broken". "Broken" in the sense, that the syntax items are not named with xxxFoo or xxxBar, where xxx is the filetype. This scheme seems to be used by ninety percent of all syntax files I saw. This is currently the only way to get the filetype from the synID. If your language may have other languages embedded, you should add the filetype to "if"-clause in CheckPossibleEmbedding(). ============================================================================== 4. Changing the keybindings *EnhComm-Keybindings* The script defines several 's, which can be used to bind the different actions to different keys: - Comment / DeComment - Traditional - FirstLine I don't think, that there's much, what needs to be explained. The 's names are descriptive enough. For every there is also its visual counterpart (eg. VisualComment), which may be used to bind the actions for visual mode. Here an example from the standard bindings: > imap Traditionalji < Clearly this definition binds in insert mode to the traditional Commentify-functionality. Step-by-Step: 1) : leave insert mode 2) Traditional: execute the Commentify-function for this line 3) j: go one line down 4) i: go back to insert mode Another example, which adds a binding for visual mode with the new first- line-mode: > vmap c VisualFirstLine < If you absolutely don't like the standards you can specify your own. Search for '***' in the script. Insert your bindings at this place and add > let g:EnhCommentifyUserBindings = 'yes' < to your .vimrc. That should do the trick. 4.1 Standard keybindings: Meta-Keys: Keys: Traditional-mode: Traditionial x Traditionial + one line down c FirstLine-mode: FirstLine x FirstLine + one line down c User-mode: Comment x Comment + one line down c DeComment X DeComment + one line down C ============================================================================== 5. Fallbacks *EnhComm-Fallbacks* Problems showed up with the php syntax file. In general it worked, but when there was simple text in a line it had an empty synID-name. Then the default kicked in using '&ft', which caused the php comments to be used, instead of the correct HTML comments. So it seemed necessary to provide a possibility to override the standard fallback. The solution looks like the following: 1st step: Create a .vim/ftplugin/foo_enhcomm.vim. 2nd step: Add the fallback-setting function call: call EnhCommentifyFallback4Embedded('synFiletype == "bar"', "baz") 3rd step: Have fun! :) So the general idea is: You specify a test and a fallback filetype. In the test 'synFiletype' can be used to reference the name tag of the current synID. For PHP this looks like: > call EnhCommentifyFallback4Embedded('synFiletype == ""', "html") < ============================================================================== 6. Support *EnhComm-Support* Suggestions, feature requests and bugreports are always welcome! You can contact me with . ============================================================================== 7. Credits *EnhComm-Credits* The following people contributed to EnhancedCommentify resp. reported bugs: (in temporal order) - Vincent Nijs (this script is based on his ToggleCommentify) - Mary Ellen Foster - Scott Stirling - Zak Beck - Xiangjiang Ma - Steve Butts - Preben Randhol - John Orr - Luc Hermite - Brett Calcott - Ben Kibbey - Brian Neu - Steve Hall - Zhang Le - Pieter Naaijkens - Thomas Link - Stefano Zacchiroli Thanks to John Orr and Xiangjiang Ma for their rich feedback and to Luc Hermite for some good improvement suggestions. ============================================================================== 8. Known Problems *EnhComm-Bugs* If g:EnhCommentifyFirstLineMode is used, the following block produces wrong code: > /* This is a comment and not programm code. */ foo = bar; baz(); < With indent string, the script recognises, that the comment is not created by the script and correctly comments the block. Lines like the following will not be correctly decommented. > /*|+ foo +| bar |+ baz +|*/ < The script currently relies on the assumption, that the names of syntax items are of the form '', eg. "phpXy" or "htmlFooBar". This seems to be true except for some rare, esoteric cases. ============================================================================== vim: ft=help:norl:ts=8:tw=78 cream-0.43/cream-menu-popup.vim0000644000076400007660000000361511517300720017020 0ustar digitectlocaluser" " cream-menu-popup.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Note: This is functionalized so we can re-set it with a call. function! Cream_menu_popup() " destroy existing popup menu silent! unmenu PopUp silent! unmenu! PopUp " add blank line only prior to version 6.1.433 if version < 601 || version == 601 && !exists("patch433") anoremenu 100 PopUp.\ anoremenu 101 PopUp.-Sep101- endif anoremenu 111 PopUp.&Undo :call Cream_undo("i") vmenu 113 PopUp.Cu&t :call Cream_cut("v") vmenu 114 PopUp.&Copy :call Cream_copy("v") vmenu 115 PopUp.&Paste :call Cream_paste("v") imenu 116 PopUp.&Paste :call Cream_paste("i") vmenu 117 PopUp.&Delete :call Cream_delete() "anoremenu 118 PopUp.-Sep108- anoremenu 119 PopUp.Select\ &All :call Cream_select_all() endfunction call Cream_menu_popup() cream-0.43/cream.vim0000644000076400007660000001346011517300720014714 0ustar digitectlocaluser" " cream.vim -- General loader, the "Main()" function of Cream. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " vars {{{1 let g:cream_version = 43 let g:cream_version_str = "0.43" let g:cream_updated = "Updated: 2011-01-24" let g:cream_mail = "digitect dancingpaper com" let g:cream_url = "http://cream.sourceforge.net" " source file function {{{1 function! Cream_source(file) " source a file if available if filereadable(a:file) > 0 execute "source " . a:file return 1 else return -1 endif endfunction " Load user custom over-rides (behavior) {{{1 " " o We source cream-conf here in order to quit in case behavior has " been set to vim or vi. " o Also, many other vars can potentially be set to shape the rest of " the load. " o However, cream-conf is also *re-loaded* via autocmd VimEnter so " that viminfo settings can be over-ridden as well. A bit redundant " but very little overhead since we're only setting variables. " " load system overrides (first) call Cream_source($CREAM . "cream-conf.vim") " load user overrides (second) if exists("g:cream_user") call Cream_source(g:cream_user . "cream-conf.vim") endif " quit if user-override behavior set to vim or vi if exists("g:CREAM_BEHAVE") if g:CREAM_BEHAVE == "vim" " back off settings we've made to here set compatible&vim set cpoptions&vim set shellslash&vim " unset variables and paths let $CREAM = "" set viminfo&vim set backupdir&vim set directory&vim set viewdir&vim " quit cream finish elseif g:CREAM_BEHAVE == "vi" " back off settings we've made to here set compatible&vi set cpoptions&vi set shellslash&vi " unset variables and paths let $CREAM = "" set viminfo&vi set backupdir&vi set directory&vi set viewdir&vi " quit cream finish elseif g:CREAM_BEHAVE == "creamlite" endif endif " Load server {{{1 call Cream_source($CREAM . "cream-server.vim") " Load project {{{1 " " * Note that modularized autocommand loading removes critical " requirement to load these files in order. However, there are still " some items within scripts that depend on a certain orderliness " (filetype comments for example) so we'll preserve this until we " know exactly what we're doing. " Note: cream-conf is loaded at the head of this file. " settings first (no global Cream variables set here) call Cream_source($CREAM . "cream-settings.vim") " libraries second (no functions called here, nothing set) call Cream_source($CREAM . "cream-lib.vim") call Cream_source($CREAM . "cream-lib-os.vim") call Cream_source($CREAM . "cream-lib-win-tab-buf.vim") call Cream_source($CREAM . "multvals.vim") call Cream_source($CREAM . "genutils.vim") " menus third (must precede syntax highlighting enable in colors, " requires multvals) call Cream_source($CREAM . "cream-menu.vim") " core " * dependant and unremovable " * menus and keyboard shortcuts may load corporately call Cream_source($CREAM . "cream-addon.vim") call Cream_source($CREAM . "cream-autocmd.vim") call Cream_source($CREAM . "cream-colors.vim") call Cream_source($CREAM . "cream-devel.vim") call Cream_source($CREAM . "cream-filetype.vim") call Cream_source($CREAM . "cream-gui.vim") call Cream_source($CREAM . "cream-keys.vim") " modules call Cream_source($CREAM . "cream-abbr.vim") call Cream_source($CREAM . "cream-ascii.vim") call Cream_source($CREAM . "cream-behavior.vim") call Cream_source($CREAM . "cream-bookmarks.vim") call Cream_source($CREAM . "cream-capitalization.vim") call Cream_source($CREAM . "cream-columns.vim") call Cream_source($CREAM . "cream-expertmode.vim") call Cream_source($CREAM . "cream-explorer.vim") call Cream_source($CREAM . "cream-find.vim") call Cream_source($CREAM . "cream-iso3166-1.vim") call Cream_source($CREAM . "cream-iso639.vim") call Cream_source($CREAM . "cream-justify.vim") call Cream_source($CREAM . "cream-loremipsum.vim") call Cream_source($CREAM . "cream-macros.vim") call Cream_source($CREAM . "cream-numberlines.vim") call Cream_source($CREAM . "cream-pop.vim") call Cream_source($CREAM . "cream-print.vim") call Cream_source($CREAM . "cream-replace.vim") call Cream_source($CREAM . "cream-replacemulti.vim") call Cream_source($CREAM . "cream-showinvisibles.vim") call Cream_source($CREAM . "cream-sort.vim") call Cream_source($CREAM . "cream-spell.vim") call Cream_source($CREAM . "cream-statusline.vim") call Cream_source($CREAM . "cream-templates.vim") call Cream_source($CREAM . "cream-vimabbrev.vim") "......................................... call Cream_source($CREAM . "calendar.vim") call Cream_source($CREAM . "EasyHtml.vim") call Cream_source($CREAM . "EnhancedCommentify.vim") call Cream_source($CREAM . "opsplorer.vim") call Cream_source($CREAM . "Rndm.vim") call Cream_source($CREAM . "taglist.vim") call Cream_source($CREAM . "securemodelines.vim") " penultimately " "cream-user" is loaded via autocmd in cream-autocmd.vim (needs to " coordinate with add-on loading for alphabetically sorted menus). " ultimate autocmd VimEnter * call Cream_source($CREAM . "cream-playpen.vim") " 1}}} " vim:foldmethod=marker cream-0.43/cream-colors-terminal.vim0000644000076400007660000000342211517300720020021 0ustar digitectlocaluser"= " cream-colors-terminal.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " set background=dark highlight clear if exists("syntax_on") syntax reset endif " force reverse highlight Normal guibg=Black guifg=White "let g:colors_name = "cream-default" "+++ Cream: " statusline highlight User1 gui=bold guifg=#999999 guibg=#404040 highlight User2 gui=bold guifg=#ffffff guibg=#404040 highlight User3 gui=bold guifg=#ffff00 guibg=#404040 highlight User4 gui=bold guifg=#ff3333 guibg=#404040 " bookmarks highlight Cream_ShowMarksHL gui=bold guifg=#ffff00 guibg=#5f5f00 ctermfg=blue ctermbg=lightblue cterm=bold " spell check highlight BadWord gui=bold guifg=#ffffff guibg=#663333 ctermfg=black ctermbg=lightblue " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#666666 " email highlight EQuote1 guifg=#ffff33 highlight EQuote2 guifg=#cccc33 highlight EQuote3 guifg=#999933 highlight Sig guifg=#999999 "+++ cream-0.43/cream.bat0000644000076400007660000000254311156572440014700 0ustar digitectlocaluser@echo OFF rem expand this file's path set FNAME=%0.bat if not "%OS%"=="Windows_NT" goto NoWinNT for %%A in (%FNAME%) do set NEW=%%~$PATH:A if not "%NEW%"=="" set FNAME=%NEW% set NEW= :NoWinNT rem set PROGRAM FILES path rem Note: Using the default value of %PROGRAMFILES% fails, because the rem if exist {name}\CON construct fails when {name} contains rem a space. set PROGRA=C:\PROGRA~1 if exist %PROGRA%\CON goto FINDVRT echo %FNAME% could not find program files, unable to continue. goto QUIT :FoundPrograms :FINDVRT rem find VIMRUNTIME path (based on PROGRAMFILES) set VRT=%PROGRA%\vim\vimFALSE if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim72 if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim71 if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim70 if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim64 if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim63 if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim62 if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim61 if exist %VRT%\CON goto RUNCREAM set VRT=%PROGRA%\vim\vim60 if exist %VRT%\CON goto RUNCREAM echo %FNAME% could not find a Vim installation, unable to continue. goto QUIT :RUNCREAM "%VRT%\gvim" --servername "CREAM" -u "%VRT%\cream\creamrc" -U NONE "%*" goto QUIT :QUIT set VRT= set PROGRA= set FNAME= :END cream-0.43/cream-justify.vim0000644000076400007660000002165411156572440016424 0ustar digitectlocaluser" " cream-justify.vim -- original justify.vim macro, adjusted for Cream. " " Modifications: " * None yet, but there seems to be a trailing space problem on short " lines. " " "--------------------------------------------------------------------- " Function to left and right align text. " " Written by: Preben "Peppe" Guldberg " Created: 980806 14:13 (or around that time anyway) " Revised: 001103 00:36 (See "Revisions" below) " function Justify( [ textwidth [, maxspaces [, indent] ] ] ) " " Justify() will left and right align a line by filling in an " appropriate amount of spaces. Extra spaces are added to existing " spaces starting from the right side of the line. As an example, the " following documentation has been justified. " " The function takes the following arguments: " textwidth argument " ------------------ " If not specified, the value of the 'textwidth' option is used. If " 'textwidth' is zero a value of 80 is used. " " Additionally the arguments 'tw' and '' are accepted. The value of " 'textwidth' will be used. These are handy, if you just want to specify " the maxspaces argument. " maxspaces argument " ------------------ " If specified, alignment will only be done, if the longest space run " after alignment is no longer than maxspaces. " " An argument of '' is accepted, should the user like to specify all " arguments. " " To aid user defined commands, negative values are accepted aswell. " Using a negative value specifies the default behaviour: any length of " space runs will be used to justify the text. " indent argument " --------------- " This argument specifies how a line should be indented. The default is " to keep the current indentation. " " Negative values: Keep current amount of leading whitespace. " Positive values: Indent all lines with leading whitespace using this " amount of whitespace. " " Note that the value 0, needs to be quoted as a string. This value " leads to a left flushed text. " " Additionally units of 'shiftwidth'/'sw' and 'tabstop'/'ts' may be " added. In this case, if the value of indent is positive, the amount of " whitespace to be added will be multiplied by the value of the " 'shiftwidth' and 'tabstop' settings. If these units are used, the " argument must be given as a string, eg. Justify('','','2sw'). " " If the values of 'sw' or 'tw' are negative, they are treated as if " they were 0, which means that the text is flushed left. There is no " check if a negative number prefix is used to change the sign of a " negative 'sw' or 'ts' value. " " As with the other arguments, '' may be used to get the default " behaviour. " Notes: " " If the line, adjusted for space runs and leading/trailing whitespace, " is wider than the used textwidth, the line will be left untouched (no " whitespace removed). This should be equivalent to the behaviour of " :left, :right and :center. " " If the resulting line is shorter than the used textwidth it is left " untouched. " " All space runs in the line are truncated before the alignment is " carried out. " " If you have set 'noexpandtab', :retab! is used to replace space runs " with whitespace using the value of 'tabstop'. This should be " conformant with :left, :right and :center. " " If joinspaces is set, an extra space is added after '.', '?' and '!'. " If 'cpooptions' include 'j', extra space is only added after '.'. " (This may on occasion conflict with maxspaces.) "*** Cream: nope. "" Related mappings: "" "" Mappings that will align text using the current text width, using at "" most four spaces in a space run and keeping current indentation. "nmap _j :%call Justify('tw',4) "vmap _j :call Justify('tw',4) "" "" Mappings that will remove space runs and format lines (might be useful "" prior to aligning the text). "nmap ,gq :%s/\s\+/ /ggq1G "vmap ,gq :s/\s\+/ /ggvgq "*** " User defined command: " " The following is an ex command that works as a shortcut to the Justify " function. Arguments to Justify() can be added after the command. com! -range -nargs=* Justify ,call Justify() " " The following commands are all equivalent: " " 1. Simplest use of Justify(): " :call Justify() " :Justify " " 2. The _j mapping above via the ex command: " :%Justify tw 4 " " 3. Justify visualised text at 72nd column while indenting all " previously indented text two shiftwidths " :'<,'>call Justify(72,'','2sw') " :'<,'>Justify 72 -1 2sw " " This documentation has been justified using the following command: ":se et|kz|1;/^" function Justify(/+,'z-g/^" /s/^" //|call Justify(70,3)|s/^/" / " Revisions: " 001103: If 'joinspaces' was set, calculations could be wrong. " Tabs at start of line could also lead to errors. " Use setline() instead of "exec 's/foo/bar/' - safer. " Cleaned up the code a bit. " " Todo: Convert maps to the new script specific form " Error function function! Justify_error(message) echohl Error echo "Justify([tw, [maxspaces [, indent]]]): " . a:message echohl None endfunction " Now for the real thing function! Justify(...) range if a:0 > 3 call Justify_error("Too many arguments (max 3)") return 1 endif " Set textwidth (accept 'tw' and '' as arguments) if a:0 >= 1 if a:1 =~ '^\(tw\)\=$' let tw = &tw elseif a:1 =~ '^\d\+$' let tw = a:1 else call Justify_error("tw must be a number (>0), '' or 'tw'") return 2 endif else let tw = &tw endif if tw == 0 let tw = 80 endif " Set maximum number of spaces between WORDs if a:0 >= 2 if a:2 == '' let maxspaces = tw elseif a:2 =~ '^-\d\+$' let maxspaces = tw elseif a:2 =~ '^\d\+$' let maxspaces = a:2 else call Justify_error("maxspaces must be a number or ''") return 3 endif else let maxspaces = tw endif if maxspaces <= 1 call Justify_error("maxspaces should be larger than 1") return 4 endif " Set the indentation style (accept sw and ts units) let indent_fix = '' if a:0 >= 3 if (a:3 == '') || a:3 =~ '^-[1-9]\d*\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = -1 elseif a:3 =~ '^-\=0\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = 0 elseif a:3 =~ '^\d\+\(shiftwidth\|sw\|tabstop\|ts\)\=$' let indent = substitute(a:3, '\D', '', 'g') elseif a:3 =~ '^\(shiftwidth\|sw\|tabstop\|ts\)$' let indent = 1 else call Justify_error("indent: a number with 'sw'/'ts' unit") return 5 endif if indent >= 0 while indent > 0 let indent_fix = indent_fix . ' ' let indent = indent - 1 endwhile let indent_sw = 0 if a:3 =~ '\(shiftwidth\|sw\)' let indent_sw = &sw elseif a:3 =~ '\(tabstop\|ts\)' let indent_sw = &ts endif let indent_fix2 = '' while indent_sw > 0 let indent_fix2 = indent_fix2 . indent_fix let indent_sw = indent_sw - 1 endwhile let indent_fix = indent_fix2 endif else let indent = -1 endif " Avoid substitution reports let save_report = &report set report=1000000 " Check 'joinspaces' and 'cpo' if &js == 1 if &cpo =~ 'j' let join_str = '\(\. \)' else let join_str = '\([.!?!] \)' endif endif let cur = a:firstline while cur <= a:lastline let str_orig = getline(cur) let save_et = &et set et exec cur . "retab" let &et = save_et let str = getline(cur) let indent_str = indent_fix let indent_n = strlen(indent_str) " Shall we remember the current indentation if indent < 0 let indent_orig = matchstr(str_orig, '^\s*') if strlen(indent_orig) > 0 let indent_str = indent_orig let indent_n = strlen(matchstr(str, '^\s*')) endif endif " Trim trailing, leading and running whitespace let str = substitute(str, '\s\+$', '', '') let str = substitute(str, '^\s\+', '', '') let str = substitute(str, '\s\+', ' ', 'g') let str_n = strlen(str) " Possible addition of space after punctuation if exists("join_str") let str = substitute(str, join_str, '\1 ', 'g') endif let join_n = strlen(str) - str_n " Can extraspaces be added? " Note that str_n may be less than strlen(str) [joinspaces above] if strlen(str) < tw - indent_n && str_n > 0 " How many spaces should be added let s_add = tw - str_n - indent_n - join_n let s_nr = strlen(substitute(str, '\S', '', 'g') ) - join_n let s_dup = s_add / s_nr let s_mod = s_add % s_nr " Test if the changed line fits with tw if 0 <= (str_n + (maxspaces - 1)*s_nr + indent_n) - tw " Duplicate spaces while s_dup > 0 let str = substitute(str, '\( \+\)', ' \1', 'g') let s_dup = s_dup - 1 endwhile " Add extra spaces from the end while s_mod > 0 let str = substitute(str, '\(\(\s\+\S\+\)\{' . s_mod . '}\)$', ' \1', '') let s_mod = s_mod - 1 endwhile " Indent the line if indent_n > 0 let str = substitute(str, '^', indent_str, '' ) endif " Replace the line call setline(cur, str) " Convert to whitespace if &et == 0 exec cur . 'retab!' endif endif " Change of line endif " Possible change let cur = cur + 1 endwhile norm ^ let &report = save_report endfunction cream-0.43/addons/0000755000076400007660000000000011517421112014353 5ustar digitectlocalusercream-0.43/addons/cream-cream-ctags.vim0000644000076400007660000001324411517300756020361 0ustar digitectlocaluser"= " cream-ctags.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Generates ctags for path (also for Cream project files) " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Ctags Generate', \ 'Generate a tags file for a single directory', \ "Generates ctags for all files within a single provided directory. Requires working accessible installation of ctags.", \ 'Ctags Generate', \ 'call Cream_ctags_generate()', \ '' \ ) " don't list unless Cream developer if exists("g:cream_dev") call Cream_addon_register( \ 'Ctags Generate Cream', \ 'Generate ctags file for Cream', \ "Generates ctags for all relevant Cream files, in all subdirectories. Requires working installation of ctags on the path and (currently) Windows.", \ 'Cream Devel.Ctags Generate Cream', \ 'call Cream_ctags_generate_cream()', \ '' \ ) endif endif function! Cream_ctags_generate_cream() let ctagsexe = s:Cream_ctags_executable() if ctagsexe == "" call confirm( \ "No ctags utility found on path. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif let n = confirm( \ "Silence shell output?\n" . \ "\n", "&Ok\n&No", 1, "Info") if n == 1 let mysilent = "silent " else let mysilent = "" endif if exists("g:cream_cvs") let creamfix = g:cream_cvs else call confirm( \ "Unable to find g:cream_cvs. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif if has("win32") && !has("win32unix") " root execute mysilent . '!' . ctagsexe . ' -f "' . creamfix . '/tags" "' . creamfix . '/*.vim"' execute mysilent . '!' . ctagsexe . ' -f "' . creamfix . '/tags" --append=yes "' . creamfix . '/addons/*.vim"' " addons execute mysilent . '!' . ctagsexe . ' -f "' . creamfix . '/addons/tags" "' . creamfix . '/*.vim"' execute mysilent . '!' . ctagsexe . ' -f "' . creamfix . '/addons/tags" --append=yes "' . creamfix . '/addons/*.vim"' else " root execute mysilent . '!' . ctagsexe . ' -f ' . creamfix . '/tags ' . creamfix . '/*.vim' execute mysilent . '!' . ctagsexe . ' -f ' . creamfix . '/tags --append=yes ' . creamfix . '/addons/*.vim' " addons execute mysilent . '!' . ctagsexe . ' -f ' . creamfix . '/addons/tags ' . creamfix . '/*.vim' execute mysilent . '!' . ctagsexe . ' -f ' . creamfix . '/addons/tags --append=yes ' . creamfix . '/addons/*.vim' endif endfunction function! Cream_ctags_generate(...) " generate ctags for the current file's directory, unless argument passed. let ctagsexe = s:Cream_ctags_executable() if ctagsexe == "" call confirm( \ "No ctags utility found on path. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif if !exists("g:cream_ctags_path") " Tim Cera patched this to a single wildcard "let mypath = expand("%:p:h") . '/*.*' let mypath = expand("%:p:h") . '/*' elseif a:0 == 1 let mypath = a:1 else let mypath = g:cream_ctags_path endif " maintain dialog until Ok or Cancel let valid = 0 while valid != 1 let n = 0 let msg = "Path/Filename(s) on which to generate ctags:\n" let msg = msg . "(wildcards accepted)\n" let msg = msg . "\n" let msg = msg . " " . mypath . " \n" let msg = msg . "\n" let n = confirm(msg, "&Enter Path/Filename\n&Browse\n&Ok\n&Cancel", 1, "Info") if n == 1 let mypath = inputdialog("Please enter the path/filename to ctag", mypath) if mypath == "" return endif elseif n == 2 let mypath = Cream_browse_path() elseif n == 3 " Validate: is single file or directory if filewritable(mypath) != 0 let valid = 1 endif " Validate: has wildcards (e.g., "*.*", "*.ext") if filewritable(fnamemodify(mypath, ":h")) != 0 let g:cream_ctags_path = mypath break endif if valid != 1 call confirm( \ "Please enter a valid path/filename.\n" . \ "\n", "&Ok", 1, "Info") endif else return endif endwhile " figure out where to put the tags file let mytagspath = g:cream_ctags_path " if uses tail has wildcards, use head let tmp = fnamemodify(mytagspath, ":t") if match(tmp, "\*") > -1 \|| match(tmp, "?") > -1 \|| match(tmp, "#") > -1 let mytagspath = fnamemodify(mytagspath, ":h") endif " windows paths (only) should be quoted if Cream_has("ms") let q = '"' else let q = '' endif " Example: :!ctags -f [path]/tags [path]/* let tmp = ':!' . ctagsexe . ' -f ' . q . mytagspath . '/tags' . q . ' ' . q . g:cream_ctags_path . q " don't silence, too many things to go wrong execute tmp endfunction function! s:Cream_ctags_executable() " returns a string of the name of the ctags executable (Gentoo and " others sometimes name it "exuberant-ctags") or 0 if nothing found let ctags = "" if executable("exuberant-ctags") let ctags = "exuberant-ctags" endif if executable("ctags") let ctags = "ctags" endif return ctags endfunction cream-0.43/addons/cream-helptags.vim0000644000076400007660000000250511517300756020000 0ustar digitectlocaluser" " Filename: cream-helptags.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Helptags Current Directory', \ "Tag current buffer's directory .TXT files as Vim help files.", \ "Use Vim's :helptags command to tag the current buffer's directory applicable files as Vim help files.", \ 'Helptags Current Directory', \ 'call Cream_help_tags()', \ '' \ ) endif " called function is in cream-lib. cream-0.43/addons/cream-ispell.vim0000644000076400007660000001233211517300756017460 0ustar digitectlocaluser"= " cream-ispell.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Convert an ispell wordlist with various multi-character " representations to actual encoding. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Ispell-To-Wordlist', \ 'Convert ispell postfix diacritics to Latin1.', \ "Convert ispell dictionary to common wordlist. Expand ispell form abbreviations (currently just deleted!) and substitute characters with postfix diacritics to Latin1. Converts the entire current file.", \ 'Ispell-To-Wordlist', \ 'call Cream_ispell2wordlist()', \ '' \ ) endif function! Cream_ispell2wordlist() " can't use without the proper encoding if &encoding != "latin1" let n = confirm( \ "This script has only been tested with encoding=latin1.\n" . \ "\n" . \ "To continue, you must temporarily change encodings.\n" . \ "(Original will be restored.) Continue?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n == 1 let myencoding = &encoding set encoding=latin1 else call confirm( \ "Script aborted.\n" . \ "\n", "&Ok", 1, "Info") return endif endif " confirm let n = confirm( \ "Do you wish to convert this file as an ispell \n" . \ "dictionary to a common expanded wordlist?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif let mymagic = &magic set magic call s:Cream_ispell_expand() call s:Cream_ispell_singlechar() if exists("myencoding") execute "let &encoding=" . myencoding endif let &magic = mymagic endfunction function! s:Cream_ispell_expand() " trash duplicate forms until we figure out how to expand without " ispell! ("ispell -e" expands munched words.) silent! %substitute/\/.\+$//gei endfunction function! s:Cream_ispell_singlechar(...) " convert diacritics " * optional argument bypasses dialog if a:0 == 1 let mylang == a:1 else let n = confirm( \ "Please select language...\n" . \ "\n", "&French\n&German\n&Spanish\n&Cancel", 4, "Info") if n == 1 let mylang = "fre" elseif n == 2 let mylang = "ger" elseif n == 3 let mylang = "spa" else return endif endif " French " source: Francais-GUTenberg-v1.0 if mylang ==? "fre" silent! %substitute/A`//geI silent! %substitute/A'//geI silent! %substitute/A\^//geI silent! %substitute/A~//geI silent! %substitute/A\"//geI silent! %substitute/C\///geI silent! %substitute/E`//geI silent! %substitute/E'//geI silent! %substitute/E\^//geI silent! %substitute/E\"//geI silent! %substitute/I`//geI silent! %substitute/I'//geI silent! %substitute/I\^//geI silent! %substitute/I\"//geI silent! %substitute/N~//geI silent! %substitute/O`//geI silent! %substitute/O'//geI silent! %substitute/O\^//geI silent! %substitute/O~//geI silent! %substitute/O\"//geI silent! %substitute/U`//geI silent! %substitute/U'//geI silent! %substitute/U\^//geI silent! %substitute/U\"//geI silent! %substitute/Y'//geI silent! %substitute/a`//geI silent! %substitute/a'//geI silent! %substitute/a\^//geI silent! %substitute/a~//geI silent! %substitute/a\"//geI silent! %substitute/c\///geI silent! %substitute/e`//geI silent! %substitute/e'//geI silent! %substitute/e\^//geI silent! %substitute/e\"//geI silent! %substitute/i`//geI silent! %substitute/i'//geI silent! %substitute/i\^//geI silent! %substitute/i\"//geI silent! %substitute/n~//geI silent! %substitute/o`//geI silent! %substitute/o'//geI silent! %substitute/o\^//geI silent! %substitute/o~//geI silent! %substitute/o\"//geI silent! %substitute/u`//geI silent! %substitute/u'//geI silent! %substitute/u\^//geI silent! %substitute/u\"//geI silent! %substitute/y'//geI " German " source: Wolfgang Hommel elseif mylang ==? "ger" silent! %substitute/sS//geI " Spanish " source: ispanish-1.7 elseif mylang ==? "spa" silent! %substitute/'a//geI silent! %substitute/'e//geI silent! %substitute/'i//geI silent! %substitute/'o//geI silent! %substitute/'u//geI silent! %substitute/'n//geI silent! %substitute/"u//geI silent! %substitute/'A//geI silent! %substitute/'E//geI silent! %substitute/'I//geI silent! %substitute/'O//geI silent! %substitute/'U//geI silent! %substitute/'N//geI silent! %substitute/"U//geI " also silent! %substitute/~n//geI silent! %substitute/~N//geI endif endfunction cream-0.43/addons/cream-highlight-mbyte.vim0000644000076400007660000000504011517300756021253 0ustar digitectlocaluser"= " cream-highlight-mbyte.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Highlight Multibyte', \ 'Show characters with decimal values 128-255', \ "Highlight characters with decimal values between 128-255. These characters may not appear the same on all systems when Vim uses an encoding other than latin1. (If used in Vim script, these characters could potentially cause script to fail.)", \ 'Highlight Multibyte', \ 'call Cream_highlight_mbyte()', \ 'call Cream_highlight_mbyte()' \ ) endif function! Cream_highlight_mbyte() " * functionalized search " * The same from the command line would be: " /[128-255] " * Test text: " " ********** hi! I'm not multi-byte. ************** " " if g:CREAM_SEARCH_HIGHLIGHT == 0 call Cream_search_highlight_toggle() endif let mystr = '[' . nr2char(127) . '-' . nr2char(255) . ']' " test first to avoid "not found" error let n = search(mystr) " if successful, do find if n > 0 " if first time through if !exists("b:mbsearch") " back off the match normal h " go to previous match execute '?' . mystr " and turn on highlighting (sigh) redraw! " NOW we're can start! (with highlighting already on ;) let b:mbsearch = 1 endif " find next execute '/' . mystr " handle edge-of-screen draws (but not on last line) if line('.') != line('$') normal lh endif " redraw (yes, again.) redraw! else call confirm("No characters found.", "&Ok", 1, "Info") endif endfunction cream-0.43/addons/cream-spell-french.vim0000644000076400007660000001013411517300756020550 0ustar digitectlocaluser"= " cream-spell-french.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Scripted process for condensing French spell check dictionary " " register as a Cream add-on if exists("$CREAM") " only if developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ 'Spell French', \ 'Condense raw French wordlist for Cream', \ "Condense raw French wordlist to (mostly) single-word forms for faster Cream spell checking.", \ 'Cream Devel.Spell French', \ 'call Cream_spell_french()', \ '' \ ) endif function! Cream_spell_french() " can't use without the proper encoding if &encoding != "latin1" && &encoding != "utf-8" call confirm( \ "Can not continue unless encoding is \"latin1\" or \"utf-8\" \n" . \ "\n", "&Cancel", 1, "Warning") return endif " confirm let n = confirm( \ "Do you wish to convert this file as a proper French language \n" . \ "wordlist to a form more suited to a Cream spell check dictionary?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif let mymagic = &magic set magic call s:Cream_spell_french_subs() " Now we're ready for uniq! call confirm( \ "Please use uniq on this file: \n" . \ "\n" . \ " " . expand("%:p") . "\n" . \ "\n" . \ "to remove duplicates.\n" . \ "\n", "&Ok", 1, "Info") let &magic = mymagic endfunction function! s:Cream_spell_french_subs() " separated hyphenated words into separate words silent! %substitute/-/\r/gei " remove all multi-word shortings with the number of words reduced " as follows: " C' - 0 c' - 6 " D' - 301 d' - 22,901 " J' - 0 j' - 9,319 " L' - 84 l' - 61,229 " M' - 0 m' - 33,753 " N' - 0 n' - 54,006 " Qu - 0 qu' - 54,051 " S' - 0 s' - 15,886 " T' - 0 t' - 33,754 " Note: We replace the prefix with itself and a return so as to " ensure it remains in the dictionary. (A final uniq will rid us " of extra anyway.) "silent! %substitute/^\(C'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(c'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(D'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(d'\)\(.\+\)$/\1\r\2/gei "silent! %substitute/^\(J'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(j'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(L'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(l'\)\(.\+\)$/\1\r\2/gei "silent! %substitute/^\(M'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(m'\)\(.\+\)$/\1\r\2/gei "silent! %substitute/^\(N'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(n'\)\(.\+\)$/\1\r\2/gei "silent! %substitute/^\(Qu'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(qu'\)\(.\+\)$/\1\r\2/gei "silent! %substitute/^\(S'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(s'\)\(.\+\)$/\1\r\2/gei "silent! %substitute/^\(T'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(t'\)\(.\+\)$/\1\r\2/gei " separate a few more multi-word components " entr' - 47 " lorsqu' - 17 " puisqu' - 22 " quoiqu' - 22 " Note: (same comment as above) silent! %substitute/^\(entr'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(lorsqu'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(puisqu'\)\(.\+\)$/\1\r\2/gei silent! %substitute/^\(quoiqu'\)\(.\+\)$/\1\r\2/gei silent! %substitute/'s$/\r's/gei endfunction cream-0.43/addons/cream-typingtutor.vim0000644000076400007660000004521011517300756020601 0ustar digitectlocaluser" " Filename: cream-typingtutor.vim " Updated: 2008-02-04 12:19:08-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " TODO: " o Penalize errant keys with a new char " o Resolve non-printing characters (space, tab, enter, etc.) " o " register as a Cream add-on {{{1 if exists("$CREAM") call Cream_addon_register( \ 'Typing Tutor', \ "Play a game while learning to type.", \ "Play a game while learning to type.", \ 'Typing Tutor', \ 'call Cream_typingtutor()', \ '' \ ) endif " Cream_typingtutor() {{{1 function! Cream_typingtutor() ""*** DEBUG: "let n = confirm( " \ "This is still a test routine, picking the options does not work. (Press Ctrl+C to stop.)" . " \ "\n", "&Continue\n&Quit", 1, "Info") "if n != 1 " return "endif ""*** " open new buffer call Cream_file_new() let ttbufnr = bufnr("%") " initialize vars, window, game space, maps, etc. call s:Init() " refresh initial switch to new buffer and setup redraw " set characters let s:chars = "" while s:level < s:levelmax " acceleration " new delay equals current delay minus the range of delay " (init - max) divided by the number of steps we'll take " (levelmax) let s:delay = s:delay - ((s:delayinit - s:delaymax) / s:levelmax) " add chars each level if exists("s:chars{s:level}") let s:chars = s:chars . s:chars{s:level} endif let play = s:PlayLevel() " if quit if play == -1 break endif let s:level = s:level + 1 endwhile " TODO: to s:Exit() let &guicursor = b:guicursor let &hlsearch = b:hlsearch "" quit buffer "if bufnr("%") == ttbufnr " silent! bwipeout! "endif endfunction " s:Init() {{{1 function! s:Init() " game initialization " turn off search highlighting let b:hlsearch = &hlsearch setlocal nohlsearch " hide normal-mode cursor let b:guicursor = &guicursor setlocal guicursor+=n:hor1-Ignore-blinkwait0-blinkon1-blinkoff1000 " case is important! setlocal noignorecase " chars of each level -------------------------------- " LOWER CASE " home row let s:chars1 = 'asdfjkl;' " home row, reach let s:chars2 = 'gh' " space let s:chars3 = ' ' " upper row let s:chars4 = 'qweruiop' " upper row, reach let s:chars5 = 'ty' " lower row let s:chars6 = 'zxcvm,./' " lower row, reach let s:chars7 = 'bn' " UPPER CASE " home row let s:chars8 = 'ASDFJKL;' " home row, reach let s:chars9 = 'GH' " upper row let s:chars10 = 'QWERUIOP' " upper row, reach let s:chars11 = 'TY' " lower row let s:chars12 = 'ZXCVM,./' " lower row, reach let s:chars13 = 'BN' " numbers let s:chars14 = '12347890' " numbers, reach let s:chars15 = '56' " tab let s:chars16 = '' " enter, backspace let s:chars17 = '' " common sentence chars, non-shifted let s:chars18 = "'-`" " common sentence chars, shifted let s:chars19 = '?!":()' " less-used chars let s:chars20 = '@#$%^&*~_+' " basic coding chars let s:chars21 = '[]{}\\|' " insert, delete, home, end " function keys " pageup, pagedown " arrow keys " ctrl, alt, shift combinations " ----------------------------------------------------------------- " frequency/density of chars based on level let s:density = 1 " initial speed let s:delayinit = 800 " current speed let s:delay = s:delayinit " max speed let s:delaymax = 400 " wrong key warning let s:wrongkey = "" " track correct/total keys let s:total = str2nr(0) let s:correct = str2nr(0) let s:score = str2nr(0) " set maximum loops (chars) per level let s:loopmax = 20 " set main level let s:level = 1 " set levels max let s:levelmax = 21 " find game area call s:GameArea() " add returns so setline() works call s:GameBoard() " clear any previous game scraps call s:ClearLines() endfunction " s:GameArea() {{{1 function! s:GameArea() " find initial game area let s:winheight = winheight(0) let s:winwidth = Cream_linewidth() - 2 if s:winwidth > 80 let s:winwidth = 80 endif endfunction " s:GameBoard() {{{1 function! s:GameBoard() " initialize game space--put a return in each line, we can't " setline() if a line doesn't exist if !exists("s:winheight") call s:GameArea() endif let @x = "" let i = 1 while i < s:winheight let @x = @x . "\n" let i = i + 1 endwhile normal "xP endfunction " s:ClearLines() {{{1 function! s:ClearLines() " clears all lines let i = 0 while i < s:winheight + 40 if exists("s:ttline{i}") unlet s:ttline{i} endif let i = i + 1 endwhile endfunction " s:Header() {{{1 function! s:Header() " defines current header and it's length let s:tthelp = 6 let s:ttline1 = "" let s:ttline2 = " Type letters before they reach the bottom! " . s:wrongkey let s:ttline3 = " [Stop]" let s:score = ((s:correct*100)/(s:total*100))/100 let s:ttline4 = " Correct: " . s:correct . " Total: " . s:total . " Score: " . s:score . "%" let s:ttline5 = " Seconds: " . s:loop . " Level: " . s:level . " Speed: " . s:delay let s:ttline6 = "" let i = 0 while i < s:winwidth let s:ttline6 = s:ttline6 . "-" let i = i + 1 endwhile ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " s:correct = \"" . s:correct . "\"\n" . " \ " str2nr(s:correct) = \"" . str2nr(s:correct) . "\"\n" . " \ " string(s:correct) = \"" . string(s:correct) . "\"\n" . " \ " s:total = \"" . s:total . "\"\n" . " \ " str2nr(s:total) = \"" . str2nr(s:total) . "\"\n" . " \ " string(s:total) = \"" . string(s:total) . "\"\n" . " \ " s:score = \"" . s:score . "\"\n" . " \ " str2nr(s:score) = \"" . str2nr(s:score) . "\"\n" . " \ " string(s:score) = \"" . string(s:score) . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** endfunction " s:MouseClick() {{{1 function! s:MouseClick() let word = expand("") if word == "Stop" let b:quit = 1 endif endfunction " s:PlayLevel() {{{1 function! s:PlayLevel() " test if maximum loops reached let s:loop = 1 while s:loop < s:loopmax && !exists("b:quit") " define game area (do it each loop in case window size " changed via mouse) call s:GameArea() " define header (do before line clearing so we know how " much) call s:Header() " advance existing lines 1 line, start from bottom let i = s:winheight - 1 while i > s:tthelp if exists("s:ttline{i}") let s:ttline{i+1} = s:ttline{i} endif let i = i - 1 endwhile " clear last line if exists("s:ttline{s:winheight}") unlet s:ttline{s:winheight} endif " decide column for new char let col = Urndm(4, s:winwidth - 4) " compose new line ( setline() ) let newline = "" " cat leading spaces/padding let i = 0 while i < col let newline = newline . " " let i = i + 1 endwhile " pick new char let len = strlen(s:chars) " random position needs a few spaces at border let cnt = Urndm(0, len) let char = s:chars[cnt] let char = s:EquivChar(char) let newline = newline . char " draw screen " start at top let i = 1 " header while i <= s:tthelp if exists("s:ttline{i}") call setline(i, s:ttline{i}) endif let i = i + 1 endwhile " play area, newline let s:ttline{s:tthelp+1} = newline " play area, existing while i < s:winheight if exists("s:ttline{i}") call setline(i, s:ttline{i}) endif let i = i + 1 endwhile " TODO: footer? (with history?) " "poof" indicator that char was correct let poof = "*poof*" " remove poofs while i > s:tthelp if exists("s:ttline{i}") if match(s:ttline{i}, escape(poof, '*')) != -1 " remove it from line let s:ttline{i} = substitute(s:ttline{i}, '^ *' . escape(poof, '*'), '', '') " redraw line call setline(i, s:ttline{i}) " refresh redraw "" quit remove loop "return break endif endif let i = i - 1 endwhile " cleanup (should be unnecessary!) execute "%substitute/" . escape(poof, '*') . "//gei" " remove lines with just whitespace execute ':%substitute/\s\+$//ge' " refresh screen redraw let sleep = 0 while sleep < s:delay " get char loop let char = getchar(0) let char = escape(char, '.') if exists("b:quit") return -1 endif " Esc if char == 27 let b:quit = 1 break " LeftMouse elseif char == "\" \|| char2nr(char[0]) == 128 \&& char2nr(char[1]) == 253 \&& char2nr(char[2]) == 44 \&& char2nr(char[3]) == 0 execute "normal i\" call s:MouseClick() if exists("b:quit") break endif endif if char let s:total = s:total + 1 let i = s:winheight " check if getchar matches char "in play" (from bottom up) let i = s:winheight while i > s:tthelp if exists("s:ttline{i}") if match(s:ttline{i}, poof) == -1 \ && match(s:ttline{i}, escape(s:EquivChar(nr2char(char)), '.\')) != -1 " remove it from line let before = s:ttline{i} let s:ttline{i} = substitute(s:ttline{i}, escape(s:EquivChar(nr2char(char)), '.\'), poof, '') " redraw line call setline(i, s:ttline{i}) let i = i - 1 " refresh redraw " quit remove loop let flag = 0 let s:correct = s:correct + 1 break endif endif let i = i - 1 endwhile " no match if we get here " penalty for wrong key is no delay if !exists("flag") let flag = 1 endif endif " time of local loop to getchar() (*not* screen " refresh, that's "s:delay") if exists("flag") && flag == 1 let sleep = s:delay let s:wrongkey = "*** WRONG KEY! ***" else let sleepdelay = 10 execute "silent! sleep " . sleepdelay . " m" let sleep = sleep + sleepdelay let s:wrongkey = "" endif if exists("flag") unlet flag endif endwhile let s:loop = s:loop + 1 endwhile endfunction " s:EquivChar() {{{1 function! s:EquivChar(char) " return character equivalents for non-printing chars if a:char == " " return "SPACE" elseif a:char == "SPACE" return " " elseif a:char == "" return "TAB" elseif a:char == "TAB" return "" elseif a:char == "" return "BACKSPACE" elseif a:char == "BACKSPACE" return "" "elseif a:char == "." " return "." else return a:char endif endfunction " 1}}} """" Random number generation (obsolete) """" Random_int_range() {{{1 """function! Random_int_range(min, max) """" Return a "random" integer (0-32768). Returns -1 on error. """" TODO: Currently unable to handle min. """ """ " disallow string """ if type(a:min) == 1 || type(a:max) == 1 """ call confirm("Error: Random() arguments must be numbers.") """ return -1 """ endif """ " verify arguments """ if a:min < 0 || a:min > 32768 """ call confirm("Error: Random() argument 1 must be between 0-32768.") """ return -1 """ endif """ if a:max < 0 || a:max > 32768 """ call confirm("Error: Random() argument 2 must be between 0-32768.") """ return -1 """ endif """ if a:min >= a:max """ call confirm("Error: Random() argument 2 must be greater than 1.") """ return -1 """ endif """ """ if exists("rnd") """ " ensure balanced range (multiple) """ if a:min == 0 && Cream_isfactor(32768, a:max) """ return rnd % a:max """ else """ " TODO: unfinished """ endif """ endif """ return -1 """ """endfunction """ """" Random_int() {{{1 """function! Random_int() """" Return a random integer based on one of several available means. """ """ " Unix/Linux (2^8) """ if has("unix") """ let rnd = system("echo $RANDOM") """ let rnd = matchstr(rnd, '\d\+') """ " Windows 2K/XP (2^8) """ elseif has("win32") && exists("$RANDOM") """ let rnd = $RANDOM """ " else """ else """ let rnd = Random_int_time() """ endif """ """ return rnd """ """endfunction """ """" Random_int_time() {{{1 """function! Random_int_time() """" Return a pseudo-random integer [0-32768 (2^16)] initially seeded by """" time. """ """ " test function hasn't been run this second """ if !exists("s:localtime") """ " initialize seconds """ let s:localtime = localtime() """ " initialize millisecond fractions """ let s:rnd0100 = 0 """ let s:rnd0010 = 0 """ let s:rnd0001 = 0 """ else """ " pause a millisecond """ call s:Random_pause() """ endif """ """ " throw out returns greater than 2^16 (just 4 possibilities) """ while !exists("rnd") """ """ " seed with time if no previous random exists """ if !exists("s:rnd") """ """ " Vim can handle max 32-bit number (4,294,967,296) """ " get afresh (each loop) """ let time = localtime() """ let s:rnd9 = matchstr(time, '\zs.\ze.........$') + 0 """ let s:rnd8 = matchstr(time, '.\zs.\ze........$') + 0 """ let s:rnd7 = matchstr(time, '..\zs.\ze.......$') + 0 """ let s:rnd6 = matchstr(time, '...\zs.\ze......$') + 0 """ let s:rnd5 = matchstr(time, '....\zs.\ze.....$') + 0 """ let s:rnd4 = matchstr(time, '.....\zs.\ze....$') + 0 """ let s:rnd3 = matchstr(time, '......\zs.\ze...$') + 0 """ let s:rnd2 = matchstr(time, '.......\zs.\ze..$') + 0 """ let s:rnd1 = matchstr(time, '........\zs.\ze.$') + 0 """ let s:rnd0 = matchstr(time, '.........\zs.\ze$') + 0 """ " s:rnd0100 set above """ " s:rnd0010 set above """ " s:rnd0001 set above """ """ " string repeating variables ("random" by chaos theory) """ let rnd = """ \ s:rnd3 . """ \ s:rnd2 . """ \ s:rnd1 . """ \ s:rnd0 . """ \ s:rnd0100 . """ \ s:rnd0010 . """ \ s:rnd0001 """ " strip leading 0's prior to math (might be interpreted as octal) """ let rnd = (substitute(rnd, '^0\+', '', 'g') + 0) """ """ " otherwise, use previous result as seed """ else """ let rnd = s:rnd """ endif """ """ " Linear Congruential Generator """ " """ " o http://www.maths.abdn.ac.uk/~igc/tch/mx4002/notes/node78.html """ " * recommends M = 2^32, A = 1664525, C = 1 """ " o http://www.cs.sunysb.edu/~skiena/jaialai/excerpts/node7.html """ " o http://www.embedded.com/showArticle.jhtml?articleID=20900500 """ " o http://www.mathcom.com/corpdir/techinfo.mdir/scifaq/q210.html#q210.6.1 """ " * x(n) = A * x(n-1) + C mod M """ """ " M (smallest prime larger than 2^8, conveniently 2^8+4, """ " meaning only four results require throwing out) """ let m = 32771 """ """ " A (multiplier, 2 < a < m ) """ " Note: we use digits here consecutive with first number to """ " make sure it's impossible to repeat frequently (115 days). """ let a = s:rnd5 . s:rnd4 """ " strip leading 0's prior to math (might be interpreted as octal) """ let a = (substitute(a, '^0\+', '', 'g') + 0) + 2 """ """ " C """ let c = 1 """ """ let rnd = (((a * rnd) + c) % m) """ """ " pause and increment if out of range """ if rnd > 32768 """ call s:Random_pause() """ endif """ """ endwhile """ """ " update at end (after loops) """ let s:localtime = localtime() """ """ " remember for next time """ let s:rnd = rnd """ """ return rnd """ """endfunction """ """function! s:Random_pause() """" Used to count pause 10 milliseconds and to increment both the 10s """" and 100s of milliseconds script-globals. """ """ let s:rnd0001 = (s:rnd0001 + 1) """ if s:rnd0001 > 9 """ let s:rnd0001 = 0 """ let s:rnd0010 = (s:rnd0010 + 1) """ if s:rnd0010 > 9 """ let s:rnd0010 = 0 """ let s:rnd0100 = (s:rnd0100 + 1) """ if s:rnd0100 > 9 """ let s:rnd0100 = 0 """ endif """ endif """ endif """ sleep 1 m """ """endfunction """ """" TTest() {{{1 """function! TTest() """" Create set of random numbers in new buffer. """" """" Note: """" It can be convenient to create a data with a range equaling the """" number of iterations. (It's a square plot.) But in this case, you """" may not wish run the 2^8 iterations required to balance the integer """" range. (Although on my 5-year old PC, this only takes about ten """" minutes and this routine continually indicates progress.) So if you """" wish to run a smaller set, two options are available: """" """" 1. Simply throw out each result that exceeds your range. This means """" wasted iterations, but should not have any affect on the results. """" """" 2. It is far more efficient to iterate by some factor of 2^8 and """" then modulus each result by the same factor to ensure a balanced """" reduction of the integers returned. Example: """" """" let max = 8192 """" [...] """" let a = Random_int() """" let a = 32768 % max <= ADD THIS LINE """" """" Otherwise you will end up disfavoring results between the """" non-factor divisor and the next factor. """" """ """ let timein = localtime() """ """ " iterations """ let max = 10000 """ """ let str = "" """ let i = 0 """ while i < max """ " get random integer """ let a = Random_int_time() """ "let a = Rndm() """ let str = str . a . "\n" """ """ " progress indication """ " pad iterations for ouput """ let cnt = i """ while strlen(cnt) < strlen(max) """ let cnt = " " . cnt """ endwhile """ " pad result for ouput """ let result = a """ while strlen(result) < strlen(max) """ let result = " " . result """ endwhile """ " echo to command line """ echo cnt . " = " . result """ redraw """ """ let i = i + 1 """ endwhile """ """ let elapsed = localtime() - timein """ let str = "Elapsed time: " . elapsed . " seconds\n" . str """ """ let @x = str """ enew """ normal "xP """ """endfunction " 1}}} " vim:foldmethod=marker cream-0.43/addons/cream-cream-update.vim0000644000076400007660000001307211517300756020541 0ustar digitectlocaluser" " Filename: cream-cream-update.vim " Updated: 2004-09-11 23:04:11-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Documentation: {{{1 " " Description: " " This is a Cream developer module to sychronize a CVS checkout of with CVS. " " Required: (set in cream-user.vim!) " o g:cream_cvs: local path to Cream CVS root (above the modules) " * no trailing slash/backslash " o $CVS_RSH (example: "ssh") " o $CVSROOT (example: "[username]@cvs.sourceforge.net:/cvsroot/cream") " o $CREAM " o $VIM " o $HOME (Unix) for creamrc location " " Notes: " o cvs import -I ! -W "*.bmp -k 'b'" -W "*.png -k 'b'" cream [username] start " o cvs update -P (prunes empty directories from working copy) " o cvs update -d (bring down directories to working copy) " o cvs checkout ... " " ToDo: " o cvs add " o cvs remove " " register as Cream add-on {{{1 if exists("$CREAM") " don't list unless developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ "Update", \ "Update Cream developer package", \ "Update Cream developer package Zip file, generally not for use for anyone but developers. Enables portable transmission of alpha technologies. ;)", \ "Cream Devel.Update", \ "call Cream_update_package()", \ '' \ ) endif " Cream_update_package() {{{1 function! Cream_update_package() " main function (decide which action to perform) "*** DEBUG: let n = confirm( \ "WARNING!\n" . \ " This routine is strictly developer-only! Do NOT use\n" . \ " unless you've read the code and are prepared for its\n" . \ " consequences!\n" . \ "\n", "&Ok\n&Cancel", 2, "Info") if n != 1 return endif "*** " validate required vars let error = "" " $CVS_RSH if !exists("$CVS_RSH") let error = error . "$CVS_RSH not found.\n" elseif !executable($CVS_RSH) let error = error . "Value of $CVS_RSH is not an executable.\n" endif " $CVSROOT if !exists("$CVSROOT") let error = error . "$CVSROOT not found.\n" endif " g:cream_cvs if has("win32") && !has("win32unix") let slash = '\' else let slash = '/' endif if !exists("g:cream_cvs") let error = error . "g:cream_cvs not found.\n" endif " cvs if !executable("cvs") let error = error . "cvs program not found.\n" endif " Errors if error != '' call confirm( \ "Error(s):\n\n" . \ error . "\nQuitting...\n" . \ "\n", "&Ok", 1, "Info") return endif let g:cream_cvs = Cream_path_addtrailingslash(g:cream_cvs) " loop let myreturn = 1 while myreturn == 1 " stack buttons vertically let sav_go = &guioptions set guioptions+=v " decide what we want to do let n = confirm( \ "Please select an option:\n" . \ "\n", \ "CVS Co&mmit\nCVS &Update\n&Cancel", 1, "Info") " restore button stacking preference let &guioptions = sav_go if n == 1 call s:Cream_CVScommit(g:cream_cvs) elseif n == 2 call s:Cream_CVSupdate(g:cream_cvs) else let myreturn = 0 endif endwhile endfunction " Cream_CVScommit() {{{1 function! s:Cream_CVScommit(path) " commit files in {path} " Note: cvs doesn't want trailing slash " Tested: Win95, WinXP, GNU/Linux (RH9) " get commit message let message = s:Cream_CVSmessage() if message == -1 return endif " establish quote and slash chars as required if has("win32") && !has("win32unix") let quote = '"' let slash = '\' else let quote = '' let slash = '/' endif " don't use silent, we need to enter a password in the shell " Notes: " o Both platforms require a quoted message! " o Unix requires a trailing slash if has("win32") && !has("win32unix") " change directories (requires trailing slash for some reason) execute 'cd ' . quote . a:path . slash . quote execute '!cvs commit -m "' . message . '" ' . quote . a:path . quote else " can't pass absolute path on Unix execute 'cd ' . quote . a:path . quote execute '!cvs commit -m "' . message . '"' endif endfunction " Cream_CVSupdate() {{{1 function! s:Cream_CVSupdate(path) " commit files in module {path} " establish quote and slash chars as required if has("win32") && !has("win32unix") let quote = '"' else let quote = '' endif " don't use silent if has("win32") && !has("win32unix") execute '!cvs update -Pd ' . quote . a:path . quote else " can't pass absolute path on Unix execute 'cd ' . quote . a:path . quote execute '!cvs update -Pd' endif endfunction " utility functions {{{1 function! s:Cream_CVSmessage() " prompts and returns the CVS log message " warns and returns -1 if empty let message = inputdialog("Please enter log message:", "") if message == "" call confirm( \ "Can not continue without a log message. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return -1 else return escape(message, '"<>|&') endif endfunction " 1}}} " vim:foldmethod=marker cream-0.43/addons/cream-cream-foldfunctions.vim0000644000076400007660000000444511517300756022140 0ustar digitectlocaluser" " cream-vim-foldfunctions.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " " Description: " Add fold marks for all functions in the form " " " MyFunction() {_{_{_1 " function! MyFunction() " " and place " " " vim_:_foldmethod=marker " " at the bottom of the current file. (Where the underscores "_" are " omitted above.) " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Vim Fold Functions', \ 'Fold all functions in the current document', \ "Create a comment line above each Vim function with the function's name followed by a fold marker.", \ 'Cream Devel.Fold Vim Functions', \ 'call Cream_vim_foldfunctions()', \ '' \ ) endif function! Cream_vim_foldfunctions() " fold all functions in a given Vim filetype document " Note: Weirdness in syntaxes below is to prevent folding. ;) " if filetype not Vim, quit if &filetype != "vim" call confirm( \ "Function designed only for Vim files. Please check this document's filetype.\n" . \ "\n", "&Ok", 1, "Info") return endif " fold all functions execute '%substitute/^function[!] \(\k\+\)()$/" \1() {' . '{' . '{' . '1\r\1()/gei' " add fold marker at bottom line ""*** BROKEN "call setline("$", getline("$") . "\n\" vim" . ":foldmethod=marker") ""*** let mypos = Cream_pos() " go to last line normal G normal $ execute "normal a\\" }" . "}" . "}" . "1\" call setline("$", "\" vim" . ":foldmethod=marker") execute mypos endfunction cream-0.43/addons/cream-cream-vim-abbrev.vim0000644000076400007660000031563611517300756021324 0ustar digitectlocaluser" " Filename: cream-cream-vim-abbrev.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " ********************************************************************** " WARNING: " This script is very much a work in progress and has several known " bugs and likely many unknown ones. You will find little automatic " success with it. It is being provided here for information only. Be " hereby warned that using these functions will tear valid Vim script " limb from limb leaving a trail of crying and gnashing of teeth " behind. " " That said, we would very much appreciate your feedback on correcting " said anamolies. Feel free to forward suggestions or fixes to: " digitect (at) mindspring (dot) com " ********************************************************************** " " Description: " This script is currently one half of a set of functions to convert " Vim command and option names between short/abbreviated and long/full " name forms. (Ex. "fu" => "function", "e" => "edit") These are " sometimes indicated like "fu[nction]" or "e[dit]". " " The script currently only converts from short to long. Based on my " own preferences, I am less motivated to do the other side. ;) But " I conceed it would be useful to have a polished routine to help " going back and forth between the two for those with preferences for " either readability or bandwidth conservation. " " The script contains plenty of working debris at the bottom which " shouldn't impact the code above. I have tried to be as complete as " possible by using Vim's own syntax and option lists to compile the " substitutions from. However you may notice omissions. " " Date: 2002-11-04 " Version: 0.1 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=471 " Author: Steve Hall [ digitect@mindspring.com ] " License: GPL (http://www.gnu.org/licenses/gpl.html) " " Dependancies: " multvals.vim (http://www.vim.org/script.php?script_id=171) " by Hari Krishna Dara, for the arrays of items to be substituted. " " Instructions: " Just drop this file into your plugins directory, make sure you have " the required dependencies (multvals.vim) also there, and start Vim. " Then call the functions Cream_vimshort2long() and " Cream_vimlong2short() from within the file to be converted. " ToDo: " * Avoid mapping syntaxes. " * Avoid heinous "normal af|g^" => "normal af|global^" error " * Avoid heinous "normal j+r" => "normal j+read" error " * Add whitespace separators around evaluation operators and " concatenation symbols. " " Design Requirements: " * File being converted (current buffer) must have &filetype == "vim" " * Two functions: " > long2short() " > short2long() " * Must handle strings appropriately: " > Must be able to search strings, due to execute forms, yet... " > Must not modify user strings. " * Must be case sensitive " * Should consider Vim keywords only. " > Patterns use syntax keywords to demark? " - vimCommand " - vimOptions " > Patterns use whole word to demark? " * Could consider preceeding ":" character " * Could be able to handle an entire file and only a selection. " * Could handle modifiers " > ! " " register as a Cream add-on if exists("$CREAM") " don't list unless developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ 'Vim Short-to-long', \ 'Extend Vim script short forms to long', \ "Convert Vim command and option names between short/abbreviated and long/full name forms. (Ex. \"fu\" => \"function\", \"e\" => \"edit\") These are sometimes indicated like \"fu[nction]\" or \"e[dit]\".", \ 'Cream Devel.Vim Short-to-long', \ 'call Cream_vimshort2long()', \ '' \ ) endif function! Cream_vimshort2long() " convert Vim script abbreviated command and option names to long/complete forms let s:save_cpo = &cpo set cpoptions&vim " restrict to only vim filetypes if &filetype != "vim" call confirm("Cannot convert a file without a filetype of \"vim\". Please save file with .vim extension. \n\nQuitting...", "&Ok", 1, "Info") endif " warning let n = confirm( \ "Warning!\n" . \ "\n" . \ "Preparing to perform over 2100 complex substitutions. This\n" . \ "may take some time. Continue?\n" . \ "\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif "---------------------------------------------------------------------- " commands, special first " * prepares later requirements for well-formed "set" or "normal" " precedents " * skip if preceded by "normal\s\+" " * skip if in or after string (not between a quote and beginning of line) " * skip if followed by an open parenthesis " :norm[al] silent! %substitute/\(^.*["']\{1}.*\)\@\(\s*(\)\@!/normal/geI " :exe[cute] silent! %substitute/\(^.*["']\{1}.*\)\@\(\s*(\)\@!/execute/geI " :!{cmd} " hmmm... "...................................................................... " commands, special precedents next " * skip if preceded by "normal\s\+" " * skip if in or after string (not between a quote and beginning of line) " - except when preceded by execute " or execute ' " * skip if followed by an open parenthesis " :sil[ent] silent! %substitute/\(^.*["']\{1}.*\)\@\(\s*(\)\@!/silent/geI " :sil[ent] when preceded by execute " or execute ' silent! %substitute/\(^\s*execute\s\+["']\{1}\)\\(\s*(\)\@\(\s*(\)\@!/set/geI " :se[t] when preceded by execute " , execute ' , execute "silent , or execute 'silent! silent! %substitute/\(^\s*execute\s\+["']\{1}\)\(silent\%[!]\=\s\+\)\=\\(\s*(\)\@!/\1\2set/geI " :setl[ocal] silent! %substitute/\(^.*["']\{1}.*\)\@\(\s*(\)\@!/setlocal/geI " :setl[ocal] when preceded by execute " , execute ' , execute "silent , or execute 'silent! silent! %substitute/\(^\s*execute\s\+["']\{1}\)\(silent\%[!]\=\s\+\)\=\\(\s*(\)\@!/\1\2setlocal/geI "...................................................................... " commands " * must *not* be preceded by "set\s\+" or "setlocal\s\+" " * skip if preceded by "normal\s\+" " * skip if in or after string (not between a quote and beginning " of line) " - except when preceded by silent[!] " * skip if followed by an open parenthesis " * skip if followed by a colon, per buffer/script-scoping prefixes " get array of long/short name pairs let myvimpairs = Cream_vimabbrev_makepairs_commands() " itterate through each pair and do substitutions over file let i = 0 let total = MvNumberOfElements(myvimpairs, "\n") " modify "ab[breviate]" form to "ab\%[breviate]" let myvimpairs = substitute(myvimpairs, '[', '\\\%[', 'g') while i < total " get pair let mypair = MvElementAt(myvimpairs, "\n", i) " get long (before ) let mylong = MvElementAt(mypair, "\t", 0) " get short (after ) let myshort = MvElementAt(mypair, "\t", 1) " substitute when not in string or when not preceded by "normal " or "set " execute 'silent! %substitute/\(^.*["' . nr2char(39) . ']\{1}.*\)\@\(:\)\@!\(\s*(\)\@!/' . mylong . '/geI' " substitute when in string only if preceded by "execute " and at beginning or also preceded by "silent[!]", as long as no "set " or "setlocal " execute 'silent! %substitute/\(^\s*execute\%[!]\s\+\)\{1}\(["' . nr2char(39) . ']\{1}\)\(silent\%[!]\s\+\)\=\(set\s\+\)\@\(:\)\@!\(\s*(\)\@) let mylong = MvElementAt(mypair, "\t", 0) " get short (after ) let myshort = MvElementAt(mypair, "\t", 1) " substitute options preceded by "set " or "setlocal " execute 'silent! %substitute/\(\\s\+\)\{1}\<' . myshort . '\>\(:\)\@!\(\s*(\)\@!/\1' . mylong . '/geI' let i = i + 1 endwhile let &cpo = s:save_cpo endfunction function! Cream_vimlong2short() call confirm("Sorry, this function not complete yet!", "&Ok", 1, "Info") endfunction " function! Cream_vimabbrev_makepairs_commands() {{{1 function! Cream_vimabbrev_makepairs_commands() " create a two-dimensional array 'VimPairs', in the form 'long\tshort\n' " *** Currently 43 pairs of dupes (86 total) commented out *** let VimCommandsPairs = "" let tab = nr2char(9) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "abbreviate" . tab . "ab[breviate]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "abclear" . tab . "abc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "aboveleft" . tab . "abo[veleft]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "all" . tab . "al[l]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "amenu" . tab . "am[enu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "anoremenu" . tab . "an[oremenu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "argadd" . tab . "arga[dd]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "argdelete" . tab . "argd[elete]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "argedit" . tab . "arge[dit]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "argglobal" . tab . "argg[lobal]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "arglocal" . tab . "argl[ocal]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "args" . tab . "ar[gs]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "argument" . tab . "argu[ment]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ascii" . tab . "as[cii]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "augroup" . tab . "aug[roup]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "aunmenu" . tab . "aun[menu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "autocmd" . tab . "au[tocmd]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "badd" . tab . "bad[d]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ball" . tab . "ba[ll]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bdelete" . tab . "bd[elete]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "belowright" . tab . "bel[owright]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bfirst" . tab . "bf[irst]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "blast" . tab . "bl[ast]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bmodified" . tab . "bm[odified]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bNext" . tab . "bN[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bnext" . tab . "bn[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "botright" . tab . "bo[tright]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bprevious" . tab . "bp[revious]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "break" . tab . "brea[k]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "breakadd" . tab . "breaka[dd]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "breakdel" . tab . "breakd[el]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "breaklist" . tab . "breakl[ist]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "brewind" . tab . "br[ewind]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "browse" . tab . "bro[wse]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "buffer" . tab . "b[uffer]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "buffer" . tab . "buf[fer]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "buffers" . tab . "ls" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bunload" . tab . "bun[load]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "bwipeout" . tab . "bw[ipeout]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cabbrev" . tab . "ca[bbrev]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cabclear" . tab . "cabc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "call" . tab . "cal[l]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cclose" . tab . "ccl[ose]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "center" . tab . "ce[nter]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cfile" . tab . "cf[ile]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cfirst" . tab . "cfir[st]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "change" . tab . "c[hange]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "chdir" . tab . "chd[ir]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "checkpath" . tab . "che[ckpath]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "checktime" . tab . "checkt[ime]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "clast" . tab . "cla[st]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "clist" . tab . "cl[ist]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "close" . tab . "clo[se]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cmap" . tab . "cm[ap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cmapclear" . tab . "cmapc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cmenu" . tab . "cme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cnewer" . tab . "cnew[er]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cnext" . tab . "cn[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cNext" . tab . "cN[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cnfile" . tab . "cnf[ile]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cnoreabbrev" . tab . "cnorea[bbrev]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cnoremap" . tab . "cno[remap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cnoremenu" . tab . "cnoreme[nu]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "colder" . tab . "col[der]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "colorscheme" . tab . "colo[rscheme]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "comclear" . tab . "comc[lear]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "command" . tab . "com[mand]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "confirm" . tab . "cf" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "confirm" . tab . "conf[irm]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "continue" . tab . "con[tinue]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "copen" . tab . "cope[n]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "copy" . tab . "co[py]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "copy" . tab . "t" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cprevious" . tab . "cp" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cquit" . tab . "cq[uit]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "crewind" . tab . "cr[ewind]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cunabbrev" . tab . "cuna[bbrev]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cunmap" . tab . "cu[nmap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cunmenu" . tab . "cunme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "cwindow" . tab . "cw[indow]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "delcommand" . tab . "delc[ommand]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "delete" . tab . "d[elete]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "delfunction" . tab . "delf[unction]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "diffget" . tab . "diffg[et]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "diffpatch" . tab . "diffp[atch]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "diffput" . tab . "diffpu[t]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "diffthis" . tab . "difft[his]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "digraphs" . tab . "dig[raphs]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "display" . tab . "di[splay]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "djump" . tab . "dj[ump]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "dlist" . tab . "dl[ist]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "doautoall" . tab . "doautoa[ll]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "doautocmd" . tab . "do[autocmd]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "drop" . tab . "dr[op]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "dsearch" . tab . "ds[earch]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "dsplit" . tab . "dsp[lit]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "echo" . tab . "ec[ho]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "echoerr" . tab . "echoe[rr]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "echomsg" . tab . "echom[sg]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "edit" . tab . "e[dit]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "else" . tab . "el[se]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "elseif" . tab . "elsei[f]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "emenu" . tab . "em[enu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "endfunction" . tab . "endf[unction]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "endif" . tab . "en[dif]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "endwhile" . tab . "endw[hile]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "enew" . tab . "ene[w]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "exit" . tab . "exi[t]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "file" . tab . "f[ile]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "filetype" . tab . "filet[ype]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "filetype" . tab . "ft" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "find" . tab . "fin[d]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "finish" . tab . "fini[sh]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "first" . tab . "fir[st]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "fixdel" . tab . "fix[del]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "fold" . tab . "fo" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "foldclose" . tab . "foldc[lose]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "folddoclosed" . tab . "folddoc[losed]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "folddoopen" . tab . "foldd[oopen]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "foldopen" . tab . "foldo[pen]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "function" . tab . "fu[nction]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "global" . tab . "g[lobal]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "goto" . tab . "go[to]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "grep" . tab . "gr[ep]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "grepadd" . tab . "grepa[dd]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "hardcopy" . tab . "ha[rdcopy]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "help" . tab . "h[elp]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "helpfind" . tab . "helpf[ind]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "helptags" . tab . "helpt[ags]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "hide" . tab . "hid[e]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "highlight" . tab . "hi[ghlight]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "history" . tab . "his[tory]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "iabbrev" . tab . "ia[bbrev]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "iabclear" . tab . "iabc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ijump" . tab . "ij[ump]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ilist" . tab . "il[ist]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "imap" . tab . "im[ap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "imapclear" . tab . "imapc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "imenu" . tab . "ime[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "inoreabbrev" . tab . "inorea[bbrev]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "inoremap" . tab . "ino[remap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "inoremenu" . tab . "inoreme[nu]") " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "isearch" . tab . "is[earch]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "isplit" . tab . "isp[lit]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "iunabbrev" . tab . "iuna[bbrev]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "iunmap" . tab . "iu[nmap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "iunmenu" . tab . "iunme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "join" . tab . "j[oin]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "jumps" . tab . "ju[mps]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "language" . tab . "lan[guage]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "last" . tab . "la[st]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "lcd" . tab . "lc[d]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "lchdir" . tab . "lch[dir]" ) " let (no abbreviation) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "left" . tab . "le[ft]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "leftabove" . tab . "lefta[bove]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "lmap" . tab . "lm[ap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "lmapclear" . tab . "lmapc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "lnoremap" . tab . "lno[remap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "loadview" . tab . "lo[adview]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "lunmap" . tab . "lu[nmap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "make" . tab . "mak[e]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "mapclear" . tab . "mapc[lear]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "mark" . tab . "ma[rk]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "match" . tab . "mat[ch]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "menu" . tab . "me[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "menutranslate" . tab . "menut[ranslate]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "mkexrc" . tab . "mk[exrc]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "mksession" . tab . "mks[ession]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "mkview" . tab . "mkvie[w]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "mkvimrc" . tab . "mkv[imrc]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "mode" . tab . "mod[e]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "move" . tab . "m[ove]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "next" . tab . "n[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "Next" . tab . "N[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "nmap" . tab . "nm[ap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "nmapclear" . tab . "nmapc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "nmenu" . tab . "nme[nu]" ) " normal (removed) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "nnoremap" . tab . "nn[oremap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "nnoremenu" . tab . "nnoreme[nu]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "nunmap" . tab . "nun[map]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "nunmenu" . tab . "nunme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "omap" . tab . "om[ap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "omapclear" . tab . "omapc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "omenu" . tab . "ome[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "only" . tab . "on[ly]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "onoremap" . tab . "ono[remap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "onoremenu" . tab . "onoreme[nu]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "open" . tab . "o[pen]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "options" . tab . "opt[ions]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ounmap" . tab . "ou[nmap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ounmenu" . tab . "ounme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "pclose" . tab . "pc[lose]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "pedit" . tab . "ped[it]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "perl" . tab . "pe[rl]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "perldo" . tab . "perld[o]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "pop" . tab . "po[p]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "popup" . tab . "pop[up]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ppop" . tab . "pp[op]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "preserve" . tab . "pre[serve]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "previous" . tab . "prev[ious]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "Print" . tab . "P[rint]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "print" . tab . "p[rint]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "promptfind" . tab . "promptf[ind]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "promptrepl" . tab . "promptr[epl]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "psearch" . tab . "ps[earch]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptag" . tab . "pta[g]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptfirst" . tab . "ptf[irst]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptjump" . tab . "ptj[ump]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptlast" . tab . "ptl[ast]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptNext" . tab . "ptN[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptnext" . tab . "ptn[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptprevious" . tab . "ptp[revious]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptrewind" . tab . "ptr[ewind]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ptselect" . tab . "pts[elect]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "put" . tab . "pu[t]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "pwd" . tab . "pw[d]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "pyfile" . tab . "pyf[ile]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "python" . tab . "py[thon]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "qall" . tab . "qa[ll]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "quit" . tab . "q[uit]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "quitall" . tab . "quita[ll]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "noreabbrev" . tab . "norea[bbrev]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "read" . tab . "r[ead]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "recover" . tab . "rec[over]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "redir" . tab . "redi[r]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "redo" . tab . "red[o]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "redraw" . tab . "redr[aw]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "registers" . tab . "reg[isters]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "noremenu" . tab . "noreme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "noremap" . tab . "no[remap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "resize" . tab . "res[ize]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "retab" . tab . "ret[ab]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "return" . tab . "retu[rn]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "rewind" . tab . "rew[ind]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "right" . tab . "ri[ght]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "rightbelow" . tab . "rightb[elow]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "ruby" . tab . "rub[y]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "rubydo" . tab . "rubyd[o]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "rubyfile" . tab . "rubyf[ile]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "runtime" . tab . "ru[ntime]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "rviminfo" . tab . "rv[iminfo]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sall" . tab . "sal[l]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sargument" . tab . "sa[rgument]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sargument" . tab . "sar[gument]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "saveas" . tab . "sav[eas]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sball" . tab . "sba[ll]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sbfirst" . tab . "sbf[irst]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sblast" . tab . "sbl[ast]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sbmodified" . tab . "sbm[odified]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sbNext" . tab . "sbN[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sbnext" . tab . "sbn[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sbprevious" . tab . "sbp[revious]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sbrewind" . tab . "sbr[ewind]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sbuffer" . tab . "sb[uffer]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "scriptencoding" . tab . "scripte[ncoding]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "scriptnames" . tab . "scrip[tnames]" ) " set (removed) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "setfiletype" . tab . "setf[iletype]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "setglobal" . tab . "setg[lobal]" ) " setlocal (removed) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sfind" . tab . "sf[ind]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sfirst" . tab . "sfir[st]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "silent" . tab . "sil[ent]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "simalt" . tab . "si[malt]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "slast" . tab . "sla[st]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sleep" . tab . "sl[eep]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "smagic" . tab . "sm[agic]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sNext" . tab . "sN[ext]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "snext" . tab . "sn[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sniff" . tab . "sni[ff]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "snomagic" . tab . "sno[magic]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "source" . tab . "so[urce]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "split" . tab . "sp[lit]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sprevious" . tab . "spr[evious]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "srewind" . tab . "sr[ewind]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "stag" . tab . "sta[g]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "startinsert" . tab . "star[tinsert]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "stjump" . tab . "stj[ump]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "stop" . tab . "st[op]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "stselect" . tab . "sts[elect]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "substitute" . tab . "s[ubstitute]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sunhide" . tab . "sun[hide]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "suspend" . tab . "sus[pend]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "sview" . tab . "sv[iew]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "syntax" . tab . "sy[ntax]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tag" . tab . "ta[g]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tcl" . tab . "tc[l]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tcldo" . tab . "tcld[o]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tclfile" . tab . "tclf[ile]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tearoff" . tab . "te[aroff]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tfirst" . tab . "tf[irst]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tjump" . tab . "tj[ump]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tlast" . tab . "tl[ast]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tmenu" . tab . "tm[enu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tnext" . tab . "tn[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tNext" . tab . "tN[ext]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "topleft" . tab . "to[pleft]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tprevious" . tab . "tp[revious]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "trewind" . tab . "tr[ewind]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tselect" . tab . "ts[elect]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "tunmenu" . tab . "tu[nmenu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "unabbreviate" . tab . "una[bbreviate]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "undo" . tab . "u[ndo]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "unhide" . tab . "unh[ide]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "unlet" . tab . "unl[et]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "unmap" . tab . "unm[ap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "unmenu" . tab . "unme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "update" . tab . "up[date]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "verbose" . tab . "verb[ose]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "version" . tab . "ve[rsion]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vertical" . tab . "vert[ical]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vglobal" . tab . "v[global]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "view" . tab . "vie[w]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "visual" . tab . "vi[sual]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vmap" . tab . "vm[ap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vmapclear" . tab . "vmapc[lear]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vmenu" . tab . "vme[nu]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vnew" . tab . "vne[w]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vnoremap" . tab . "vn[oremap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vnoremenu" . tab . "vnoreme[nu]") let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vsplit" . tab . "vs[plit]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vunmap" . tab . "vu[nmap]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "vunmenu" . tab . "vunme[nu]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wall" . tab . "wa[ll]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "while" . tab . "wh[ile]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wincmd" . tab . "winc[md]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "winpos" . tab . "winp[os]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "winsize" . tab . "win[size]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wnext" . tab . "wn[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wNext" . tab . "wN[ext]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wprevous" . tab . "wp[revous]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wqall" . tab . "wqa[ll]" ) " dupe let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wsverb" . tab . "ws[verb]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "wviminfo" . tab . "wv[iminfo]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "xall" . tab . "xa[ll]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "xit" . tab . "x[it]" ) let VimCommandsPairs = MvAddElement(VimCommandsPairs, "\n", "yank" . tab . "y[ank]" ) return VimCommandsPairs endfunction " function! Cream_vimabbrev_makepairs_options() {{{1 function! Cream_vimabbrev_makepairs_options() let VimOptionsPairs = "" let tab = nr2char(9) "*** Please don't re-tab this! *** "let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "aleph" . tab . "al[eph]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "allowrevins" . tab . "ari" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noallowrevins" . tab . "noari" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "altkeymap" . tab . "akm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noaltkeymap" . tab . "noakm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "autoindent" . tab . "ai" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noautoindent" . tab . "noai" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "autoread" . tab . "ar" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noautoread" . tab . "noar" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "autowrite" . tab . "aw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noautowrite" . tab . "noaw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "autowriteall" . tab . "awa" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noautowriteall" . tab . "noawa" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "background" . tab . "bg" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "backspace" . tab . "bs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "backup" . tab . "bk" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nobackup" . tab . "nobk" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "backupcopy" . tab . "bkc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "backupdir" . tab . "bdir" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "backupext" . tab . "bex" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "backupskip" . tab . "bsk" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "balloondelay" . tab . "bdlay" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ballooneval" . tab . "beval" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noballooneval" . tab . "nobeval" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "binary" . tab . "bin[ary]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nobinary" . tab . "nobin[ary]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "bioskey" . tab . "biosk[ey]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nobioskey" . tab . "nobiosk[ey]" ) " bomb " nobomb let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "breakat" . tab . "brk" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "browsedir" . tab . "bsdir" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "bufhidden" . tab . "bh" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "buflisted" . tab . "bl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "buftype" . tab . "bt" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cdpath" . tab . "cd[path]" ) " cedit let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "charconvert" . tab . "ccv" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cindent" . tab . "cin[dent]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nocindent" . tab . "nocin[dent]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cinkeys" . tab . "cink[eys]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cinoptions" . tab . "cino[ptions]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cinwords" . tab . "cinw[ords]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "clipboard" . tab . "cb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cmdheight" . tab . "ch" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cmdwinheight" . tab . "cwh" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "columns" . tab . "co[lumns]" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "comments" . tab . "com" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "commentstring" . tab . "cms" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "compatible" . tab . "cp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nocompatible" . tab . "nocp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "complete" . tab . "cpt" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "confirm" . tab . "conf[irm]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noconfirm" . tab . "nocf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "conskey" . tab . "consk[ey]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noconskey" . tab . "noconsk[ey]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cpoptions" . tab . "cpo[ptions]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cscopepathcomp" . tab . "cspc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cscopeprg" . tab . "csprg" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cscopetag" . tab . "cst" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nocscopetag" . tab . "nocst" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cscopetagorder" . tab . "csto" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "cscopeverbose" . tab . "csverb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nocscopeverbose" . tab . "nocsverb" ) " debug let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "define" . tab . "def[ine]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "delcombine" . tab . "deco" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "dictionary" . tab . "dict[ionary]" ) " diff " nodiff let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "diffexpr" . tab . "dex" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "diffopt" . tab . "dip" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "digraph" . tab . "dg" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nodigraph" . tab . "nodg" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "directory" . tab . "dir[ectory]" ) " nodisable let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "display" . tab . "dy" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "eadirection" . tab . "ead[irection]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "edcompatible" . tab . "ed[compatible]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noedcompatible" . tab . "noed[compatible]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "encoding" . tab . "enc[oding]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "endofline" . tab . "eol" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noendofline" . tab . "noeol" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "equalalways" . tab . "ea" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noequalalways" . tab . "noea" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "equalprg" . tab . "ep" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "errorbells" . tab . "eb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noerrorbells" . tab . "noeb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "errorfile" . tab . "ef" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "errorformat" . tab . "efm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "esckeys" . tab . "ek" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noesckeys" . tab . "noek" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "eventignore" . tab . "ei" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "expandtab" . tab . "et" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noexpandtab" . tab . "noet" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "exrc" . tab . "ex" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noexrc" . tab . "noex" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "fileencoding" . tab . "fenc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "fileencodings" . tab . "fencs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "fileformat" . tab . "ff" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "fileformats" . tab . "ffs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "filetype" . tab . "fi" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "fillchars" . tab . "fcs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "fkmap" . tab . "fk[map]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nofkmap" . tab . "nofk[map]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldclose" . tab . "fcl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldcolumn" . tab . "fdc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldenable" . tab . "fen" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nofoldenable" . tab . "nofen" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldexpr" . tab . "fde" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldignore" . tab . "fdi" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldlevel" . tab . "fdl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldlevelstart" . tab . "fdls" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldmarker" . tab . "fmr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldmethod" . tab . "fdm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldminlines" . tab . "fml" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldnestmax" . tab . "fdn" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldopen" . tab . "fdo" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "foldtext" . tab . "fdt" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "formatoptions" . tab . "fo[rmatoptions]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "formatprg" . tab . "fp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "gdefault" . tab . "gd[efault]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nogdefault" . tab . "nogd[efault]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "grepformat" . tab . "gfm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "grepprg" . tab . "gp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "guicursor" . tab . "gcr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "guifont" . tab . "gfn" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "guifontset" . tab . "gfs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "guifontwide" . tab . "gfw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "guiheadroom" . tab . "ghr" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "guioptions" . tab . "go" ) " guipty " noguipty let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "helpfile" . tab . "hf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "helpheight" . tab . "hh" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "hidden" . tab . "hid[den]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nohidden" . tab . "nohid[den]" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "highlight" . tab . "hl" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "history" . tab . "hi[story]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "hkmap" . tab . "hk[map]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nohkmap" . tab . "nohk[map]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "hkmapp" . tab . "hkp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nohkmapp" . tab . "nohkp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "hlsearch" . tab . "hls[earch]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nohlsearch" . tab . "nohls[earch]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ignorecase" . tab . "ic" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noignorecase" . tab . "noic" ) " icon " noicon " iconstring let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "imactivatekey" . tab . "imak" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "imcmdline" . tab . "imc[mdline]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noimcmdline" . tab . "noimc[mdline]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "imdisable" . tab . "imd[isable]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noimdisable" . tab . "noimd[isable]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "iminsert" . tab . "imi[nsert]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "imsearch" . tab . "ims[earch]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "include" . tab . "inc[lude]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "includeexpr" . tab . "ine" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "includeexpr" . tab . "inex" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "incsearch" . tab . "is" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noincsearch" . tab . "nois" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "indentexpr" . tab . "inde[ntexpr]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "indentkeys" . tab . "indk" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "infercase" . tab . "inf[ercase]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noinfercase" . tab . "noinf[ercase]" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "insertmode" . tab . "im" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noinsertmode" . tab . "noim" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "isfname" . tab . "isf[name]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "isident" . tab . "isi[dent]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "iskeyword" . tab . "isk[eyword]" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "isprint" . tab . "isp[rint]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "joinspaces" . tab . "js" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nojoinspaces" . tab . "nojs" ) " key let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "keymap" . tab . "kmp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "keymodel" . tab . "km" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "keywordprg" . tab . "kp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "langmap" . tab . "lmap" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "langmenu" . tab . "lm" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "laststatus" . tab . "ls" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "lazyredraw" . tab . "lz" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nolazyredraw" . tab . "nolz" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "linebreak" . tab . "lbr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nolinebreak" . tab . "nolbr" ) " lines let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "linespace" . tab . "lsp" ) " lisp " nolisp let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "lispwords" . tab . "lw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "list" . tab . "l[ist]" ) " nolist let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "listchars" . tab . "lcs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "loadplugins" . tab . "lpl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noloadplugins" . tab . "nolpl" ) " magic " nomagic let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "makeef" . tab . "mef" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "makeprg" . tab . "mp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "matchpairs" . tab . "mps" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "matchtime" . tab . "mat[chtime]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "maxfuncdepth" . tab . "mfd" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "maxmapdepth" . tab . "mmd" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "maxmem" . tab . "mm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "maxmemtot" . tab . "mmt" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "menuitems" . tab . "mis" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "modeline" . tab . "ml" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nomodeline" . tab . "noml" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "modelines" . tab . "mls" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "modifiable" . tab . "ma" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nomodifiable" . tab . "noma" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "modified" . tab . "mod[ified]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nomodified" . tab . "nomod[ified]" ) " more " nomore " mouse let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "mousefocus" . tab . "mousef[ocus]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nomousefocus" . tab . "nomousef[ocus]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "mousehide" . tab . "mh" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nomousehide" . tab . "nomh" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "mousemodel" . tab . "mousem[odel]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "mouseshape" . tab . "mouses[hape]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "mousetime" . tab . "mouset[ime]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nrformats" . tab . "nf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "number" . tab . "nu[mber]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nonumber" . tab . "nonu[mber]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "osfiletype" . tab . "oft" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "paragraphs" . tab . "para[graphs]" ) " paste " nopaste let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "pastetoggle" . tab . "pt" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "patchexpr" . tab . "pex" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "patchmode" . tab . "pm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "path" . tab . "pa[th]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "previewheight" . tab . "pvh" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "previewwindow" . tab . "pvw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nopreviewwindow" . tab . "nopvw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "printdevice" . tab . "pdev" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "printexpr" . tab . "pexpr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "printfont" . tab . "pfn" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "printheader" . tab . "pheader") let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "printoptions" . tab . "popt" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "readonly" . tab . "ro" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noreadonly" . tab . "noro" ) " remap " report let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "restorescreen" . tab . "rs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "norestorescreen" . tab . "nors" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "revins" . tab . "ri" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "norevins" . tab . "nori" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "rightleft" . tab . "rl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "norightleft" . tab . "norl" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ruler" . tab . "ru[ler]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noruler" . tab . "noru[ler]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "rulerformat" . tab . "ruf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "runtimepath" . tab . "rtp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "scroll" . tab . "scr[oll]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "scrollbind" . tab . "scb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noscrollbind" . tab . "noscb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "scrolljump" . tab . "sj" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "scrolloff" . tab . "so" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "scrollopt" . tab . "sbo" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "sections" . tab . "sect[ions]" ) " secure " nosecure let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "selection" . tab . "sel[ection]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "selectmode" . tab . "slm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "sessionoptions" . tab . "ssop" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shell" . tab . "sh[ell]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shellcmdflag" . tab . "shcf" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shellpipe" . tab . "sp" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shellquote" . tab . "shq" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shellredir" . tab . "srr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shellslash" . tab . "ssl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noshellslash" . tab . "nossl" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shelltype" . tab . "st" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shellxquote" . tab . "sxq" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shiftround" . tab . "sr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noshiftround" . tab . "nosr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shiftwidth" . tab . "sw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shortmess" . tab . "shm" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "shortname" . tab . "sn" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noshortname" . tab . "nosn" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "showbreak" . tab . "sbr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "showcmd" . tab . "sc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noshowcmd" . tab . "nosc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "showfulltag" . tab . "sft" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noshowfulltag" . tab . "nosft" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "showmatch" . tab . "sm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noshowmatch" . tab . "nosm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "showmode" . tab . "smd" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noshowmode" . tab . "nosmd" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "sidescroll" . tab . "ss" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "sidescrolloff" . tab . "siso" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "smartcase" . tab . "scs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nosmartcase" . tab . "noscs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "smartindent" . tab . "si" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nosmartindent" . tab . "nosi" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "smarttab" . tab . "sta" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nosmarttab" . tab . "nosta" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "softtabstop" . tab . "sts" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "splitbelow" . tab . "sb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nosplitbelow" . tab . "nosb" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "splitright" . tab . "spr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nosplitright" . tab . "nospr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "startofline" . tab . "sol" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nostartofline" . tab . "nosol" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "statusline" . tab . "stl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "suffixes" . tab . "su[ffixes]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "suffixesadd" . tab . "sua" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "swapfile" . tab . "swf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noswapfile" . tab . "noswf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "swapsync" . tab . "sws" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "switchbuf" . tab . "swb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "syntax" . tab . "syn[tax]" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "tabstop" . tab . "ts" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "tagbsearch" . tab . "tbs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "notagbsearch" . tab . "notbs" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "taglength" . tab . "tl" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "tagrelative" . tab . "tr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "notagrelative" . tab . "notr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "tags" . tab . "tag[s]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "tagstack" . tab . "tgst" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "notagstack" . tab . "notgst" ) " term let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "termencoding" . tab . "tenc" ) " terse " noterse " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "textauto" . tab . "ta" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "notextauto" . tab . "nota" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "textmode" . tab . "tx" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "notextmode" . tab . "notx" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "textwidth" . tab . "tw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "thesaurus" . tab . "tsr" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "tildeop" . tab . "top" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "notildeop" . tab . "notop" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "timeout" . tab . "to" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "notimeout" . tab . "noto" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "timeoutlen" . tab . "tm" ) " title " notitle " titlelen " titleold " titlestring let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "toolbar" . tab . "tb" ) " ttimeout " nottimeout let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ttimeoutlen" . tab . "ttm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ttybuiltin" . tab . "tbi" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nottybuiltin" . tab . "notbi" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ttyfast" . tab . "tf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nottyfast" . tab . "notf" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ttymouse" . tab . "ttym[ouse]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ttyscroll" . tab . "tsl" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "ttytype" . tab . "tty[type]" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "undolevels" . tab . "ul" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "updatecount" . tab . "uc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "updatetime" . tab . "ut" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "verbose" . tab . "vbs" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "viewdir" . tab . "vdir" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "viewoptions" . tab . "vop" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "viminfo" . tab . "vi[minfo]" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "virtualedit" . tab . "ve" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "visualbell" . tab . "vb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "novisualbell" . tab . "novb" ) " warn " nowarn let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "weirdinvert" . tab . "wiv" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "noweirdinvert" . tab . "nowiv" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "whichwrap" . tab . "ww" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "wildchar" . tab . "wc" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "wildcharm" . tab . "wcm" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "wildignore" . tab . "wig" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "wildmenu" . tab . "wmnu" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nowildmenu" . tab . "nowmnu" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "wildmode" . tab . "wim" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "winaltkeys" . tab . "wak" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "winheight" . tab . "wh" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "winminheight" . tab . "wmh" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "winminwidth" . tab . "wmw" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "winwidth" . tab . "wiw" ) " wrap " nowrap let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "wrapmargin" . tab . "wm" ) " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "wrapscan" . tab . "ws" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nowrapscan" . tab . "nows" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "write" . tab . "w[rite]" ) " nowrite " dupe let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "writeany" . tab . "wa" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nowriteany" . tab . "nowa" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "writebackup" . tab . "wb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "nowritebackup" . tab . "nowb" ) let VimOptionsPairs = MvAddElement(VimOptionsPairs, "\n", "writedelay" . tab . "wd" ) return VimOptionsPairs endfunction 1}}} " Test suite {{{1 fun! TestCow0() " yikes, not really! fini " strings (these shouldn't be changed) let test = "normal fu" let test = "norm fu" "normal fu" " second words should *not* get lengthened normal se norm se normal is norm is normal norm norm norm " commented should not change "normal exe "norm exe " silent in execute strings exe "sil au VimEnter * call TestCow()" exe "sil! au VimEnter * call TestCow()" exe 'sil au VimEnter * call TestCow()' exe 'sil! au VimEnter * call TestCow()' sil cow sil! cow sile cow silen cow silent cow " commands ec "fu" let fu="fu fun func funct functi functio function" let fun="is ise isea isear isearc isearch" ech fu execute "function TestCowBob()|endfunction" execute "sil fu TestCowBob()|endfunction" execute "sil! fun TestCowBob()|endfunction" execute "silen! func TestCowBob()|endfunction" " errors, don't lengthen execute " sil " execute "silent! sil" execute "set fu" execute "set norm" execute "silent set fu" execute "silent! set fu" execute "silent set norm" " set se noinsertmode se noim se insertmode se im " options in execute strings execute "se ai" execute "se go+=a" execute 'se ai' execute 'se go+=a' execute "sil se go+=a" execute "sil! se go+=a" execute 'sil se go+=a' execute 'sil! se go+=a' endf " 1}}} "= " STOP!!! Debris beyond... finish "= "" commands {{{1 "abbreviate ab "abclear abc "aboveleft abo "all al "argadd arga "argdelete argd "argdo "argedit arge "argglobal argg "arglocal argl "args ar "argument argu "ascii as "badd bad "ball ba "bdelete bd "belowright bel "bfirst bf "blast bl "bmodified bm "bmodified bmod "bnext bn "bNext bN "botright bo "bprevious bp "break brea "breakadd breaka "breakdel breakd "breaklist breakl "brewind br "browse bro "bufdo "buffer b "buffer buf "buffers "buffers ls "bunload bun "bwipeout bw "cabbrev ca "cabclear cabc "call cal "cc "cclose ccl "cd "center ce "cfile cf "cfirst cfir "change c "chdir chd "checkpath che "checktime checkt "clast cla "clist cl "close clo "cmapclear cmapc "cnewer cnew "cnext cn "cNext cN "cnfile cnf "cnoreabbrev cnorea "colder col "colorscheme colo "comclear comc "command com "compiler "confirm conf "continue con "copen cope "copy co "copy t "cprevious cp "cquit cq "crewind cr "cunabbrev cuna "cunmap cu "cwindow cw "delcommand delc "delcommand delcom "delete d "delete de "delete del "DeleteFirst "delfunction delf "diffget diffg "diffpatch diffp "diffput diffpu "diffsplit "diffthis difft "digraphs dig "display di "djump dj "dlist dl "drop dr "dsearch ds "dsplit dsp "echoerr echoe "echomsg echom "echon "edit e "else el "elseif elsei "emenu "emenu em "endfunction endf "endif en "endwhile endw "enew ene "ex "exit exi "file f "files "filetype fi "filetype filet "find fin "finish fini "first fir "fixdel fix "fold fo "foldclose foldc "folddoclosed folddoc "folddoopen foldd "foldopen foldo "function fu "global g "goto go "grep gr "grepadd grepa "hardcopy ha "help h "helpfind helpf "helptags helpt "hide hid "highlight hi "history his "iabbrev ia "iabclear iabc "if "ijump ij "ilist il "imapclear imapc "inoreabbrev inorea "isearch is "isplit isp "iunabbrev iuna "iunmap iu "join j "jumps ju "k "language lan "last la "lcd lc "lchdir lch "left le "leftabove lefta "list l "lmap lm "lmapclear lmapc "lnoremap lno "loadview lo "ls "lunmap lu "make mak "mark ma "marks "match mat "menutranslate menut "mkexrc mk "mksession mks "mkview mkvie "mkvimrc mkv "mode mod "move m "new "next n "Next N "nmapclear nmapc "nohlsearch noh "noreabbrev norea "normal norm "Nread "number nu "nunmap nun "Nw "omapclear omapc "only on "open o "options opt "ounmap ou "pclose pc "pedit ped "perl pe "perldo perld "pop po "popup pop "ppop pp "preserve pre "previous prev "print p "Print P "prompt "promptfind promptf "promptrepl promptr "psearch ps "ptag pta "ptfirst ptf "ptjump ptj "ptlast ptl "ptnext ptn "ptNext ptN "ptprevious ptp "ptrewind ptr "ptselect pts "put pu "pwd pw "pyfile pyf "python py "qall qa "quit q "quitall quita "read r "recover rec "redir redi "redo red "redraw redr "registers reg "resize res "retab ret "return retu "rewind rew "right ri "rightbelow rightb "ruby rub "rubydo rubyd "rubyfile rubyf "runtime ru "rviminfo rv "sall sal "sargument sa "sargument sar "saveas sav "sball sba "sbfirst sbf "sblast sbl "sbmodified sbm "sbmodified sbmod "sbnext sbn "sbNext sbN "sbprevious sbp "sbrewind sbr "sbuffer sb "scriptencoding scripte "scriptnames scrip "set se "setfiletype setf "setglobal setg "setlocal setl "sfind sf "sfirst sfir "shell sh "sign "silent sil "simalt si "slast sla "sleep sl "smagic sm "snext sn "sNext sN "sniff sni "snomagic sno "source so "split sp "sprevious spr "srewind sr "stag sta "startinsert star "stjump stj "stop st "stselect sts "sunhide sun "suspend sus "sview sv "syncbind "tag ta "tags "tcl tc "tcldo tcld "tclfile tclf "tearoff te "tfirst tf "tjump tj "tlast tl "tmenu tm "tnext tn "tNext tN "topleft to "tprevious tp "trewind tr "tselect ts "tunmenu tu "unabbreviate una "undo u "unhide unh "unmap unm "update up "U "verbose verb "version ve "vertical vert "vglobal v "view vie "visual vi "vmapclear vmapc "vnew vne "vsplit vs "vunmap vu "wall wa "while wh "win "wincmd winc "windo "winpos "winpos winp "winsize win "wNext wN "wnext wn "wprevous wp "wq "wqall wqa "write w "wsverb ws "wviminfo wv "X "xall xa "xit x "yank y " 1}}} "" let {{{1 "let "unlet unl "" autocommands {{{1 "autocmd au "augroup aug "doautocmd do "doautoall doautoa "" options {{{1 " aleph al " allowrevins ari "noallowrevins noari " altkeymap akm "noaltkeymap noakm " autoindent ai "noautoindent noai " autoread ar "noautoread noar " autowrite aw "noautowrite noaw " autowriteall awa "noautowriteall noawa " background bg " backspace bs " backup bk "nobackup nobk " backupcopy bkc " backupdir bdir " backupext bex " backupskip bsk " balloondelay bdlay " ballooneval beval "noballooneval nobeval " binary bin "nobinary nobin " bioskey biosk "nobioskey nobiosk " bomb "nobomb " breakat brk " browsedir bsdir " bufhidden bh " buflisted bl " buftype bt " cdpath cd " cedit " charconvert ccv " cindent cin "nocindent nocin " cinkeys cink " cinoptions cino " cinwords cinw " clipboard cb " cmdheight ch " cmdwinheight cwh " columns co " comments com " commentstring cms " compatible cp "nocompatible nocp " complete cpt " confirm cf "noconfirm nocf " conskey consk "noconskey noconsk " cpoptions cpo " cscopepathcomp cspc " cscopeprg csprg " cscopetag cst "nocscopetag nocst " cscopetagorder csto " cscopeverbose csverb "nocscopeverbose nocsverb " debug " define def " delcombine deco " dictionary dict " diff "nodiff " diffexpr dex " diffopt dip " digraph dg "nodigraph nodg " directory dir "nodisable " display dy " eadirection ead " edcompatible ed "noedcompatible noed " encoding enc " endofline eol "noendofline noeol " equalalways ea "noequalalways noea " equalprg ep " errorbells eb "noerrorbells noeb " errorfile ef " errorformat efm " esckeys ek "noesckeys noek " eventignore ei " expandtab et "noexpandtab noet " exrc ex "noexrc noex " fileencoding fenc " fileencodings fencs " fileformat ff " fileformats ffs " filetype ft " fillchars fcs " fkmap fk "nofkmap nofk " foldclose fcl " foldcolumn fdc " foldenable fen "nofoldenable nofen " foldexpr fde " foldignore fdi " foldlevel fdl " foldlevelstart fdls " foldmarker fmr " foldmethod fdm " foldminlines fml " foldnestmax fdn " foldopen fdo " foldtext fdt " formatoptions fo " formatprg fp " gdefault gd "nogdefault nogd " grepformat gfm " grepprg gp " guicursor gcr " guifont gfn " guifontset gfs " guifontwide gfw " guiheadroom ghr " guioptions go " guipty "noguipty " helpfile hf " helpheight hh " hidden hid "nohidden nohid " highlight hl " history hi " hkmap hk "nohkmap nohk " hkmapp hkp "nohkmapp nohkp " hlsearch hls "nohlsearch nohls " icon "noicon " iconstring " ignorecase ic "noignorecase noic " imactivatekey imak " imcmdline imc "noimcmdline noimc " imdisable imd "noimdisable noimd " iminsert imi " imsearch ims " include inc " includeexpr ine " includeexpr inex " incsearch is "noincsearch nois " indentexpr inde " indentkeys indk " infercase inf "noinfercase noinf " insertmode im "noinsertmode noim " isfname isf " isident isi " iskeyword isk " isprint isp " joinspaces js "nojoinspaces nojs " key " keymap kmp " keymodel km " keywordprg kp " langmap lmap " langmenu lm " laststatus ls " lazyredraw lz "nolazyredraw nolz " linebreak lbr "nolinebreak nolbr " lines " linespace lsp " lisp "nolisp " lispwords lw " list "nolist " listchars lcs " loadplugins lpl "noloadplugins nolpl " magic "nomagic " makeef mef " makeprg mp " matchpairs mps " matchtime mat " maxfuncdepth mfd " maxmapdepth mmd " maxmem mm " maxmemtot mmt " menuitems mis " modeline ml "nomodeline noml " modelines mls " modifiable ma "nomodifiable noma " modified mod "nomodified nomod " more "nomore " mouse " mousefocus mousef "nomousefocus nomousef " mousehide mh "nomousehide nomh " mousemodel mousem " mouseshape mouses " mousetime mouset " nrformats nf "nonumber nonu " number nu " osfiletype oft " paragraphs para " paste "nopaste " pastetoggle pt " patchexpr pex " patchmode pm " path pa " previewheight pvh "nopreviewwindow nopvw " previewwindow pvw " printdevice pdev " printexpr pexpr " printfont pfn " printheader pheader " printoptions popt " readonly ro "noreadonly noro " remap " report " restorescreen rs "norestorescreen nors " revins ri "norevins nori " rightleft rl "norightleft norl " ruler ru "noruler noru " rulerformat ruf " runtimepath rtp " scroll scr " scrollbind scb "noscrollbind noscb " scrolljump sj " scrolloff so " scrollopt sbo " sections sect " secure "nosecure " selection sel " selectmode slm " sessionoptions ssop " shell sh " shellcmdflag shcf " shellpipe sp " shellquote shq " shellredir srr " shellslash ssl "noshellslash nossl " shelltype st " shellxquote sxq " shiftround sr "noshiftround nosr " shiftwidth sw " shortmess shm " shortname sn "noshortname nosn " showbreak sbr " showcmd sc "noshowcmd nosc " showfulltag sft "noshowfulltag nosft " showmatch sm "noshowmatch nosm " showmode smd "noshowmode nosmd " sidescroll ss " sidescrolloff siso " smartcase scs "nosmartcase noscs " smartindent si "nosmartindent nosi " smarttab sta "nosmarttab nosta " softtabstop sts " splitbelow sb "nosplitbelow nosb " splitright spr "nosplitright nospr " startofline sol "nostartofline nosol " statusline stl " suffixes su " suffixesadd sua " swapfile swf "noswapfile noswf " swapsync sws " switchbuf swb " syntax syn " tabstop ts " tagbsearch tbs "notagbsearch notbs " taglength tl " tagrelative tr "notagrelative notr " tags tag " tagstack tgst "notagstack notgst " term " termencoding tenc " terse "noterse " textauto ta "notextauto nota " textmode tx "notextmode notx " textwidth tw " thesaurus tsr " tildeop top "notildeop notop " timeout to "notimeout noto " timeoutlen tm " title "notitle " titlelen " titleold " titlestring " toolbar tb " ttimeout "nottimeout " ttimeoutlen ttm " ttybuiltin tbi "nottybuiltin notbi " ttyfast tf "nottyfast notf " ttymouse ttym " ttyscroll tsl " ttytype tty " undolevels ul " updatecount uc " updatetime ut " verbose vbs " viewdir vdir " viewoptions vop " viminfo vi " virtualedit ve " visualbell vb "novisualbell novb " warn "nowarn " weirdinvert wiv "noweirdinvert nowiv " whichwrap ww " wildchar wc " wildcharm wcm " wildignore wig " wildmenu wmnu "nowildmenu nowmnu " wildmode wim " winaltkeys wak " winheight wh " winminheight wmh " winminwidth wmw " winwidth wiw " wrap "nowrap " wrapmargin wm " wrapscan ws "nowrapscan nows " write "nowrite " writeany wa "nowriteany nowa " writebackup wb "nowritebackup nowb " writedelay wd "" menus {{{1 "amenu am "anoremenu an "aunmenu aun "cmenu cme "cnoremenu cnoreme "cunmenu cunme "imenu ime "inoremenu inoreme "iunmenu iunme "menu me "nmenu nme "nnoremenu nnoreme "noremenu noreme "nunmenu nunme "omenu ome "onoremenu onoreme "ounmenu ounme "unmenu unme "vmenu vme "vnoremenu vnoreme "vunmenu vunme "" maps {{{1 " map "cmap cm "imap im "nmap nm "omap om "vmap vm " noremap no "cnoremap cno "inoremap ino "nnoremap nn "onoremap ono "vnoremap vn " unmap unm "nunmap nun "vunmap vu "ounmap ou "iunmap iu "lunmap lu "cunmap cu " mapclear mapc "nmapclear nmapc "vmapclear vmapc "omapclear omapc "imapclear imapc "lmapclear lmapc "cmapclear cmapc "1}}} "" These below unlikely candidates "" Missing options {{{1 "autoprint ap "beautify bf "flash fl "graphic gr "hardtabs ht "mesg "novice "open "optimize op "prompt "redraw "slowopen slow "sourceany "window wi "w300 "w1200 "w9600 "1}}} " vim:foldmethod=marker cream-0.43/addons/cream-cream-fileformat.vim0000644000076400007660000000434511517300756021412 0ustar digitectlocaluser"= " cream-cream-fileformat.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Highlight characters with decimal values between 128-255. These " characters may not appear the same on all systems when Vim uses an " encoding other than latin1. (If used in Vim script, these characters " could potentially cause script to fail.) " " register as a Cream add-on if exists("$CREAM") " don't list unless Cream developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ 'Cream Fileformat', \ 'Set Cream *.vim files to fileformat=unix', \ 'Ensure fileformat=unix for all Cream *.vim files (except spell check dictionaries).', \ 'Cream Devel.Fileformat Fixer', \ 'call Cream_format_cream_unix()', \ 'call Cream_format_cream_unix()' \ ) endif " Create function to verify all Cream files are filetype=unix. function! Cream_format_cream_unix() let n = confirm( \ "Preparing to ensure all Cream *.vim files except spell check dictionaries \n" . \ "have fileformat=unix. \n" . \ " \n" . \ "Continue? \n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif let mylazyredraw = &lazyredraw set lazyredraw let cmd = "call Cream_fileformat('unix')" call Cream_cmd_on_files($CREAM . "*.vim", cmd) call Cream_cmd_on_files($CREAM . "addons/*.vim", cmd) call Cream_cmd_on_files($VIM . "/_*vimrc", cmd) let &lazyredraw = mylazyredraw endfunction cream-0.43/addons/cream-encrypt-rot13.vim0000644000076400007660000000445111517300756020625 0ustar digitectlocaluser" " cream-encrypt-rot13.vim -- Rotate 13 "encryption" " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Encrypt, Rot13', \ 'Encrypt, Rotate 13', \ 'Encrypt a selection by rotating the alphabetic characters (no numbers) 13 places ahead in the alphabet.', \ 'Encrypt.Rot13', \ 'call Cream_encrypt_rot13()', \ 'call Cream_encrypt_rot13("v")' \ ) endif function! Cream_encrypt_rot13(...) " Rot13 (rotate all alphas 13 chars forward) " * Optional argument "v" encrypts current (or previous) selection; " otherwise entire buffer is processed " find arguments if a:0 > 0 let i = 0 while i < a:0 let i = i + 1 execute "let myarg = a:" . i if myarg == "v" let dofile = 0 elseif myarg == "silent" let silent = 1 endif endwhile endif " handle not-founds if !exists("dofile") let dofile = 1 endif " select if dofile == 0 " reselect previous selection normal gv else if !exists("silent") let n = confirm( \ "Encrypt entire file?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 " quit return endif endif " remember position let mypos_orig = Cream_pos() " select all call Cream_select_all(1) endif " rot13 normal g? " recover position if select all if exists("mypos_orig") " go back to insert mode normal i execute mypos_orig " recover selection otherwise else normal gv endif endfunction cream-0.43/addons/cream-cream-vim-deformat.vim0000644000076400007660000000370111517300756021647 0ustar digitectlocaluser" " Filename: cream-cream-vim-deformat.vim " Updated: 2004-11-04 07:23:28-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as Cream add-on if exists("$CREAM") " don't list unless developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ "Vim Script Deformat", \ "Cream Devel -- Vim script deformatter", \ "Remove comments, indention, and empty lines from Vim script.", \ "Cream Devel.Vim Script Deformat", \ "call Cream_vimscript_crush()", \ '' \ ) endif function! Cream_vimscript_crush() " Totally smoke the readibility of Vim script. if fnamemodify(expand("%"), ":e") != "vim" call confirm( \ "Not in file a Vim file. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif let n = confirm( \ "Do you really want to destroy the readability of this file?!\n\n(Remove indention, comments and empty lines.)\n" . \ "\n", "Yes\nNo", 2, "Info") if n != 1 return endif " delete leading whitespace silent %substitute/^\s*//gei " delete commented lines silent %substitute/^".*$//gei " delete empty lines silent %substitute/\n\n\+/\r/gei endfunction cream-0.43/addons/cream-sort.vim0000644000076400007660000004157411517300756017171 0ustar digitectlocaluser" " cream-sort.vim -- Various sorting methods and algorithms " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " register as a Cream add-on {{{1 if exists("$CREAM") call Cream_addon_register( \ 'Sort Selected Lines', \ 'Sort the lines currently selected', \ 'Sort the lines currently selected.', \ 'Sort.Selected Lines', \ '', \ 'BISort2' \ ) call Cream_addon_register( \ 'Sort Selected Lines, Inverse', \ 'Reverse sort the lines currently selected', \ 'Reverse sort the lines currently selected.', \ 'Sort.Selected Lines, Inverse', \ '', \ "BISort2Reverse" \ ) call Cream_addon_register( \ 'Invert Lines of Selection', \ 'Invert the lines of the current selection', \ 'Invert the lines of the current selection.', \ 'Invert Selected Lines', \ '', \ "Invert" \ ) call Cream_addon_register( \ 'Uniq', \ 'Eliminate duplicate, sorted lines', \ 'Eliminate duplicate lines of an alphabetically sorted selection, simliar to the Unix utility uniq.', \ 'Uniq Selected Lines', \ '', \ 'call Cream_uniq("v")' \ ) endif "********************************************************************* " BISort and related moved to library where we can access them " at startup. "********************************************************************* " File Sort (external sort) {{{1 "--------------------------------------------------------------------- " Version: 1.5 " Date: 2002 October 23 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=310 " Author: Steve Hall [ digitect@mindspring.com ] " " Description: " Sort a file alphabetically by lines using external operating system " (Linux or Windows) commands which redirect the current file into " a sorted temporary file. " " Installation: " Simply copy this file and paste it into your vimrc. Or you can drop " the entire file into your plugins directory. " " Useage: " Use :call Cream_sortfile() to sort the current file alphabetically " by line. User is prompted to choose the column of the sort (default " is 1). " " Notes: " * The function uses the operating system's sort command (Windows or " Linux) for speed since our original use was for 7mb dictionary " wordlists(!). " " * Sorting is actually done in a temp file to preserve the original. " " * Please notice three other sort libraries included within the " script below the advertised first one. They were "research" during " the project and may serve certain users better than ours! " " ChangeLog: " " 2003-02-15 -- Version 1.5 " * Unnamed buffer now saved as temporary file. " " 2002-10-23 -- Version 1.4 " * Temp file overwrite option added. " " 2002-09-10 -- Version 1.3 " * Quote path/filenames on Windows to handle spaces " " 2002-09-07 -- Version 1.2 " * Added requirement that file be named (external redirection methods " require it) " * Added prompt to save modified file before proceeding " " 2002-07-18 -- Version 1.1 " * Added temp file verification. " * Changed Linux "--key" to "-k" to work with some Linuxes. " * Eliminated Linux "-o=[FILENAME]" option to simple redirection to " work with some Linuxes. " " 2002-06-07 -- Version 1.0 " * Initial Release " list as an add-on if Cream project in use if exists("$CREAM") call Cream_addon_register( \ 'Sort File', \ 'Sort the current file by column', \ 'Sort the current file alphabetically by line. User is prompted to choose the column of the sort (default is 1).', \ 'Sort.File (external sort)', \ 'call Cream_sortfile()' \ ) endif function! Cream_sortfile() " sort a file's lines by column number " * option: sort selection by alternate column number (default 1) " * multi-platform: Windows 95-XP and Linux " require file to be named (can't sort an un-named file due to the " external redirections that this module uses) if expand("%") == "" "let n = confirm("File must be named before proceeding...", "&Ok\n&Cancel", 1, "Info") "if n != 1 " call confirm("Canceled. Sort not performed.", "&Ok", 1, "Info") " return "endif "if has("browse") " browse confirm write "else " confirm write "endif "" if still unnamed, quit "if expand("%") == "" " call confirm( " \ "Can not continue, document unnamed. Quitting...\n" . " \ "\n", "&Ok", 1, "Info") " return "endif let myfile = tempname() call confirm( \ "Saving as temp file " . myfile . " ...\n" . \ "\n", "&Ok", 1, "Info") execute "saveas " . myfile endif " prompt to save modified first if &modified == 1 let n = confirm("Do you wish to save changes first?", "&Ok\n&No\n&Cancel", 1, "Info") if n == 1 write elseif n == 2 " carry on else call confirm("Canceled. Sort not performed.", "&Ok", 1, "Info") return endif endif " current file let myfile = fnamemodify(expand("%"), ":p") " escape backslashes (for Windows) let myfile = escape(myfile, "\\") " temp file (append extension .tmp) let myfiletmp = myfile . ".tmp" " verify temp file doesn't already exist if filewritable(myfiletmp) == 1 let n = confirm("Filename \"" . myfiletmp . "\" already exists. Overwrite and continue?", "&Ok\n&Cancel", 2, "Warning") if n != 1 return endif elseif filewritable(myfiletmp) == 2 call confirm("Unable to continue. A directory with the name \"" . myfiletmp . "\" already exists.", "&Ok", 1, "Warning") return endif " get column to sort on let mycol = inputdialog("Please enter column number to sort on (default 1)", "1") if mycol == "" return endif " validate " convert to number let mycol = mycol + 0 " make sure not empty if mycol == 0 let mycol = "1" endif " sort (by platform command) if has("win32") " fix back slashes if any (I use :set shellslash) let myfile = substitute(myfile,'/','\\','g') let myfiletmp = substitute(myfiletmp,'/','\\','g') " Windows "---------------------------------------------------------------------- " SORT /? " " Sorts input and writes results to the screen, a file, or another device " " SORT [/R] [/+n] [[drive1:][path1]filename1] [> [drive2:][path2]filename2] " [command |] SORT [/R] [/+n] [> [drive2:][path2]filename2] " " /R Reverses the sort order; that is, sorts Z to A, " then 9 to 0. " /+n Sorts the file according to characters in " column n. " [drive1:][path1]filename1 Specifies file(s) to be sorted " [drive2:][path2]filename2 Specifies a file where the sorted input is to be " stored. " command Specifies a command whose output is to be sorted. " command (extra quotes handle file/pathnames with spaces) execute ":silent !SORT /+" . mycol . " " . "\"" . myfile . "\"" . " > " . "\"" . myfiletmp . "\"" elseif has("unix") " Linux | Cygwin "---------------------------------------------------------------------- " sort --help " " Usage: sort [OPTION]... [FILE]... " Write sorted concatenation of all FILE(s) to standard output. " " Ordering options: " " Mandatory arguments to long options are mandatory for short options too. " -b, --ignore-leading-blanks ignore leading blanks " -d, --dictionary-order consider only blanks and alphanumeric characters " -f, --ignore-case fold lower case to upper case characters " -g, --general-numeric-sort compare according to general numerical value " -i, --ignore-nonprinting consider only printable characters " -M, --month-sort compare (unknown) < `JAN' < ... < `DEC' " -n, --numeric-sort compare according to string numerical value " -r, --reverse reverse the result of comparisons " " Other options: " " -c, --check check whether input is sorted; do not sort " -k, --key=POS1[,POS2] start a key at POS1, end it at POS 2 (origin 1) " -m, --merge merge already sorted files; do not sort " -o, --output=FILE write result to FILE instead of standard output " -s, --stable stabilize sort by disabling last-resort comparison " -S, --buffer-size=SIZE use SIZE for main memory buffer " -t, --field-separator=SEP use SEP instead of non- to whitespace transition " -T, --temporary-directory=DIR use DIR for temporaries, not $TMPDIR or /tmp " multiple options specify multiple directories " -u, --unique with -c: check for strict ordering " otherwise: output only the first of an equal run " -z, --zero-terminated end lines with 0 byte, not newline " --help display this help and exit " --version output version information and exit " " POS is F[.C][OPTS], where F is the field number and C the character position " in the field. OPTS is one or more single-letter ordering options, which " override global ordering options for that key. If no key is given, use the " entire line as the key. " " SIZE may be followed by the following multiplicative suffixes: " % 1% of memory, b 1, K 1024 (default), and so on for M, G, T, P, E, Z, Y. " " With no FILE, or when FILE is -, read standard input. " " *** WARNING *** " The locale specified by the environment affects sort order. " Set LC_ALL=C to get the traditional sort order that uses " native byte values. " " Report bugs to . " command " * original: " execute ":!sort --key=" . mycol . " -fid -o=" . myfiletmp . " " . myfile " * some systems cannot use the "--key=" option, use "-k" " * some systems cannot use the "-o=" option, use redirection execute ":!sort -k " . mycol . " -fid " . myfile . " > " . myfiletmp else call confirm("Sorry! This platform untested. \n\nPlease contact us at\n http://cream.sourceforge.net ", "&Ok", 1, "Info") return endif " edit temp file execute ":edit " . myfiletmp " warn we're in temp file call confirm("Now in temp file:\n " . myfiletmp . "\n\nPreserved original file:\n " . myfile . "\n\n", "&Ok", 1, "Warning") endfunction " 1}}} " Various other (unused) sort functions " Line Sort {{{1 "" list as an add-on if Cream project in use "if exists("$CREAM") " call Cream_addon_register( " \ 'Sort Selection', " \ 'Sort the current selection', " \ 'Sort the current selection.', " \ 'Sort.Selection', " \ '', " \ 'Sort' " \ ) " call Cream_addon_register( " \ 'Sort Selection, Inverse', " \ 'Reverse sort the current selection', " \ 'Reverse sort the current selection.', " \ 'Sort.Selection, Inverse', " \ '', " \ 'SortReverse' " \ ) "endif " * Extended version found in :help eval-examples " * See also in explorer.vim " * Extremely slow (>10 min.) for large files (dictionaries) " " Author: Robert Webb " " Function for use with Sort(), to compare two strings. func! Strcmp(str1, str2) if (a:str1 < a:str2) return -1 elseif (a:str1 > a:str2) return 1 else return 0 endif endfunction " Function for use with Sort(), to compare two strings. func! Stricmp(str1, str2) let st1=substitute(a:str1,'^.*$', '\L&', "") let st2=substitute(a:str1,'^.*$', '\L&', "") if (st1 < st2) return -1 elseif (st1 > st2) return 1 else return 0 endif endfunction " Sort lines. SortR() is called recursively. func! SortR(start, end, cmp) if (a:start >= a:end) return endif let partition = a:start - 1 let middle = partition let partStr = getline((a:start + a:end) / 2) let i = a:start while (i <= a:end) let str = getline(i) exec "let result = " . a:cmp . "(str, partStr)" if (result <= 0) " Need to put it before the partition. Swap lines i and partition. let partition = partition + 1 if (result == 0) let middle = partition endif if (i != partition) let str2 = getline(partition) call setline(i, str2) call setline(partition, str) endif endif let i = i + 1 endwhile " Now we have a pointer to the "middle" element, as far as partitioning " goes, which could be anywhere before the partition. Make sure it is at " the end of the partition. if (middle != partition) let str = getline(middle) let str2 = getline(partition) call setline(middle, str2) call setline(partition, str) endif call SortR(a:start, partition - 1, a:cmp) call SortR(partition + 1, a:end, a:cmp) endfunc " To Sort a range of lines, pass the range to Sort() along with the name of a " function that will compare two lines. func! Sort(cmp) range call SortR(a:firstline, a:lastline, a:cmp) endfunc " :Sort takes a range of lines and sorts them. command! -nargs=0 -range Sort ,call Sort('Strcmp') command! -nargs=0 -range ISort ,call Sort('Stricmp') "+++ Cream: command! -nargs=0 -range SortReverse ,call Sort('StrcmpR') func! StrcmpR(str2, str1) if (a:str1 < a:str2) return -1 elseif (a:str1 > a:str2) return 1 else return 0 endif endfunction "+++ " Line Sort (BISort) {{{1 " Source: Piet Delport, vim@vim.org list, 2003-05-01 "" list as an add-on if Cream project in use "if exists("$CREAM") " call Cream_addon_register( " \ 'Sort Selection', " \ 'Sort the current selection', " \ 'Sort the current selection.', " \ 'Sort.Selection (BISort)', " \ '', " \ 'call Cream_BISort_call("v")' " \ ) " " call Cream_addon_register( " \ 'Sort Selection, Inverse', " \ 'Reverse sort the current selection', " \ 'Reverse sort the current selection.', " \ 'Sort.Selection, Inverse (BISort)', " \ '', " \ 'call Cream_BISort_call_reverse("v")' " \ ) "endif function! Cream_BISort_call(mode) " calls BISort2, establishing the range if a:mode != "v" return endif normal gv call BISort(line("'<"), line("'>"), 'Strcmp') endfunction function! Cream_BISort_call_reverse(mode) " calls BISort2, establishing the range if a:mode != "v" return endif normal gv call BISort(line("'>"), line("'<"), 'StrcmpR') endfunction function! BISort(start, end, cmp) let compare_ival_mid = 'let diff = '.a:cmp.'(i_val, getline(mid))' let i = a:start + 1 while i <= a:end " find insertion point via binary search let i_val = getline(i) let lo = a:start let hi = i while lo < hi let mid = (lo + hi) / 2 exec compare_ival_mid if diff < 0 let hi = mid else let lo = mid + 1 if diff == 0 | break | endif endif endwhile " do insert if lo < i exec i.'d_' call append(lo - 1, i_val) endif let i = i + 1 endwhile endfunction " Line length sorting {{{1 " " See: genutils.vim by Hari Krishna Dara " http://vim.sourceforge.net/scripts/script.php?script_id=197 " " Perl file sorting {{{1 " by Colin Keith, on the vim@vim.org mailing list 03 Jun 2002 " * Uses Perl function! VimPerlSort(...) range if !has('perl') echoerr "Perl not installed, unable to continue" return endif let s:col = 1 let s:order = 0 " Calculate sort method if exists('a:1') && a:1 > 0 && a:1 < 5 let s:order = a:1 " And if we want any column other than the first if exists('a:2') let s:col = a:2 endif endif " alphabetical if s:order == 1 let s:sort = 'my $x = substr($a, '. s:col. ', 1)||""; '. \ 'my $y = substr($b, '. s:col. ', 1)||""; '. \ 'return $x cmp $y;' " reverse alphabetical elseif s:order == 2 let s:sort = 'my $x = substr($a, '. s:col. ', 1)||""; '. \ 'my $y = substr($b, '. s:col. ', 1)||""; '. \ 'return $y cmp $x;' " numerical elseif s:order == 3 let s:sort = 'my $x = substr($a, '. s:col. ', 1)||0; '. \ 'my $y = substr($b, '. s:col. ', 1)||0; '. \ 'return $x <=> $y;' " reverse numerical elseif s:order == 4 let s:sort = 'my $x = substr($a, '. s:col. ', 1)||0; '. \ 'my $y = substr($b, '. s:col. ', 1)||0; '. \ 'return $y <=> $x;' else let s:sort = '$a cmp $b' endif " Load into memory execute ':perl @data = sort { '. s:sort . ' } '. \ '$curbuf->Get('. a:firstline. '..'. a:lastline. ')' execute ':perl $curbuf->Set('. a:firstline. ', @data)' " just to make sure the memory is released: :perl @data=() endfunction " 1}}} " vim:foldmethod=marker cream-0.43/addons/cream-table.vim0000644000076400007660000001214711517300756017263 0ustar digitectlocaluser" " Filename: cream-table.vim " Updated: 2005-01-21 23:05:30-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Limitations: " " As this script matures, we hope to eliminate these, but they exist " for the time being: " o No text may exist to the right or left of the table. " o Assumes no wrapping. " o Assumes expandtab " register as a Cream add-on {{{1 if exists("$CREAM") " don't list unless developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ 'Table Edit', \ "Edit tables with special behaviors.", \ "Edit tables with special behaviors.", \ 'Table Edit', \ 'call Cream_table()', \ '' \ ) endif " * http://table.sf.net features " - Cell size is dynamically adjusted as contents are typed in. " - Cells can be split horizontally and vertically. " - Cells can span into an adjacent cell. " - Cells maintains own justification. " - Can be translated into HTML source. function! Cream_table() endfunction function! s:Cream_table_size() endfunction " Cream_table_getfirstline() {{{1 function! Cream_table_get_firstlinenr() " return line number of table's first line " start from current line and work up let pos = line('.') while match(getline(pos), '^\s*[|+]') != -1 let pos = pos - 1 endwhile " return 0 if we don't find a table above cur pos if pos >= line('.') return 0 endif return pos + 1 endfunction " Cream_table_getlastline() {{{1 function! Cream_table_get_lastlinenr() " return line number of table's first line " start from current line and work up let pos = line('.') while match(getline(pos), '^\s*[|+]') != -1 let pos = pos + 1 endwhile " return 0 if we don't find a table above cur pos if pos <= line('.') return 0 endif return pos - 1 endfunction function! s:Cream_table_getfirstcol() endfunction function! s:Cream_table_getlastcol() endfunction function! s:Cream_table_getcols() " returns number of columns in the current line endfunction function! s:Cream_table_getlines() " returns number of columns in the current line endfunction function! s:Cream_table_widen() " add one char width to current column endfunction function! s:Cream_table_narrow() " remove one char width of current column endfunction function! s:Cream_table_add_column() " add column after current one endfunction function! s:Cream_table_add_line() " insert line after current one endfunction function! s:Cream_table_pos() " return col,line of current cell endfunction function! s:Cream_table_nextcell() " go to next cell, including on next line if at end endfunction " Cream_table_insert() {{{1 function! Cream_table_insert() " insert a new table, prompting for number of let n = Inputdialog("Enter number of columns:", 4) " cancel if n == "{cancel}" return " empty or 0 elseif n == "" || n == "0" " if empty call confirm("0 not allowed, defaulting to 4", "&Ok", 1) let n = 4 " non-digits elseif n =~ '\D' call confirm( \ "Only number values accepted.\n" . \ "\n", "&Ok", 1, "Info") return endif let cells = "|" let rules = "+" let i = 0 while i < n let rules = rules . "-----+" let cells = cells . " |" let i = i + 1 endwhile let rules = rules . "\n" let cells = cells . "\n" let x = rules . cells . rules let @x = x put x endfunction " s:Cream_columns() {{{1 function! s:Cream_columns() endfunction " Cream_table_isin() {{{1 function! Cream_table_isin() " Return 1 if in a table, 0 if not. " if no pipes preceeding current position if match(strpart(getline('.'), 0, col('.')), '[|+]') == -1 return 0 " if no pipes following current position elseif match(strpart(getline('.'), col('.')), '[|+]') == -1 return 0 " if not in table elseif Cream_table_getfirstline() == 0 return 0 else return 1 endif endfunction finish "##################################################################### +-----+-----+-----+-----+ | | | | | | | | | | +-----+-----+-----+-----+ | | | | | | | | | | +-----+-----+-----+-----+ | | | | | | | | | | +-----+-----+-----+-----+ | | | | | | | | | | +-----+-----+-----+-----+ "##################################################################### " 1}}} " vim:foldmethod=marker cream-0.43/addons/cream-convert-hex.vim0000644000076400007660000000635111517300756020436 0ustar digitectlocaluser" " cream-convert-hex.vim -- Functions derived from Vim distribution " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Convert ASCII to Hex', \ 'Convert ASCII to Hex.', \ 'Convert ASCII from Hex using xxd binary. (Distributed with Vim on Windows, usually available on Unix systems.', \ 'Convert.ASCII to Hex', \ 'call Cream_ascii2hex("i")', \ 'call Cream_ascii2hex("v")' \ ) call Cream_addon_register( \ 'Convert Hex to ASCII', \ 'Convert Hex to ASCII.', \ 'Convert Hex to ASCII using xxd binary. (Distributed with Vim on Windows, usually available on Unix systems.)', \ 'Convert.Hex to ASCII', \ 'call Cream_hex2ascii("i")', \ 'call Cream_hex2ascii("v")' \ ) endif function! Cream_ascii2hex(mode) if a:mode == "v" normal gv elseif a:mode == "i" let n = confirm( \ "Convert entire file to hex?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif else return endif let mod = &modified call s:XxdFind() " quote path/filename on Windows in case of spaces if has("win32") || has ("dos32") let myquote = '"' else let myquote = "" endif if a:mode == "v" execute "'\<,'>!" . myquote . g:xxdprogram . myquote elseif a:mode == "i" execute "%!" . myquote . g:xxdprogram . myquote endif set filetype=xxd let &modified = mod endfunction function! Cream_hex2ascii(mode) if a:mode == "v" normal gv elseif a:mode == "i" let n = confirm( \ "Return entire file to ASCII?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif else return endif let mod = &modified call s:XxdFind() " quote path/filename on Windows in case of spaces if has("win32") || has ("dos32") let myquote = '"' else let myquote = "" endif if a:mode == "v" execute "'\<,'>!" . myquote . g:xxdprogram . myquote . " -r" elseif a:mode == "i" execute "%!" . myquote . g:xxdprogram . myquote . " -r" endif set filetype= doautocmd filetypedetect BufReadPost let &modified = mod endfunction function! s:XxdFind() " sets "g:xxdprogram" to the location of an xxd binary if !exists("g:xxdprogram") " On Windows, xxd may not be in the path but in the install " directory if (has("win32") || has("dos32")) && !executable("xxd") let g:xxdprogram = $VIMRUNTIME . (&shellslash ? '/' : '\') . "xxd.exe" else let g:xxdprogram = "xxd" endif endif endfunction cream-0.43/addons/cream-slide-generator.vim0000644000076400007660000002667411517300756021272 0ustar digitectlocaluser" " Filename: cream-slide-generator.vim " Updated: 2007-07-04 17:04:47EDT " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " " A auto-slideshow generator: " o Maintains all the original images. " o Creates thumbnails of all the images in the directory. " o Creates an HTML document that displays all the thumbnails, where " each links to another HMTL page displaying the fullsize image. " o Provides navigation bar on each slide page through all slides. " " TODO: " o Link subdirectories. " o Indicates each filename and size on the slide page. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Slide Generator', \ "Generate an HTML thumbnail page from a directory's images.", \ "Generate an HTML thumbnail page displaying all the images in a directory.", \ 'Slide Generator', \ 'call Cream_slide_generator()', \ '' \ ) endif function! Cream_slide_generator() " verify dependencies " on PATH if exists("g:CREAM_SLIDE_GENERATOR_CONVERTPATH") if !executable(g:CREAM_SLIDE_GENERATOR_CONVERTPATH) call confirm( \ "Remembered ImageMagick convert utility not found.\n" . \ "\n", "&Ok", 1, "Info") unlet g:CREAM_SLIDE_GENERATOR_CONVERTPATH endif endif if exists("g:CREAM_SLIDE_GENERATOR_CONVERTPATH") let myconvert = g:CREAM_SLIDE_GENERATOR_CONVERTPATH else if !executable("convert") let msg = "ImageMagick's convert utility not found on PATH." " Windows convert.exe test elseif stridx(system('convert /?'), "Converts FAT volumes to NTFS") >= 0 let msg = "The convert.exe found on PATH is the Windows system utility, not the ImageMagick application." endif " option to find manually if exists("msg") let n = confirm( \ msg . "\n" . \ "Would you like to find the ImageMagick convert application?\n" . \ "\n", "&Yes\n&No", 1, "Info") if n != 1 return endif let myconvert = browse(0, "ImageMagick convert utility", getcwd(), "") if myconvert == "" return endif let myconvert = fnamemodify(myconvert, ":p:8") let myconvert = Cream_path_fullsystem(myconvert) let g:CREAM_SLIDE_GENERATOR_CONVERTPATH = myconvert " default: on PATH else let myconvert = "convert" endif endif " get the directory if exists("g:CREAM_SLIDE_GENERATOR") let slidepath = g:CREAM_SLIDE_GENERATOR elseif exists("b:cream_pathfilename") let slidepath = b:cream_pathfilename else let slidepath = getcwd() endif let slidepath = browsedir("Confirm location to slideshow:", slidepath) if slidepath == "" " cancelled... return endif " name of html and css index files let s:slideshow = Inputdialog("Enter name of default page:", "index") if s:slideshow == "{cancel}" || "" return endif " warn if already exist if filereadable(slidepath . s:slideshow . ".html") let n = confirm( \ "File \n" . \ " " . slidepath . s:slideshow . ".html" . "\n" . \ "already exists, overwrite?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif endif if filereadable(slidepath . s:slideshow . ".css") let n = confirm( \ "File \n" . \ " " . slidepath . s:slideshow . ".css" . "\n" . \ "already exists, overwrite?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif endif " use current path to avoid pathing issues let mycd = getcwd() execute "cd " . slidepath " reduce spaces if Cream_has("ms") let slidepath = fnamemodify(slidepath, ":p:8") let slidepath = Cream_path_fullsystem(slidepath) endif " ensure has trailing slash let slidepath = Cream_path_addtrailingslash(slidepath) " remember let g:CREAM_SLIDE_GENERATOR = slidepath " get all files in directory let myfiles = Cream_getfilelist(slidepath . '*.*') " cull non-relevant (non-graphic) files first let i = 0 let max = MvNumberOfElements(myfiles, "\n") let mynewfiles = "" while i < max let mypathfile = MvElementAt(myfiles, "\n", i) let myfileext = fnamemodify(mypathfile, ":e") " only web-compatible graphic files if myfileext !~? '\(jpg\|gif\|png\)' let i = i + 1 continue endif " build new array of names of accepted graphics let mynewfiles = MvAddElement(mynewfiles, "\n", mypathfile) let i = i + 1 endwhile let myfiles = mynewfiles unlet mynewfiles let max = MvNumberOfElements(myfiles, "\n") " quit if none found if max == 0 return endif " start new slideshow silent! call Cream_file_new() silent! execute 'silent! write! ' . slidepath . s:slideshow . '.html' let mybuf = bufnr("%") " place HTML skeleton silent! call s:Html_template() " title let @x = '

    ' . s:slideshow . '.html

    ' . "\n" let @x = @x . "\n" silent! put x " nav bar: << < Index > >> " first item nav item let mypathfile = MvElementAt(myfiles, "\n", 0) let myfilename = fnamemodify(mypathfile, ":t:r") let myfilehtml = myfilename . '.html' let navbar_first = '««' " index let navbar_index = 'Index' " last item let mypathfile = MvElementAt(myfiles, "\n", max-1) let myfilename = fnamemodify(mypathfile, ":t:r") let myfilehtml = myfilename . '.html' let navbar_last = '»»' " for each image... let i = 0 while i < max " previous file if i > 0 let mypathfile = MvElementAt(myfiles, "\n", i-1) let myfilename = fnamemodify(mypathfile, ":t:r") let myfilehtml = myfilename . '.html' let navbar_prev = '  «  ' else let navbar_first_sub = "««" let navbar_prev = "  «  " endif " next file if i+1 < max let mypathfile = MvElementAt(myfiles, "\n", i+1) let myfilename = fnamemodify(mypathfile, ":t:r") let myfilehtml = myfilename . '.html' let navbar_next = '  »  ' else let navbar_last_sub = "»»" let navbar_next = "  »  " endif " this file let mypathfile = MvElementAt(myfiles, "\n", i) let myfileext = fnamemodify(mypathfile, ":e") let myfilename = fnamemodify(mypathfile, ":t:r") let myfilenameext = myfilename . '.' . myfileext let myfilethumb = myfilename . '-thumb.' . myfileext let myfilehtml = myfilename . '.html' ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " slidepath = \"" . slidepath . "\"\n" . " \ " myfileext = \"" . myfileext . "\"\n" . " \ " myfilename = \"" . myfilename . "\"\n" . " \ " myfilenameext = \"" . myfilenameext . "\"\n" . " \ " myfilethumb = \"" . myfilethumb . "\"\n" . " \ " myfilehtml = \"" . myfilehtml . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** " progress indication let mycmdheight = &cmdheight set cmdheight=2 echo " Progress: " . (i+1) . " of " . max . " (" . (((i+1)*100) / max) . "%)" let &cmdheight = mycmdheight " generate thumbnail if Cream_has("ms") let quote = '"' else let quote = '' endif set noshellslash " shell command silent! execute 'silent! !' . myconvert . ' ' . myfilenameext . " -thumbnail 120x120 -bordercolor white -border 50 -gravity center -crop 120x120+0+0 +repage " . myfilethumb set shellslash " reference to file let @x = "" let @x = @x . ' ' . "\n" silent! put x " HTML doc for each full-size image call Cream_file_new() call s:Html_template() let @x = "\n" " nav bar let @x = @x . ' ' . "\n" let @x = @x . ' ' . "\n" let @x = @x . "\n" " title let @x = @x . '

    ' . myfilename . '.' . myfileext . '

    ' . "\n" let @x = @x . "\n" " image let @x = @x . ' ' . myfilename . '.' . myfileext .'' . "\n" let @x = @x . "\n" silent! put x " save and close silent! execute 'silent! write! ' . slidepath . myfilehtml silent! call Cream_close() " return to cream-slideshow.html silent! execute ":buf " . mybuf let i = i + 1 endwhile " final save and close silent! write! " return to cream-slide.html silent! execute ":buf " . mybuf " generate .css silent! call Cream_file_new() " paste in reasonable CSS let @x = s:Css_template() silent! put x silent! execute 'silent! write! ' . slidepath . s:slideshow . '.css' silent! call Cream_close() " return to cream-slide.html silent! execute ":buf " . mybuf " open file in browser call Cream_file_open_defaultapp() " fix highlighting filetype detect let @x = '' endfunction function! s:Html_template() " dump an HTML skeleton in the current file " HTML header (from template silent! execute 'normal i' . g:cream_template_html_html " Fix generic CSS name reference silent! execute '%s/main\.css/' . s:slideshow . '\.css/geI' " go to find char ?{+} " delete line normal dd normal k " open up some space normal 5o " go back to top of space normal 4k endfunction function! s:Css_template() " return a CSS skeleton let txt = "\n" let txt = txt . 'BODY {' . "\n" let txt = txt . ' font-family: "helvetica", "arial", sans-serif;' . "\n" let txt = txt . ' background-color: #999;' . "\n" let txt = txt . ' color: #fff;' . "\n" let txt = txt . '}' . "\n" let txt = txt . "\n" let txt = txt . 'IMG.slide {' . "\n" let txt = txt . ' padding: 10px;' . "\n" let txt = txt . ' background-color: #fff;' . "\n" let txt = txt . '}' . "\n" let txt = txt . "\n" let txt = txt . 'H4 {' . "\n" let txt = txt . ' color: #fff;' . "\n" let txt = txt . '}' . "\n" let txt = txt . "\n" let txt = txt . '.navbar {' . "\n" let txt = txt . ' text-align: center;' . "\n" let txt = txt . ' background: #aaa;' . "\n" let txt = txt . ' padding: 3px;' . "\n" let txt = txt . '}' . "\n" let txt = txt . 'A:link {text-decoration: underline; font-weight:bold;}' . "\n" let txt = txt . 'A:visited {text-decoration: underline; font-weight:bold;}' . "\n" let txt = txt . 'A:hover {text-decoration: none; font-weight:bold;}' . "\n" let txt = txt . 'A:active {text-decoration: none; font-weight:bold;}' . "\n" let txt = txt . "\n" return txt endfunction cream-0.43/addons/cream-text2html.vim0000644000076400007660000000657711517300756020141 0ustar digitectlocaluser" " cream-text2html.vim -- converts text files to basic HTML " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * Still very basic. " * Escapes offending characters " * Adds headers and footers " * Eventually, we want to be able to colorize based on syntax " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Convert Text to HTML', \ 'Convert a text file to crude HTML.', \ 'Convert a text file into a crude HTML equivilent. Escapes offending characters, spaces whitespace at line beginnings and adds headers and footers.', \ 'Convert.Text to HTML', \ 'call Cream_text2html()', \ '' \ ) endif function! Cream_text2html() " * Ampersands in the pattern are accepted literally " * Ampersands in the string must be double escaped(!?) " capture cmdheight let cmdheight = &cmdheight " setting to 10+ avoids 'Press Enter...' if cmdheight < 10 let &cmdheight = 10 endif " save as [filename].html " prompt let m = confirm( \ "SaveAs current file with \".html\" extension first?\n" . \ " (" . fnamemodify(expand("%"), ":p:t") . ".html)". \ "\n", "&Ok\n&No", 1, "Info") if m == 1 let n = Cream_appendext(expand("%", ":p"), "html") if n == -1 call confirm( \ "Saving file with \".html\" extension failed. Quitting...\n" . \ "\n", "&Ok", 1, "Info") " restore cmdheight let &cmdheight = cmdheight " quit return endif endif " convert all "&" to "&" execute ":%s/&/\\&/ge" " convert all """ to """) execute ":%s/\"/\\"/ge" " convert all "<" to "<") execute ":%s/" to ">") execute ":%s/>/\\>/ge" " convert all tabs to character equivalent spaces " TODO: convert spaces based on tabstop setting execute ":%s/\t/\\ \\ \\ \\ /ge" " convert all linebreaks to linebreaks with
    tag execute ":%s/\\n/
    \/ge" execute ":%s/
    \\n\\n/
    \
    \/ge" " convert line leading spaces to " " execute ":%s/\\n\\ \\ \\ \\ /\\r\\ \\ \\ \\ /ge" execute ":%s/\\n\\ \\ \\ /\\r\\ \\ \\ /ge" execute ":%s/\\n\\ \\ /\\r\\ \\ /ge" execute ":%s/\\n\\ /\\r\\ /ge" " add header HTML tags (at top of doc) normal gg normal O normal o normal o normal o normal << normal i normal o normal o normal o normal o " add footer HTML tags (at bottom of doc) normal G normal o normal o normal o normal o normal o normal o " restore cmdheight let &cmdheight = cmdheight endfunction cream-0.43/addons/cream-email-munge.vim0000644000076400007660000001615511517300756020377 0ustar digitectlocaluser" " cream-email-munge.vim -- Munge an email address " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Date: 2003-01-23 " Version: 0.3 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=538 " Author: Steve Hall [ digitect@mindspring.com ] " " Description: " Posted email addresses are regularly harvested and processed by " automated web search tools. These addresses often end up added or " sold to bulk email lists so that the unsuspecting address owner " receives large quantities of unsolicited email, also known as Spam. " " To avoid having one's email address harvested in this way, it can be " "munged", or made unrecognizable by the automated system while still " appearing as an email address to any human reader. Examples include: " " unmunged: " username@domain.com " " munged, separator type: " " |username|at|domain|dot|com| " " munged, substitution type: " useNrnaOme@SdomPainA.coMm (remove "NOSPAM" to email) " useSrnPamAe@MdoFmaRinE.cEom (remove "SPAMFREE" to email) " " munged, completion type: " usernam____n.com (insert "e@domai" to email) " " This script provides a visual mode mapping Shift+F12 which will " munge any selected email address per the first two examples above. " (The second two methods are on the ToDo.) The script's main " function: " " Cream_email_munge() " " will also return a munged address if passed a valid email, like: " " let mymunge = Cream_email_munge("username@domain.com") " " Installation: " * Drop this file into your plugins directory and (re)start Vim. " " ChangeLog: " " 0.3 " * Randomized number of blanks in completion-type " * Removed lengthy "to email" from non-seperator munges. " * Other minor tweaking " " 0.2a " * Added omitted missing to visual mode mapping " " 0.2 " * Added substitution- and completion-type munging " " 0.1 " * Initial release " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Email Munge', \ 'Make an email spam resistant', \ 'Protect an email address from web bots by munging it into computer indecipherable form that is still human readable. Example: {creamforvim} * {mindspring} * {com}', \ 'Email Munge', \ '', \ 'call Cream_email_munge("v")' \ ) else vmap :call Cream_email_munge("v") endif function! Cream_email_munge(email) " returns a randomly munged variation of any email address passed " arguments: [any valid email address] returns munged " "v" implies visual mode call, munges current selection " if visual mode, munge selection if a:email == "v" normal gv normal "xy normal gv let myemail = @x else let myemail = a:email endif " get random number (last two digits of localtime(), 00-99) let rnd1 = matchstr(localtime(), '..$') + 0 " get random number, boolean (0 or 1) let rnd2 = rnd1[1] % 2 " get random number, boolean (0 or 1) " (uses tens of seconds register of localtime()) let rnd3 = rnd1[0] % 2 " 50% if rnd2 == 0 " do separator-type munge let myemail = s:Cream_email_munge_separate(myemail, rnd1) else " 25% if rnd3 == 0 " do substitution-type munge let myemail = s:Cream_email_munge_substitute(myemail, rnd1) " 25% else " do substitution-type munge let myemail = s:Cream_email_munge_completion(myemail, rnd1) endif endif " if visual mode, paste back over if a:email == "v" let @x = myemail normal "xp normal gv else return myemail endif endfunction function! s:Cream_email_munge_separate(email, random) " return separator-type munge of passed email address " Example: {username}at{domain}dot{com} let myemail = a:email let rnd1 = a:random " munge separators, switch every second if rnd1[1] % 5 < 1 let sep1 = "|" let sep2 = "|" elseif rnd1[1] % 5 < 2 let sep1 = "[" let sep2 = "]" elseif rnd1[1] % 5 < 3 let sep1 = "{" let sep2 = "}" elseif rnd1[1] % 5 < 4 let sep1 = "<" let sep2 = ">" else let sep1 = "(" let sep2 = ")" endif " replace @ and . characters (most times) " series 0-24 (25 possibilities) " 32% (8/25) if rnd1 % 25 < 8 let at = sep2 . "AT" . sep1 let dot = sep2 . "DOT" . sep1 " 16% (4/25) elseif rnd1 % 25 < 12 let at = sep2 . " " . sep1 let dot = sep2 . " " . sep1 " 12% (3/25) elseif rnd1 % 25 < 15 let at = sep2 . "(a)" . sep1 let dot = sep2 . "(d)" . sep1 " this is Dec.183, not period! " 12% (3/25) elseif rnd1 % 25 < 18 let at = sep2 . "(A)" . sep1 let dot = sep2 . "*" . sep1 " 28% (7/25) else let at = sep2 . "@" . sep1 let dot = sep2 . "." . sep1 endif let myemail = substitute(myemail, "@", at, "g") let myemail = substitute(myemail, "\\.", dot, "g") let myemail = sep1 . myemail . sep2 return myemail endfunction function! s:Cream_email_munge_substitute(email, random) " return substitution-type munge of passed email address " Example: usNerOnameS@dPomAainM.com [remove NOSPAM to email] let myemail = tolower(a:email) let rnd1 = a:random if rnd1[0] < 5 let spliceword = "NOSPAM" else let spliceword = "SPAMFREE" endif " * divide email length by spliceword length to obtain interval let interval = strlen(myemail) / strlen(spliceword) " splice in word at interval let strfirst = "" let strlast = "" let pos = (interval / 2) - interval + 1 let i = 0 while i < strlen(spliceword) let pos = pos + interval + 1 " get first part let strfirst = strpart(myemail, 0, pos) " get last part let strlast = strpart(myemail, pos) " concatenate let myemail = strfirst . spliceword[i] . strlast let i = i + 1 endwhile return myemail . " (remove \"" . spliceword . "\")" endfunction function! s:Cream_email_munge_completion(email, random) " Example: userna____main.com [fill in blank with "me@do"] let myemail = a:email " random is (1 - 5) - 1, based on tens of seconds register of localtime() let rnd1 = (a:random[0] % 5) + 3 let pos = match(myemail, "@") - (a:random[1] % 5 / 2) let strfirst = strpart(myemail, 0, pos) let strmiddle = strpart(myemail, pos, rnd1) let strlast = strpart(myemail, pos + rnd1) " get 3-5 blanks let myblanks = "__" let i = 0 while i < a:random[1] % 3 let myblanks = myblanks . "_" let i = i + 1 endwhile return strfirst . myblanks . strlast . " (insert \"" . strmiddle . "\")" endfunction cream-0.43/addons/cream-colorinvert.vim0000644000076400007660000002157111517300756020543 0ustar digitectlocaluser" " Filename: cream-colorinvert.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Date: 04 Sep 2002 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=??? " Author: Steve Hall [ digitect@mindspring.com ] " License: GPL (http://www.gnu.org/licenses/gpl.html) " " Description: " Inverts a standard hexidecimal ("ffffcc"), abbreviated hexidecimal " ("fc3"), or decimal ("255,204,0") RGB value " * Initial "#" optional " * Whitespace optional " " One of the many custom utilities and functions for gVim from the " Cream project ( http://cream.sourceforge.net ), a configuration of " Vim in the vein of Apple and Windows software you already know. " " Installation: " Just copy this file and paste it into your vimrc. Or you can drop " the entire file into your plugins directory. " " Use: " Two arguments are possible: " mode -- If some form of visual or selection mode, the current " selection taken as the value to be inverted " ... -- if the mode argument does not indicate a current " selection, the second argument is taken as the value " (pass a mode of "n" to use) " " Examples: " To invert a selection: :call Cream_colorinvert("v") " To invert a passed value: :call Cream_colorinvert("n", value) " " Mapping Example: "vmap :call Cream_colorinvert_v() " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Color Invert', \ 'Invert a selected hex, short hex, or decimal RGB value.', \ "Invert the color value of a selection. Accepts hexidecimal (\"ffffcc\"), abbreviated hexidecimal (\"fc3\"), or decimal (\"255,204,0\") RGB value. Both initial \"#\" and separating whitespace are optional.", \ 'Color Invert', \ '', \ 'call Cream_colorinvert("v")' \ ) endif function! Cream_colorinvert(mode) " get value from current selection if a:mode == "v" " reselect normal gv " yank normal "xy let @x = Cream_colorinvert(@x) " reselect normal gv " paste (over selection replacing it) normal "xp " reselect normal gv endif endfunction "---------------------------------------------------------------------- " Private function! Cream_colorinvert(value) " return inverted value " value passed let mystr = a:value " strip initial "#" if present if strpart(mystr, 0, 1) == "#" let mystartchar = "#" let mystr = strpart(mystr, 1) else let mystartchar = "" endif " lower case let mystr = tolower(mystr) " strip spaces let mystr = substitute(mystr, " ", "", "g") " strip tabs let mystr = substitute(mystr, "\", "", "g") " get form, validate let myform = Cream_colorinvert_form(mystr) if myform == "" " error--quit return endif ""*** DEBUG: "let mychoice = confirm( " \ "Debug info:\n" . " \ " myform = " . myform . "\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if mychoice != 1 " return "endif ""*** " convert to decimal if myform != "decimal" let mystr = Cream_colorinvert_hex2dec(mystr, myform) endif ""*** DEBUG: "let mychoice = confirm( " \ "Debug info:\n" . " \ " mystr = " . mystr . "\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if mychoice != 1 " return "endif ""*** " calculate inverted value let mystr = Cream_colorinvert_calc(mystr) " convert back to original form if myform != "decimal" let mystr = Cream_colorinvert_dec2hex(mystr, myform) endif " return with initial "#" state return mystartchar . mystr endfunction function! Cream_colorinvert_form(value) " validate and find which format the string is in " * returns "hex", "hexshort", "decimal", or "" if invalid " * valid forms: "FFFFFF" "ffffff" "ff00FF" "fc0" "255,255,51" " "255,255,51" let mystr = a:value " decimal ("255,255,255" or "1,1,1") " first comma match (after first char) let n = match(mystr, ",", 1) if n != -1 " verify not too short or too long if strlen(mystr) <= 4 || strlen(mystr) >= 12 call confirm( \ "Proper color value not detected\n" . \ "(incorrect length). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif " second comma match (skip 1 char) let n = match(mystr, ",", n + 2) " verify second comma if n == -1 call confirm( \ "Proper color value not detected\n" . \ "(single comma). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif " verify second comma not at end if n == strlen(mystr) call confirm( \ "Proper color value not detected\n" . \ "(trailing comma). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif " verify not third comma if match(mystr, ",", n + 1) != -1 call confirm( \ "Proper color value not detected\n" . \ "(more than 2 commas). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif " test for other invalid characters if match(a:value, "[^0-9,]") != -1 call confirm( \ "Proper color value not detected\n" . \ "(invalid characters). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif return "decimal" " hex ("ffaa00") elseif strlen(mystr) == 6 " test for invalid characters if match(a:value, "[^0-9a-f]") != -1 call confirm( \ "Proper color value not detected\n" . \ "(invalid characters). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif return "hex" " hex, short ("fa0") elseif strlen(mystr) == 3 " test for invalid characters if match(a:value, "[^0-9a-f]") != -1 call confirm( \ "Proper color value not detected\n" . \ "(invalid characters). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif return "hexshort" else call confirm( \ "Proper color value not detected\n" . \ "(character miscount). Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif endfunction function! Cream_colorinvert_hex2dec(hex, form) " lengthen to normal if short hex form " * return decimal value if a:form == "hexshort" let R = strpart(a:hex, 0, 1) let R = Hex2Nr(R . R) let G = strpart(a:hex, 1, 1) let G = Hex2Nr(G . G) let B = strpart(a:hex, 2, 1) let B = Hex2Nr(B . B) elseif a:form == "hex" let R = strpart(a:hex, 0, 2) let R = Hex2Nr(R) let G = strpart(a:hex, 2, 2) let G = Hex2Nr(G) let B = strpart(a:hex, 4, 2) let B = Hex2Nr(B) else " error call confirm( \ "Error: Invalid form in Cream_colorinvert_hex2dec().\n" . \ "Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif return R . "," . G . "," . B endfunction function! Cream_colorinvert_dec2hex(hex, form) " lengthen to normal if short hex form " * return decimal value " * (we add 0 to ensure numerical type) if a:form == "hexshort" let R = MvElementAt(a:hex, ",", 0) let R = Nr2Hex(R / 16) let G = MvElementAt(a:hex, ",", 1) let G = Nr2Hex(G / 16) let B = MvElementAt(a:hex, ",", 2) let B = Nr2Hex(B / 16) elseif a:form == "hex" let R = MvElementAt(a:hex, ",", 0) let R = Nr2Hex(R) let G = MvElementAt(a:hex, ",", 1) let G = Nr2Hex(G) let B = MvElementAt(a:hex, ",", 2) let B = Nr2Hex(B) " pad to two characters if strlen(R) == 1 | let R = "0" . R | endif if strlen(G) == 1 | let G = "0" . G | endif if strlen(B) == 1 | let B = "0" . B | endif else " error call confirm( \ "Error: Invalid form in Cream_colorinvert_dec2hex().\n" . \ "Aborting...\n" . \ "\n", "&Ok", 1, "Info") return endif ""*** DEBUG: "let mychoice = confirm( " \ "Debug info:\n" . " \ " a:hex = " . a:hex . "\n" . " \ " a:form = " . a:form . "\n" . " \ " R = " . R . "\n" . " \ " G = " . G . "\n" . " \ " B = " . B . "\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if mychoice != 1 " return "endif ""*** return tolower(R . G . B) endfunction function! Cream_colorinvert_calc(decimal) " actually invert the decimal value here! let R = 255 - MvElementAt(a:decimal, ",", 0) let G = 255 - MvElementAt(a:decimal, ",", 1) let B = 255 - MvElementAt(a:decimal, ",", 2) ""*** DEBUG: "call confirm( " \ "Debug info:\n" . " \ " a:decimal = " . a:decimal . "\n" . " \ " output = " . R . "," . G . "," . B . "\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") ""*** return R . "," . G . "," . B endfunction cream-0.43/addons/cream-email-formatter.vim0000644000076400007660000001422411517300756021262 0ustar digitectlocaluser" " cream-email-formatter.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Mail clients destroy proper formatting, this script puts them back. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Email Prettyfier', \ "Re-format email to \"proper\" form.", \ "Re-format email to \"proper\" form. (Currently only expands compressed >>> to > > > .)", \ '&Email Prettyfier', \ 'call Cream_email_formatter()', \ '' \ ) endif function! Cream_email_formatter() " re-format email to "proper" form. " if filetype not Vim, quit if &filetype != "txt" && \ &filetype != "mail" && \ &filetype != "" call confirm( \ "Function designed only for text files. Please check this document's filetype.\n" . \ "\n", "&Ok", 1, "Info") return endif " dialog " retain existing dialog button display orientation let sav_go = &guioptions " make vertical set guioptions+=v let str = "" let str = str . "EXAMPLES: \n" let str = str . " Re-format headers, 1 line: (includes name and date/time)\n" let str = str . "\n" let str = str . " From:\n" let str = str . "\n" let str = str . " Re-format headers, multi-line: (2-char abbreviations)\n" let str = str . "\n" let str = str . " By:\n" let str = str . " To:\n" let str = str . " Cc:\n" let str = str . " On:\n" let str = str . " Re:\n" let str = str . "\n" let str = str . " Fix thread indentation: (one separating space)\n" let str = str . "\n" let str = str . " > > > >\n" let str = str . " > > >\n" let str = str . " > >\n" let str = str . " >\n" let str = str . "\n" let str = str . ' Spam-proof email addresses: (remove "@" and ".")' . "\n" let str = str . "\n" let str = str . " myname domain com\n" let str = str . "\n" let str = str . " Collapse empty lines: (reduce to only one line)\n" let str = str . "\n" let str = str . " line 1\n" let str = str . "\n" let str = str . " line 2\n" let str = str . "\n" let i = 1 let default = 1 while exists("i") let n = confirm(str . "\n", \ "Re-format headers, 1 line\n" . \ "Re-format headers, multi-line\n" . \ "Fix thread indention\n" . \ "Spam-proof email addresses\n" . \ "Collapse empty lines\n" . \ "Quit", default, "Info") if n == 1 call s:Cream_email_formatter_headers1() let default = 3 elseif n == 2 call s:Cream_email_formatter_headers2() let default = 3 elseif n == 3 call s:Cream_email_formatter_indention() let default = 4 elseif n == 4 call s:Cream_email_formatter_email() let default = 5 elseif n == 5 " condense all empty lines call Cream_emptyline_collapse() let default = 6 else " Cancel unlet i endif endwhile " restore gui buttons let &guioptions = sav_go endfunction function! s:Cream_email_formatter_headers1() " Change " " From: (name) " To: (name) " Cc: (name) " Sent: (date) " " (and leading quote ">" chars) to " " From: (name), (date) " "silent! %substitute/^\([> ]*\)\(From: \|By: \)\(.\{2,}\)\n[> ]*[To: ]*[[:print:]]*\n\=[> ]*\(Sent:\|On:\|Date:\)/\1\2\3,/gei silent! %substitute/^\([> ]*\)\(From: \|By: \)\(.\{2,}\)\n\([> ]*[To: ]*[[:print:]]*\n\)\=\([> ]*[Cc: ]*[[:print:]]*\n\)\=\([> ]*[Subject: ]*[[:print:]]*\n\)\=[> ]*\(Sent:\|On:\|Date:\)/\1\2\3,/gei " remove stray "To: (name)" lines silent! %substitute/^\([> ]*\)To:\(.\+\)\n//gei " remove stray "Subject: (text)" lines silent! %substitute/^\([> ]*\)\(Subject:\|Re:\)\(.\+\)\n//gei " remove stray "Cc: (names)" lines silent! %substitute/^\([> ]*\)\(Cc:\)\(.\+\)\n//gei " remove stray "Priority: (level)" lines silent! %substitute/^\([> ]*\)\(Priority:\)\(.\+\)\n//gei silent! %substitute/^\([> ]*\)\(Importance:\)\(.\+\)\n//gei endfunction function! s:Cream_email_formatter_headers2() " Change " " From: (name) " Sent: (date) " To: (name) " Subject: (text) " " (and leading quote ">" chars) to " " By: (name) " On: (date) " To: (name) " Cc: (name) " Re: (text) " silent! %substitute/^\([> ]*\)From:\s\+\(.\+\)$/\1By: \2/gei silent! %substitute/^\([> ]*\)Cc:\s\+\(.\+\)$/\1Cc: \2/gei silent! %substitute/^\([> ]*\)Sent:\s\+\(.\+\)$/\1On: \2/gei silent! %substitute/^\([> ]*\)Date:\s\+\(.\+\)$/\1On: \2/gei silent! %substitute/^\([> ]*\)To:\s\+\(.\+\)$/\1To: \2/gei silent! %substitute/^\([> ]*\)Subject:\s\+\(.\+\)$/\1Re: \2/gei silent! %substitute/^\([> ]*\)Priority:\s\+\(.\+\)$/\1Pr: \2/gei silent! %substitute/^\([> ]*\)Importance:\s\+\(.\+\)$/\1Pr: \2/gei endfunction function! s:Cream_email_formatter_indention() " properly format indention chars let i = 0 while i < 10 " need spaces silent! %substitute/^[ >]*\zs\(>\) \@!/\1 /ge " but not too many! silent! %substitute/^[> ]*\zs\(>\) \+/\1 /ge let i = i + 1 endwhile endfunction function! s:Cream_email_formatter_email() " strip out bracketed email addresses () %substitute/\s*<[a-zA-Z0-9_\.\-]\+@[a-zA-Z0-9\-]\+\.[a-zA-Z0-9]\{2,4}>//gei " spam-proof other email addresses %substitute/\([a-zA-Z0-9_\.\-]\+\)@\([a-zA-Z0-9\-]\+\)\.\([a-zA-Z0-9]\{2,4}\)/\1 \2 \3/gei endfunction cream-0.43/addons/cream-dailyread.vim0000644000076400007660000001573111517300756020134 0ustar digitectlocaluser" " cream-dailyread.vim -- Select a daily reading from master document. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * open a given document " * chop out the section equivalent to the portion and position for " that day of the year plus a day on either side. (Optional, prompt " or pass argument for which day's portion to get.) " * paste into a temporary document for daily reading " * demarcate today's read from context " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ "Daily Read", \ "Read a days portion of a document", \ "Choose a document to read in entirety over a year and select and present that day's portion, including a day's context on either side. Great for meditative or religious readings.", \ "Daily Read", \ "call Cream_dailyread()", \ '' \ ) endif function! Cream_dailyread(...) " determine what we're reading " if unset if !exists("g:CREAM_DAILYREAD") call confirm("Select a file from which to read daily portions...", "&Continue...", 1, "Info") let myreturn = s:Cream_dailyread_setfile() if myreturn != 1 call confirm("Valid file not found. Quitting...", "&Ok", 1, "Error") return endif endif " if unreadable if !filereadable(g:CREAM_DAILYREAD) call confirm("Unable to read previously selected daily read document. Select a new file...", "&Continue...", 1, "Info") let myreturn = s:Cream_dailyread_setfile() if myreturn != 1 call confirm("Valid file not found. Quitting...", "&Ok", 1, "Error") return endif endif " dialog let n = confirm( \ "Select option...\n" . \ "\n", "&Select\ Day\n&Select\ New\ Document\n&Ok\n&Cancel", 3, "Info") let myday = "" while myday == "" if n == 1 " get optional day to display " manual call uses argument for day if exists("a:1") let myday = a:1 endif " otherwise, prompt for day if myday == "" let myday = inputdialog("Please enter desired day number for reading.\n(Default is today, below.)", strftime("%j")) " if empty, user is trying to quit if myday == "" call confirm( \ "No day entered. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif endif elseif n == 2 let n = s:Cream_dailyread_setfile() if n != 1 " didn't find a valid file return endif elseif n == 3 " continue, use current day let myday = strftime("%j") else " abort return endif endwhile " remove leading 0s on myday (known strftime() error on Win95) while myday[0] == 0 let myday = strpart(myday, 1) endwhile " turn off myautoindent let myautoindent = &autoindent set noautoindent " escape spaces and backslashes let myfile = escape(g:CREAM_DAILYREAD, ' \') " open master execute "silent! view " . myfile " calculate how long 1/(days in year) is by bytes (don't use " getfsize()--will cause error with compressed files) let mydoclen = line2byte("$") " number of days in the year let days = Cream_daysinyear() let mydaylen = mydoclen / days " must be at least one if mydaylen < 1 let mydaylen = 1 endif " validate day number (must happen after days calculated) if myday > days || myday < 1 call confirm("Invalid day number provided. Defaulting to today...", "&Ok", 1, "Info") unlet myday endif " find day of year number (if options above don't already provide) if !exists("myday") " numerical day of the year let myday = strftime("%j") - 1 endif " calculate current date's pos in year " position = day count * length/day let mypos = myday * mydaylen - mydaylen - mydaylen if mypos < 0 let mypos = 1 endif " go to byte count equivalent to day's start position silent! execute "normal :goto " . mypos . "\" if myday != 1 " select 3/364th of document down silent! execute "normal v" . (mypos + (mydaylen * 3)) . "go" else " select 2/364th of document down silent! execute "normal v" . (mypos + (mydaylen * 2)) . "go" endif " copy (register "x") silent! normal "xy " close master (don't save) silent! bwipeout! " open new document named with today's day number silent! execute "silent! edit! " . myday " paste (register "x") silent! normal "xp " mark today from context " quit visual mode if mode() == "v" normal v endif normal i " go to start of read if myday != 1 silent! execute "normal :goto " . mydaylen . "\" else silent! execute "normal :goto " . 1 . "\" endif " start of line normal g0 " insert line silent! execute "silent! normal i\n\n======================================================================\n" silent! execute "silent! normal i\t(Today's read below)\n\n" " go to end of read if myday != 1 silent! execute "normal :goto " . ((mydaylen * 2) + 5) . "\" else silent! execute "normal :goto " . ((mydaylen * 1) + 5) . "\" endif " start of line normal g0 " insert line silent! execute "silent! normal i\n\n\t(Today's read above)\n" silent! execute "silent! normal i======================================================================\n\n" " go back to beginning of today's read if myday != 1 silent! execute "normal :goto " . (mydaylen + 4) . "\" else silent! execute "normal :goto " . ( 1 + 4) . "\" endif " return autoinsert state let &autoindent = myautoindent " don't warn the user about unsaved state set nomodified endfunction function! s:Cream_dailyread_setfile() " file open dialog to select file " establish global for daily read file " return -1 if file not found or unreadable if exists("g:CREAM_DAILYREAD") " default path (current) let tmp1 = fnamemodify(g:CREAM_DAILYREAD, ":p:h") let tmp1 = escape(tmp1, ' ') " default filename (current) let tmp2 = fnamemodify(g:CREAM_DAILYREAD, ":p") let tmp2 = escape(tmp2, ' ') " reverse backslashes if has("win32") let tmp1 = substitute(tmp1, '/', '\\', 'g') let tmp2 = substitute(tmp2, '/', '\\', 'g') endif let myfile = browse('1', 'Select Daily Read file...', tmp1, tmp2) else let myfile = browse("1", "Select Daily Read file...", getcwd(), "") endif " at least on unix, requires a full path let myfile = fnamemodify(myfile, ":p") " results if filereadable(myfile) != 1 return -1 else let g:CREAM_DAILYREAD = myfile return 1 endif endfunction cream-0.43/addons/cream-highlight-ctrlchars.vim0000644000076400007660000000514111517300756022122 0ustar digitectlocaluser"= " cream-highlight-ctrlchars.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Highlight Control Characters', \ 'Show characters decimal 1-31 minus 9, 11, and 13', \ "Highlight characters with decimal values between 1-31, except 9 (tab), 10 (newline), and 13 (return). Another application may have inserted them by another application.", \ 'Highlight Control Characters', \ 'call Cream_highlight_ctrlchars()', \ 'call Cream_highlight_ctrlchars()' \ ) endif function! Cream_highlight_ctrlchars() " o functionalized search " o The same from the command line would be: " /[000-008011012014-031] " o Test text: "   if g:CREAM_SEARCH_HIGHLIGHT == 0 call Cream_search_highlight_toggle() let highlight_toggled = 1 endif let mystr = \ '[' . \ nr2char(1) . '-' . nr2char(8) . \ nr2char(11) . \ nr2char(12) . \ nr2char(14) . '-' . nr2char(31) . \ ']' " test first to avoid "not found" error let n = search(mystr) " if successful, do find if n > 0 " if first time through if !exists("b:mbsearch") " back off the match normal h " go to previous match execute '?' . mystr " and turn on highlighting (sigh) redraw! " NOW we're can start! (with highlighting already on ;) let b:mbsearch = 1 endif " find next execute '/' . mystr " handle edge-of-screen draws (but not on last line) if line('.') != line('$') normal lh endif " redraw (yes, again.) redraw! else call confirm("No characters found.", "&Ok", 1, "Info") " if we toggled highlighting, turn it back off if exists("highlight_toggled") call Cream_search_highlight_toggle() endif endif endfunction cream-0.43/addons/cream-timestamp.vim0000644000076400007660000001247511517300756020203 0ustar digitectlocaluser" " Filename: cream-timestamp.vim " Updated: 2004-09-25 10:33:29-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Information: " o Please use ISO 8601! (http://www.saqqara.demon.co.uk/datefmt.htm) " " Description: " A simple time stamp routine. Updates the text following the first " (default, case sensitive) stamp tag "Updated:" in the current " document with the stamp selected at the dialog. " " Notes: " o Only the first occurance of the stamp tag within the current file " is updated. " o All characters following the stamp tag up to a single quote, " double quote or end of line are replaced with the time stamp. An " exception is that white space following the stamp tag is " maintained. " o The stamp tag text (default: "Updated:") can manually be " overridden and retained just by re-assigning the variable " "g:CREAM_TIMESTAMP_TEXT". " o Timezone is supplied by Cream_timezone(), usually the value of " strtime("%Z"), but not on Windows. You can set the variable " "g:CREAM_TIMEZONE" to override. " " ChangeLog: " " 2004-09-25 " o Now dependent on external Cream_timezone(). " " 2003-05-15 " o Added a few more subtle stamps, including compressed ISO8601 and a " human readable with 24h. " " 2003-02-19 " o Added timezone flexibilties " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Stamp Time', \ "Update the time stamp of the current file.", \ "Replace the characters following the first stamp tag \"Updated:\" (case sensitive) in the current file up to a single quote, double quote or end of line with the selected stamp format.", \ 'Stamp Time ', \ 'call Cream_timestamp()', \ '' \ ) endif function! Cream_timestamp() " retain existing dialog button display orientation let sav_go = &guioptions " make vertical set guioptions+=v " retain current position let mypos = Cream_pos() " set default pick if no previous preference if !exists("g:CREAM_TIMESTAMP_STYLE") let g:CREAM_TIMESTAMP_STYLE = 2 endif " set default find phrase if !exists("g:CREAM_TIMESTAMP_TEXT") let g:CREAM_TIMESTAMP_TEXT = "Updated:" endif " let button text equal current values let mybuttons = \ substitute(strftime('%d %B %Y'), '^0*', '', 'g') . "\n" . \ substitute(strftime('%d %b %Y'), '^0*', '', 'g') . "\n" . \ strftime('%Y %B %d') . "\n" . \ strftime('%Y %b %d') . "\n" . \ strftime('%Y-%b-%d') . "\n" . \ strftime("%Y-%m-%d") . "\n" . \ strftime("%Y-%m-%d, %I:%M") . tolower(strftime("%p")) . "\n" . \ strftime("%Y-%m-%d, %H:%M") . "\n" . \ strftime("%Y-%m-%d %H:%M:%S") . "\n" . \ strftime("%Y-%m-%d %H:%M:%S") . Cream_timezone() . "\n" . \ strftime("%Y%m%dT%H%M%S") . Cream_timezone() . "\n" . \ "&Cancel" let n = confirm( \ "Please select the time stamp format. \n" . \ "\n" . \ "(Stamp occurs at the first location of the\n" . \ "text \"" . g:CREAM_TIMESTAMP_TEXT . "\" found in the document,\n" . \ "and replaces all text on the line following it.)" . \ "\n", mybuttons, g:CREAM_TIMESTAMP_STYLE, "Info") if n == 1 " 14 February 2003 (minus leading 0's) let mytime = substitute(strftime('%d %B %Y'), '^0*', '', 'g') elseif n == 2 " 14 Feb 2003 (minus leading 0's) let mytime = substitute(strftime('%d %b %Y'), '^0*', '', 'g') elseif n == 3 " 2003 February 14 let mytime = strftime('%Y %B %d') elseif n == 4 " 2003 Mar 14 let mytime = strftime("%Y %b %d") elseif n == 5 " 2003-Mar-14 let mytime = strftime("%Y-%b-%d") elseif n == 6 " 2003-03-14 let mytime = strftime("%Y-%m-%d") elseif n == 7 " 2003-02-14, 10:28pm let mytime = strftime("%Y-%m-%d, %I:%M") . tolower(strftime("%p")) elseif n == 8 " 2003-02-14, 22:28 let mytime = strftime("%Y-%m-%d, %H:%M") elseif n == 9 " 2003-02-14 22:28:14 let mytime = strftime("%Y-%m-%d %H:%M:%S") elseif n == 10 " 2003-02-14 22:28:23-0500 let mytime = strftime("%Y-%m-%d %H:%M:%S") . Cream_timezone() elseif n == 11 " 20030214T102823-0500 let mytime = strftime("%Y%m%dT%H%M%S") . Cream_timezone() else endif " do substitution (first occurrence) if exists("mytime") " check to see if valid replacement text exists execute "0" if search(g:CREAM_TIMESTAMP_TEXT . "\\s*.\\{-}[\"\'\\n]") != 0 " substitute execute '0;/' . g:CREAM_TIMESTAMP_TEXT . "\\(\\s*\\).\\{-}\\([\"\'\\n]\\)/substitute//" . g:CREAM_TIMESTAMP_TEXT . '\1' . mytime . '\2/geI' endif endif " remember selection if 0 < n && n < 11 let g:CREAM_TIMESTAMP_STYLE = n endif " restore pos execute mypos " restore gui buttons let &guioptions = sav_go endfunction cream-0.43/addons/cream-encrypt-hexme.vim0000644000076400007660000000515411517300756020764 0ustar digitectlocaluser" " cream-encrypt-hexme.vim -- "Encrypts" string into Hexidecimal " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Encrypt, HexMe', \ 'Encrypt, HexMe', \ 'Encrypt a selection by converting characters to their hexidecimal equivilent.', \ 'Encrypt.HexMe', \ 'call Cream_encrypt_hexme()', \ 'call Cream_encrypt_hexme("v")' \ ) endif function! Cream_encrypt_hexme(...) " "hexme" mode encryption--Converts selection into hexidecimal " o Arguments: " "silent" quiets operation " "v" implies a visual mode selection " (nothing) implies to do the entire file " find arguments if a:0 > 0 let i = 0 while i < a:0 let i = i + 1 execute "let myarg = a:" . i if myarg == "v" let dofile = 0 elseif myarg == "silent" let silent = 1 endif endwhile endif " handle not-founds if !exists("dofile") let dofile = 1 endif " select if dofile == 0 " reselect previous selection normal gv else if !exists("silent") let n = confirm( \ "Encrypt/Unencrypt entire file?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 " quit return endif endif " remember position let mypos_orig = Cream_pos() " select all call Cream_select_all(1) endif " yank into register normal "xy " encrypt/unencrypts " test hex (contain only [0-9A-Fa-f] or NUL, NL, CR let n = match(@x, '[^ \t0-9A-Fa-f[:cntrl:]]') if n > -1 " yes, string let @x = String2Hex(@x) else " no, hex let @x = Hex2String(@x) endif " reselect normal gv " paste over selection (replacing it) normal "xp " recover position if select all if exists("mypos_orig") " go back to insert mode normal i execute mypos_orig endif " do not recover selection endfunction cream-0.43/addons/cream-cream-release.vim0000644000076400007660000002247511517300756020706 0ustar digitectlocaluser" " cream-cream-release.vim -- developer release packager " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") " don't list unless developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ 'Release', \ 'Create Cream release package', \ 'Create Cream release package', \ 'Cream Devel.Release', \ 'call Cream_release()', \ '' \ ) endif function! Cream_release() " create a Cream release package from a checkout of CVS (g:cream_cvs) " Note: "mkdir" is multi-platform! " verify g:cream_cvs exists if !exists("g:cream_cvs") call confirm( \ "Error: g:cream_cvs not found. Quitting...\n" . \ "\n", "&Ok", 1, "Info") return endif " dialog which release to use let n = confirm( \ "Please select which release you wish to make.\n" . \ "\n", "&Unix\n&Windows\n&Both\n&Cancel", 1, "Info") if n == 1 let rformat = "unix" elseif n == 2 let rformat = "windows" elseif n == 3 let rformat = "both" else return endif " verify tool sets required to make the platform's release if rformat == "windows" if executable("zip") == 0 call confirm( \ "Unable to create final package, utility \"zip\" doesn't exist on the path.\n" . \ "\n", "&Ok", 1, "Info") return endif else " must have both if executable("tar") == 0 call confirm( \ "Unable to create final package, utility \"tar\" doesn't exist on the path.\n" . \ "\n", "&Ok", 1, "Info") return endif if executable("gzip") == 0 call confirm( \ "Unable to create final package, utility \"gzip\" doesn't exist on the path.\n" . \ "\n", "&Ok", 1, "Info") return endif endif " silent actions *related to copying* (optional) " "" -- shows prompts, shells " "silent " -- avoid prompts, shells " "silent! " -- avoid prompts, shells and errors let mysilent = "" " platform-specifics vars if Cream_has("ms") let slash = '\' let quote = '"' " very important! let myshellslash = &shellslash set noshellslash let copycmd = 'xcopy' else let slash = '/' let quote = '' let copycmd = 'cp -p' endif " use periods, Debian requires it "" don't use periods in version indication for file names (we want "" to match CVS tag) "let ver = substitute(g:cream_version_str, '\.', '-', 'g') let ver = g:cream_version_str " fix g:cream_cvs name (Windows only) if Cream_has("ms") let cream_cvs = substitute(g:cream_cvs, '/', '\', 'g') else let cream_cvs = g:cream_cvs endif " strip trailing slash let cream_cvs = substitute(cream_cvs, '[\\/]$', '', 'g') " make package directory if rformat == "windows" " .\cream (two above module CVS hole) let releasedir = fnamemodify(cream_cvs, ":h:h") . slash . 'release-windows-' . strftime("%Y%m%dT%H%M%S") elseif rformat == "unix" " ./cream-X.XX (two above module CVS hole) let releasedir = fnamemodify(cream_cvs, ":h:h") . slash . 'release-unix-' . strftime("%Y%m%dT%H%M%S") else " ./cream-X.XX (two above module CVS hole) let releasedir = fnamemodify(cream_cvs, ":h:h") . slash . 'release-both-' . strftime("%Y%m%dT%H%M%S") endif execute ':' . mysilent . '!mkdir ' . quote . releasedir . quote " make package version directory if rformat == "windows" let releasedir = releasedir . slash . 'cream' execute ':' . mysilent . '!mkdir ' . quote . releasedir . quote else let releasedir = releasedir . slash . 'cream-' . ver execute ':' . mysilent . '!mkdir ' . quote . releasedir . quote endif " make subdirectories execute ':' . mysilent . '!mkdir ' . quote . releasedir . slash . 'addons' . quote execute ':' . mysilent . '!mkdir ' . quote . releasedir . slash . 'bitmaps' . quote execute ':' . mysilent . '!mkdir ' . quote . releasedir . slash . 'docs' . quote execute ':' . mysilent . '!mkdir ' . quote . releasedir . slash . 'docs-html' . quote execute ':' . mysilent . '!mkdir ' . quote . releasedir . slash . 'filetypes' . quote execute ':' . mysilent . '!mkdir ' . quote . releasedir . slash . 'help' . quote execute ':' . mysilent . '!mkdir ' . quote . releasedir . slash . 'lang' . quote " copy files (don't just copy the structure, CVS interlaced) execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'creamrc' . quote . ' ' . quote . releasedir . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . '*.vim' . quote . ' ' . quote . releasedir . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'cream.svg' . quote . ' ' . quote . releasedir . quote if rformat == "windows" || rformat == "both" execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'cream.ico' . quote . ' ' . quote . releasedir . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'INSTALL.bat' . quote . ' ' . quote . releasedir . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'cream.bat' . quote . ' ' . quote . releasedir . quote endif if rformat == "unix" || rformat == "both" execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'cream.png' . quote . ' ' . quote . releasedir . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'INSTALL.sh' . quote . ' ' . quote . releasedir . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'cream' . quote . ' ' . quote . releasedir . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'cream.desktop' . quote . ' ' . quote . releasedir . quote endif execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'addons' . slash . '*.vim' . quote . ' ' . quote . releasedir . slash . 'addons' . quote if rformat == "windows" let bitmap = '*.bmp' elseif rformat == "unix" let bitmap = '*.xpm' else let bitmap = '*.*' endif execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'bitmaps' . slash . bitmap . quote . ' ' . quote . releasedir . slash . 'bitmaps' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'docs' . slash . '*.txt' . quote . ' ' . quote . releasedir . slash . 'docs' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'docs-html' . slash . '*.html' . quote . ' ' . quote . releasedir . slash . 'docs-html' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'docs-html' . slash . '*.php' . quote . ' ' . quote . releasedir . slash . 'docs-html' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'docs-html' . slash . '*.png' . quote . ' ' . quote . releasedir . slash . 'docs-html' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'docs-html' . slash . '*.gif' . quote . ' ' . quote . releasedir . slash . 'docs-html' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'docs-html' . slash . '*.ico' . quote . ' ' . quote . releasedir . slash . 'docs-html' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'filetypes' . slash . '*.vim' . quote . ' ' . quote . releasedir . slash . 'filetypes' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'help' . slash . '*.txt' . quote . ' ' . quote . releasedir . slash . 'help' . quote execute ':' . mysilent . '!' . copycmd . ' ' . quote . cream_cvs . slash . 'lang' . slash . '*.vim' . quote . ' ' . quote . releasedir . slash . 'lang' . quote " don't copy cream/views " create package if rformat == "windows" execute 'cd ' . fnamemodify(releasedir, ":h") execute ':!zip -r -9 ' . quote . fnamemodify(releasedir, ":h") . slash . 'cream-' . ver . '.zip' . quote . ' ' . quote . 'cream' . quote else execute ':!cd ' . fnamemodify(releasedir, ":h") . '; tar -cvf cream-' . ver . '.tar ' . 'cream-' . ver execute ':!gzip ' . fnamemodify(releasedir, ":h") . slash . 'cream-' . ver . '.tar' " Warning call confirm( \ "VERIFY!\n" . \ " o Permissions on package files and directories\n" . \ " o Line endings on files\n" . \ "\n", "&Ok", 1, "Info") endif if exists("myshellslash") let &shellslash = myshellslash endif endfunction cream-0.43/addons/cream-cream-bugreport.vim0000644000076400007660000000300011517300756021256 0ustar digitectlocaluser" " cream-bugreport.vim -- Debug info report " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Updated: 2004-10-05 22:54:32-0400 " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Cream Config Info', \ "Create report of Cream and Vim application information", \ "Create report of Cream and Vim application information", \ 'Cream Config Info', \ 'call Cream_bugreport()', \ '' \ ) endif function! Cream_bugreport() " Use existing debug functions to obtain debugging information and " dump into a report (new, unsaved document). let @x = Cream_debug_info() call Cream_file_new() put! x setlocal foldmethod=marker endfunction cream-0.43/addons/cream-stamp-filename.vim0000644000076400007660000001133311517300756021072 0ustar digitectlocaluser" " Filename: cream-stamp-filename.vim " Updated: 2004-09-09 16:46:54-0400 " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " " Description: " A simple filename stamp routine. Updates the text following the " first (default, case sensitive) stamp tag "Filename:" in the current " document with the stamp selected at the dialog. " " Notes: " o Only the first occurance of the stamp tag within the current file " is updated. " o All characters following the stamp tag up to a single quote, " double quote or end of line are replaced with the stamp. An " exception is that white space following the stamp tag is " maintained. " o The stamp tag text (default: "Filename:") can manually be " overridden and retained just by re-assigning the variable " "g:CREAM_STAMP_FILENAME_TEXT". " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Stamp Filename', \ "Update the filename stamp of the current file.", \ "Replace the characters following the first stamp tag \"Filename:\" (case sensitive) in the current file up to a single quote, double quote or end of line with the selected stamp format.", \ 'Stamp Filename', \ 'call Cream_stamp_filename()', \ '' \ ) endif function! Cream_stamp_filename() " retain existing dialog button display orientation let sav_go = &guioptions " make vertical set guioptions+=v " retain current position let mypos = Cream_pos() " set default pick if no previous preference if !exists("g:CREAM_STAMP_FILENAME_STYLE") let g:CREAM_STAMP_FILENAME_STYLE = 1 endif " set default find phrase if !exists("g:CREAM_STAMP_FILENAME_TEXT") let g:CREAM_STAMP_FILENAME_TEXT = "Filename:" endif " get button label from current file let sample1 = fnamemodify(expand("%"), ":p:t") let sample2 = fnamemodify(expand("%"), ":p") " shorten button labels to < 45 chars " (use strpart() rather than str[idx] to handle multi-byte) if strlen(sample1) > 45 let sample1 = strpart(sample1, 0, 42) . "..." endif if strlen(sample2) > 45 " we want to trim with priority to filename over path: " /pat.../filename " unless filename itself is too long, then we'll show a bit of path " /pat.../filena... let fname = fnamemodify(expand("%"), ":p:t") let pname = fnamemodify(expand("%"), ":p") if strlen(fname) > 40 let fname = strpart(fname, 0, 33) . "..." let pname = strpart(fname, 0, 6) . "..." else " trim path to 45 minus filename length minus ellipses let pname = strpart(pname, 0, 45 - strlen(fname) - 3) . "..." endif let sample2 = pname . fname " fix if on Windows if Cream_has("ms") let sample2 = substitute(sample2, '/', '\', 'g') endif endif " let button text equal current values let mybuttons = \ sample1 . "\n" . \ sample2 . "\n" . \ "&Cancel" let n = confirm( \ "Please select the stamp format. \n" . \ "\n" . \ "(Stamp occurs at the first location of the\n" . \ "text \"" . g:CREAM_STAMP_FILENAME_TEXT . "\" found in the document,\n" . \ "and replaces all text on the line following it.)" . \ "\n", mybuttons, g:CREAM_STAMP_FILENAME_STYLE, "Info") if n == 1 " filename let mystr = fnamemodify(expand("%"), ":p:t") elseif n == 2 " path-filename let mystr = fnamemodify(expand("%"), ":p") " fix if on Windows if Cream_has("ms") let mystr = substitute(mystr, '/', '\', 'g') endif else endif " do substitution (first occurrence) if exists("mystr") " only if check to see if valid replacement text exists successful execute "0" if search(g:CREAM_STAMP_FILENAME_TEXT . "\\s*.\\{-}[\"\'\\n]") != 0 " substitute execute '0;/' . g:CREAM_STAMP_FILENAME_TEXT . "\\(\\s*\\).\\{-}\\([\"\'\\n]\\)/substitute//" . g:CREAM_STAMP_FILENAME_TEXT . '\1' . escape(mystr, '/\.') . '\2/geI' endif endif " remember selection if 0 < n && n < 9 let g:CREAM_STAMP_FILENAME_STYLE = n endif " restore pos execute mypos " restore gui buttons let &guioptions = sav_go endfunction cream-0.43/addons/cream-debinary.vim0000644000076400007660000000515611517300756017773 0ustar digitectlocaluser" " cream-playpen.vim -- Experiments, things in flux or unresolved. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'De-binary', \ "Delete a file's non-ASCII characters.", \ 'Brute force filtration of a binary file into recognizable ASCII characters by deleting those not between 32-126.', \ 'De-binary', \ 'call Cream_debinary()', \ '' \ ) endif function! Cream_debinary() " Brute force function to filter a binary file into something remotely " resembling ASCII. Useful for string reduction out of data that might " otherwise be ensared in an unhelpful binary file format. (Such as " a corrupt word processing file.) let n = confirm( \ "Debinary is a brute force function to filter a binary file into\n" . \ "something remotely resembling ASCII. It's useful for string reduction\n" . \ "out of data that might otherwise be ensared in an unhelpful binary\n" . \ "file format. (Such as a corrupt word processing file.)\n" . \ "\n" . \ "You should not use this unless you know what you are doing! Continue?\n" . \ "\n", "&Ok\n&Cancel", 2, "Info") if n != 1 return endif " remove characters (decimal 0) execute "%s/" . nr2char(0) . "//gei" " convert all binary characters to returns silent! %substitute/[-]/\r/g " replace all 128s with spaces (great for Word Perfect docs) silent! %substitute// /g " uhh... "foreign" characters might be useful! " prompt let n = confirm( \ "Remove characters with ASCII values above 126?\n" . \ "\n", "&Ok\n&No", 1, "Info") if n == 1 silent! %substitute/[-]/\r/g endif " delete all blank lines (last) call Cream_emptyline_collapse() "" replace all returns with tabs (for readability) "silent! %substitute/\n/\t/g endfunction cream-0.43/addons/cream-encrypt-algorithmic.vim0000644000076400007660000002053011517300756022153 0ustar digitectlocaluser" " cream-encrypt-algorithmic.vim -- General "encryption" functions. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Encrypt, Algorithmic', \ 'Encrypt, Algorithmic', \ "Encrypt or unencrypt a selection with optional neat formatting. (Actual mathematical encryption is not yet written; currently all characters are merely converted to four-digit decimal equivilents.)", \ 'Encrypt.Algorithmic', \ 'call Cream_encrypt_algorithmic()', \ 'call Cream_encrypt_algorithmic("v")' \ ) endif function! Cream_encrypt_algorithmic(...) " converts string into decimal values in preparation for (not yet " included) mathematical encryption. " * Optional arguments: " "v" -- acts on visual selection (without mode, does file) " "encrypt" -- encrypts " "unencrypt" -- unencrypts " argument "encrypt" or "unencrypt" performs as expected, but " where omitted, process is guessed based on the presence of " non-numeric/non-whitespace characters " " "silent" -- no prompting (does best/quickest option) " " * Dialog prompts for optional (slower) formatting into neat rows and " columns. " * Currently has no real encryption algorithm. (Location " indicated--requires merely the conversion of the obtained string.) " capture current states let s:save_cpo = &cpo set cpoptions&vim " find arguments if a:0 > 0 let i = 0 while i < a:0 let i = i + 1 execute "let myarg = a:" . i if myarg ==? "v" let dofile = 0 elseif myarg ==? "encrypt" let myprocess = "encrypt" elseif myarg ==? "unencrypt" let myprocess = "unencrypt" elseif myarg ==? "silent" let silent = 1 endif endwhile endif if exists("dofile") let dofile = dofile else let dofile = 1 endif if exists("silent") let silent = silent else let silent = 0 endif " get file or selection if dofile == 1 if silent == 0 " select all let n = confirm( \ "Encrypt entire file?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 " return states let &cpo = s:save_cpo " quit return endif endif call Cream_select_all(1) else " reselect previous selection normal gv endif " copy selection into @x normal "xy " guess encryption process if not provided if !exists("myprocess") " if matches any character NOT numeric, space, or if match(@x, "[^0-9\ \n\r]", 0) != -1 let myprocess = "encrypt" else let myprocess = "unencrypt" endif endif ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " dofile = \"" . dofile . "\"\n" . " \ " myprocess = \"" . myprocess . "\"\n" . " \ " silent = \"" . silent . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** " do it! if myprocess == "encrypt" if silent == 0 let @x = Cream_encrypt_algorithmic_encrypt(@x) else let @x = Cream_encrypt_algorithmic_encrypt(@x, "silent") endif elseif myprocess == "unencrypt" if silent == 0 let @x = Cream_encrypt_algorithmic_unencrypt(@x) else let @x = Cream_encrypt_algorithmic_unencrypt(@x, "silent") endif else "*** DEBUG: let n = confirm( \ "Error: No process detected in Cream_encrypt_algorithmic(). Quitting...\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") return endif " re-select normal gv " paste back over selection normal "xp " return states let &cpo = s:save_cpo endfunction function! Cream_encrypt_algorithmic_encrypt(mystr, ...) " returns an encrypted string from an unencrypted one " check silent if a:0 > 0 if a:1 ==? "silent" let silent = 1 endif endif if !exists("silent") let silent = 0 endif " determine return characteristics if &fileformat == "unix" let myreturn = "\n" let myreturnlen = 1 elseif &fileformat == "dos" let myreturn = "\r\n" let myreturnlen = 2 elseif &fileformat == "mac" let myreturn = "\r" let myreturnlen = 1 endif let newstr = a:mystr " notice let mytemp = strlen(a:mystr) if silent == 0 let mychoice = confirm( \"Notes:\n" . \" * Data is NOT currently being encrypted, just reduced to numerical ASCII values.\n" . \" * The routine automatically knows if you're encyrpting or unencrypting.\n" . \" * Formatting at least doubles processing time.\n" . \" Estimatated time (unformatted): " . (mytemp / 300) . " seconds processing " . mytemp . " bytes)\n" . \" Estimatated time (formatted): " . (mytemp / 100) . " seconds processing " . mytemp . " bytes)\n" . \"\n", "&Encrypt\nEncrypt\ and\ &Format", 1, "Info") if mychoice == 1 let myformat = 0 else let myformat = 1 endif else let myformat = 0 endif "" give ourselves some room "execute "normal i" . myreturn "normal o "normal o "normal kk " string to decimal string let newstr = Cream_str2dec_pad(newstr) " simple format -- add returns at 78 if myformat == 0 let pos = 78 while pos < strlen(newstr) let front = strpart(newstr, 0, pos) let back = strpart(newstr, pos + 1) let newstr = front . myreturn . back let pos = pos + 78 + myreturnlen endwhile endif "*********************************************** "*** do amazing mathematical encryption here *** "*********************************************** " format -- pretty if myformat == 1 let mystrfirst = "" let mystrmiddle = "" let mystrlast = "" let mypos = 0 let i = 0 let j = 0 while mypos < strlen(newstr) " get first part let mystrfirst = strpart(newstr, 0, mypos) " get middle part (always one char) let mystrmiddle = strpart(newstr, mypos, 1) " get last part let mystrlast = strpart(newstr, mypos + 1) " place every 5 chars let i = i + 1 if i % 5 == 0 let mystrmiddle = mystrmiddle . " " let mypos = mypos + 1 endif " place return every 78 chars (65 chars + 65/5 spaces) let j = j + 1 if j % 65 == 0 let mystrmiddle = mystrmiddle . myreturn let mypos = mypos + myreturnlen endif " concatenate let newstr = mystrfirst . mystrmiddle . mystrlast " find new pos let mypos = mypos + 1 endwhile endif return newstr endfunction function! Cream_encrypt_algorithmic_unencrypt(mystr, ...) " returns an unencrypted string from an encrypted one " check silent if a:0 > 0 if a:1 ==? "silent" let silent = 1 endif endif if !exists("silent") let silent = 0 endif " determine return characteristics if &fileformat == "unix" let myreturn = "\n" let myreturnlen = 1 elseif &fileformat == "dos" let myreturn = "\n" let myreturnlen = 1 elseif &fileformat == "mac" let myreturn = "\r" let myreturnlen = 1 endif " initialize variables let mystrfirst = "" let mystrmiddle = "" let mystrlast = "" let mypos = 0 let newstr = a:mystr " notice let mytemp = strlen(a:mystr) if silent == 0 let mychoice = confirm( \"Unencrypting. (Roughly estimate " . (mytemp / 1000) . " seconds processing " . mytemp . " bytes)\n", \"&Begin", 1, "Info") endif " de-format " substitutions designed without let s:save_magic = &magic set nomagic " remove all linefeeds let newstr = substitute(newstr, "\n", "", "g") " remove all carriage returns let newstr = substitute(newstr, "\r", "", "g") " remove all spaces let newstr = substitute(newstr, " ", "", "g") " return state let &magic = s:save_magic "************************************************** "*** do amazing mathematical un-encryption here *** "************************************************** " decimal string to string let newstr = Cream_dec2str_pad(newstr) return newstr endfunction cream-0.43/addons/cream-cream-keytest.vim0000644000076400007660000011536111517300756020753 0ustar digitectlocaluser" " Filename: cream-cream-keytest.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Test and interpret individual keyboard characters. Useful to see " exactly what code your hardware and software combination returns for " a given keystroke. Where our interpretation table isn't complete, " the actual decimal values for the key pressed are returned. " " Updated: 2003-12-20 01:49:04EST " Version: 2.0 " Source: http://vim.sourceforge.net/script.php?script_id=488 " Author: Steve Hall [ digitect@mindspring.com ] " License: GPL (http://www.gnu.org/licenses/gpl.html) " " Installation: " Just drop this file into your plugins directory, and start Vim. " " Usage: " * Call "Cream_keytest()" to get feedback about each key pressed. " * Call "Cream_keyinterpret()" to return only the interpretation. " An empty return means character not yet in the table. " " Notes: " * The interpretation table is currently unfinished. There are " literally between 400 and 700 possible keystroke combinations on " the average keyboard. Please look at the complete Ctrl/Shift/Alt " combination interpretations of the Ins, Del, Home, End, PgUp, PgDn " keys for an example of a full test. " " * This has only been tested with &encoding=latin1. " " * If you take the time to develop the script further, please forward " your explorations or improvements them back to us! (Besides, " that's what the GPL is all about. ;) " " register as a Cream add-on if exists("$CREAM") " don't list unless Cream developer if !exists("g:cream_dev") finish endif call Cream_addon_register( \ 'Key Test', \ 'Interpret keystroke characters', \ "Test and interpret individual keyboard characters. Useful to see exactly what code your hardware and software combination returns for a given keystroke. Where our table isn't complete, the actual decimal value(s) are returned.", \ 'Cream Devel.Key Test', \ 'call Cream_keytest()', \ '' \ ) endif function! Cream_keytest() let n = confirm( \ "Please press continue then press a key to interpret. (Esc to Quit)", \ "&Continue", 1, "Info") if n != 1 return endif while n == 1 let myreturn = Cream_keyinterpret2() if myreturn ==? "esc" \ || myreturn ==? "027 ESC" break endif endwhile endfunction " Cream_keyinterpret() [obsolete] {{{1 function! Cream_keyinterpret_old(...) " if optional argument provided, use per-character feedback dialog " currently, we've only tested &encoding=latin1 if &encoding !=? 'latin1' call confirm( \ "Not tested with &encoding value \"" . &encoding . "\". Quitting...\n" . \ "(Please contact us if you wish to test an alternate coding!)\n" . \ "\n", "&Ok", 1, "Info") return endif " our interpretation let mycharname = "" let multi = "" " get character let mychar = getchar() " alpha-numeric if mychar > 32 \ && mychar < 127 let mycharname = nr2char(mychar) elseif mychar == 9 let mycharname = "tab" elseif mychar == 10 let mycharname = "linefeed" elseif mychar == 13 let mycharname = "return" elseif mychar == 26 let mycharname = "ctrl+z" elseif mychar == 27 let mycharname = "esc" elseif mychar == 32 let mycharname = "space" " multi-byte has initial Esc {{{2 elseif mychar[0] == nr2char("128") " interpret *remainder* let mytemp = strpart(mychar, 1) " backspace if mytemp ==# "kb" let mycharname = "backspace" elseif mytemp ==# "kb" let mycharname = "shift+backspace" " down elseif mytemp ==# "kd" let mycharname = "down" " up elseif mytemp ==# "ku" let mycharname = "up" " left elseif mytemp ==# "kl" let mycharname = "left" elseif mytemp ==# "#4" let mycharname = "shift+left" " right elseif mytemp ==# "kr" let mycharname = "right" elseif mytemp ==# "%i" let mycharname = "shift+right" " insert elseif mytemp ==# "kI" let mycharname = "insert" elseif mytemp ==# "#3" let mycharname = "shift+insert" elseif mytemp ==# "kI" let mycharname = "ctrl+insert" elseif mytemp ==# "kI" let mycharname = "alt+insert" elseif mytemp ==# " kI" let mycharname = "ctrl+alt+insert" elseif mytemp ==# "#3" let mycharname = "ctrl+shift+insert" elseif mytemp ==# "#3" let mycharname = "alt+shift+insert" elseif mytemp ==# " #3" let mycharname = "ctrl+alt+shift+insert" " delete elseif mytemp ==# "kD" let mycharname = "delete" elseif mytemp ==# "*4" let mycharname = "shift+delete" elseif mytemp ==# "kD" let mycharname = "ctrl+delete" elseif mytemp ==# "kD" let mycharname = "alt+delete" elseif mytemp ==# "*4" let mycharname = "ctrl+shift+delete" elseif mytemp ==# " kD" let mycharname = "ctrl+alt+delete" elseif mytemp ==# "*4" let mycharname = "alt+shift+delete" elseif mytemp ==# " *4" let mycharname = "ctrl+alt+shift+delete" " home elseif mytemp ==# "kh" let mycharname = "home" elseif mytemp ==# "#2" let mycharname = "shift+home" elseif mytemp ==# "O" let mycharname = "ctrl+home" elseif mytemp ==# "kh" let mycharname = "alt+home" elseif mytemp ==# "#2" let mycharname = "ctrl+shift+home" elseif mytemp ==# "O" let mycharname = "ctrl+alt+home" elseif mytemp ==# "#2" let mycharname = "alt+shift+home" elseif mytemp ==# " #2" let mycharname = "ctrl+alt+shift+home" " end elseif mytemp ==# "@7" let mycharname = "end" elseif mytemp ==# "*7" let mycharname = "shift+end" elseif mytemp ==# "P" let mycharname = "ctrl+end" elseif mytemp ==# "@7" let mycharname = "alt+end" elseif mytemp ==# "*7" let mycharname = "ctrl+shift+end" elseif mytemp ==# "P" let mycharname = "ctrl+alt+end" elseif mytemp ==# "*7" let mycharname = "alt+shift+end" elseif mytemp ==# " *7" let mycharname = "ctrl+alt+shift+end" " pgup elseif mytemp ==# "kP" let mycharname = "pgup" elseif mytemp ==# "kP" let mycharname = "shift+pgup" elseif mytemp ==# "kP" let mycharname = "ctrl+pgup" elseif mytemp ==# "kP" let mycharname = "alt+pgup" elseif mytemp ==# "kP" let mycharname = "ctrl+shift+pgup" elseif mytemp ==# " kP" let mycharname = "ctrl+alt+pgup" ""*** broken (252.010.128.107.080) -- 010 removes to line end! "elseif mytemp ==# "kP" " let mycharname = "alt+shift+pgup" elseif mytemp ==# "kP" let mycharname = "ctrl+alt+shift+pgup" " pgdn elseif mytemp ==# "kN" let mycharname = "pgdn" elseif mytemp ==# "kN" let mycharname = "shift+pgdn" elseif mytemp ==# "kN" let mycharname = "ctrl+pgdn" elseif mytemp ==# "kN" let mycharname = "alt+pgdn" elseif mytemp ==# "kN" let mycharname = "ctrl+shift+pgdn" elseif mytemp ==# " kN" let mycharname = "ctrl+alt+pgdn" ""*** broken (252.010.128.107.078) -- 010 removes to line end! "elseif mytemp ==# "kN" " let mycharname = "alt+shift+pgdn" elseif mytemp ==# "kN" let mycharname = "ctrl+alt+shift+pgdn" " F-keys elseif mytemp ==# "k1" let mycharname = "F1" elseif mytemp ==# "" let mycharname = "shift+F1" elseif mytemp ==# "k1" let mycharname = "ctrl+F1" elseif mytemp ==# "k2" let mycharname = "F2" elseif mytemp ==# "" let mycharname = "shift+F2" elseif mytemp ==# "k2" let mycharname = "ctrl+F2" elseif mytemp ==# "k3" let mycharname = "F3" elseif mytemp ==# "" let mycharname = "shift+F3" elseif mytemp ==# "k3" let mycharname = "ctrl+F3" elseif mytemp ==# "k4" let mycharname = "F4" elseif mytemp ==# " " let mycharname = "shift+F4" elseif mytemp ==# "k4" let mycharname = "ctrl+F4" elseif mytemp ==# "k5" let mycharname = "F5" ""*** broken (128.253.010) -- 010 removes to line end! "elseif mytemp ==# "" " let mycharname = "shift+F5" elseif mytemp ==# "k5" let mycharname = "ctrl+F5" elseif mytemp ==# "k6" let mycharname = "F6" elseif mytemp ==# " " let mycharname = "shift+F6" elseif mytemp ==# "k6" let mycharname = "ctrl+F6" elseif mytemp ==# "k7" let mycharname = "F7" elseif mytemp ==# " " let mycharname = "shift+F7" elseif mytemp ==# "k7" let mycharname = "ctrl+F7" elseif mytemp ==# "k8" let mycharname = "F8" elseif mytemp ==# " " let mycharname = "shift+F8" elseif mytemp ==# "k8" let mycharname = "ctrl+F8" elseif mytemp ==# "k9" let mycharname = "F9" elseif mytemp ==# "" let mycharname = "shift+F9" elseif mytemp ==# "k9" let mycharname = "ctrl+F9" elseif mytemp ==# "k;" let mycharname = "F10" elseif mytemp ==# "" let mycharname = "shift+F10" " unknown (Windows usurps, didn't reboot to GNU/Linux ;) "elseif mytemp ==# "k1" " let mycharname = "ctrl+F10" elseif mytemp ==# "F1" let mycharname = "F11" elseif mytemp ==# "" let mycharname = "shift+F11" elseif mytemp ==# "F1" let mycharname = "ctrl+F11" elseif mytemp ==# "F2" let mycharname = "F12" elseif mytemp ==# "" let mycharname = "shift+F12" elseif mytemp ==# "F2" let mycharname = "ctrl+F12" endif " 2}}} else " uninterpreted, but not preceded by Esc. endif " requested optional per-character feedback if exists("a:1") if mycharname != "" let msg = " mycharname = " . mycharname . "\n" else " decipher each char of multi-char codes if strlen(mychar) > 1 let i = 0 while i < strlen(mychar) if i != 0 let multi = multi . " + " endif let multi = multi . char2nr(mychar[i]) let i = i + 1 endwhile endif " compose message let msg = "" let msg = msg . "Character not interpreted:\n" "let msg = msg . " mychar = " . mychar . "\n" let msg = msg . " char2nr(mychar) = " . char2nr(mychar) . "\n" let msg = msg . " nr2char(mychar) = " . nr2char(mychar) . "\n" let msg = msg . " (multi) = " . multi . "\n" let msg = msg . "\n" let msg = msg . " mycharname = " . mycharname . "\n" endif " feedback call confirm( \ msg . \ "\n", "&Ok", 1, "Info") endif return mycharname endfunction " 1}}} function! Cream_keyinterpret2() " returns a string describing the character captured. " (empty string) if none interpreted let mycharname = "" let multicodes = "" " get character let mychar = getchar() " alpha-numeric if mychar > 32 \ && mychar < 127 let mycharname = nr2char(mychar) " space elseif nr2char(mychar) == "\" let mycharname = "Space" elseif mychar == "\" let mycharname = "S-Space" elseif mychar == "\" let mycharname = "M-Space" elseif mychar == "\" let mycharname = "C-Space" elseif mychar == "\" let mycharname = "M-S-Space" elseif mychar == "\" let mycharname = "C-S-Space" elseif mychar == "\" let mycharname = "C-M-Space" elseif mychar == "\" let mycharname = "C-M-S-Space" " single byte ctrl chars {{{1 elseif nr2char(mychar) == "\" let mycharname = "000 NUL" elseif nr2char(mychar) == "" let mycharname = "001 SOH" elseif nr2char(mychar) == "" let mycharname = "002 STX" elseif nr2char(mychar) == "" let mycharname = "003 ETX" elseif nr2char(mychar) == "" let mycharname = "004 EOT" elseif nr2char(mychar) == "" let mycharname = "005 ENQ" elseif nr2char(mychar) == "" let mycharname = "006 ACK" elseif nr2char(mychar) == "" let mycharname = "007 BEL" elseif nr2char(mychar) == "" let mycharname = "008 BS" elseif nr2char(mychar) == "\" let mycharname = "009 TAB" elseif nr2char(mychar) == "\" let mycharname = "010 NL (LF)" elseif nr2char(mychar) == " " let mycharname = "011 VT" elseif nr2char(mychar) == "\" let mycharname = "012 FF" elseif nr2char(mychar) == "\" let mycharname = "013 CR" elseif nr2char(mychar) == "" let mycharname = "014 SO" elseif nr2char(mychar) == "" let mycharname = "015 SI" elseif nr2char(mychar) == "" let mycharname = "016 DLE" elseif nr2char(mychar) == "" let mycharname = "017 DC1" elseif nr2char(mychar) == "" let mycharname = "018 DC2" elseif nr2char(mychar) == "" let mycharname = "019 DC3" elseif nr2char(mychar) == "" let mycharname = "020 DC4" elseif nr2char(mychar) == "" let mycharname = "021 NAK" elseif nr2char(mychar) == "" let mycharname = "022 SYN" elseif nr2char(mychar) == "" let mycharname = "023 ETB" elseif nr2char(mychar) == "" let mycharname = "024 CAN" elseif nr2char(mychar) == "" let mycharname = "025 EM" elseif nr2char(mychar) == "" let mycharname = "026 SUB" elseif nr2char(mychar) == "" let mycharname = "027 ESC" elseif nr2char(mychar) == "" let mycharname = "028 FS" elseif nr2char(mychar) == "" let mycharname = "029 GS" elseif nr2char(mychar) == "" let mycharname = "030 RS" elseif nr2char(mychar) == "" let mycharname = "031 US" " single byte ctrls w/ mods {{{1 elseif nr2char(mychar) == "\" let mycharname = "BS" elseif mychar == "\" let mycharname = "S-BS" elseif mychar == "\" let mycharname = "M-BS" elseif mychar == "\" let mycharname = "C-BS" elseif mychar == "\" let mycharname = "M-S-BS" elseif mychar == "\" let mycharname = "C-S-BS" elseif mychar == "\" let mycharname = "C-M-BS" elseif mychar == "\" let mycharname = "C-M-S-BS" elseif nr2char(mychar) == "\" let mycharname = "Tab" elseif mychar == "\" let mycharname = "S-Tab" elseif mychar == "\" let mycharname = "M-Tab" elseif mychar == "\" let mycharname = "C-Tab" elseif mychar == "\" let mycharname = "M-S-Tab" elseif mychar == "\" let mycharname = "C-S-Tab" elseif mychar == "\" let mycharname = "C-M-Tab" elseif mychar == "\" let mycharname = "C-M-S-Tab" elseif nr2char(mychar) == "\" let mycharname = "Esc" elseif mychar == "\" let mycharname = "S-Esc" elseif mychar == "\" let mycharname = "M-Esc" elseif mychar == "\" let mycharname = "C-Esc" elseif mychar == "\" let mycharname = "M-S-Esc" elseif mychar == "\" let mycharname = "C-S-Esc" elseif mychar == "\" let mycharname = "C-M-Esc" elseif mychar == "\" let mycharname = "C-M-S-Esc" elseif nr2char(mychar) == "\" let mycharname = "Enter" elseif mychar == "\" let mycharname = "S-Enter" elseif mychar == "\" let mycharname = "M-Enter" elseif mychar == "\" let mycharname = "C-Enter" elseif mychar == "\" let mycharname = "M-S-Enter" elseif mychar == "\" let mycharname = "C-S-Enter" elseif mychar == "\" let mycharname = "C-M-Enter" elseif mychar == "\" let mycharname = "C-M-S-Enter" " Arrows {{{1 elseif mychar == "\" let mycharname = "Up" elseif mychar == "\" let mycharname = "S-Up" elseif mychar == "\" let mycharname = "M-Up" elseif mychar == "\" let mycharname = "C-Up" elseif mychar == "\" let mycharname = "M-S-Up" elseif mychar == "\" let mycharname = "C-S-Up" elseif mychar == "\" let mycharname = "C-M-Up" elseif mychar == "\" let mycharname = "C-M-S-Up" elseif mychar == "\" let mycharname = "Down" elseif mychar == "\" let mycharname = "S-Down" elseif mychar == "\" let mycharname = "M-Down" elseif mychar == "\" let mycharname = "C-Down" elseif mychar == "\" let mycharname = "M-S-Down" elseif mychar == "\" let mycharname = "C-S-Down" elseif mychar == "\" let mycharname = "C-M-Down" elseif mychar == "\" let mycharname = "C-M-S-Down" elseif mychar == "\" let mycharname = "Left" elseif mychar == "\" let mycharname = "S-Left" elseif mychar == "\" let mycharname = "M-Left" elseif mychar == "\" let mycharname = "C-Left" elseif mychar == "\" let mycharname = "M-S-Left" elseif mychar == "\" let mycharname = "C-S-Left" elseif mychar == "\" let mycharname = "C-M-Left" elseif mychar == "\" let mycharname = "C-M-S-Left" elseif mychar == "\" let mycharname = "Right" elseif mychar == "\" let mycharname = "S-Right" elseif mychar == "\" let mycharname = "M-Right" elseif mychar == "\" let mycharname = "C-Right" elseif mychar == "\" let mycharname = "M-S-Right" elseif mychar == "\" let mycharname = "C-S-Right" elseif mychar == "\" let mycharname = "C-M-Right" elseif mychar == "\" let mycharname = "C-M-S-Right" " Function keys {{{1 elseif mychar == "\" let mycharname = "F1" elseif mychar == "\" let mycharname = "S-F1" elseif mychar == "\" let mycharname = "M-F1" elseif mychar == "\" let mycharname = "C-F1" elseif mychar == "\" let mycharname = "M-S-F1" elseif mychar == "\" let mycharname = "C-S-F1" elseif mychar == "\" let mycharname = "C-M-F1" elseif mychar == "\" let mycharname = "C-M-S-F1" elseif mychar == "\" let mycharname = "F2" elseif mychar == "\" let mycharname = "S-F2" elseif mychar == "\" let mycharname = "M-F2" elseif mychar == "\" let mycharname = "C-F2" elseif mychar == "\" let mycharname = "M-S-F2" elseif mychar == "\" let mycharname = "C-S-F2" elseif mychar == "\" let mycharname = "C-M-F2" elseif mychar == "\" let mycharname = "C-M-S-F2" elseif mychar == "\" let mycharname = "F3" elseif mychar == "\" let mycharname = "S-F3" elseif mychar == "\" let mycharname = "M-F3" elseif mychar == "\" let mycharname = "C-F3" elseif mychar == "\" let mycharname = "M-S-F3" elseif mychar == "\" let mycharname = "C-S-F3" elseif mychar == "\" let mycharname = "C-M-F3" elseif mychar == "\" let mycharname = "C-M-S-F3" elseif mychar == "\" let mycharname = "F4" elseif mychar == "\" let mycharname = "S-F4" elseif mychar == "\" let mycharname = "M-F4" elseif mychar == "\" let mycharname = "C-F4" elseif mychar == "\" let mycharname = "M-S-F4" elseif mychar == "\" let mycharname = "C-S-F4" elseif mychar == "\" let mycharname = "C-M-F4" elseif mychar == "\" let mycharname = "C-M-S-F4" elseif mychar == "\" let mycharname = "F5" elseif mychar == "\" let mycharname = "S-F5" elseif mychar == "\" let mycharname = "M-F5" elseif mychar == "\" let mycharname = "C-F5" elseif mychar == "\" let mycharname = "M-S-F5" elseif mychar == "\" let mycharname = "C-S-F5" elseif mychar == "\" let mycharname = "C-M-F5" elseif mychar == "\" let mycharname = "C-M-S-F5" elseif mychar == "\" let mycharname = "F6" elseif mychar == "\" let mycharname = "S-F6" elseif mychar == "\" let mycharname = "M-F6" elseif mychar == "\" let mycharname = "C-F6" elseif mychar == "\" let mycharname = "M-S-F6" elseif mychar == "\" let mycharname = "C-S-F6" elseif mychar == "\" let mycharname = "C-M-F6" elseif mychar == "\" let mycharname = "C-M-S-F6" elseif mychar == "\" let mycharname = "F7" elseif mychar == "\" let mycharname = "S-F7" elseif mychar == "\" let mycharname = "M-F7" elseif mychar == "\" let mycharname = "C-F7" elseif mychar == "\" let mycharname = "M-S-F7" elseif mychar == "\" let mycharname = "C-S-F7" elseif mychar == "\" let mycharname = "C-M-F7" elseif mychar == "\" let mycharname = "C-M-S-F7" elseif mychar == "\" let mycharname = "F8" elseif mychar == "\" let mycharname = "S-F8" elseif mychar == "\" let mycharname = "M-F8" elseif mychar == "\" let mycharname = "C-F8" elseif mychar == "\" let mycharname = "M-S-F8" elseif mychar == "\" let mycharname = "C-S-F8" elseif mychar == "\" let mycharname = "C-M-F8" elseif mychar == "\" let mycharname = "C-M-S-F8" elseif mychar == "\" let mycharname = "F9" elseif mychar == "\" let mycharname = "S-F9" elseif mychar == "\" let mycharname = "M-F9" elseif mychar == "\" let mycharname = "C-F9" elseif mychar == "\" let mycharname = "M-S-F9" elseif mychar == "\" let mycharname = "C-S-F9" elseif mychar == "\" let mycharname = "C-M-F9" elseif mychar == "\" let mycharname = "C-M-S-F9" elseif mychar == "\" let mycharname = "F10" elseif mychar == "\" let mycharname = "S-F10" elseif mychar == "\" let mycharname = "M-F10" elseif mychar == "\" let mycharname = "C-F10" elseif mychar == "\" let mycharname = "M-S-F10" elseif mychar == "\" let mycharname = "C-S-F10" elseif mychar == "\" let mycharname = "C-M-F10" elseif mychar == "\" let mycharname = "C-M-S-F10" elseif mychar == "\" let mycharname = "F11" elseif mychar == "\" let mycharname = "S-F11" elseif mychar == "\" let mycharname = "M-F11" elseif mychar == "\" let mycharname = "C-F11" elseif mychar == "\" let mycharname = "M-S-F11" elseif mychar == "\" let mycharname = "C-S-F11" elseif mychar == "\" let mycharname = "C-M-F11" elseif mychar == "\" let mycharname = "C-M-S-F11" elseif mychar == "\" let mycharname = "F12" elseif mychar == "\" let mycharname = "S-F12" elseif mychar == "\" let mycharname = "M-F12" elseif mychar == "\" let mycharname = "C-F12" elseif mychar == "\" let mycharname = "M-S-F12" elseif mychar == "\" let mycharname = "C-S-F12" elseif mychar == "\" let mycharname = "C-M-F12" elseif mychar == "\" let mycharname = "C-M-S-F12" " Insert/Delete/Home/End/PageUp/PageDown {{{1 elseif mychar == "\" let mycharname = "Insert" elseif mychar == "\" let mycharname = "S-Insert" elseif mychar == "\" let mycharname = "M-Insert" elseif mychar == "\" let mycharname = "C-Insert" elseif mychar == "\" let mycharname = "M-S-Insert" elseif mychar == "\" let mycharname = "C-S-Insert" elseif mychar == "\" let mycharname = "C-M-Insert" elseif mychar == "\" let mycharname = "C-M-S-Insert" elseif mychar == "\" let mycharname = "Del" elseif mychar == "\" let mycharname = "S-Del" elseif mychar == "\" let mycharname = "M-Del" elseif mychar == "\" let mycharname = "C-Del" elseif mychar == "\" let mycharname = "M-S-Del" elseif mychar == "\" let mycharname = "C-S-Del" elseif mychar == "\" let mycharname = "C-M-Del" elseif mychar == "\" let mycharname = "C-M-S-Del" elseif mychar == "\" let mycharname = "Home" elseif mychar == "\" let mycharname = "S-Home" elseif mychar == "\" let mycharname = "M-Home" elseif mychar == "\" let mycharname = "C-Home" elseif mychar == "\" let mycharname = "M-S-Home" elseif mychar == "\" let mycharname = "C-S-Home" elseif mychar == "\" let mycharname = "C-M-Home" elseif mychar == "\" let mycharname = "C-M-S-Home" elseif mychar == "\" let mycharname = "End" elseif mychar == "\" let mycharname = "S-End" elseif mychar == "\" let mycharname = "M-End" elseif mychar == "\" let mycharname = "C-End" elseif mychar == "\" let mycharname = "M-S-End" elseif mychar == "\" let mycharname = "C-S-End" elseif mychar == "\" let mycharname = "C-M-End" elseif mychar == "\" let mycharname = "C-M-S-End" elseif mychar == "\" let mycharname = "PageUp" elseif mychar == "\" let mycharname = "S-PageUp" elseif mychar == "\" let mycharname = "M-PageUp" elseif mychar == "\" let mycharname = "C-PageUp" elseif mychar == "\" let mycharname = "M-S-PageUp" elseif mychar == "\" let mycharname = "C-S-PageUp" elseif mychar == "\" let mycharname = "C-M-PageUp" elseif mychar == "\" let mycharname = "C-M-S-PageUp" elseif mychar == "\" let mycharname = "PageDown" elseif mychar == "\" let mycharname = "S-PageDown" elseif mychar == "\" let mycharname = "M-PageDown" elseif mychar == "\" let mycharname = "C-PageDown" elseif mychar == "\" let mycharname = "M-S-PageDown" elseif mychar == "\" let mycharname = "C-S-PageDown" elseif mychar == "\" let mycharname = "C-M-PageDown" elseif mychar == "\" let mycharname = "C-M-S-PageDown" " Keypad {{{1 elseif mychar == "\" let mycharname = "kHome" elseif mychar == "\" let mycharname = "kEnd" elseif mychar == "\" let mycharname = "kPageUp" elseif mychar == "\" let mycharname = "kPageDown" elseif mychar == "\" let mycharname = "kPlus" elseif mychar == "\" let mycharname = "kMinus" elseif mychar == "\" let mycharname = "kMultiply" elseif mychar == "\" let mycharname = "kDivide" elseif mychar == "\" let mycharname = "kEnter" elseif mychar == "\" let mycharname = "kPoint" elseif mychar == "\" let mycharname = "k0" elseif mychar == "\" let mycharname = "k1" elseif mychar == "\" let mycharname = "k2" elseif mychar == "\" let mycharname = "k3" elseif mychar == "\" let mycharname = "k4" elseif mychar == "\" let mycharname = "k5" elseif mychar == "\" let mycharname = "k6" elseif mychar == "\" let mycharname = "k7" elseif mychar == "\" let mycharname = "k8" elseif mychar == "\" let mycharname = "k9" " Mouse {{{1 elseif mychar == "\" let mycharname = "LeftMouse" elseif mychar == "\" let mycharname = "S-LeftMouse" elseif mychar == "\" let mycharname = "M-LeftMouse" elseif mychar == "\" let mycharname = "C-LeftMouse" elseif mychar == "\" let mycharname = "M-S-LeftMouse" elseif mychar == "\" let mycharname = "C-S-LeftMouse" elseif mychar == "\" let mycharname = "C-M-LeftMouse" elseif mychar == "\" let mycharname = "C-M-S-LeftMouse" elseif mychar == "\<2-LeftMouse>" let mycharname = "2-LeftMouse" elseif mychar == "\" let mycharname = "S-2-LeftMouse" elseif mychar == "\" let mycharname = "M-2-LeftMouse" elseif mychar == "\" let mycharname = "C-2-LeftMouse" elseif mychar == "\" let mycharname = "M-S-2-LeftMouse" elseif mychar == "\" let mycharname = "C-S-2-LeftMouse" elseif mychar == "\" let mycharname = "C-M-2-LeftMouse" elseif mychar == "\" let mycharname = "C-M-S-2-LeftMouse" elseif mychar == "\<3-LeftMouse>" let mycharname = "3-LeftMouse" elseif mychar == "\" let mycharname = "S-3-LeftMouse" elseif mychar == "\" let mycharname = "M-3-LeftMouse" elseif mychar == "\" let mycharname = "C-3-LeftMouse" elseif mychar == "\" let mycharname = "M-S-3-LeftMouse" elseif mychar == "\" let mycharname = "C-S-3-LeftMouse" elseif mychar == "\" let mycharname = "C-M-3-LeftMouse" elseif mychar == "\" let mycharname = "C-M-S-3-LeftMouse" elseif mychar == "\<4-LeftMouse>" let mycharname = "4-LeftMouse" elseif mychar == "\" let mycharname = "S-4-LeftMouse" elseif mychar == "\" let mycharname = "M-4-LeftMouse" elseif mychar == "\" let mycharname = "C-4-LeftMouse" elseif mychar == "\" let mycharname = "M-S-4-LeftMouse" elseif mychar == "\" let mycharname = "C-S-4-LeftMouse" elseif mychar == "\" let mycharname = "C-M-4-LeftMouse" elseif mychar == "\" let mycharname = "C-M-S-4-LeftMouse" elseif mychar == "\" let mycharname = "LeftDrag" elseif mychar == "\" let mycharname = "S-LeftDrag" elseif mychar == "\" let mycharname = "M-LeftDrag" elseif mychar == "\" let mycharname = "C-LeftDrag" elseif mychar == "\" let mycharname = "M-S-LeftDrag" elseif mychar == "\" let mycharname = "C-S-LeftDrag" elseif mychar == "\" let mycharname = "C-M-LeftDrag" elseif mychar == "\" let mycharname = "C-M-S-LeftDrag" elseif mychar == "\" let mycharname = "LeftRelease" elseif mychar == "\" let mycharname = "S-LeftRelease" elseif mychar == "\" let mycharname = "M-LeftRelease" elseif mychar == "\" let mycharname = "C-LeftRelease" elseif mychar == "\" let mycharname = "M-S-LeftRelease" elseif mychar == "\" let mycharname = "C-S-LeftRelease" elseif mychar == "\" let mycharname = "C-M-LeftRelease" elseif mychar == "\" let mycharname = "C-M-S-LeftRelease" elseif mychar == "\" let mycharname = "MiddleMouse" elseif mychar == "\" let mycharname = "S-MiddleMouse" elseif mychar == "\" let mycharname = "M-MiddleMouse" elseif mychar == "\" let mycharname = "C-MiddleMouse" elseif mychar == "\" let mycharname = "M-S-MiddleMouse" elseif mychar == "\" let mycharname = "C-S-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-S-MiddleMouse" elseif mychar == "\<2-MiddleMouse>" let mycharname = "2-MiddleMouse" elseif mychar == "\" let mycharname = "S-2-MiddleMouse" elseif mychar == "\" let mycharname = "M-2-MiddleMouse" elseif mychar == "\" let mycharname = "C-2-MiddleMouse" elseif mychar == "\" let mycharname = "M-S-2-MiddleMouse" elseif mychar == "\" let mycharname = "C-S-2-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-2-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-S-2-MiddleMouse" elseif mychar == "\<3-MiddleMouse>" let mycharname = "3-MiddleMouse" elseif mychar == "\" let mycharname = "S-3-MiddleMouse" elseif mychar == "\" let mycharname = "M-3-MiddleMouse" elseif mychar == "\" let mycharname = "C-3-MiddleMouse" elseif mychar == "\" let mycharname = "M-S-3-MiddleMouse" elseif mychar == "\" let mycharname = "C-S-3-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-3-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-S-3-MiddleMouse" elseif mychar == "\<4-MiddleMouse>" let mycharname = "4-MiddleMouse" elseif mychar == "\" let mycharname = "S-4-MiddleMouse" elseif mychar == "\" let mycharname = "M-4-MiddleMouse" elseif mychar == "\" let mycharname = "C-4-MiddleMouse" elseif mychar == "\" let mycharname = "M-S-4-MiddleMouse" elseif mychar == "\" let mycharname = "C-S-4-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-4-MiddleMouse" elseif mychar == "\" let mycharname = "C-M-S-4-MiddleMouse" elseif mychar == "\" let mycharname = "MiddleDrag" elseif mychar == "\" let mycharname = "S-MiddleDrag" elseif mychar == "\" let mycharname = "M-MiddleDrag" elseif mychar == "\" let mycharname = "C-MiddleDrag" elseif mychar == "\" let mycharname = "M-S-MiddleDrag" elseif mychar == "\" let mycharname = "C-S-MiddleDrag" elseif mychar == "\" let mycharname = "C-M-MiddleDrag" elseif mychar == "\" let mycharname = "C-M-S-MiddleDrag" elseif mychar == "\" let mycharname = "MiddleRelease" elseif mychar == "\" let mycharname = "S-MiddleRelease" elseif mychar == "\" let mycharname = "M-MiddleRelease" elseif mychar == "\" let mycharname = "C-MiddleRelease" elseif mychar == "\" let mycharname = "M-S-MiddleRelease" elseif mychar == "\" let mycharname = "C-S-MiddleRelease" elseif mychar == "\" let mycharname = "C-M-MiddleRelease" elseif mychar == "\" let mycharname = "C-M-S-MiddleRelease" elseif mychar == "\" let mycharname = "RightMouse" elseif mychar == "\" let mycharname = "S-RightMouse" elseif mychar == "\" let mycharname = "M-RightMouse" elseif mychar == "\" let mycharname = "C-RightMouse" elseif mychar == "\" let mycharname = "M-S-RightMouse" elseif mychar == "\" let mycharname = "C-S-RightMouse" elseif mychar == "\" let mycharname = "C-M-RightMouse" elseif mychar == "\" let mycharname = "C-M-S-RightMouse" elseif mychar == "\<2-RightMouse>" let mycharname = "2-RightMouse" elseif mychar == "\" let mycharname = "S-2-RightMouse" elseif mychar == "\" let mycharname = "M-2-RightMouse" elseif mychar == "\" let mycharname = "C-2-RightMouse" elseif mychar == "\" let mycharname = "M-S-2-RightMouse" elseif mychar == "\" let mycharname = "C-S-2-RightMouse" elseif mychar == "\" let mycharname = "C-M-2-RightMouse" elseif mychar == "\" let mycharname = "C-M-S-2-RightMouse" elseif mychar == "\<3-RightMouse>" let mycharname = "3-RightMouse" elseif mychar == "\" let mycharname = "S-3-RightMouse" elseif mychar == "\" let mycharname = "M-3-RightMouse" elseif mychar == "\" let mycharname = "C-3-RightMouse" elseif mychar == "\" let mycharname = "M-S-3-RightMouse" elseif mychar == "\" let mycharname = "C-S-3-RightMouse" elseif mychar == "\" let mycharname = "C-M-3-RightMouse" elseif mychar == "\" let mycharname = "C-M-S-3-RightMouse" elseif mychar == "\<4-RightMouse>" let mycharname = "4-RightMouse" elseif mychar == "\" let mycharname = "S-4-RightMouse" elseif mychar == "\" let mycharname = "M-4-RightMouse" elseif mychar == "\" let mycharname = "C-4-RightMouse" elseif mychar == "\" let mycharname = "M-S-4-RightMouse" elseif mychar == "\" let mycharname = "C-S-4-RightMouse" elseif mychar == "\" let mycharname = "C-M-4-RightMouse" elseif mychar == "\" let mycharname = "C-M-S-4-RightMouse" elseif mychar == "\" let mycharname = "RightDrag" elseif mychar == "\" let mycharname = "S-RightDrag" elseif mychar == "\" let mycharname = "M-RightDrag" elseif mychar == "\" let mycharname = "C-RightDrag" elseif mychar == "\" let mycharname = "M-S-RightDrag" elseif mychar == "\" let mycharname = "C-S-RightDrag" elseif mychar == "\" let mycharname = "C-M-RightDrag" elseif mychar == "\" let mycharname = "C-M-S-RightDrag" elseif mychar == "\" let mycharname = "RightRelease" elseif mychar == "\" let mycharname = "S-RightRelease" elseif mychar == "\" let mycharname = "M-RightRelease" elseif mychar == "\" let mycharname = "C-RightRelease" elseif mychar == "\" let mycharname = "M-S-RightRelease" elseif mychar == "\" let mycharname = "C-S-RightRelease" elseif mychar == "\" let mycharname = "C-M-RightRelease" elseif mychar == "\" let mycharname = "C-M-S-RightRelease" " ctrl-chars [BROKEN] {{{1 elseif mychar == "" \ || mychar == "\" \ || mychar == '' let mycharname = "C-u" elseif mychar == "" \ || mychar == "\" \ || mychar == '' let mycharname = "C-c" elseif mychar == "" \ || mychar == "\" \ || mychar == '' let mycharname = "C-o" " 1}}} endif " feedback " if not interpreted if mycharname == "" " decipher each char of multi-char codes let multicodes = Cream_getchar_code(mychar) " compose message let msg = "" let msg = msg . "Character not interpreted:\n" "let msg = msg . " mychar = " . mychar . "\n" let msg = msg . " char2nr(mychar) = " . char2nr(mychar) . "\n" let msg = msg . " nr2char(mychar) = " . nr2char(mychar) . "\n" let msg = msg . " (multicodes) = " . multicodes . "\n" let msg = msg . "\n" else let msg = " mycharname = " . mycharname . "\n" endif call confirm( msg, "&Ok", 1, "Info") return mycharname endfunction function! Cream_getchar_code(char) " returns a string expressing the argument's character code(s) " o Multi-byte characters are returned in the form "128 + 147 + 28" "if a:char[0] != nr2char("128") " return a:char "elseif char2nr(a:char[1]) == 0 " return a:char "endif let multicodes = "" let i = 0 "while char2nr(a:char)[i] != 0 while i < strlen(a:char) " concatenate if not first if i != 0 let multicodes = multicodes . " + " endif let multicodes = multicodes . char2nr(a:char[i]) let i = i + 1 endwhile "Ctrl+O = 49+53 "Ctrl+U = 50+49 "Ctrl+C = 50 return multicodes endfunction " vim:fileencoding=latin1:foldmethod=marker cream-0.43/addons/cream-encrypt-gpg.vim0000644000076400007660000001126511517300756020433 0ustar digitectlocaluser" " cream-encrypt-gpg.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Encrypt, GPG', \ 'Encrypt, GnuPG', \ 'Encrypt a selection with GnuPG.', \ 'Encrypt.GnuPG', \ 'call Cream_encrypt_gpg()', \ 'call Cream_encrypt_gpg("v")' \ ) endif function! Cream_encrypt_gpg(...) " Encrypt with GNU GPG " o Arguments: " "silent" quiets operation " "v" implies a visual mode selection " (nothing) implies to do the entire file " verify gpg is on the system if !executable("gpg") call confirm( \ "GPG program not found, quitting.\n" . \ "\n", "&Ok", 1, "Info") return endif " find arguments if a:0 > 0 let i = 0 while i < a:0 let i = i + 1 execute "let myarg = a:" . i if myarg == "v" let dofile = 0 elseif myarg == "silent" let silent = 1 endif endwhile endif " handle not-founds if !exists("dofile") let dofile = 1 endif " get current cursor position let line = line('.') if line < 1 let line = 1 endif " select if dofile == 0 " reselect previous selection normal gv else if !exists("silent") let n = confirm( \ "Encrypt/Unencrypt entire file?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 " quit return endif endif " remember position let mypos_orig = Cream_pos() " select all call Cream_select_all(1) endif " OPTION 1: using temp files {{{1 " cut selection into register normal "xx " write register to tmpfile let tmpfile = Cream_path_fullsystem(tempname()) " decrypt if @x =~ '^\s*-\+BEGIN PGP ' " write register to file call Cream_str_tofile(@x, tmpfile.".gpg") if Cream_has("ms") let q = '"' else let q = '' endif " TAKE 1 " command " TODO: on GNU/Linux, this fails due to TTY problems let cmd = "!gpg --output " . q.tmpfile.q . " --decrypt " . q.tmpfile.".gpg".q let @+ = cmd silent execute cmd " read in encrypted file (at point of cut) silent execute "silent! " . line-1 . "read " . tmpfile let bufnr = bufnr("$") " close buffer silent execute "silent! bwipeout! " . bufnr """" TAKE 2 """redir @y """execute "!gpg --decrypt " . q.tmpfile.".gpg".q """redir END """put y """" TAKE 3 """" command """" TODO: on GNU/Linux, this fails due to TTY problems """let cmd = "!gpg --decrypt " . q.tmpfile.".gpg".q """execute cmd """" read in encrypted file (at point of cut) """silent execute "silent! " . line-1 . "read " . tmpfile "" clean up temp files "call delete(tmpfile) "call delete(tmpfile . ".gpg") " encrypt else " write register to file call Cream_str_tofile(@x, tmpfile) " command "silent execute 'silent! !gpg --armor --output "' . tmpfile . '.gpg" --encrypt "' . tmpfile . '"' if Cream_has("ms") let q = '"' else let q = '' endif " TODO: on GNU/Linux, this fails due to TTY problems and " requesting recipient if "--default-recipient-self" " option isn't used. silent execute "silent! !gpg -q --armor --default-recipient-self --output " . q.tmpfile.".gpg".q . " --encrypt " . q.tmpfile.q " read in encrypted file (at point of cut) silent execute "silent! " . line-1 . "read " . escape(tmpfile, ' \') . ".gpg" let bufnr = bufnr("$") " close buffer silent execute "silent! bwipeout! " . bufnr " clean up temp files call delete(tmpfile) call delete(tmpfile . ".gpg") endif " OPTION 2: no temp files, only streams {{{1 """" copy selection into register """normal "xy """" re-select for paste over """normal gv """ """" decrypt """if @x =~ '^\s*-\+BEGIN PGP ' """ """ " command """ execute '!echo ' . @x . '> !gpg --output "' . tmpfile . '" --decrypt "' . tmpfile . '.gpg"' """ """" encrypt """else """ """ " command """ call system('echo "' . @x . '" | gpg --armor --encrypt') """ """endif " 1}}} endfunction " vim:foldmethod=marker cream-0.43/addons/cream-str-invert.vim0000644000076400007660000000345011517300756020306 0ustar digitectlocaluser" " cream-str-invert.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Invert Selected String', \ "Inverts characters in a selection", \ "Inverts characters in a selection", \ 'Invert Selected String', \ '', \ "call Cream_str_reverse(\"v\")" \ ) endif function! Cream_str_reverse(mode) " reverse the string selected if a:mode != "v" call confirm( \ "Cream_str_reverse() requires visual mode.\n" . \ "\n", "&Ok", 1, "Info") return endif " reselect, copy normal gv " cut normal "xy " reverse input set revins " the magic let @x = Cream_str_invert(@x) normal gv normal "xp " set input normal set norevins " reselect normal gv endfunction function! Cream_str_invert(str) " returns inverted string " by Preben "Peppe" Guldberg, originally "InvertString()" return substitute(a:str, '.\(.*\)\@=', '\=a:str[strlen(submatch(1))]', 'g') endfunction cream-0.43/addons/cream-encrypt-h4x0r.vim0000644000076400007660000001754011517300756020625 0ustar digitectlocaluser" " cream-encrypt-h4x0r.vim -- General "encryption" functions. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Encrypt, h4x0r', \ 'Encrypt, h4x0r', \ 'Encrypt a selection by substituting certain letters or numbers with others that mimic the look of the original. An example would be the number 4 for a capital A.', \ 'Encrypt.h4x0r', \ 'call Cream_encrypt_h4x0r()', \ 'call Cream_encrypt_h4x0r("v")' \ ) endif function! Cream_encrypt_h4x0r(...) " "h4x0r" mode encryption--Converts selection into alphabetic " o See functions at bottom for char equivalant tables " o Requires selection before calling " find arguments if a:0 > 0 let i = 0 while i < a:0 let i = i + 1 execute "let myarg = a:" . i if myarg == "v" let dofile = 0 elseif myarg == "silent" let silent = 1 endif endwhile endif " handle not-founds if !exists("dofile") let dofile = 1 endif " select if dofile == 0 " reselect previous selection normal gv else if !exists("silent") let n = confirm( \ "Encrypt entire file?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 " quit return endif endif " remember position let mypos_orig = Cream_pos() " select all call Cream_select_all(1) endif " yank into register normal "xy " encrypt let @x = Cream_h4x0r(@x) " reselect normal gv " paste over selection (replacing it) normal "xp " recover position if select all if exists("mypos_orig") " go back to insert mode normal i execute mypos_orig " recover selection otherwise else normal gv endif endfunction function! Cream_h4x0r(mystr) " return a "h4x0r encrypted" string "***************************************************************** " NOTE: YOU CAN'T DO SIMPLE SUBSTITUTIONS HERE! We are *toggling* " characters, meaning "e"s go to "3"s while at the same time "3"s " go to "e"s! Without specifying either the position up to which " the process has taken place, or specifying which it is we're " doing, there's no way to know whether we're encrypting or " unencrypting. You always end up where you started. ;) "***************************************************************** let mypos = 0 let newstr = a:mystr " do while char still found while mypos < strlen(newstr) " get first part let mystrfirst = strpart(newstr, 0, mypos) " get middle part (always one char) let mystrmiddle = strpart(newstr, mypos, 1) " get last part let mystrlast = strpart(newstr, mypos + 1) " USE ONLY ONE BELOW! """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let mystrmiddle = s:Cream_encrypt_h4x0r_7bit(mystrmiddle) """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" "" multi-byte substitution "" *** BROKEN: some of the positioning stuff above appears to "" mis-count multi-byte chars. "let char = s:Cream_encrypt_h4x0r_8bit(mystrmiddle) "" account for multi-byte offsets "if strlen(mystrmiddle) == 1 && strlen(char) == 2 " let mypos = mypos + 1 "elseif strlen(mystrmiddle) == 2 && strlen(char) == 1 " let mypos = mypos - 1 "endif "let mystrmiddle = char """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " concatenate let newstr = mystrfirst . mystrmiddle . mystrlast " find new pos let mypos = mypos + 1 endwhile return newstr endfunction function! s:Cream_encrypt_h4x0r_7bit(char) " return a char based on the table: " abcdefghijklmnopqrstuvwxyz " 4 3 6 1 0 $7 2 " convert to decimal (to maintain case) let char = char2nr(a:char) " a/4 if char == char2nr("a") return "4" elseif char == char2nr("4") return "a" " e/3 elseif char == char2nr("e") return "3" elseif char == char2nr("3") return "e" " g/6 elseif char == char2nr("g") return "6" elseif char == char2nr("6") return "g" " i/1 elseif char == char2nr("i") return "1" elseif char == char2nr("1") return "i" " o/0 elseif char == char2nr("o") return "0" elseif char == char2nr("0") return "o" " s/$ elseif char == char2nr("s") return "$" elseif char == char2nr("$") return "s" " t/7 elseif char == char2nr("t") return "7" elseif char == char2nr("7") return "t" " z/2 elseif char == char2nr("z") return "2" elseif char == char2nr("2") return "z" endif return a:char endfunction function! s:Cream_encrypt_h4x0r_8bit(char) " return a char based on the table: " abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ " @Þ¢ êƒ ¡ 1 ñø 9®$†µ ×ýž Aß©Ð3 6 ¦ £ ÑØ¶ Š7Û %Ÿ2 "" convert to decimal (to maintain case) "let char = char2nr(a:char) let char = a:char " a/@ if char == "a" return "4" elseif char == "4" return "a" " b/Þ elseif char == "b" return "Þ" elseif char == "Þ" return "b" " c/¢ elseif char == "c" return "¢" elseif char == "¢" return "c" " e/ê elseif char == "e" return "ê" elseif char == "ê" return "e" " f/ƒ elseif char == "f" return "ƒ" elseif char == "ƒ" return "f" " i/¡ elseif char == "i" return "¡" elseif char == "¡" return "i" " l/1 elseif char == "l" return "1" elseif char == "1" return "l" " n/ñ elseif char == "n" return "ñ" elseif char == "ñ" return "n" " o/ø elseif char == "o" return "ø" elseif char == "ø" return "o" " q/9 elseif char == "q" return "9" elseif char == "9" return "q" " r/® elseif char == "r" return "®" elseif char == "®" return "r" " s/$ elseif char == "s" return "$" elseif char == "$" return "s" " t/† elseif char == "t" return "†" elseif char == "†" return "t" " u/µ elseif char == "u" return "µ" elseif char == "µ" return "u" " x/× elseif char == "x" return "×" elseif char == "×" return "x" " y/ý elseif char == "y" return "ý" elseif char == "ý" return "y" " z/ž elseif char == "z" return "ž" elseif char == "ž" return "z" " A/A elseif char == "A" return "A" elseif char == "A" return "A" " B/ß elseif char == "B" return "ß" elseif char == "ß" return "B" " C/© elseif char == "C" return "©" elseif char == "©" return "C" " D/Ð elseif char == "D" return "Ð" elseif char == "Ð" return "D" " E/3 elseif char == "E" return "3" elseif char == "3" return "E" " G/6 elseif char == "G" return "6" elseif char == "6" return "G" " I/¦ elseif char == "I" return "¦" elseif char == "¦" return "I" " L/£ elseif char == "L" return "£" elseif char == "£" return "L" " N/Ñ elseif char == "N" return "Ñ" elseif char == "Ñ" return "N" " S/Š elseif char == "S" return "Š" elseif char == "Š" return "S" " T/7 elseif char == "T" return "7" elseif char == "7" return "T" " U/Û elseif char == "U" return "Û" elseif char == "Û" return "U" " X/% elseif char == "X" return "%" elseif char == "%" return "X" " Y/Ÿ elseif char == "Y" return "Ÿ" elseif char == "Ÿ" return "Y" " Z/2 elseif char == "Z" return "2" elseif char == "2" return "Z" endif return a:char endfunction cream-0.43/addons/cream-syntax2html.vim0000644000076400007660000000436511517300756020474 0ustar digitectlocaluser" " cream-syntax2html.vim -- converts syntax-highlighted text files to HTML " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * A wrapper for Vim's 'TOhtml' syntax-aware text to html conversion script " register as a Cream add-on if exists("$CREAM") call Cream_addon_register( \ 'Convert Syntax Highlighting to HTML', \ 'Convert syntax highlighting to HTML.', \ 'Convert syntax highlighting into the HTML equivalent. Produces colorized output using the current syntax highlighting and color theme.', \ 'Convert.Syntax Highlighting to HTML', \ 'call Cream_source2html("i")', \ 'call Cream_source2html("v")' \ ) endif function! Cream_source2html(mode) if exists("g:html_number_lines") let save_html_number_lines = g:html_number_lines endif if exists("g:html_use_css") let save_html_use_css = g:html_use_css endif if exists("g:html_no_pre") let save_html_no_pre = g:html_no_pre endif let g:html_number_lines = g:CREAM_LINENUMBERS let g:html_use_css = 1 let g:html_no_pre = 1 set eventignore=all if a:mode == "v" execute ":'\<,'\>TOhtml" else execute ":TOhtml" endif set eventignore= doautocmd BufEnter * if exists("l:save_html_number_lines") let g:html_number_lines = save_html_number_lines endif if exists("l:save_html_use_css") let g:html_use_css = save_html_use_css endif if exists("l:save_html_no_pre") let g:html_html_no_pre = save_html_no_pre endif endfunction cream-0.43/cream-numberlines.vim0000644000076400007660000000633411517300720017237 0ustar digitectlocaluser" " cream-numberlines.vim -- Number lines of a selection with optional " (dialog prompt) start number " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Updated: 2003-05-09T00:00:45-0400 " Version: 0.2.1 " Source: http://vim.sourceforge.net/scripts/script.php?script_id=605 " Author: Steve Hall [ digitect@mindspring.com ] " " Installation: " o Drop this file into your plugins directory and (re)start Vim. " " Usage: " o Must be called from visual mode (with a selection). " o Required argument indicates mode, only "v" (visual) allowed. " o Example mapping: " vmap :call Cream_number_lines("v") " o Example menu: " vmenu 40.151 I&nsert.Line\ Numbers\ (selection) :call Cream_number_lines("v") " function! Cream_number_lines(mode) " only possible with selection (visual mode) if a:mode !=? "v" return endif " prompt for line number (default current) let startno = inputdialog("Enter the beginning number...", line("'<")) " verify '0' means 0 and not quit if startno == 0 let n = confirm("Ok to start with line number '0' or Cancel function...\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif endif " force to digit (theoretical) let startno = startno + 0 " first line ok an any position let mypos1 = line("'<") " don't use last line if end mark is in first column if col("'>") == 1 let mypos2 = line("'>") - 1 else let mypos2 = line("'>") endif " calculate difference in line and starting number let startdiff = startno - line("'<") " file's current number of lines let maxlinelen = strlen(line('$')) + 0 " how large line numbers can be let maxsize = maxlinelen " require minimum of 3 columns (reduces amount of re-justification " if user adds enough lines to bump up the width of the line " number column; we're assuming any file will have at least 100 " lines) if maxlinelen < 3 let maxlinelen = 3 + 0 endif " create spacer the number of spaces of maxlines let myspacer = " " while strlen(myspacer) <= maxlinelen let myspacer = myspacer . " " endwhile " add line numbers (regexp help by Stefan Roemer , 2003-03-27) execute mypos1 . "," . mypos2 . "s/^/\\=submatch(1) . " . \ "strpart('" . myspacer . "', 1, " . maxlinelen . " - strlen((line('.') + " . startdiff . "))) . " . \ "(line('.') + " . startdiff . ") . ':'" endfunction cream-0.43/cream-colors-dawn.vim0000644000076400007660000000573611156572440017162 0ustar digitectlocaluser" Vim color file " Maintainer: Ajit J. Thakkar (ajit AT unb DOT ca) " Last Change: 2003 Feb. 23 " This GUI-only color scheme has a light grey background, and is a softer " variant of the default and morning color schemes. set background=light hi clear if exists("syntax_on") syntax reset endif "let colors_name = "dawn" hi Normal guifg=Black guibg=grey90 " Groups used in the 'highlight' and 'guicursor' options default value. hi ErrorMsg guifg=White guibg=HotPink hi IncSearch gui=NONE guifg=fg guibg=LightGreen hi ModeMsg gui=bold guifg=fg guibg=bg hi StatusLine gui=NONE guifg=DarkBlue guibg=grey70 hi StatusLineNC gui=NONE guifg=grey90 guibg=grey70 hi VertSplit gui=NONE guifg=grey70 guibg=grey70 hi Visual gui=reverse guifg=Grey guibg=fg hi VisualNOS gui=underline,bold guifg=fg guibg=bg hi DiffText gui=bold guifg=Blue guibg=LightYellow "hi Cursor guifg=NONE guibg=Green hi Cursor guifg=NONE guibg=Black hi lCursor guifg=NONE guibg=Cyan hi Directory guifg=Blue guibg=bg " CREAM "hi LineNr guifg=Brown guibg=bg hi LineNr guifg=Brown guibg=grey80 " END CREAM hi MoreMsg gui=bold guifg=SeaGreen guibg=bg "hi NonText gui=bold guifg=Blue guibg=grey80 hi Question gui=bold guifg=SeaGreen guibg=bg hi Search guifg=fg guibg=PeachPuff "hi SpecialKey guifg=Blue guibg=bg hi Title gui=bold guifg=Magenta guibg=bg hi WarningMsg guifg=Red guibg=bg hi WildMenu guifg=fg guibg=PeachPuff hi Folded guifg=DarkBlue guibg=#d0d0d0 hi FoldColumn guifg=DarkBlue guibg=Grey hi DiffAdd gui=bold guifg=Blue guibg=LightCyan hi DiffChange gui=bold guifg=fg guibg=MistyRose1 hi DiffDelete gui=NONE guifg=LightBlue guibg=LightCyan " Colors for syntax highlighting hi Constant gui=NONE guifg=SteelBlue guibg=bg hi String gui=NONE guifg=Maroon guibg=bg hi Special gui=bold guifg=DarkSlateBlue guibg=bg hi Statement gui=NONE guifg=Brown guibg=bg hi Ignore gui=NONE guifg=bg guibg=bg hi ToDo gui=NONE guifg=Blue guibg=LightYellow hi Error gui=NONE guifg=White guibg=HotPink hi Comment gui=NONE guifg=RoyalBlue guibg=NONE hi Identifier gui=NONE guifg=DarkCyan guibg=NONE hi PreProc gui=NONE guifg=Purple guibg=NONE hi Type gui=NONE guifg=SeaGreen guibg=NONE hi Underlined gui=underline guifg=SlateBlue guibg=bg "+++ Cream: " invisible characters highlight NonText guifg=#aaaabb guibg=#e0e0e0 gui=none highlight SpecialKey guifg=#aaaabb guibg=grey90 gui=none " statusline highlight User1 gui=bold guifg=#bbbbbb guibg=#f3f3f3 highlight User2 gui=bold guifg=#000000 guibg=#f3f3f3 highlight User3 gui=bold guifg=#0000ff guibg=#f3f3f3 highlight User4 gui=bold guifg=#ff0000 guibg=#f3f3f3 " bookmarks highlight Cream_ShowMarksHL gui=bold guifg=blue guibg=grey80 ctermfg=blue ctermbg=lightblue cterm=bold " spell check highlight BadWord gui=bold guifg=DarkBlue guibg=#ddcccc ctermfg=black ctermbg=lightblue " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#eeeecc " email highlight EQuote1 guifg=#0000cc highlight EQuote2 guifg=#6666cc highlight EQuote3 guifg=#9999cc highlight Sig guifg=#999999 "+++ cream-0.43/cream-menu-toolbar.vim0000644000076400007660000002707511517300720017325 0ustar digitectlocaluser" " cream-menu-toolbar.vim -- GUI toolbar (for MS-Windows and GTK) " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " if !has("toolbar") finish endif "---------------------------------------------------------------------- "Add $CREAM to &runtimepath " " Description: The amenu icon= syntax is completely broken for " Windows. Vince Negri wrote a patch 2002 Sep 20 to fix it, but it " (obviously) isn't included in Vim6.1. " " Therefore, we do the workaround below, which adds cream\bitmaps to " the runtime path so that the toolbars can find the icons on a " "default" path. This path *cannot* be removed from the runtime after " the toolbar has been loaded without problems, so it is retained. " remove trailing slash from $CREAM if matchstr($CREAM, '.$') == '/' \|| matchstr($CREAM, '.$') == '\' let myruntimepath = matchstr($CREAM, '^.*\(.$\)\@=') . "," . &runtimepath else let myruntimepath = $CREAM . "," . &runtimepath endif " escape all spaces let myruntimepath = substitute(myruntimepath, " ", "\\\\ ", "ge") " add to &runtimepath execute "set runtimepath=" . myruntimepath "---------------------------------------------------------------------- "if !has("gui_gtk2") " "anoremenu 200.05 ToolBar.new :call Cream_file_new() " tmenu ToolBar.new New File "anoremenu 200.10 ToolBar.open :call Cream_file_open() " tmenu ToolBar.open Open "anoremenu 200.15 ToolBar.save :call Cream_save() " tmenu ToolBar.save Save "anoremenu 200.17 ToolBar.save_as :call Cream_saveas() " tmenu ToolBar.save_as Save As "anoremenu 200.20 ToolBar.save_all :call Cream_saveall() " tmenu ToolBar.save_all Save All "anoremenu 200.25 ToolBar.broken_image :call Cream_close() " tmenu ToolBar.broken_image Close "anoremenu 200.30 ToolBar.exit :call Cream_exit() " tmenu ToolBar.exit Exit Vim " "anoremenu 200.40 ToolBar.-sep40- "if has("printer") " anoremenu 200.41 ToolBar.print :call Cream_print("a") " tmenu ToolBar.print Print "elseif has("unix") " anoremenu 200.41 ToolBar.print :w !lpr " tmenu ToolBar.print Print "elseif has("vms") " anoremenu 200.41 ToolBar.print :call VMSPrint(":") " tmenu ToolBar.print Print "endif " "anoremenu 200.45 ToolBar.-sep45- "anoremenu 200.50 ToolBar.undo :call Cream_undo("i") " tmenu ToolBar.undo Undo "anoremenu 200.60 ToolBar.redo :call Cream_redo("i") " tmenu ToolBar.redo Redo " "anoremenu 200.65 ToolBar.-sep65- " vmenu 200.70 ToolBar.cut_alt :call Cream_cut("v") " tmenu ToolBar.cut_alt Cut (to Clipboard) " vmenu 200.80 ToolBar.copy_alt :call Cream_copy("v") " tmenu ToolBar.copy_alt Copy (to Clipboard) " imenu 200.85.1 ToolBar.paste :call Cream_paste("i") " vmenu 200.85.2 ToolBar.paste :call Cream_paste("v") " tmenu ToolBar.paste Paste (to Clipboard) " " "anoremenu 200.600 ToolBar.-sep600- " imenu 200.601 ToolBar.text_align_left :call Cream_quickwrap_set("i", "left") " vmenu 200.602 ToolBar.text_align_left :call Cream_quickwrap_set("v", "left") " tmenu ToolBar.text_align_left Justify, Left " imenu 200.603 ToolBar.text_align_center :call Cream_quickwrap_set("i", "center") " vmenu 200.604 ToolBar.text_align_center :call Cream_quickwrap_set("v", "center") " tmenu ToolBar.text_align_center Justify, Center " imenu 200.605 ToolBar.text_align_right :call Cream_quickwrap_set("i", "right") " vmenu 200.606 ToolBar.text_align_right :call Cream_quickwrap_set("v", "right") " tmenu ToolBar.text_align_right Justify, Right " imenu 200.607 ToolBar.text_align_justify :call Cream_quickwrap_set("i", "full") " vmenu 200.608 ToolBar.text_align_justify :call Cream_quickwrap_set("v", "full") " tmenu ToolBar.text_align_justify Justify, Full " "if !has("gui_athena") " anoremenu 200.700 ToolBar.-sep700- " anoremenu 200.701 ToolBar.search :call Cream_find() " tmenu ToolBar.search Search " vunmenu ToolBar.search " vmenu ToolBar.search :call Cream_find() " " anoremenu 200.702 ToolBar.search_and_replace :call Cream_replace() " tmenu ToolBar.search_and_replace Search and Replace " vunmenu ToolBar.search_and_replace " vmenu ToolBar.search_and_replace :call Cream_replace() "endif " " "anoremenu 200.750 ToolBar.-sep750- "anoremenu 200.751 ToolBar.spellcheck :call Cream_spell_next() "tmenu ToolBar.spellcheck Spell Check " "anoremenu 200.800 ToolBar.-sep800- "anoremenu 200.802 ToolBar.font :call Cream_font_set() "tmenu ToolBar.font Font " " ""anoremenu 200.245 ToolBar.-sep6- ""anoremenu 200.250 ToolBar.convert :make ""anoremenu 200.260 ToolBar.terminal :silent sh ""anoremenu 200.270 ToolBar.RunCtags :!ctags -R . ""anoremenu 200.280 ToolBar.jump-to g] " "anoremenu 200.900 ToolBar.-sep900- "anoremenu 200.901 ToolBar.book :call Cream_help_find() " tmenu ToolBar.book Help Topic "anoremenu 200.902 ToolBar.help :help " tmenu ToolBar.help Help " " ""--------------------------------------------------------------------- "else imenu icon=new 200.05 ToolBar.new :call Cream_file_new() vmenu icon=new 200.06 ToolBar.new :call Cream_file_new() tmenu ToolBar.new New File imenu icon=open 200.10 ToolBar.open :call Cream_file_open() vmenu icon=open 200.11 ToolBar.open :call Cream_file_open() tmenu ToolBar.open Open imenu icon=save 200.15 ToolBar.save :call Cream_save() vmenu icon=save 200.15 ToolBar.save :call Cream_save() tmenu ToolBar.save Save imenu icon=save_as 200.17 ToolBar.save_as :call Cream_saveas() vmenu icon=save_as 200.17 ToolBar.save_as :call Cream_saveas() tmenu ToolBar.save_as Save As imenu icon=save_all 200.20 ToolBar.save_all :call Cream_saveall() vmenu icon=save_all 200.20 ToolBar.save_all :call Cream_saveall() tmenu ToolBar.save_all Save All imenu icon=broken_image 200.25 ToolBar.broken_image :call Cream_close() vmenu icon=broken_image 200.25 ToolBar.broken_image :call Cream_close() tmenu ToolBar.broken_image Close imenu icon=exit 200.30 ToolBar.exit :call Cream_exit() vmenu icon=exit 200.30 ToolBar.exit :call Cream_exit() tmenu ToolBar.exit Exit Vim imenu icon=print 200.41 ToolBar.print :call Cream_print("i") vmenu icon=print 200.41 ToolBar.print :call Cream_print("v") tmenu ToolBar.print Print anoremenu 200.45 ToolBar.-sep45- anoremenu icon=undo 200.50 ToolBar.undo :call Cream_undo("i") tmenu ToolBar.undo Undo anoremenu icon=redo 200.60 ToolBar.redo :call Cream_redo("i") tmenu ToolBar.redo Redo anoremenu 200.65 ToolBar.-sep65- vmenu icon=cut_alt 200.70 ToolBar.cut_alt :call Cream_cut("v") tmenu ToolBar.cut_alt Cut (to Clipboard) vmenu icon=copy_alt 200.80 ToolBar.copy_alt :call Cream_copy("v") tmenu ToolBar.copy_alt Copy (to Clipboard) imenu icon=paste 200.85.1 ToolBar.paste :call Cream_paste("i") vmenu icon=paste 200.85.2 ToolBar.paste :call Cream_paste("v") tmenu ToolBar.paste Paste (from Clipboard) anoremenu 200.600 ToolBar.-sep600- imenu icon=text_align_left 200.601 ToolBar.text_align_left :call Cream_quickwrap_set("i", "left") vmenu icon=text_align_left 200.602 ToolBar.text_align_left :call Cream_quickwrap_set("v", "left") tmenu ToolBar.text_align_left Justify, Left imenu icon=text_align_center 200.603 ToolBar.text_align_center :call Cream_quickwrap_set("i", "center") vmenu icon=text_align_center 200.604 ToolBar.text_align_center :call Cream_quickwrap_set("v", "center") tmenu ToolBar.text_align_center Justify, Center imenu icon=text_align_right 200.605 ToolBar.text_align_right :call Cream_quickwrap_set("i", "right") vmenu icon=text_align_right 200.606 ToolBar.text_align_right :call Cream_quickwrap_set("v", "right") tmenu ToolBar.text_align_right Justify, Right imenu icon=text_align_justify 200.607 ToolBar.text_align_justify :call Cream_quickwrap_set("i", "full") vmenu icon=text_align_justify 200.608 ToolBar.text_align_justify :call Cream_quickwrap_set("v", "full") tmenu ToolBar.text_align_justify Justify, Full if !has("gui_athena") anoremenu 200.700 ToolBar.-sep700- anoremenu icon=search 200.701 ToolBar.search :call Cream_find() tmenu ToolBar.search Search vunmenu ToolBar.search vmenu icon=search 200.702 ToolBar.search :call Cream_find() anoremenu icon=search_and_replace 200.710 ToolBar.search_and_replace :call Cream_replace() tmenu ToolBar.search_and_replace Search and Replace vunmenu ToolBar.search_and_replace vmenu icon=search_and_replace 200.711 ToolBar.search_and_replace :call Cream_replace() endif anoremenu 200.750 ToolBar.-sep750- anoremenu icon=spellcheck 200.751 ToolBar.spellcheck :call Cream_spell_next() tmenu ToolBar.spellcheck Spell Check "anoremenu 200.245 ToolBar.-sep6- "anoremenu 200.250 ToolBar.convert :make "anoremenu 200.260 ToolBar.terminal :silent sh "anoremenu 200.270 ToolBar.RunCtags :!ctags -R . "anoremenu 200.280 ToolBar.jump-to g] anoremenu 200.900 ToolBar.-sep900- anoremenu icon=book 200.901 ToolBar.book :call Cream_help_find() tmenu ToolBar.book Help Topic anoremenu icon=help 200.902 ToolBar.help :help tmenu ToolBar.help Help "endif cream-0.43/taglist.vim0000644000076400007660000025142211156572442015311 0ustar digitectlocaluser "********************************************************************* " Note: Cream adds one adjustment (marked with "+++ CREAM" below). "********************************************************************* " File: taglist.vim " Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com) " Version: 3.3 " Last Modified: May 26, 2004 " " The "Tag List" plugin is a source code browser plugin for Vim and " provides an overview of the structure of source code files and allows " you to efficiently browse through source code files for different " programming languages. You can visit the taglist plugin home page for " more information: " " http://www.geocities.com/yegappan/taglist " " You can subscribe to the taglist mailing list to post your questions " or suggestions for improvement or to report bugs. Visit the following " page for subscribing to the mailing list: " " http://groups.yahoo.com/group/taglist/ " " For more information about using this plugin, after installing the " taglist plugin, use the ":help taglist" command. " " Installation " ------------ " 1. Download the taglist.zip file and unzip the files to the $HOME/.vim " or the $HOME/vimfiles or the $VIM/vimfiles directory. This should " unzip the following two files (the directory structure should be " preserved): " " plugin/taglist.vim - main taglist plugin file " doc/taglist.txt - documentation (help) file " " Refer to the 'add-plugin', 'add-global-plugin' and 'runtimepath' " Vim help pages for more details about installing Vim plugins. " 2. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or " $VIM/doc/vimfiles directory, start Vim and run the ":helptags ." " command to process the taglist help file. " 3. Set the Tlist_Ctags_Cmd variable to point to the location of the " exuberant ctags utility (not to the directory) in the .vimrc file. " 4. If you are running a terminal/console version of Vim and the " terminal doesn't support changing the window width then set the " 'Tlist_Inc_Winwidth' variable to 0 in the .vimrc file. " 5. Restart Vim. " 6. You can now use the ":Tlist" command to open/close the taglist " window. You can use the ":help taglist" command to get more " information about using the taglist plugin. " " ****************** Do not modify after this line ************************ if exists('loaded_taglist') || &cp finish endif let loaded_taglist=1 " Location of the exuberant ctags tool if !exists('Tlist_Ctags_Cmd') if executable('exuberant-ctags') let Tlist_Ctags_Cmd = 'exuberant-ctags' elseif executable('ctags') let Tlist_Ctags_Cmd = 'ctags' elseif executable('tags') let Tlist_Ctags_Cmd = 'tags' else "+++ CREAM: "echomsg 'Taglist: Exuberant ctags not found in PATH. ' . " \ 'Plugin is not loaded.' "+++ finish endif endif " Tag listing sort type - 'name' or 'order' if !exists('Tlist_Sort_Type') let Tlist_Sort_Type = 'order' endif " Tag listing window split (horizontal/vertical) control if !exists('Tlist_Use_Horiz_Window') let Tlist_Use_Horiz_Window = 0 endif " Open the vertically split taglist window on the left or on the right side. " This setting is relevant only if Tlist_Use_Horiz_Window is set to zero (i.e. " only for vertically split windows) if !exists('Tlist_Use_Right_Window') let Tlist_Use_Right_Window = 0 endif " Increase Vim window width to display vertically split taglist window. For " MS-Windows version of Vim running in a MS-DOS window, this must be set to 0 " otherwise the system may hang due to a Vim limitation. if !exists('Tlist_Inc_Winwidth') if (has('win16') || has('win95')) && !has('gui_running') let Tlist_Inc_Winwidth = 0 else let Tlist_Inc_Winwidth = 1 endif endif " Vertically split taglist window width setting if !exists('Tlist_WinWidth') let Tlist_WinWidth = 30 endif " Horizontally split taglist window height setting if !exists('Tlist_WinHeight') let Tlist_WinHeight = 10 endif " Automatically open the taglist window on Vim startup if !exists('Tlist_Auto_Open') let Tlist_Auto_Open = 0 endif " Display tag prototypes or tag names in the taglist window if !exists('Tlist_Display_Prototype') let Tlist_Display_Prototype = 0 endif " Display tag scopes in the taglist window if !exists('Tlist_Display_Tag_Scope') let Tlist_Display_Tag_Scope = 1 endif " Use single left mouse click to jump to a tag. By default this is disabled. " Only double click using the mouse will be processed. if !exists('Tlist_Use_SingleClick') let Tlist_Use_SingleClick = 0 endif " Control whether additional help is displayed as part of the taglist or not. " Also, controls whether empty lines are used to separate the tag tree. if !exists('Tlist_Compact_Format') let Tlist_Compact_Format = 0 endif " Exit Vim if only the taglist window is currently open. By default, this is " set to zero. if !exists('Tlist_Exit_OnlyWindow') let Tlist_Exit_OnlyWindow = 0 endif " Automatically close the folds for the non-active files in the taglist window if !exists('Tlist_File_Fold_Auto_Close') let Tlist_File_Fold_Auto_Close = 0 endif " Automatically highlight the current tag if !exists('Tlist_Auto_Highlight_Tag') let Tlist_Auto_Highlight_Tag = 1 endif " Process files even when the taglist window is not open if !exists('Tlist_Process_File_Always') let Tlist_Process_File_Always = 0 endif " Enable fold column to display the folding for the tag tree if !exists('Tlist_Enable_Fold_Column') let Tlist_Enable_Fold_Column = 1 endif "------------------- end of user configurable options -------------------- " Initialize the taglist plugin local variables for the supported file types " and tag types " assembly language let s:tlist_def_asm_settings = 'asm;d:define;l:label;m:macro;t:type' " aspperl language let s:tlist_def_aspperl_settings = 'asp;f:function;s:sub;v:variable' " aspvbs language let s:tlist_def_aspvbs_settings = 'asp;f:function;s:sub;v:variable' " awk language let s:tlist_def_awk_settings = 'awk;f:function' " beta language let s:tlist_def_beta_settings = 'beta;f:fragment;s:slot;v:pattern' " c language let s:tlist_def_c_settings = 'c;d:macro;g:enum;s:struct;u:union;t:typedef;' . \ 'v:variable;f:function' " c++ language let s:tlist_def_cpp_settings = 'c++;v:variable;d:macro;t:typedef;c:class;' . \ 'n:namespace;g:enum;s:struct;u:union;f:function' " c# language let s:tlist_def_cs_settings = 'c#;d:macro;t:typedef;n:namespace;c:class;' . \ 'E:event;g:enum;s:struct;i:interface;' . \ 'p:properties;m:method' " cobol language let s:tlist_def_cobol_settings = 'cobol;d:data;f:file;g:group;p:paragraph;' . \ 'P:program;s:section' " eiffel language let s:tlist_def_eiffel_settings = 'eiffel;c:class;f:feature' " erlang language let s:tlist_def_erlang_settings = 'erlang;d:macro;r:record;m:module;f:function' " expect (same as tcl) language let s:tlist_def_expect_settings = 'tcl;c:class;f:method;p:procedure' " fortran language let s:tlist_def_fortran_settings = 'fortran;p:program;b:block data;' . \ 'c:common;e:entry;i:interface;k:type;l:label;m:module;' . \ 'n:namelist;t:derived;v:variable;f:function;s:subroutine' " HTML language let s:tlist_def_html_settings = 'html;a:anchor;f:javascript function' " java language let s:tlist_def_java_settings = 'java;p:package;c:class;i:interface;' . \ 'f:field;m:method' " javascript language let s:tlist_def_javascript_settings = 'javascript;f:function' " lisp language let s:tlist_def_lisp_settings = 'lisp;f:function' " lua language let s:tlist_def_lua_settings = 'lua;f:function' " makefiles let s:tlist_def_make_settings = 'make;m:macro' " pascal language let s:tlist_def_pascal_settings = 'pascal;f:function;p:procedure' " perl language let s:tlist_def_perl_settings = 'perl;p:package;s:subroutine' " php language let s:tlist_def_php_settings = 'php;c:class;f:function' " python language let s:tlist_def_python_settings = 'python;c:class;m:member;f:function' " rexx language let s:tlist_def_rexx_settings = 'rexx;s:subroutine' " ruby language let s:tlist_def_ruby_settings = 'ruby;c:class;f:method;F:function;' . \ 'm:singleton method' " scheme language let s:tlist_def_scheme_settings = 'scheme;s:set;f:function' " shell language let s:tlist_def_sh_settings = 'sh;f:function' " C shell language let s:tlist_def_csh_settings = 'sh;f:function' " Z shell language let s:tlist_def_zsh_settings = 'sh;f:function' " slang language let s:tlist_def_slang_settings = 'slang;n:namespace;f:function' " sml language let s:tlist_def_sml_settings = 'sml;e:exception;c:functor;s:signature;' . \ 'r:structure;t:type;v:value;f:function' " sql language let s:tlist_def_sql_settings = 'sql;c:cursor;F:field;P:package;r:record;' . \ 's:subtype;t:table;T:trigger;v:variable;f:function;p:procedure' " tcl language let s:tlist_def_tcl_settings = 'tcl;c:class;f:method;p:procedure' " vera language let s:tlist_def_vera_settings = 'vera;c:class;d:macro;e:enumerator;' . \ 'f:function;g:enum;m:member;p:program;' . \ 'P:prototype;t:task;T:typedef;v:variable;' . \ 'x:externvar' "verilog language let s:tlist_def_verilog_settings = 'verilog;m:module;P:parameter;r:register;' . \ 't:task;w:write;p:port;v:variable;f:function' " vim language let s:tlist_def_vim_settings = 'vim;a:autocmds;v:variable;f:function' " yacc language let s:tlist_def_yacc_settings = 'yacc;l:label' "------------------- end of language specific options -------------------- " Vim window size is changed or not let s:tlist_winsize_chgd = 0 " Taglist window is maximized or not let s:tlist_win_maximized = 0 " Number of files displayed in the taglist window let s:tlist_file_count = 0 " Number of filetypes supported by taglist let s:tlist_ftype_count = 0 " Is taglist part of other plugins like winmanager or cream? let s:tlist_app_name = "none" " Are we displaying brief help text let s:tlist_brief_help = 1 " Do not change the name of the taglist title variable. The winmanager plugin " relies on this name to determine the title for the taglist plugin. let TagList_title = "__Tag_List__" " An autocommand is used to refresh the taglist window when entering any " buffer. We don't want to refresh the taglist window if we are entering the " file window from one of the taglist functions. The 'Tlist_Skip_Refresh' " variable is used to skip the refresh of the taglist window and is set " and cleared appropriately. let s:Tlist_Skip_Refresh = 0 " Tlist_Display_Help() function! s:Tlist_Display_Help() if s:tlist_app_name == "winmanager" " To handle a bug in the winmanager plugin, add a space at the " last line call setline('$', ' ') endif if s:tlist_brief_help " Add the brief help call append(0, '" Press ? to display help text') else " Add the extensive help call append(0, '" : Jump to tag definition') call append(1, '" o : Jump to tag definition in new window') call append(2, '" p : Preview the tag definition') call append(3, '" : Display tag prototype') call append(4, '" u : Update tag list') call append(5, '" s : Select sort field') call append(6, '" d : Remove file from taglist') call append(7, '" x : Zoom-out/Zoom-in taglist window') call append(8, '" + : Open a fold') call append(9, '" - : Close a fold') call append(10, '" * : Open all folds') call append(11, '" = : Close all folds') call append(12, '" [[ : Move to the start of previous file') call append(13, '" ]] : Move to the start of next file') call append(14, '" q : Close the taglist window') call append(15, '" ? : Remove help text') endif endfunction " Tlist_Toggle_Help_Text() " Toggle taglist plugin help text between the full version and the brief " version function! s:Tlist_Toggle_Help_Text() if g:Tlist_Compact_Format " In compact display mode, do not display help return endif " Include the empty line displayed after the help text let brief_help_size = 1 let full_help_size = 16 setlocal modifiable " Set report option to a huge value to prevent informational messages " while deleting the lines let old_report = &report set report=99999 " Remove the currently highlighted tag. Otherwise, the help text " might be highlighted by mistake match none " Toggle between brief and full help text if s:tlist_brief_help let s:tlist_brief_help = 0 " Remove the previous help exe '1,' . brief_help_size . ' delete _' " Adjust the start/end line numbers for the files call s:Tlist_Update_Line_Offsets(0, 1, full_help_size - brief_help_size) else let s:tlist_brief_help = 1 " Remove the previous help exe '1,' . full_help_size . ' delete _' " Adjust the start/end line numbers for the files call s:Tlist_Update_Line_Offsets(0, 0, full_help_size - brief_help_size) endif call s:Tlist_Display_Help() " Restore the report option let &report = old_report setlocal nomodifiable endfunction " Tlist_Warning_Msg() " Display a message using WarningMsg highlight group function! s:Tlist_Warning_Msg(msg) echohl WarningMsg echomsg a:msg echohl None endfunction " Tlist_Get_File_Index() " Return the index of the specified filename function! s:Tlist_Get_File_Index(fname) let i = 0 " Do a linear search while i < s:tlist_file_count if s:tlist_{i}_filename == a:fname return i endif let i = i + 1 endwhile return -1 endfunction " Tlist_Get_File_Index_By_Linenum() " Return the index of the filename present in the specified line number " Line number refers to the line number in the taglist window function! s:Tlist_Get_File_Index_By_Linenum(lnum) let i = 0 " TODO: Convert this to a binary search while i < s:tlist_file_count if a:lnum >= s:tlist_{i}_start && a:lnum <= s:tlist_{i}_end return i endif let i = i + 1 endwhile return -1 endfunction " Tlist_Skip_File() " Check whether tag listing is supported for the specified file function! s:Tlist_Skip_File(filename, ftype) " Skip buffers with filetype not set if a:ftype == '' return 1 endif " Skip files which are not supported by exuberant ctags " First check whether default settings for this filetype are available. " If it is not available, then check whether user specified settings are " available. If both are not available, then don't list the tags for this " filetype let var = 's:tlist_def_' . a:ftype . '_settings' if !exists(var) let var = 'g:tlist_' . a:ftype . '_settings' if !exists(var) return 1 endif endif " Skip buffers with no names if a:filename == '' return 1 endif " Skip files which are not readable or files which are not yet stored " to the disk if !filereadable(a:filename) return 1 endif return 0 endfunction " Tlist_FileType_Init " Initialize the ctags arguments and tag variable for the specified " file type function! s:Tlist_FileType_Init(ftype) " If the user didn't specify any settings, then use the default " ctags args. Otherwise, use the settings specified by the user let var = 'g:tlist_' . a:ftype . '_settings' if exists(var) " User specified ctags arguments let settings = {var} . ';' else " Default ctags arguments let var = 's:tlist_def_' . a:ftype . '_settings' if !exists(var) " No default settings for this file type. This filetype is " not supported return 0 endif let settings = s:tlist_def_{a:ftype}_settings . ';' endif let msg = 'Taglist: Invalid ctags option setting - ' . settings " Format of the option that specifies the filetype and ctags arugments: " " ;flag1:name1;flag2:name2;flag3:name3 " " Extract the file type to pass to ctags. This may be different from the " file type detected by Vim let pos = stridx(settings, ';') if pos == -1 call s:Tlist_Warning_Msg(msg) return 0 endif let ctags_ftype = strpart(settings, 0, pos) if ctags_ftype == '' call s:Tlist_Warning_Msg(msg) return 0 endif " Make sure a valid filetype is supplied. If the user didn't specify a " valid filetype, then the ctags option settings may be treated as the " filetype if ctags_ftype =~ ':' call s:Tlist_Warning_Msg(msg) return 0 endif " Remove the file type from settings let settings = strpart(settings, pos + 1) if settings == '' call s:Tlist_Warning_Msg(msg) return 0 endif " Process all the specified ctags flags. The format is " flag1:name1;flag2:name2;flag3:name3 let ctags_flags = '' let cnt = 0 while settings != '' " Extract the flag let pos = stridx(settings, ':') if pos == -1 call s:Tlist_Warning_Msg(msg) return 0 endif let flag = strpart(settings, 0, pos) if flag == '' call s:Tlist_Warning_Msg(msg) return 0 endif " Remove the flag from settings let settings = strpart(settings, pos + 1) " Extract the tag type name let pos = stridx(settings, ';') if pos == -1 call s:Tlist_Warning_Msg(msg) return 0 endif let name = strpart(settings, 0, pos) if name == '' call s:Tlist_Warning_Msg(msg) return 0 endif let settings = strpart(settings, pos + 1) let cnt = cnt + 1 let s:tlist_{a:ftype}_{cnt}_name = flag let s:tlist_{a:ftype}_{cnt}_fullname = name let ctags_flags = ctags_flags . flag endwhile let s:tlist_{a:ftype}_ctags_args = '--language-force=' . ctags_ftype . \ ' --' . ctags_ftype . '-types=' . ctags_flags let s:tlist_{a:ftype}_count = cnt let s:tlist_{a:ftype}_ctags_flags = ctags_flags " Save the filetype name let s:tlist_ftype_{s:tlist_ftype_count}_name = a:ftype let s:tlist_ftype_count = s:tlist_ftype_count + 1 return 1 endfunction " Tlist_Discard_TagInfo " Discard the stored tag information for a file function! s:Tlist_Discard_TagInfo(fidx) let ftype = s:tlist_{a:fidx}_filetype " Discard information about the tags defined in the file let i = 1 while i <= s:tlist_{a:fidx}_tag_count unlet! s:tlist_{a:fidx}_tag_{i} let i = i + 1 endwhile let s:tlist_{a:fidx}_tag_count = 0 " Discard information about tags groups by their type let i = 1 while i <= s:tlist_{ftype}_count let ttype = s:tlist_{ftype}_{i}_name if s:tlist_{a:fidx}_{ttype} != '' let s:tlist_{a:fidx}_{ttype} = '' let s:tlist_{a:fidx}_{ttype}_start = 0 let cnt = s:tlist_{a:fidx}_{ttype}_count let s:tlist_{a:fidx}_{ttype}_count = 0 let j = 1 while j <= cnt unlet! s:tlist_{a:fidx}_{ttype}_{j} let j = j + 1 endwhile endif let i = i + 1 endwhile endfunction " Tlist_Update_Line_Offsets " Update the line offsets for tags for files starting from start_idx " and displayed in the taglist window by the specified offset function! s:Tlist_Update_Line_Offsets(start_idx, increment, offset) let i = a:start_idx while i < s:tlist_file_count if s:tlist_{i}_visible " Update the start/end line number only if the file is visible if a:increment let s:tlist_{i}_start = s:tlist_{i}_start + a:offset let s:tlist_{i}_end = s:tlist_{i}_end + a:offset else let s:tlist_{i}_start = s:tlist_{i}_start - a:offset let s:tlist_{i}_end = s:tlist_{i}_end - a:offset endif endif let i = i + 1 endwhile endfunction " Tlist_Discard_FileInfo " Discard the stored information for a file function! s:Tlist_Discard_FileInfo(fidx) call s:Tlist_Discard_TagInfo(a:fidx) let ftype = s:tlist_{a:fidx}_filetype let i = 1 while i <= s:tlist_{ftype}_count let ttype = s:tlist_{ftype}_{i}_name unlet! s:tlist_{a:fidx}_{ttype} unlet! s:tlist_{a:fidx}_{ttype}_start unlet! s:tlist_{a:fidx}_{ttype}_count let i = i + 1 endwhile unlet! s:tlist_{a:fidx}_filename unlet! s:tlist_{a:fidx}_sort_type unlet! s:tlist_{a:fidx}_filetype unlet! s:tlist_{a:fidx}_mtime unlet! s:tlist_{a:fidx}_start unlet! s:tlist_{a:fidx}_end unlet! s:tlist_{a:fidx}_valid unlet! s:tlist_{a:fidx}_visible unlet! s:tlist_{a:fidx}_tag_count endfunction " Tlist_Remove_File_From_Display " Remove the specified file from display function! s:Tlist_Remove_File_From_Display(fidx) " Remove the tags displayed for the specified file from the window let start = s:tlist_{a:fidx}_start " Include the empty line after the last line also if g:Tlist_Compact_Format let end = s:tlist_{a:fidx}_end else let end = s:tlist_{a:fidx}_end + 1 endif setlocal modifiable exe 'silent! ' . start . ',' . end . 'delete _' setlocal nomodifiable " Correct the start and end line offsets for all the files following " this file, as the tags for this file are removed call s:Tlist_Update_Line_Offsets(a:fidx + 1, 0, end - start + 1) endfunction " Tlist_Remove_File " Remove the file under the cursor or the specified file index function! s:Tlist_Remove_File(file_idx) let fidx = a:file_idx if fidx == -1 let fidx = s:Tlist_Get_File_Index_By_Linenum(line('.')) if fidx == -1 return endif endif call s:Tlist_Remove_File_From_Display(fidx) call s:Tlist_Discard_FileInfo(fidx) " Shift all the file variables by one index let i = fidx + 1 while i < s:tlist_file_count let j = i - 1 let s:tlist_{j}_filename = s:tlist_{i}_filename let s:tlist_{j}_sort_type = s:tlist_{i}_sort_type let s:tlist_{j}_filetype = s:tlist_{i}_filetype let s:tlist_{j}_mtime = s:tlist_{i}_mtime let s:tlist_{j}_start = s:tlist_{i}_start let s:tlist_{j}_end = s:tlist_{i}_end let s:tlist_{j}_valid = s:tlist_{i}_valid let s:tlist_{j}_visible = s:tlist_{i}_visible let s:tlist_{j}_tag_count = s:tlist_{i}_tag_count let k = 1 while k <= s:tlist_{j}_tag_count let s:tlist_{j}_tag_{k} = s:tlist_{i}_tag_{k} let k = k + 1 endwhile let ftype = s:tlist_{i}_filetype let k = 1 while k <= s:tlist_{ftype}_count let ttype = s:tlist_{ftype}_{k}_name let s:tlist_{j}_{ttype} = s:tlist_{i}_{ttype} let s:tlist_{j}_{ttype}_start = s:tlist_{i}_{ttype}_start let s:tlist_{j}_{ttype}_count = s:tlist_{i}_{ttype}_count if s:tlist_{j}_{ttype} != '' let l = 1 while l <= s:tlist_{j}_{ttype}_count let s:tlist_{j}_{ttype}_{l} = s:tlist_{i}_{ttype}_{l} let l = l + 1 endwhile endif let k = k + 1 endwhile " As the file and tag information is copied to the new index, " discard the previous information call s:Tlist_Discard_FileInfo(i) let i = i + 1 endwhile " Reduce the number of files displayed let s:tlist_file_count = s:tlist_file_count - 1 endfunction " Tlist_Open_Window " Create a new taglist window. If it is already open, jump to it function! s:Tlist_Open_Window() " If used with winmanager don't open windows. Winmanager will handle " the window/buffer management if s:tlist_app_name == "winmanager" return endif " If the window is open, jump to it let winnum = bufwinnr(g:TagList_title) if winnum != -1 " Jump to the existing window if winnr() != winnum exe winnum . 'wincmd w' endif return endif " Create a new window. If user prefers a horizontal window, then open " a horizontally split window. Otherwise open a vertically split " window if g:Tlist_Use_Horiz_Window " Open a horizontally split window let win_dir = 'botright' " Horizontal window height let win_size = g:Tlist_WinHeight else " Open a horizontally split window. Increase the window size, if " needed, to accomodate the new window if g:Tlist_Inc_Winwidth && \ &columns < (80 + g:Tlist_WinWidth) " one extra column is needed to include the vertical split let &columns= &columns + (g:Tlist_WinWidth + 1) let s:tlist_winsize_chgd = 1 else let s:tlist_winsize_chgd = 0 endif if g:Tlist_Use_Right_Window " Open the window at the rightmost place let win_dir = 'botright vertical' else " Open the window at the leftmost place let win_dir = 'topleft vertical' endif let win_size = g:Tlist_WinWidth endif " If the tag listing temporary buffer already exists, then reuse it. " Otherwise create a new buffer let bufnum = bufnr(g:TagList_title) if bufnum == -1 " Create a new buffer let wcmd = g:TagList_title else " Edit the existing buffer let wcmd = '+buffer' . bufnum endif " Create the taglist window exe 'silent! ' . win_dir . ' ' . win_size . 'split ' . wcmd endfunction " Tlist_Zoom_Window " Zoom (maximize/minimize) the taglist window function! s:Tlist_Zoom_Window() if s:tlist_win_maximized " Restore the window back to the previous size if g:Tlist_Use_Horiz_Window exe 'resize ' . g:Tlist_WinHeight else exe 'vert resize ' . g:Tlist_WinWidth endif let s:tlist_win_maximized = 0 else " Set the window size to the maximum possible without closing other " windows if g:Tlist_Use_Horiz_Window resize else vert resize endif let s:tlist_win_maximized = 1 endif endfunction " Tlist_Init_Window " Set the default options for the taglist window function! s:Tlist_Init_Window() " Define taglist window element highlighting if has('syntax') syntax match TagListComment '^" .*' syntax match TagListFileName '^[^" ].*$' syntax match TagListTitle '^ \S.*$' syntax match TagListTagScope '\s\[.\{-\}\]$' " Define the highlighting only if colors are supported if has('gui_running') || &t_Co > 2 " Colors to highlight various taglist window elements " If user defined highlighting group exists, then use them. " Otherwise, use default highlight groups. if hlexists('MyTagListTagName') highlight link TagListTagName MyTagListTagName else highlight link TagListTagName Search endif " Colors to highlight comments and titles if hlexists('MyTagListComment') highlight link TagListComment MyTagListComment else highlight clear TagListComment highlight link TagListComment Comment endif if hlexists('MyTagListTitle') highlight link TagListTitle MyTagListTitle else highlight clear TagListTitle highlight link TagListTitle Title endif if hlexists('MyTagListFileName') highlight link TagListFileName MyTagListFileName else highlight clear TagListFileName highlight link TagListFileName LineNr endif if hlexists('MyTagListTagScope') highlight link TagListTagScope MyTagListTagScope else highlight clear TagListTagScope highlight link TagListTagScope Identifier endif else highlight TagListTagName term=reverse cterm=reverse endif endif " Folding related settings if has('folding') setlocal foldenable setlocal foldminlines=0 setlocal foldmethod=manual if g:Tlist_Enable_Fold_Column setlocal foldcolumn=3 else setlocal foldcolumn=0 endif setlocal foldtext=v:folddashes.getline(v:foldstart) endif if s:tlist_app_name != "winmanager" " Mark buffer as scratch silent! setlocal buftype=nofile if s:tlist_app_name == "none" silent! setlocal bufhidden=delete endif silent! setlocal noswapfile " Due to a bug in Vim 6.0, the winbufnr() function fails for unlisted " buffers. So if the taglist buffer is unlisted, multiple taglist " windows will be opened. This bug is fixed in Vim 6.1 and above if v:version >= 601 silent! setlocal nobuflisted endif endif silent! setlocal nowrap " If the 'number' option is set in the source window, it will affect the " taglist window. So forcefully disable 'number' option for the taglist " window silent! setlocal nonumber " Create buffer local mappings for jumping to the tags and sorting the list nnoremap :call Tlist_Jump_To_Tag(0) nnoremap o :call Tlist_Jump_To_Tag(1) nnoremap p :call Tlist_Jump_To_Tag(2) nnoremap <2-LeftMouse> :call Tlist_Jump_To_Tag(0) nnoremap s :call Tlist_Change_Sort() nnoremap + :silent! foldopen nnoremap - :silent! foldclose nnoremap * :silent! %foldopen! nnoremap = :silent! %foldclose nnoremap :silent! foldopen nnoremap :silent! foldclose nnoremap :silent! %foldopen! nnoremap :call Tlist_Show_Tag_Prototype() nnoremap u :call Tlist_Update_Window() nnoremap d :call Tlist_Remove_File(-1) nnoremap x :call Tlist_Zoom_Window() nnoremap [[ :call Tlist_Move_To_File(-1) nnoremap ]] :call Tlist_Move_To_File(1) nnoremap ? :call Tlist_Toggle_Help_Text() nnoremap q :close " Insert mode mappings imap :call Tlist_Jump_To_Tag(0) " Windows needs return imap :call Tlist_Jump_To_Tag(0) inoremap o :call Tlist_Jump_To_Tag(1) inoremap p :call Tlist_Jump_To_Tag(2) imap <2-LeftMouse> :call \ Tlist_Jump_To_Tag(0) inoremap s :call Tlist_Change_Sort() inoremap + :silent! foldopen inoremap - :silent! foldclose inoremap * :silent! %foldopen! inoremap = :silent! %foldclose inoremap :silent! foldopen inoremap :silent! foldclose inoremap :silent! %foldopen! inoremap :call \ Tlist_Show_Tag_Prototype() inoremap u :call Tlist_Update_Window() inoremap d :call Tlist_Remove_File(-1) inoremap x :call Tlist_Zoom_Window() inoremap [[ :call Tlist_Move_To_File(-1) inoremap ]] :call Tlist_Move_To_File(1) inoremap ? :call Tlist_Toggle_Help_Text() inoremap q :close " Map single left mouse click if the user wants this functionality if g:Tlist_Use_SingleClick nnoremap :if bufname("%") =~ "__Tag_List__" \ call Tlist_Jump_To_Tag(0) endif endif " Define the taglist autocommands augroup TagListAutoCmds autocmd! " Display the tag prototype for the tag under the cursor. autocmd CursorHold __Tag_List__ call s:Tlist_Show_Tag_Prototype() " Highlight the current tag autocmd CursorHold * silent call Tlist_Highlight_Tag( \ fnamemodify(bufname('%'), ':p'), line('.'), 1) " Adjust the Vim window width when taglist window is closed autocmd BufUnload __Tag_List__ call Tlist_Post_Close_Cleanup() " Close the fold for this buffer when it's not visible in any window autocmd BufWinLeave * silent call Tlist_Update_File_Display( \ fnamemodify(expand(''), ':p'), 1) " Remove the file from the list when it's buffer is deleted autocmd BufDelete * silent call Tlist_Update_File_Display( \ fnamemodify(expand(''), ':p'), 2) " Exit Vim itself if only the taglist window is present (optional) autocmd BufEnter __Tag_List__ call Tlist_Check_Only_Window() if s:tlist_app_name != "winmanager" && !g:Tlist_Process_File_Always " Auto refresh the taglist window autocmd BufEnter * call Tlist_Refresh() endif augroup end endfunction " Tlist_Refresh_Window " Display the tags for all the files in the taglist window function! s:Tlist_Refresh_Window() " Set report option to a huge value to prevent informational messages " while deleting the lines let old_report = &report set report=99999 " Mark the buffer as modifiable setlocal modifiable " Delete the contents of the buffer to the black-hole register silent! %delete _ if g:Tlist_Compact_Format == 0 " Display help in non-compact mode call s:Tlist_Display_Help() endif " Mark the buffer as not modifiable setlocal nomodifiable " Restore the report option let &report = old_report " List all the tags for the previously processed files let i = 0 while i < s:tlist_file_count " Mark the file as not visible, so that Tlist_Explore_File() will " display the tags for this file and mark the file as visible let s:tlist_{i}_visible = 0 call s:Tlist_Explore_File(s:tlist_{i}_filename, s:tlist_{i}_filetype) let i = i + 1 endwhile " If Tlist_File_Fold_Auto_Close option is set, then close all the " folds if g:Tlist_File_Fold_Auto_Close if has('folding') " Close all the folds silent! %foldclose endif endif endfunction " Tlist_Post_Close_Cleanup() " Close the taglist window and adjust the Vim window width function! s:Tlist_Post_Close_Cleanup() " Mark all the files as not visible let i = 0 while i < s:tlist_file_count let s:tlist_{i}_visible = 0 let i = i + 1 endwhile " Remove the taglist autocommands silent! autocmd! TagListAutoCmds " Clear all the highlights match none if has('syntax') silent! syntax clear TagListTitle silent! syntax clear TagListComment silent! syntax clear TagListTagScope endif " Remove the left mouse click mapping if it was setup initially if g:Tlist_Use_SingleClick if hasmapto('') nunmap endif endif if s:tlist_app_name != "winmanager" if g:Tlist_Use_Horiz_Window || g:Tlist_Inc_Winwidth == 0 || \ s:tlist_winsize_chgd == 0 || \ &columns < (80 + g:Tlist_WinWidth) " No need to adjust window width if using horizontally split taglist " window or if columns is less than 101 or if the user chose not to " adjust the window width else " Adjust the Vim window width let &columns= &columns - (g:Tlist_WinWidth + 1) endif endif " Reset taglist state variables if s:tlist_app_name == "winmanager" let s:tlist_app_name = "none" let s:tlist_window_initialized = 0 endif endfunction " Tlist_Check_Only_Window " Check if only the taglist window is opened currently. If the " Tlist_Exit_OnlyWindow variable is set, then close the taglist window function! s:Tlist_Check_Only_Window() if g:Tlist_Exit_OnlyWindow if winbufnr(2) == -1 && bufname(winbufnr(1)) == g:TagList_title " If only the taglist window is currently open, then the buffer " number associated with window 2 will be -1. quit endif endif endfunction " Tlist_Explore_File() " List the tags defined in the specified file in a Vim window function! s:Tlist_Explore_File(filename, ftype) " First check whether the file already exists let fidx = s:Tlist_Get_File_Index(a:filename) if fidx != -1 let file_exists = 1 else let file_exists = 0 endif if file_exists && s:tlist_{fidx}_visible " Check whether the file tags are currently valid if s:tlist_{fidx}_valid " Goto the first line in the file exe s:tlist_{fidx}_start " If the line is inside a fold, open the fold if has('folding') exe "silent! " . s:tlist_{fidx}_start . "," . \ s:tlist_{fidx}_end . "foldopen!" endif return endif " Discard and remove the tags for this file from display call s:Tlist_Discard_TagInfo(fidx) call s:Tlist_Remove_File_From_Display(fidx) endif " Process and generate a list of tags defined in the file if !file_exists || !s:tlist_{fidx}_valid let ret_fidx = s:Tlist_Process_File(a:filename, a:ftype) if ret_fidx == -1 return endif let fidx = ret_fidx endif " Set report option to a huge value to prevent informational messages " while adding lines to the taglist window let old_report = &report set report=99999 " Mark the buffer as modifiable setlocal modifiable " Add new files to the end of the window. For existing files, add them at " the same line where they were previously present. If the file is not " visible, then add it at the end if s:tlist_{fidx}_start == 0 || !s:tlist_{fidx}_visible if g:Tlist_Compact_Format let s:tlist_{fidx}_start = line('$') else let s:tlist_{fidx}_start = line('$') + 1 endif endif let s:tlist_{fidx}_visible = 1 " Goto the line where this file should be placed if g:Tlist_Compact_Format exe s:tlist_{fidx}_start else exe (s:tlist_{fidx}_start - 1) endif let txt = fnamemodify(s:tlist_{fidx}_filename, ':t') . ' (' . \ fnamemodify(s:tlist_{fidx}_filename, ':p:h') . ')' if g:Tlist_Compact_Format == 0 silent! put =txt else silent! put! =txt " Move to the next line exe line('.') + 1 endif let file_start = s:tlist_{fidx}_start " Add the tag names grouped by tag type to the buffer with a title let i = 1 while i <= s:tlist_{a:ftype}_count let ttype = s:tlist_{a:ftype}_{i}_name " Add the tag type only if there are tags for that type if s:tlist_{fidx}_{ttype} != '' let txt = ' ' . s:tlist_{a:ftype}_{i}_fullname if g:Tlist_Compact_Format == 0 let ttype_start_lnum = line('.') + 1 silent! put =txt else let ttype_start_lnum = line('.') silent! put! =txt endif silent! put =s:tlist_{fidx}_{ttype} if g:Tlist_Compact_Format exe (line('.') + s:tlist_{fidx}_{ttype}_count) endif let s:tlist_{fidx}_{ttype}_start = ttype_start_lnum - file_start " create a fold for this tag type if has('folding') let fold_start = ttype_start_lnum let fold_end = fold_start + s:tlist_{fidx}_{ttype}_count exe fold_start . ',' . fold_end . 'fold' endif if g:Tlist_Compact_Format == 0 silent! put ='' endif endif let i = i + 1 endwhile if s:tlist_{fidx}_tag_count == 0 put ='' endif let s:tlist_{fidx}_end = line('.') - 1 " Create a fold for the entire file if has('folding') exe s:tlist_{fidx}_start . ',' . s:tlist_{fidx}_end . 'fold' exe 'silent! ' . s:tlist_{fidx}_start . ',' . \ s:tlist_{fidx}_end . 'foldopen!' endif " Goto the starting line for this file, exe s:tlist_{fidx}_start if s:tlist_app_name == "winmanager" " To handle a bug in the winmanager plugin, add a space at the " last line call setline('$', ' ') endif " Mark the buffer as not modifiable setlocal nomodifiable " Restore the report option let &report = old_report " Update the start and end line numbers for all the files following this " file let start = s:tlist_{fidx}_start " include the empty line after the last line if g:Tlist_Compact_Format let end = s:tlist_{fidx}_end else let end = s:tlist_{fidx}_end + 1 endif call s:Tlist_Update_Line_Offsets(fidx + 1, 1, end - start + 1) return endfunction " Tlist_Init_File " Initialize the variables for a new file function! s:Tlist_Init_File(filename, ftype) " Add new files at the end of the list let fidx = s:tlist_file_count let s:tlist_file_count = s:tlist_file_count + 1 " Initialize the file variables let s:tlist_{fidx}_filename = a:filename let s:tlist_{fidx}_sort_type = g:Tlist_Sort_Type let s:tlist_{fidx}_filetype = a:ftype let s:tlist_{fidx}_mtime = -1 let s:tlist_{fidx}_start = 0 let s:tlist_{fidx}_end = 0 let s:tlist_{fidx}_valid = 0 let s:tlist_{fidx}_visible = 0 let s:tlist_{fidx}_tag_count = 0 " Initialize the tag type variables let i = 1 while i <= s:tlist_{a:ftype}_count let ttype = s:tlist_{a:ftype}_{i}_name let s:tlist_{fidx}_{ttype} = '' let s:tlist_{fidx}_{ttype}_start = 0 let s:tlist_{fidx}_{ttype}_count = 0 let i = i + 1 endwhile return fidx endfunction " Tlist_Process_File " Get the list of tags defined in the specified file and store them " in Vim variables. Returns the file index where the tags are stored. function! s:Tlist_Process_File(filename, ftype) " Check for valid filename and valid filetype if a:filename == '' || !filereadable(a:filename) || a:ftype == '' return -1 endif " If the tag types for this filetype are not yet created, then create " them now let var = 's:tlist_' . a:ftype . '_count' if !exists(var) if s:Tlist_FileType_Init(a:ftype) == 0 return -1 endif endif " If this file is already processed, then use the cached values let fidx = s:Tlist_Get_File_Index(a:filename) if fidx == -1 " First time, this file is loaded let fidx = s:Tlist_Init_File(a:filename, a:ftype) else " File was previously processed. Discard the tag information call s:Tlist_Discard_TagInfo(fidx) endif let s:tlist_{fidx}_valid = 1 " Exuberant ctags arguments to generate a tag list let ctags_args = ' -f - --format=2 --excmd=pattern --fields=nks ' " Form the ctags argument depending on the sort type if s:tlist_{fidx}_sort_type == 'name' let ctags_args = ctags_args . ' --sort=yes ' else let ctags_args = ctags_args . ' --sort=no ' endif " Add the filetype specific arguments let ctags_args = ctags_args . ' ' . s:tlist_{a:ftype}_ctags_args " Ctags command to produce output with regexp for locating the tags let ctags_cmd = g:Tlist_Ctags_Cmd . ctags_args let ctags_cmd = ctags_cmd . ' "' . a:filename . '"' " In Windows 95, if not using cygwin, disable the 'shellslash' " option. Otherwise, this will cause problems when running the " ctags command. if has("win95") && !has("win32unix") let myshellslash = &shellslash set noshellslash endif " Run ctags and get the tag list let cmd_output = system(ctags_cmd) " Restore the value of the 'shellslash' option. if has("win95") && !has("win32unix") let &shellslash = myshellslash endif " Handle errors if v:shell_error && cmd_output != '' let msg = "Taglist: Failed to generate tags for " . a:filename call s:Tlist_Warning_Msg(msg) call s:Tlist_Warning_Msg(cmd_output) return fidx endif " No tags for current file if cmd_output == '' call s:Tlist_Warning_Msg('Taglist: No tags found for ' . a:filename) return fidx endif " Store the modification time for the file let s:tlist_{fidx}_mtime = getftime(a:filename) " Process the ctags output one line at a time. Separate the tag output " based on the tag type and store it in the tag type variable " The format of each line in the ctags output is: " " tag_namefile_nameex_cmd;"extension_fields " while cmd_output != '' " Extract one line at a time let idx = stridx(cmd_output, "\n") let one_line = strpart(cmd_output, 0, idx) " Remove the line from the tags output let cmd_output = strpart(cmd_output, idx + 1) if one_line == '' " Line is not in proper tags format continue endif " Extract the tag type let ttype = s:Tlist_Extract_Tagtype(one_line) if ttype == '' " Line is not in proper tags format continue endif " make sure the tag type is supported if s:tlist_{a:ftype}_ctags_flags !~# ttype " Tag type is not supported continue endif " Extract the tag name if g:Tlist_Display_Prototype == 0 let ttxt = ' ' . strpart(one_line, 0, stridx(one_line, "\t")) " Add the tag scope, if it is available. Tag scope is the last " field after the 'line:\t' field if g:Tlist_Display_Tag_Scope " only if it is selected let tag_scope = s:Tlist_Extract_Tag_Scope(one_line) if tag_scope != '' let ttxt = ttxt . ' [' . tag_scope . ']' endif endif else let ttxt = s:Tlist_Extract_Tag_Prototype(one_line) endif " Update the count of this tag type let cnt = s:tlist_{fidx}_{ttype}_count + 1 let s:tlist_{fidx}_{ttype}_count = cnt " Add this tag to the tag type variable let s:tlist_{fidx}_{ttype} = s:tlist_{fidx}_{ttype} . ttxt . "\n" " Update the total tag count let s:tlist_{fidx}_tag_count = s:tlist_{fidx}_tag_count + 1 " Store the ctags output line and the tagtype count let s:tlist_{fidx}_tag_{s:tlist_{fidx}_tag_count} = \ cnt . ':' . one_line " Store the tag output index let s:tlist_{fidx}_{ttype}_{cnt} = s:tlist_{fidx}_tag_count endwhile return fidx endfunction " Tlist_Update_File_Tags " Update the tags for a file (if needed) function! Tlist_Update_File_Tags(filename, ftype) " If the file doesn't support tag listing, skip it if s:Tlist_Skip_File(a:filename, a:ftype) return endif " First check whether the file already exists let fidx = s:Tlist_Get_File_Index(a:filename) if fidx != -1 && s:tlist_{fidx}_valid " File exists and the tags are valid return endif " If the taglist window is opened, update it let winnum = bufwinnr(g:TagList_title) if winnum == -1 " Taglist window is not present. Just update the taglist " and return call s:Tlist_Process_File(a:filename, a:ftype) else " Save the current window number let save_winnr = winnr() " Goto the taglist window call s:Tlist_Open_Window() " Update the taglist window call s:Tlist_Explore_File(a:filename, a:ftype) if winnr() != save_winnr " Go back to the original window exe save_winnr . 'wincmd w' endif endif endfunction " Tlist_Close_Window " Close the taglist window function! s:Tlist_Close_Window() " Make sure the taglist window exists let winnum = bufwinnr(g:TagList_title) if winnum == -1 call s:Tlist_Warning_Msg('Error: Taglist window is not open') return endif if winnr() == winnum " Already in the taglist window. Close it and return if winbufnr(2) != -1 " If a window other than the taglist window is open, " then only close the taglist window. close endif else " Goto the taglist window, close it and then come back to the " original window let curbufnr = bufnr('%') exe winnum . 'wincmd w' close " Need to jump back to the original window only if we are not " already in that window let winnum = bufwinnr(curbufnr) if winnr() != winnum exe winnum . 'wincmd w' endif endif endfunction " Tlist_Toggle_Window() " Open or close a taglist window function! s:Tlist_Toggle_Window() let curline = line('.') " If taglist window is open then close it. let winnum = bufwinnr(g:TagList_title) if winnum != -1 call s:Tlist_Close_Window() return endif if s:tlist_app_name == "winmanager" " Taglist plugin is no longer part of the winmanager app let s:tlist_app_name = "none" endif " Get the filename and filetype for the specified buffer let curbuf_name = fnamemodify(bufname('%'), ':p') let curbuf_ftype = getbufvar('%', '&filetype') " Mark the current window as the desired window to open a file " when a tag is selcted let w:tlist_file_window = "yes" " Open the taglist window call s:Tlist_Open_Window() " Initialize the taglist window call s:Tlist_Init_Window() call s:Tlist_Refresh_Window() " Add and list the tags for all the buffers in the bufferlist let i = 1 while i < bufnr('$') let fname = fnamemodify(bufname(i), ':p') let ftype = getbufvar(i, '&filetype') call s:Tlist_Explore_File(fname, ftype) let i = i + 1 endwhile " Highlight the current tag call s:Tlist_Highlight_Tag(curbuf_name, curline, 1) " Go back to the original window let prev_Tlist_Skip_Refresh = s:Tlist_Skip_Refresh let s:Tlist_Skip_Refresh = 1 wincmd p let s:Tlist_Skip_Refresh = prev_Tlist_Skip_Refresh endfunction " Tlist_Extract_Tagtype " Extract the tag type from the tag text function! s:Tlist_Extract_Tagtype(tag_txt) " The tag type is after the tag prototype field. The prototype field " ends with the /;"\t string. We add 4 at the end to skip the characters " in this special string.. let start = strridx(a:tag_txt, '/;"' . "\t") + 4 let end = strridx(a:tag_txt, 'line:') - 1 let ttype = strpart(a:tag_txt, start, end - start) return ttype endfunction " Tlist_Extract_Tag_Prototype " Extract the tag protoype from the tag text function! s:Tlist_Extract_Tag_Prototype(tag_txt) let start = stridx(a:tag_txt, '/^') + 2 let end = strridx(a:tag_txt, '/;"' . "\t") " The search patterns for some tag types doesn't end with " the ;" character if a:tag_txt[end - 1] == '$' let end = end -1 endif let tag_pat = strpart(a:tag_txt, start, end - start) " Remove all the leading space characters let tag_pat = substitute(tag_pat, '\s*', '', '') return tag_pat endfunction " Tlist_Extract_Tag_Scope " Extract the tag scope from the tag text function! s:Tlist_Extract_Tag_Scope(tag_txt) let start = strridx(a:tag_txt, 'line:') let end = strridx(a:tag_txt, "\t") if end <= start return '' endif let tag_scope = strpart(a:tag_txt, end + 1) let tag_scope = strpart(tag_scope, stridx(tag_scope, ':') + 1) return tag_scope endfunction " Tlist_Refresh() " Refresh the taglist function! s:Tlist_Refresh() " If we are entering the buffer from one of the taglist functions, then " no need to refresh the taglist window again. if s:Tlist_Skip_Refresh || (s:tlist_app_name == "winmanager") return endif " Skip buffers with 'buftype' set to nofile, nowrite, quickfix or help if &buftype != '' return endif let filename = fnamemodify(bufname('%'), ':p') let ftype = &filetype " If the file doesn't support tag listing, skip it if s:Tlist_Skip_File(filename, ftype) return endif let curline = line('.') " Make sure the taglist window is open. Otherwise, no need to refresh let winnum = bufwinnr(g:TagList_title) if winnum == -1 if g:Tlist_Process_File_Always call Tlist_Update_File_Tags(filename, ftype) endif return endif let fidx = s:Tlist_Get_File_Index(filename) if fidx != -1 let mtime = getftime(filename) if s:tlist_{fidx}_mtime != mtime " Invalidate the tags listed for this file let s:tlist_{fidx}_valid = 0 " Update the taglist window call Tlist_Update_File_Tags(s:tlist_{fidx}_filename, \ s:tlist_{fidx}_filetype) " Store the new file modification time let s:tlist_{fidx}_mtime = mtime endif " If the tag listing for the current window is already present, no " need to refresh it if !g:Tlist_Auto_Highlight_Tag return endif " Highlight the current tag call s:Tlist_Highlight_Tag(filename, curline, 1) return endif " Save the current window number let cur_winnr = winnr() " Goto the taglist window call s:Tlist_Open_Window() if !g:Tlist_Auto_Highlight_Tag " Save the cursor position let save_line = line('.') let save_col = col('.') endif " Update the taglist window call s:Tlist_Explore_File(filename, ftype) " Highlight the current tag call s:Tlist_Highlight_Tag(filename, curline, 1) if !g:Tlist_Auto_Highlight_Tag " Restore the cursor position call cursor(save_line, save_col) endif " Refresh the taglist window redraw if s:tlist_app_name != "winmanager" " Jump back to the original window exe cur_winnr . 'wincmd w' endif endfunction " Tlist_Change_Sort() " Change the sort order of the tag listing function! s:Tlist_Change_Sort() let fidx = s:Tlist_Get_File_Index_By_Linenum(line('.')) if fidx == -1 return endif " Remove the previous highlighting match none let sort_type = s:tlist_{fidx}_sort_type " Toggle the sort order from 'name' to 'order' and vice versa if sort_type == 'name' let s:tlist_{fidx}_sort_type = 'order' else let s:tlist_{fidx}_sort_type = 'name' endif " Save the current line for later restoration let curline = '\V\^' . getline('.') . '\$' " Invalidate the tags listed for this file let s:tlist_{fidx}_valid = 0 call s:Tlist_Explore_File(s:tlist_{fidx}_filename, s:tlist_{fidx}_filetype) " Go back to the cursor line before the tag list is sorted call search(curline, 'w') endfunction " Tlist_Update_Tags() " Update taglist for the current buffer by regenerating the tag list " Contributed by WEN Guopeng. function! s:Tlist_Update_Tags() if winnr() == bufwinnr(g:TagList_title) " In the taglist window. Update the current file call s:Tlist_Update_Window() return else " Not in the taglist window. Update the current buffer let filename = fnamemodify(bufname('%'), ':p') let fidx = s:Tlist_Get_File_Index(filename) if fidx != -1 let s:tlist_{fidx}_valid = 0 endif call Tlist_Update_File_Tags(filename, &filetype) endif endfunction " Tlist_Update_Window() " Update the window by regenerating the tag list function! s:Tlist_Update_Window() let fidx = s:Tlist_Get_File_Index_By_Linenum(line('.')) if fidx == -1 return endif " Remove the previous highlighting match none " Save the current line for later restoration let curline = '\V\^' . getline('.') . '\$' let s:tlist_{fidx}_valid = 0 " Update the taglist window call s:Tlist_Explore_File(s:tlist_{fidx}_filename, s:tlist_{fidx}_filetype) " Go back to the tag line before the list is updated call search(curline, 'w') endfunction " Tlist_Get_Tag_Index() " Return the tag index for the current line function! s:Tlist_Get_Tag_Index(fidx) let lnum = line('.') let ftype = s:tlist_{a:fidx}_filetype " Determine to which tag type the current line number belongs to using the " tag type start line number and the number of tags in a tag type let i = 1 while i <= s:tlist_{ftype}_count let ttype = s:tlist_{ftype}_{i}_name let start_lnum = s:tlist_{a:fidx}_start + s:tlist_{a:fidx}_{ttype}_start let end = start_lnum + s:tlist_{a:fidx}_{ttype}_count if lnum >= start_lnum && lnum <= end break endif let i = i + 1 endwhile " Current line doesn't belong to any of the displayed tag types if i > s:tlist_{ftype}_count return 0 endif " Compute the index into the displayed tags for the tag type let tidx = lnum - start_lnum if tidx == 0 return 0 endif " Get the corresponding tag line and return it return s:tlist_{a:fidx}_{ttype}_{tidx} endfunction " Tlist_Highlight_Tagline " Higlight the current tagline function! s:Tlist_Highlight_Tagline() " Clear previously selected name match none " Highlight the current selected name if g:Tlist_Display_Prototype == 0 exe 'match TagListTagName /\%' . line('.') . 'l\s\+\zs.*/' else exe 'match TagListTagName /\%' . line('.') . 'l.*/' endif endfunction " Tlist_Jump_To_Tag() " Jump to the location of the current tag " win_ctrl == 0 - Reuse the existing file window " win_ctrl == 1 - Open a new window " win_ctrl == 2 - Preview the tag function! s:Tlist_Jump_To_Tag(win_ctrl) " Do not process comment lines and empty lines let curline = getline('.') if curline =~ '^\s*$' || curline[0] == '"' return endif " If inside a fold, then don't try to jump to the tag if foldclosed('.') != -1 return endif let fidx = s:Tlist_Get_File_Index_By_Linenum(line('.')) if fidx == -1 return endif " Get the tag output for the current tag let tidx = s:Tlist_Get_Tag_Index(fidx) if tidx != 0 let mtxt = s:tlist_{fidx}_tag_{tidx} let start = stridx(mtxt, '/^') + 2 let end = strridx(mtxt, '/;"' . "\t") if mtxt[end - 1] == '$' let end = end - 1 endif let tagpat = '\V\^' . strpart(mtxt, start, end - start) . \ (mtxt[end] == '$' ? '\$' : '') " Highlight the tagline call s:Tlist_Highlight_Tagline() else " Selected a line which is not a tag name. Just edit the file let tagpat = '' endif call s:Tlist_Open_File(a:win_ctrl, s:tlist_{fidx}_filename, tagpat) endfunction " Tlist_Open_File " Open the specified file in either a new window or an existing window " and place the cursor at the specified tag pattern function! s:Tlist_Open_File(win_ctrl, filename, tagpat) let prev_Tlist_Skip_Refresh = s:Tlist_Skip_Refresh let s:Tlist_Skip_Refresh = 1 if s:tlist_app_name == "winmanager" " Let the winmanager edit the file call WinManagerFileEdit(a:filename, a:win_ctrl) else " Goto the window containing the file. If the window is not there, open a " new window let winnum = bufwinnr(a:filename) if winnum == -1 " Locate the previously used window for opening a file let fwin_num = 0 let i = 1 while winbufnr(i) != -1 if getwinvar(i, 'tlist_file_window') == "yes" let fwin_num = i break endif let i = i + 1 endwhile if fwin_num != 0 " Jump to the file window exe fwin_num . "wincmd w" " If the user asked to jump to the tag in a new window, then split " the existing window into two. if a:win_ctrl == 1 split endif exe "edit " . a:filename else " Open a new window if g:Tlist_Use_Horiz_Window exe 'leftabove split #' . bufnr(a:filename) " Go to the taglist window to change the window size to the user " configured value wincmd p exe 'resize ' . g:Tlist_WinHeight " Go back to the file window wincmd p else " Open the file in a window and skip refreshing the taglist " window exe 'rightbelow vertical split #' . bufnr(a:filename) " Go to the taglist window to change the window size to the user " configured value wincmd p exe 'vertical resize ' . g:Tlist_WinWidth " Go back to the file window wincmd p endif let w:tlist_file_window = "yes" endif else exe winnum . 'wincmd w' " If the user asked to jump to the tag in a new window, then split the " existing window into two. if a:win_ctrl == 1 split endif endif endif " Jump to the tag if a:tagpat != '' silent call search(a:tagpat, 'w') endif " Bring the line to the middle of the window normal! z. " If the line is inside a fold, open the fold if has('folding') if foldlevel('.') != 0 normal! zv endif endif " If the user selects to preview the tag then jump back to the " taglist window if a:win_ctrl == 2 " Go back to the taglist window let winnum = bufwinnr(g:TagList_title) exe winnum . 'wincmd w' endif let s:Tlist_Skip_Refresh = prev_Tlist_Skip_Refresh endfunction " Tlist_Show_Tag_Prototype() " Display the prototype of the tag under the cursor function! s:Tlist_Show_Tag_Prototype() " If we have already display prototype in the tag window, no need to " display it in the status line if g:Tlist_Display_Prototype return endif " Clear the previously displayed line echo " Do not process comment lines and empty lines let curline = getline('.') if curline =~ '^\s*$' || curline[0] == '"' return endif " If inside a fold, then don't display the prototype if foldclosed('.') != -1 return endif " Get the file index let fidx = s:Tlist_Get_File_Index_By_Linenum(line('.')) if fidx == -1 return endif " Get the tag output line for the current tag let tidx = s:Tlist_Get_Tag_Index(fidx) if tidx == 0 return endif let mtxt = s:tlist_{fidx}_tag_{tidx} " Get the tag search pattern and display it echo s:Tlist_Extract_Tag_Prototype(mtxt) endfunction " Tlist_Find_Tag_text " Find the tag text given the line number in the source window function! s:Tlist_Find_Tag_text(fidx, linenum) let sort_type = s:tlist_{a:fidx}_sort_type let left = 1 let right = s:tlist_{a:fidx}_tag_count if sort_type == 'order' " Tag list sorted by order, do a binary search comparing the line " numbers and pick a tag entry that contains the current line and " highlight it. The idea behind this function is taken from the " ctags.vim script (by Alexey Marinichev) available at the Vim online " website. " If the current line is the less than the first tag, then no need to " search let txt = s:tlist_{a:fidx}_tag_1 let start = strridx(txt, 'line:') + strlen('line:') let end = strridx(txt, "\t") if end < start let first_lnum = strpart(txt, start) + 0 else let first_lnum = strpart(txt, start, end - start) + 0 endif if a:linenum < first_lnum return "" endif while left < right let middle = (right + left + 1) / 2 let txt = s:tlist_{a:fidx}_tag_{middle} let start = strridx(txt, 'line:') + strlen('line:') let end = strridx(txt, "\t") if end < start let middle_lnum = strpart(txt, start) + 0 else let middle_lnum = strpart(txt, start, end - start) + 0 endif if middle_lnum == a:linenum let left = middle break endif if middle_lnum > a:linenum let right = middle - 1 else let left = middle endif endwhile else " sorted by name, brute force method (Dave Eggum) let closest_lnum = 0 let final_left = 0 while left < right let txt = s:tlist_{a:fidx}_tag_{left} let start = strridx(txt, 'line:') + strlen('line:') let end = strridx(txt, "\t") if end < start let lnum = strpart(txt, start) + 0 else let lnum = strpart(txt, start, end - start) + 0 endif if lnum < a:linenum && lnum > closest_lnum let closest_lnum = lnum let final_left = left elseif lnum == a:linenum let closest_lnum = lnum break else let left = left + 1 endif endwhile if closest_lnum == 0 return "" endif if left == right let left = final_left endif endif return s:tlist_{a:fidx}_tag_{left} endfunction " Tlist_Highlight_Tag() " Highlight the current tag " cntx == 1, Called by the taglist plugin itself " cntx == 2, Forced by the user through the TlistSync command function! s:Tlist_Highlight_Tag(filename, curline, cntx) " Highlight the current tag only if the user configured the " taglist plugin to do so or if the user explictly invoked the " command to highlight the current tag. if !g:Tlist_Auto_Highlight_Tag && a:cntx == 1 return endif if a:filename == '' return endif " Make sure the taglist window is present let winnum = bufwinnr(g:TagList_title) if winnum == -1 call s:Tlist_Warning_Msg('Error: Taglist window is not open') return endif let fidx = s:Tlist_Get_File_Index(a:filename) if fidx == -1 return endif " If there are no tags for this file, then no need to proceed further if s:tlist_{fidx}_tag_count == 0 return endif " If part of winmanager then disable winmanager autocommands if s:tlist_app_name == "winmanager" call WinManagerSuspendAUs() endif " Save the original window number let org_winnr = winnr() if org_winnr == winnum let in_taglist_window = 1 else let in_taglist_window = 0 endif " Go to the taglist window if !in_taglist_window exe winnum . 'wincmd w' endif " Clear previously selected name match none let tag_txt = s:Tlist_Find_Tag_text(fidx, a:curline) if tag_txt == "" " Make sure the current tag line is visible in the taglist window. " Calling the winline() function makes the line visible. Don't know " of a better way to achieve this. let cur_lnum = line('.') if cur_lnum < s:tlist_{fidx}_start || cur_lnum > s:tlist_{fidx}_end " Move the cursor to the beginning of the file exe s:tlist_{fidx}_start endif if has('folding') normal! zv endif call winline() if !in_taglist_window let prev_Tlist_Skip_Refresh = s:Tlist_Skip_Refresh let s:Tlist_Skip_Refresh = 1 exe org_winnr . 'wincmd w' let s:Tlist_Skip_Refresh = prev_Tlist_Skip_Refresh endif if s:tlist_app_name == "winmanager" call WinManagerResumeAUs() endif return endif " Extract the tag type let ttype = s:Tlist_Extract_Tagtype(tag_txt) " Extract the tag offset let offset = strpart(tag_txt, 0, stridx(tag_txt, ':')) + 0 " Compute the line number let lnum = s:tlist_{fidx}_start + s:tlist_{fidx}_{ttype}_start + offset " Goto the line containing the tag exe lnum " Open the fold if has('folding') normal! zv endif " Make sure the current tag line is visible in the taglist window. " Calling the winline() function makes the line visible. Don't know " of a better way to achieve this. call winline() " Highlight the tag name call s:Tlist_Highlight_Tagline() " Go back to the original window if !in_taglist_window let prev_Tlist_Skip_Refresh = s:Tlist_Skip_Refresh let s:Tlist_Skip_Refresh = 1 exe org_winnr . 'wincmd w' let s:Tlist_Skip_Refresh = prev_Tlist_Skip_Refresh endif if s:tlist_app_name == "winmanager" call WinManagerResumeAUs() endif return endfunction " Tlist_Get_Tag_Prototype_By_Line " Get the prototype for the tag on or before the specified line number in the " current buffer function! Tlist_Get_Tag_Prototype_By_Line(...) if a:0 == 0 " Arguments are not supplied. Use the current buffer name " and line number let filename = bufname('%') let linenr = line('.') elseif a:0 == 2 " Filename and line number are specified let filename = a:1 let linenr = a:2 if linenr !~ '\d\+' " Invalid line number return "" endif else " Sufficient arguments are not supplied let msg = 'Usage: Tlist_Get_Tag_Prototype_By_Line ' . \ '' call s:Tlist_Warning_Msg(msg) return "" endif " Expand the file to a fully qualified name let filename = fnamemodify(filename, ':p') if filename == '' return "" endif let fidx = s:Tlist_Get_File_Index(filename) if fidx == -1 return "" endif " If there are no tags for this file, then no need to proceed further if s:tlist_{fidx}_tag_count == 0 return "" endif " Get the tag text using the line number let tag_txt = s:Tlist_Find_Tag_text(fidx, linenr) if tag_txt == "" return "" endif " Extract the tag search pattern and return it return s:Tlist_Extract_Tag_Prototype(tag_txt) endfunction " Tlist_Get_Tagname_By_Line " Get the tag name on or before the specified line number in the " current buffer function! Tlist_Get_Tagname_By_Line(...) if a:0 == 0 " Arguments are not supplied. Use the current buffer name " and line number let filename = bufname('%') let linenr = line('.') elseif a:0 == 2 " Filename and line number are specified let filename = a:1 let linenr = a:2 if linenr !~ '\d\+' " Invalid line number return "" endif else " Sufficient arguments are not supplied let msg = 'Usage: Tlist_Get_Tagname_By_Line ' call s:Tlist_Warning_Msg(msg) return "" endif " Make sure the current file has a name let filename = fnamemodify(filename, ':p') if filename == '' return "" endif let fidx = s:Tlist_Get_File_Index(filename) if fidx == -1 return "" endif " If there are no tags for this file, then no need to proceed further if s:tlist_{fidx}_tag_count == 0 return "" endif " Get the tag name using the line number let tag_txt = s:Tlist_Find_Tag_text(fidx, linenr) if tag_txt == "" return "" endif " Remove the line number at the beginning let start = stridx(tag_txt, ':') + 1 " Extract the tag name and return it return strpart(tag_txt, start, stridx(tag_txt, "\t") - start) endfunction " Tlist_Move_To_File " Move the cursor to the beginning of the current file or the next file " or the previous file in the taglist window " dir == -1, move to start of current or previous function " dir == 1, move to start of next function function! s:Tlist_Move_To_File(dir) if foldlevel('.') == 0 " Cursor is on a non-folded line (it is not in any of the files) " Move it to a folded line if a:dir == -1 normal! zk else " While moving down to the start of the next fold, " no need to do go to the start of the next file. normal! zj return endif endif let fidx = s:Tlist_Get_File_Index_By_Linenum(line('.')) if fidx == -1 return endif let cur_lnum = line('.') if a:dir == -1 if cur_lnum > s:tlist_{fidx}_start " Move to the beginning of the current file exe s:tlist_{fidx}_start return endif if fidx == 0 " At the first file, can't move to previous file return endif " Otherwise, move to the beginning of the previous file let fidx = fidx - 1 exe s:tlist_{fidx}_start return else let fidx = fidx + 1 if fidx == s:tlist_file_count " At the last file, can't move to the next file return endif " Otherwise, move to the beginning of the next file exe s:tlist_{fidx}_start return endif endfunction " Tlist_Session_Load " Load a taglist session (information about all the displayed files " and the tags) from the specified file function! s:Tlist_Session_Load(...) if a:0 == 0 || a:1 == '' call s:Tlist_Warning_Msg('Usage: TlistSessionLoad ') return endif let sessionfile = a:1 if !filereadable(sessionfile) let msg = 'Taglist: Error - Unable to open file ' . sessionfile call s:Tlist_Warning_Msg(msg) return endif " Mark the current window as the file window if bufname('%') !~ g:TagList_title let w:tlist_file_window = "yes" endif " Open to the taglist window call s:Tlist_Open_Window() " Source the session file exe 'source ' . sessionfile let new_file_count = g:tlist_file_count unlet! g:tlist_file_count let i = 0 while i < new_file_count let ftype = g:tlist_{i}_filetype unlet! g:tlist_{i}_filetype if !exists("s:tlist_" . ftype . "_count") if s:Tlist_FileType_Init(ftype) == 0 let i = i + 1 continue endif endif let fname = g:tlist_{i}_filename unlet! g:tlist_{i}_filename let fidx = s:Tlist_Get_File_Index(fname) if fidx != -1 let s:tlist_{fidx}_visible = 0 let i = i + 1 continue endif let fidx = s:Tlist_Init_File(fname, ftype) let s:tlist_{fidx}_filename = fname let s:tlist_{fidx}_sort_type = g:tlist_{i}_sort_type unlet! g:tlist_{i}_sort_type let s:tlist_{fidx}_filetype = ftype let s:tlist_{fidx}_mtime = getftime(fname) let s:tlist_{fidx}_start = 0 let s:tlist_{fidx}_end = 0 let s:tlist_{fidx}_valid = 1 " Mark the file as not visible, so that Tlist_Init_Window() function " will display the tags for this file let s:tlist_{fidx}_visible = 0 let s:tlist_{fidx}_tag_count = g:tlist_{i}_tag_count unlet! g:tlist_{i}_tag_count let j = 1 while j <= s:tlist_{fidx}_tag_count let s:tlist_{fidx}_tag_{j} = g:tlist_{i}_tag_{j} unlet! g:tlist_{i}_tag_{j} let j = j + 1 endwhile let j = 1 while j <= s:tlist_{ftype}_count let ttype = s:tlist_{ftype}_{j}_name if exists('g:tlist_' . i . '_' . ttype) let s:tlist_{fidx}_{ttype} = g:tlist_{i}_{ttype} unlet! g:tlist_{i}_{ttype} let s:tlist_{fidx}_{ttype}_start = 0 let s:tlist_{fidx}_{ttype}_count = g:tlist_{i}_{ttype}_count unlet! g:tlist_{i}_{ttype}_count let k = 1 while k <= s:tlist_{fidx}_{ttype}_count let s:tlist_{fidx}_{ttype}_{k} = g:tlist_{i}_{ttype}_{k} unlet! g:tlist_{i}_{ttype}_{k} let k = k + 1 endwhile else let s:tlist_{fidx}_{ttype} = '' let s:tlist_{fidx}_{ttype}_start = 0 let s:tlist_{fidx}_{ttype}_count = 0 endif let j = j + 1 endwhile let i = i + 1 endwhile " Initialize the taglist window call s:Tlist_Init_Window() call s:Tlist_Refresh_Window() if s:tlist_file_count > 0 " Jump to the beginning of the first file call cursor(s:tlist_0_start, 1) endif endfunction " Tlist_Session_Save " Save a taglist session (information about all the displayed files " and the tags) into the specified file function! s:Tlist_Session_Save(...) if a:0 == 0 || a:1 == '' call s:Tlist_Warning_Msg('Usage: TlistSessionSave ') return endif let sessionfile = a:1 if s:tlist_file_count == 0 " There is nothing to save call s:Tlist_Warning_Msg('Warning: Taglist is empty. Nothing to save.') return endif if filereadable(sessionfile) let ans = input("Do you want to overwrite " . sessionfile . " (Y/N)?") if ans !=? 'y' return endif echo "\n" endif exe 'redir! > ' . sessionfile silent! echo '" Taglist session file. This file is auto-generated.' silent! echo '" File information' silent! echo 'let tlist_file_count = ' . s:tlist_file_count let i = 0 while i < s:tlist_file_count " Store information about the file silent! echo 'let tlist_' . i . "_filename = '" . \ s:tlist_{i}_filename . "'" silent! echo 'let tlist_' . i . '_sort_type = "' . \ s:tlist_{i}_sort_type . '"' silent! echo 'let tlist_' . i . '_filetype = "' . \ s:tlist_{i}_filetype . '"' silent! echo 'let tlist_' . i . '_tag_count = ' . \ s:tlist_{i}_tag_count " Store information about all the tags let j = 1 while j <= s:tlist_{i}_tag_count let txt = escape(s:tlist_{i}_tag_{j}, '"\\') silent! echo 'let tlist_' . i . '_tag_' . j . ' = "' . txt . '"' let j = j + 1 endwhile " Store information about all the tags grouped by their type let ftype = s:tlist_{i}_filetype let j = 1 while j <= s:tlist_{ftype}_count let ttype = s:tlist_{ftype}_{j}_name if s:tlist_{i}_{ttype}_count != 0 let txt = substitute(s:tlist_{i}_{ttype}, "\n", "\\\\n", "g") silent! echo 'let tlist_' . i . '_' . ttype . ' = "' . \ txt . '"' silent! echo 'let tlist_' . i . '_' . ttype . '_count = ' . \ s:tlist_{i}_{ttype}_count let k = 1 while k <= s:tlist_{i}_{ttype}_count silent! echo 'let tlist_' . i . '_' . ttype . '_' . k . \ ' = ' . s:tlist_{i}_{ttype}_{k} let k = k + 1 endwhile endif let j = j + 1 endwhile silent! echo let i = i + 1 endwhile redir END endfunction " Tlist_Update_File_Display " Update a file displayed in the taglist window. " action == 1, Close the fold for the file " action == 2, Remove the file from the taglist window function! s:Tlist_Update_File_Display(filename, action) " Make sure a valid filename is supplied if a:filename == '' return endif " Make sure the taglist window is present let winnum = bufwinnr(g:TagList_title) if winnum == -1 call s:Tlist_Warning_Msg('Taglist: Error - Taglist window is not open') return endif " Save the original window number let org_winnr = winnr() if org_winnr == winnum let in_taglist_window = 1 else let in_taglist_window = 0 endif " Go to the taglist window if !in_taglist_window exe winnum . 'wincmd w' endif " Get tag list index of the specified file let idx = s:Tlist_Get_File_Index(a:filename) if idx != -1 " Save the cursor position let save_lnum = line('.') " Perform the requested action on the file if a:action == 1 " Close the fold for the file if g:Tlist_File_Fold_Auto_Close " Close the fold for the file if has('folding') exe "silent! " . s:tlist_{idx}_start . "," . \ s:tlist_{idx}_end . "foldclose" endif endif elseif a:action == 2 " Remove the file from the list call s:Tlist_Remove_File(idx) endif " Move the cursor to the original location exe save_lnum endif " Go back to the original window if !in_taglist_window let prev_Tlist_Skip_Refresh = s:Tlist_Skip_Refresh let s:Tlist_Skip_Refresh = 1 exe org_winnr . 'wincmd w' let s:Tlist_Skip_Refresh = prev_Tlist_Skip_Refresh endif endfunction " Define the taglist autocommand to automatically open the taglist window on " Vim startup if g:Tlist_Auto_Open autocmd VimEnter * nested Tlist endif " Refresh the taglist if g:Tlist_Process_File_Always autocmd BufEnter * call Tlist_Refresh() endif " Define the user commands to manage the taglist window command! -nargs=0 Tlist call s:Tlist_Toggle_Window() command! -nargs=0 TlistClose call s:Tlist_Close_Window() command! -nargs=0 TlistUpdate call s:Tlist_Update_Tags() command! -nargs=0 TlistSync call s:Tlist_Highlight_Tag( \ fnamemodify(bufname('%'), ':p'), line('.'), 2) command! -nargs=* -complete=buffer TlistShowPrototype \ echo Tlist_Get_Tag_Prototype_By_Line() command! -nargs=* -complete=buffer TlistShowTag \ echo Tlist_Get_Tagname_By_Line() command! -nargs=* -complete=file TlistSessionLoad \ call s:Tlist_Session_Load() command! -nargs=* -complete=file TlistSessionSave \ call s:Tlist_Session_Save() " Tlist_Set_App " Set the name of the external plugin/application to which taglist " belongs. " Taglist plugin is part of another plugin like cream or winmanager. function! Tlist_Set_App(name) if a:name == "" return endif let s:tlist_app_name = a:name endfunction " Winmanager integration " Initialization required for integration with winmanager function! TagList_Start() " If current buffer is not taglist buffer, then don't proceed if bufname('%') != '__Tag_List__' return endif call Tlist_Set_App("winmanager") " Get the current filename from the winmanager plugin let bufnum = WinManagerGetLastEditedFile() if bufnum != -1 let filename = fnamemodify(bufname(bufnum), ':p') let ftype = getbufvar(bufnum, '&filetype') endif " Initialize the taglist window, if it is not already initialized if !exists("s:tlist_window_initialized") || !s:tlist_window_initialized call s:Tlist_Init_Window() call s:Tlist_Refresh_Window() let s:tlist_window_initialized = 1 endif " Open the taglist window if bufnum != -1 call s:Tlist_Explore_File(filename, ftype) endif endfunction function! TagList_IsValid() return 0 endfunction function! TagList_WrapUp() return 0 endfunction cream-0.43/cream-iso3166-1.vim0000644000076400007660000010564611517300720016172 0ustar digitectlocaluser" " cream-iso3166-1.vim -- Exchange ISO3166-1 country codes and names " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " " Updated: 2004-07-31 01:40:03-0400 " " Description: " Find ISO3166-1 country code or name when passed the other. " " Source: " http://en.wikipedia.org/wiki/ISO_3166-1 " " Usage: " " Cream_iso3166_1(word, ...) " " o Test {word} for match of iso3166_1-compliant country name, 3- or " 2-letter abbreviation, or 3-digit numerical code: " * Returns name if {word} matches either abbreviation. " * Returns 2-letter if {word} matches name or number. " * Returns 0 if no match is made. " o Use {optional} argument to force a given return: " * Returns 3-letter if {optional} is "3" and {word} matches. " * Returns 2-letter if {optional} is "2" and {word} matches. " * Returns name if {optional} is "name" and {word} matches. " * Returns number if {optional} is "number" and {word} matches. " * Returns 0 if no match is made. " o Matching is case-insensitive. But return values are capitalized " according to the standard. (Name is title case, abbreviations are " UPPER CASE.) " " Examples: " " :echo Cream_iso3166_1("AND") returns "Andorra" " :echo Cream_iso3166_1("AD") returns "Andorra" " :echo Cream_iso3166_1("Andorra") returns "AD" " :echo Cream_iso3166_1("020") returns "AD" " " Name or abbreviation unmatched: " " :echo Cream_iso3166_1("not-a-name") returns 0 " :echo Cream_iso3166_1("not") returns 0 " " Cream_iso3166_1() {{{1 function! Cream_iso3166_1(word, ...) " test strings " handle empty string if a:word == "" return "" endif " set option if a:0 > 0 if a:1 == "2" \|| a:1 == "3" \|| a:1 == "number" \|| a:1 == "name" let optn = a:1 else let optn = "" endif else let optn = "" endif let a = s:Cream_iso3166_1_test(a:word, "004", "AFG", "AF", "Afghanistan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "248", "ALA", "AX", "Åland Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "008", "ALB", "AL", "Albania", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "012", "DZA", "DZ", "Algeria", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "016", "ASM", "AS", "American Samoa", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "020", "AND", "AD", "Andorra", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "024", "AGO", "AO", "Angola", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "660", "AIA", "AI", "Anguilla", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "010", "ATA", "AQ", "Antarctica", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "028", "ATG", "AG", "Antigua and Barbuda", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "032", "ARG", "AR", "Argentina", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "051", "ARM", "AM", "Armenia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "533", "ABW", "AW", "Aruba", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "036", "AUS", "AU", "Australia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "040", "AUT", "AT", "Austria", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "031", "AZE", "AZ", "Azerbaijan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "044", "BHS", "BS", "Bahamas", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "048", "BHR", "BH", "Bahrain", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "050", "BGD", "BD", "Bangladesh", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "052", "BRB", "BB", "Barbados", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "112", "BLR", "BY", "Belarus", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "056", "BEL", "BE", "Belgium", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "084", "BLZ", "BZ", "Belize", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "204", "BEN", "BJ", "Benin", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "060", "BMU", "BM", "Bermuda", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "064", "BTN", "BT", "Bhutan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "068", "BOL", "BO", "Bolivia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "070", "BIH", "BA", "Bosnia and Herzegovina", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "072", "BWA", "BW", "Botswana", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "074", "BVT", "BV", "Bouvet Island", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "076", "BRA", "BR", "Brazil", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "086", "IOT", "IO", "British Indian Ocean Territory", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "096", "BRN", "BN", "Brunei Darussalam", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "100", "BGR", "BG", "Bulgaria", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "854", "BFA", "BF", "Burkina Faso", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "108", "BDI", "BI", "Burundi", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "116", "KHM", "KH", "Cambodia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "120", "CMR", "CM", "Cameroon", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "124", "CAN", "CA", "Canada", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "132", "CPV", "CV", "Cape Verde", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "136", "CYM", "KY", "Cayman Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "140", "CAF", "CF", "Central African Republic", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "148", "TCD", "TD", "Chad", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "152", "CHL", "CL", "Chile", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "156", "CHN", "CN", "China, mainland", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "162", "CXR", "CX", "Christmas Island", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "166", "CCK", "CC", "Cocos (Keeling) Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "170", "COL", "CO", "Colombia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "174", "COM", "KM", "Comoros", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "178", "COG", "CG", "Congo, Republic of the ", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "180", "COD", "CD", "Congo, The Democratic Republic Of The", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "184", "COK", "CK", "Cook Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "188", "CRI", "CR", "Costa Rica", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "384", "CIV", "CI", "Côte d'Ivoire", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "191", "HRV", "HR", "Croatia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "192", "CUB", "CU", "Cuba", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "196", "CYP", "CY", "Cyprus", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "203", "CZE", "CZ", "Czech Republic", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "208", "DNK", "DK", "Denmark", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "262", "DJI", "DJ", "Djibouti", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "212", "DMA", "DM", "Dominica", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "214", "DOM", "DO", "Dominican Republic", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "218", "ECU", "EC", "Ecuador", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "818", "EGY", "EG", "Egypt", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "222", "SLV", "SV", "El Salvador", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "226", "GNQ", "GQ", "Equatorial Guinea", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "232", "ERI", "ER", "Eritrea", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "233", "EST", "EE", "Estonia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "231", "ETH", "ET", "Ethiopia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "238", "FLK", "FK", "Falkland Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "234", "FRO", "FO", "Faroe Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "242", "FJI", "FJ", "Fiji", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "246", "FIN", "FI", "Finland", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "250", "FRA", "FR", "France", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "254", "GUF", "GF", "French Guiana", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "258", "PYF", "PF", "French Polynesia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "260", "ATF", "TF", "French Southern Territories", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "266", "GAB", "GA", "Gabon", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "270", "GMB", "GM", "Gambia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "268", "GEO", "GE", "Georgia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "276", "DEU", "DE", "Germany", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "288", "GHA", "GH", "Ghana", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "292", "GIB", "GI", "Gibraltar", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "300", "GRC", "GR", "Greece", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "304", "GRL", "GL", "Greenland", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "308", "GRD", "GD", "Grenada", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "312", "GLP", "GP", "Guadeloupe", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "316", "GUM", "GU", "Guam", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "320", "GTM", "GT", "Guatemala", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "324", "GIN", "GN", "Guinea", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "624", "GNB", "GW", "Guinea-Bissau", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "328", "GUY", "GY", "Guyana", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "332", "HTI", "HT", "Haiti", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "334", "HMD", "HM", "Heard Island and McDonald Islands", optn)| if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "336", "VAT", "VA", "Vatican City State", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "340", "HND", "HN", "Honduras", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "344", "HKG", "HK", "Hong Kong", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "348", "HUN", "HU", "Hungary", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "352", "ISL", "IS", "Iceland", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "356", "IND", "IN", "India", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "360", "IDN", "ID", "Indonesia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "364", "IRN", "IR", "Iran, Islamic Republic of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "368", "IRQ", "IQ", "Iraq", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "372", "IRL", "IE", "Ireland, Republic of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "376", "ISR", "IL", "Israel", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "380", "ITA", "IT", "Italy", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "388", "JAM", "JM", "Jamaica", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "392", "JPN", "JP", "Japan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "400", "JOR", "JO", "Jordan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "398", "KAZ", "KZ", "Kazakhstan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "404", "KEN", "KE", "Kenya", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "296", "KIR", "KI", "Kiribati", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "408", "PRK", "KP", "Korea, Democratic People's Republic of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "410", "KOR", "KR", "Korea, Republic of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "414", "KWT", "KW", "Kuwait", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "417", "KGZ", "KG", "Kyrgyzstan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "418", "LAO", "LA", "Lao People's Democratic Republic", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "428", "LVA", "LV", "Latvia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "422", "LBN", "LB", "Lebanon", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "426", "LSO", "LS", "Lesotho", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "430", "LBR", "LR", "Liberia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "434", "LBY", "LY", "Libyan Arab Jamahiriya", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "438", "LIE", "LI", "Liechtenstein", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "440", "LTU", "LT", "Lithuania", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "442", "LUX", "LU", "Luxembourg", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "446", "MAC", "MO", "Macao", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "807", "MKD", "MK", "Macedonia, The Former Yugoslav Republic of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "450", "MDG", "MG", "Madagascar", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "454", "MWI", "MW", "Malawi", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "458", "MYS", "MY", "Malaysia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "462", "MDV", "MV", "Maldives", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "466", "MLI", "ML", "Mali", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "470", "MLT", "MT", "Malta", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "584", "MHL", "MH", "Marshall Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "474", "MTQ", "MQ", "Martinique", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "478", "MRT", "MR", "Mauritania", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "480", "MUS", "MU", "Mauritius", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "175", "MYT", "YT", "Mayotte", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "484", "MEX", "MX", "Mexico", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "583", "FSM", "FM", "Micronesia, Federated States of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "498", "MDA", "MD", "Moldova, Republic of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "492", "MCO", "MC", "Monaco", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "496", "MNG", "MN", "Mongolia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "500", "MSR", "MS", "Montserrat", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "504", "MAR", "MA", "Morocco", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "508", "MOZ", "MZ", "Mozambique", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "104", "MMR", "MM", "Myanmar", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "516", "NAM", "NA", "Namibia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "520", "NRU", "NR", "Nauru", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "524", "NPL", "NP", "Nepal", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "528", "NLD", "NL", "Netherlands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "530", "ANT", "AN", "Netherlands Antilles", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "540", "NCL", "NC", "New Caledonia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "554", "NZL", "NZ", "New Zealand", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "558", "NIC", "NI", "Nicaragua", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "562", "NER", "NE", "Niger", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "566", "NGA", "NG", "Nigeria", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "570", "NIU", "NU", "Niue", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "574", "NFK", "NF", "Norfolk Island", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "580", "MNP", "MP", "Northern Mariana Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "578", "NOR", "NO", "Norway", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "512", "OMN", "OM", "Oman", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "586", "PAK", "PK", "Pakistan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "585", "PLW", "PW", "Palau", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "275", "PSE", "PS", "Palestinian Territory, Occupied", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "591", "PAN", "PA", "Panama", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "598", "PNG", "PG", "Papua New Guinea", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "600", "PRY", "PY", "Paraguay", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "604", "PER", "PE", "Peru", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "608", "PHL", "PH", "Philippines", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "612", "PCN", "PN", "Pitcairn", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "616", "POL", "PL", "Poland", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "620", "PRT", "PT", "Portugal", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "630", "PRI", "PR", "Puerto Rico", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "634", "QAT", "QA", "Qatar", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "638", "REU", "RE", "Réunion", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "642", "ROU", "RO", "Romania", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "643", "RUS", "RU", "Russian Federation", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "646", "RWA", "RW", "Rwanda", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "654", "SHN", "SH", "Saint Helena", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "659", "KNA", "KN", "Saint Kitts and Nevis", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "662", "LCA", "LC", "Saint Lucia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "666", "SPM", "PM", "Saint-Pierre and Miquelon", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "670", "VCT", "VC", "Saint Vincent and the Grenadines", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "882", "WSM", "WS", "Samoa", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "674", "SMR", "SM", "San Marino", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "678", "STP", "ST", "São Tomé and Príncipe", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "682", "SAU", "SA", "Saudi Arabia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "686", "SEN", "SN", "Senegal", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "891", "SCG", "CS", "Serbia and Montenegro", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "690", "SYC", "SC", "Seychelles", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "694", "SLE", "SL", "Sierra Leone", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "702", "SGP", "SG", "Singapore", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "703", "SVK", "SK", "Slovakia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "705", "SVN", "SI", "Slovenia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "090", "SLB", "SB", "Solomon Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "706", "SOM", "SO", "Somalia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "710", "ZAF", "ZA", "South Africa", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "239", "SGS", "GS", "South Georgia and the South Sandwich Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "724", "ESP", "ES", "Spain", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "144", "LKA", "LK", "Sri Lanka", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "736", "SDN", "SD", "Sudan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "740", "SUR", "SR", "Suriname", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "744", "SJM", "SJ", "Svalbard and Jan Mayen", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "748", "SWZ", "SZ", "Swaziland", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "752", "SWE", "SE", "Sweden", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "756", "CHE", "CH", "Switzerland", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "760", "SYR", "SY", "Syrian Arab Republic", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "158", "TWN", "TW", "Taiwan (Republic of China)", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "762", "TJK", "TJ", "Tajikistan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "834", "TZA", "TZ", "Tanzania, United Republic Of", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "764", "THA", "TH", "Thailand", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "626", "TLS", "TL", "Timor-Leste", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "768", "TGO", "TG", "Togo", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "772", "TKL", "TK", "Tokelau", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "776", "TON", "TO", "Tonga", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "780", "TTO", "TT", "Trinidad and Tobago", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "788", "TUN", "TN", "Tunisia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "792", "TUR", "TR", "Turkey", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "795", "TKM", "TM", "Turkmenistan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "796", "TCA", "TC", "Turks and Caicos Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "798", "TUV", "TV", "Tuvalu", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "800", "UGA", "UG", "Uganda", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "804", "UKR", "UA", "Ukraine", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "784", "ARE", "AE", "United Arab Emirates", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "826", "GBR", "GB", "United Kingdom", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "840", "USA", "US", "United States", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "581", "UMI", "UM", "United States Minor Outlying Islands", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "858", "URY", "UY", "Uruguay", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "860", "UZB", "UZ", "Uzbekistan", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "548", "VUT", "VU", "Vanuatu", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "862", "VEN", "VE", "Venezuela", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "704", "VNM", "VN", "Viet Nam", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "092", "VGB", "VG", "Virgin Islands, British", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "850", "VIR", "VI", "Virgin Islands, U.S.", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "876", "WLF", "WF", "Wallis and Futuna", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "732", "ESH", "EH", "Western Sahara", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "887", "YEM", "YE", "Yemen", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "894", "ZMB", "ZM", "Zambia", optn) | if a!="0" | return a | endif let a = s:Cream_iso3166_1_test(a:word, "716", "ZWE", "ZW", "Zimbabwe", optn) | if a!="0" | return a | endif return 0 endfunction " s:Cream_iso3166_1_test() {{{1 function! s:Cream_iso3166_1_test(word, numb, abb3, abb2, name, optn) " the brains of the operation :) if a:optn == "" if a:word ==? a:abb2 return a:name elseif a:word ==? a:abb3 return a:name elseif a:word ==? a:numb return a:abb2 elseif a:word ==? a:name return a:abb2 endif elseif a:optn == "number" if a:word ==? a:name \|| a:word ==? a:numb \|| a:word ==? a:abb3 \|| a:word ==? a:abb2 return a:numb endif elseif a:optn == "name" if a:word ==? a:name \|| a:word ==? a:numb \|| a:word ==? a:abb3 \|| a:word ==? a:abb2 return a:name endif elseif a:optn == "3" if a:word ==? a:name \|| a:word ==? a:numb \|| a:word ==? a:abb3 \|| a:word ==? a:abb2 return a:abb3 endif elseif a:optn == "2" if a:word ==? a:name \|| a:word ==? a:numb \|| a:word ==? a:abb3 \|| a:word ==? a:abb2 return a:abb2 endif endif return "0" endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-colors-blackwhite.vim0000644000076400007660000000731411156572440020340 0ustar digitectlocaluser" Vim color file " Maintainer: Mike Williams " Last Change: 2nd June 2003 " Version: 1.1 " Remove all existing highlighting. set background=light hi clear if exists("syntax_on") syntax reset endif let g:colors_name = "blackwhite" highlight Normal cterm=NONE ctermfg=black ctermbg=white gui=NONE guifg=black guibg=white highlight NonText ctermfg=black ctermbg=white guifg=black guibg=white highlight LineNr cterm=italic ctermfg=black ctermbg=white gui=italic guifg=black guibg=white " Syntax highlighting scheme highlight Comment cterm=italic ctermfg=black ctermbg=white gui=italic guifg=black guibg=white highlight Constant ctermfg=black ctermbg=white guifg=black guibg=white highlight String ctermfg=black ctermbg=white guifg=black guibg=white highlight Character ctermfg=black ctermbg=white guifg=black guibg=white highlight Number ctermfg=black ctermbg=white guifg=black guibg=white " Boolean defaults to Constant highlight Float ctermfg=black ctermbg=white guifg=black guibg=white highlight Identifier ctermfg=black ctermbg=white guifg=black guibg=white highlight Function ctermfg=black ctermbg=white guifg=black guibg=white highlight Statement ctermfg=black ctermbg=white guifg=black guibg=white highlight Conditional ctermfg=black ctermbg=white guifg=black guibg=white highlight Repeat ctermfg=black ctermbg=white guifg=black guibg=white highlight Label ctermfg=black ctermbg=white guifg=black guibg=white highlight Operator ctermfg=black ctermbg=white guifg=black guibg=white " Keyword defaults to Statement " Exception defaults to Statement highlight PreProc cterm=bold ctermfg=black ctermbg=white gui=bold guifg=black guibg=white " Include defaults to PreProc " Define defaults to PreProc " Macro defaults to PreProc " PreCondit defaults to PreProc highlight Type cterm=bold ctermfg=black ctermbg=white gui=bold guifg=black guibg=white " StorageClass defaults to Type " Structure defaults to Type " Typedef defaults to Type highlight Special cterm=italic ctermfg=black ctermbg=white gui=bold guifg=black guibg=white " SpecialChar defaults to Special " Tag defaults to Special " Delimiter defaults to Special highlight SpecialComment cterm=italic ctermfg=black ctermbg=white gui=italic guifg=black guibg=white " Debug defaults to Special highlight Todo cterm=italic,bold ctermfg=black ctermbg=white gui=italic,bold guifg=black guibg=white " Ideally, the bg color would be white but VIM cannot print white on black! highlight Error cterm=bold,reverse ctermfg=black ctermbg=grey gui=bold,reverse guifg=black guibg=grey "+++ Cream: missing highlight WarningMsg cterm=bold ctermfg=black ctermbg=grey gui=italic guifg=black guibg=white highlight Underlined cterm=bold ctermfg=black ctermbg=white gui=underline guifg=black guibg=white highlight ModeMsg cterm=bold ctermfg=black ctermbg=white gui=bold guifg=black guibg=white "+++ "+++ Cream: " invisible characters highlight NonText guifg=#bbbbbb gui=none highlight SpecialKey guifg=#bbbbbb gui=none " statusline highlight User1 gui=bold guifg=#bbbbbb guibg=#f3f3f3 highlight User2 gui=bold guifg=#555555 guibg=#f3f3f3 highlight User3 gui=bold guifg=#000000 guibg=#f3f3f3 highlight User4 gui=bold guifg=#000000 guibg=#f3f3f3 " bookmarks highlight Cream_ShowMarksHL gui=bold guifg=black guibg=white ctermfg=black ctermbg=white cterm=bold " spell check highlight BadWord gui=bold guifg=foreground guibg=LightGray ctermfg=black ctermbg=grey " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#dddddd " email highlight EQuote1 guifg=#000000 highlight EQuote2 guifg=#444444 highlight EQuote3 guifg=#888888 highlight Sig guifg=#999999 "+++ " EOF print_bw.vim cream-0.43/cream-colors-oceandeep.vim0000644000076400007660000001674511517300720020145 0ustar digitectlocaluser" " cream-colors-oceandeep.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " "---------------------------------------------------------------------- " Vim color file " Maintainer: Tom Regner " Last Change: " " 2007-10-16 change by Alexei Alexandrov " - highlight CursorColumn " " 2007-08-20 change by Diederick Niehorster " - highlight CursorLine " " 2007-02-05 " - included changes from Keffin Barnaby " (vim>=7.0 PMenu and Spellchecking) " " 2006-09-06 " - changed String to DarkCyan, Macro to DarkRed " " 2006-09-05 " - more console-colors " - added console-colors, clean-up " " Version: 1.2.5 " URL: http://vim.sourceforge.net/script.php?script_id=368 """ Init set background=dark highlight clear if exists("syntax_on") syntax reset endif let g:colors_name = "oceandeep" """" GUI highlight Cursor gui=None guibg=PaleTurquoise3 guifg=White highlight CursorIM gui=bold guifg=white guibg=PaleTurquoise3 highlight CursorLine gui=None guibg=#003853 highlight CursorColumn gui=None guibg=#003853 highlight Directory guifg=LightSeaGreen guibg=bg highlight DiffAdd gui=None guifg=fg guibg=DarkCyan highlight DiffChange gui=None guifg=fg guibg=Green4 highlight DiffDelete gui=None guifg=fg guibg=black highlight DiffText gui=bold guifg=fg guibg=bg highlight ErrorMsg guifg=LightYellow guibg=FireBrick highlight VertSplit gui=NONE guifg=black guibg=grey60 highlight Folded gui=bold guibg=#305060 guifg=#b0d0e0 highlight FoldColumn gui=bold guibg=#305060 guifg=#b0d0e0 highlight IncSearch gui=reverse guifg=fg guibg=bg highlight LineNr gui=bold guibg=grey6 guifg=LightSkyBlue3 highlight ModeMsg guibg=DarkGreen guifg=LightGreen highlight MoreMsg gui=bold guifg=SeaGreen4 guibg=bg "+++ Cream: "if version < 600 " " same as SpecialKey " highlight NonText guibg=#123A4A guifg=#3D5D6D "else " " Bottom fill (use e.g. same as LineNr) " highlight NonText gui=None guibg=#103040 guifg=LightSkyBlue "endif highlight NonText gui=None guibg=#062636 guifg=#6080c0 "+++ highlight Normal gui=None guibg=#103040 guifg=honeydew2 highlight Question gui=bold guifg=SeaGreen2 guibg=bg highlight Search gui=NONE guibg=LightSkyBlue4 guifg=NONE "+++ Cream: make same as NonText "highlight SpecialKey guibg=#103040 guifg=#324262 highlight SpecialKey guibg=#103040 guifg=#6080c0 "+++ highlight StatusLine gui=bold guibg=grey88 guifg=black highlight StatusLineNC gui=NONE guibg=grey60 guifg=grey10 highlight Title gui=bold guifg=MediumOrchid1 guibg=bg highlight Visual gui=reverse guibg=WHITE guifg=SeaGreen highlight VisualNOS gui=bold,underline guifg=fg guibg=bg highlight WarningMsg gui=bold guifg=FireBrick1 guibg=bg highlight WildMenu gui=bold guibg=Chartreuse guifg=Black """" Syntax Colors "+++ Cream: make comments a little better contrast "highlight Comment gui=None guifg=#507080 highlight Comment gui=None guifg=#80a0b0 "+++ highlight Constant guifg=cyan3 guibg=bg highlight String gui=None guifg=turquoise2 guibg=bg highlight Number gui=None guifg=Cyan guibg=bg highlight Boolean gui=bold guifg=Cyan guibg=bg "+++ Cream: we like version 4--it stands apart from our " lighter comment colors better "highlight Identifier guifg=LightSkyBlue3 highlight Identifier guifg=DeepSkyBlue3 "+++ highlight Function gui=None guifg=DarkSeaGreen3 guibg=bg highlight Statement gui=NONE guifg=LightGreen highlight Conditional gui=None guifg=LightGreen guibg=bg highlight Repeat gui=None guifg=SeaGreen2 guibg=bg highlight Operator gui=None guifg=Chartreuse guibg=bg highlight Keyword gui=bold guifg=LightGreen guibg=bg highlight Exception gui=bold guifg=LightGreen guibg=bg highlight PreProc guifg=SkyBlue1 highlight Include gui=None guifg=LightSteelBlue3 guibg=bg highlight Define gui=None guifg=LightSteelBlue2 guibg=bg highlight Macro gui=None guifg=LightSkyBlue3 guibg=bg highlight PreCondit gui=None guifg=LightSkyBlue2 guibg=bg highlight Type gui=NONE guifg=LightBlue highlight StorageClass gui=None guifg=LightBlue guibg=bg highlight Structure gui=None guifg=LightBlue guibg=bg highlight Typedef gui=None guifg=LightBlue guibg=bg highlight Special gui=bold guifg=aquamarine3 highlight Underlined gui=underline guifg=honeydew4 guibg=bg highlight Ignore guifg=#204050 highlight Error guifg=LightYellow guibg=FireBrick highlight Todo guifg=Cyan guibg=#507080 if v:version >= 700 highlight PMenu gui=bold guibg=LightSkyBlue4 guifg=honeydew2 highlight PMenuSel gui=bold guibg=DarkGreen guifg=honeydew2 highlight PMenuSbar gui=bold guibg=LightSkyBlue4 highlight PMenuThumb gui=bold guibg=DarkGreen highlight SpellBad gui=undercurl guisp=Red highlight SpellRare gui=undercurl guisp=Orange highlight SpellLocal gui=undercurl guisp=Orange highlight SpellCap gui=undercurl guisp=Yellow endif """ Console if v:version >= 700 highlight PMenu cterm=bold ctermbg=DarkGreen ctermfg=Gray highlight PMenuSel cterm=bold ctermbg=Yellow ctermfg=Gray highlight PMenuSbar cterm=bold ctermbg=DarkGreen highlight PMenuThumb cterm=bold ctermbg=Yellow highlight SpellBad ctermbg=Red highlight SpellRare ctermbg=Red highlight SpellLocal ctermbg=Red highlight SpellCap ctermbg=Yellow endif highlight Normal ctermfg=Gray ctermbg=None highlight Search ctermfg=Black ctermbg=Red cterm=NONE highlight Visual cterm=reverse highlight Cursor ctermfg=Black ctermbg=Green cterm=bold highlight Special ctermfg=Brown highlight Comment ctermfg=DarkGray highlight StatusLine ctermfg=Blue ctermbg=White highlight Statement ctermfg=Yellow cterm=NONE highlight Type cterm=NONE highlight Macro ctermfg=DarkRed highlight Identifier ctermfg=DarkYellow highlight Structure ctermfg=DarkGreen highlight String ctermfg=DarkCyan "+++ Cream: " statusline highlight User1 gui=BOLD guifg=#b0d0e0 guibg=Black highlight User2 gui=bold guifg=LightGreen guibg=Black highlight User3 gui=bold guifg=MediumOrchid1 guibg=Black highlight User4 gui=bold guifg=FireBrick guibg=Black " bookmarks highlight Cream_ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold gui=BOLD guifg=MediumOrchid1 guibg=#103040 " spell check highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=honeydew2 guibg=#602030 " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#406070 " email highlight EQuote1 guifg=#99cccc highlight EQuote2 guifg=#669999 highlight EQuote3 guifg=#007777 highlight Sig guifg=#80a0b0 "+++ cream-0.43/cream-lib-os.vim0000644000076400007660000002570611517300720016105 0ustar digitectlocaluser" " Filename: cream-lib-os.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License " GNU General Public License (GPL) {{{1 " " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. [ " http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA " 02111-1307, USA. " " 1}}} " Local functions {{{1 "function! s:OnMS() "" NOTE: This localized function a duplicate of that from genutils.vim. "" " return has("win32") || has("dos32") || has("win16") || has("dos16") || has("win95") "endfunction " Path and filenames {{{1 function! Cream_path_fullsystem(path, ...) " Return a completely expanded and valid path for the current system " from string {path}. " o Path does not have to exist, although generally invalid formats " will not usually be properly expanded (e.g., backslash path separators " on Unix). " o Both files and directories may be processed. (Paths will not be " returned with a trailing path separator.) " o Preserves Windows UNC server name preceding "\\". " o {optional} argument can be used to override system settings: " * "win" forces return in Windows format as possible: " - No drive letter is added (none can be assumed) " * "unix" forces return to Unix format as possible: " - Windows drive letter is not removed " " format type " forced with argument if a:0 == 1 if a:1 == "win" let format = "win" elseif a:1 == "unix" let format = "unix" endif endif " detected if not forced if !exists("format") if Cream_has("ms") let format = "win" else let format = "unix" endif endif " expand to full path let path = fnamemodify(a:path, ":p") " make Windows format (assume is Unix) if format == "win" " remove escaping of spaces let path = substitute(path, '\\ ', ' ', "g") " convert forward slashes to backslashes let path = substitute(path, '/', '\', "g") " make Unix format (assume is Windows) else "" strip drive letter "let path = substitute(path, '^\a:', '', '') " convert backslashes to forward slashes let path = substitute(path, '\', '/', "g") " escape spaces (but not twice) let path = substitute(path, '[/\\]* ', '\\ ', "g") endif " remove duplicate separators let path = substitute(path, '\\\+', '\', "g") let path = substitute(path, '/\+', '/', "g") " remove trailing separators let path = substitute(path, '[/\\]*$', '', "") " maintain Windows UNC servername if Cream_path_isunc(a:path) let path = substitute(path, '^\', '\\\\', "") let path = substitute(path, '^/', '\\\\', "") endif return path endfunction function! Cream_path_isunc(path) " Returns 1 if {path} is in Windows UNC format, 0 if not. if match(a:path, '^\\\\') != -1 || match(a:path, '^//') != -1 return 1 endif endfunction function! Cream_pathexists(path) " Returns 1 if {path} is an existing file or directory. (Ignores " ability to write or read to it, only if exists.) " if both unreadable and not a directory if !filereadable(a:path) && filewritable(a:path) != 2 return 0 else return 1 endif endfunction " Open with default app {{{1 function! Cream_file_open_defaultapp(...) " Open file {...} with OS default application. If none passed, current " file used. if a:0 == 0 " use current file let file = Cream_path_fullsystem(expand("%")) else let file = a:1 endif " GNOME2 if has("gui_gtk2") let cmd = 'silent! !gnome-open ' . escape(file, ' ') " Windows elseif Cream_has("ms") " 95/98/ME if has("win95") let cmd = 'silent! !command /c start "' . file . '"' " NT/2K/XP else " handle URLs differently (http://www.google.com) if Cream_isURL(file) " use start, don't quote let cmd = 'silent! !cmd /c start ' . file else let cmd = 'silent! !cmd /c "' . file . '"' endif endif else " no command found, exit call confirm( \ "Platform not identified, unable to open file.\n" . \ "\n", "&Ok", 1, "Info") return endif if Cream_has("ms") let myshellslash = &shellslash set noshellslash silent! execute cmd let &shellslash = myshellslash else silent! execute cmd endif return 1 endfunction " Open file explorer {{{1 "function! Cream_open_fileexplorer() "" open the OS file manager to the current file's directory " " " parse b:cream_pathfilename (respects links as opposed to " " getcwd()) " if exists("b:cream_pathfilename") " let mypath = fnamemodify(b:cream_pathfilename, ":p:h") " else " let mypath = getcwd() " endif " " call Cream_file_open_defaultapp(mypath) " "endfunction function! Cream_open_fileexplorer() " open the OS file manager to the current file's directory " parse b:cream_pathfilename (respects links as opposed to " getcwd()) if exists("b:cream_pathfilename") let mypath = fnamemodify(b:cream_pathfilename, ":p:h") else let mypath = getcwd() endif let mypath = Cream_path_fullsystem(mypath) " NOTE: On Windows XP (2008-01-07), pointing to a cmd.exe to a " directory fails to open explorer--call explorer specifically " "call Cream_file_open_defaultapp(mypath) " " GNOME2 if has("gui_gtk2") let cmd = 'silent! !gnome-open ' . escape(mypath, ' ') " Windows elseif Cream_has("ms") " 95/98/ME if has("win95") let cmd = 'silent! !command /c start "' . mypath . '"' " NT/2K/XP else "let cmd = 'silent! !cmd /c "' . mypath . '"' let cmd = 'silent! !explorer /e,"' . mypath . '"' endif endif " no command found, exit if !exists("cmd") call confirm("Platform not identified, unable to open file.\n", "&Ok", 1, "Info") return endif silent! execute cmd return 1 endfunction " File operations {{{1 "function! Cream_touch(pathfile) "" create an empty file {pathfile} "" WARNING: Will overwrite an existing file of the same name! " " " test that head exists " if !Cream_pathexists(fnamemodify(a:pathfile, ":p:h")) " call confirm( " \ "Error: Invalid path passed to Cream_touch()\n" . " \ "Touch file not created\n" . " \ "\n", "&Ok", 1, "Warning") " return -1 " endif " " " save position " if exists("$CREAM") " let mypos = Cream_pos() " endif " " silent! enew " silent! execute "saveas! " . a:pathfile " " close buffer " silent! bwipeout! " " " restore pos " if exists("$CREAM") " execute mypos " endif " "endfunction function! Cream_touch(pathfile) " create an empty file {pathfile}, prompting if it exists " test that head exists if !Cream_pathexists(fnamemodify(a:pathfile, ":p:h")) call confirm( \ "Error: Invalid path passed to Cream_touch().\n" . \ "File not created.\n" . \ "\n", "&Ok", 1, "Warning") return -1 endif if Cream_has("ms") let pathfile = fnamemodify(a:pathfile, ":p:8") else let pathfile = fnamemodify(a:pathfile, ":p") endif execute "silent! confirm 0write " . pathfile endfunction " Windows drive letters {{{1 function! Cream_windrives() " Return string listing existing drive letters on MS Windows. Each is " returned followed by a newline. if !Cream_has("ms") return "" endif let cmd = 'for %A in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %A:\CON echo %A: >nul' redir @x silent! echo system(cmd) redir END let drives = @x " remove DOS echos let drives = substitute(drives, '\u:[[:print:]]\{-1,}>if exist \u:\\CON echo \u:', '', 'g') " remove extra lines let drives = substitute(drives, '\n\n', '', 'g') " remove leading spaces let drives = substitute(drives, '^[ \r\n]\+', '', 'g') return drives endfunction " Windows Shortcut {{{1 function! Cream_make_shortcut(spath, sname, target, key, desc) " Make a windows shortcut. " " Example: " call Cream_make_shortcut( . " \ "C:\WINDOWS\Desktop", . " \ "MyShortcut", . " \ "C:\WINDOWS\notepad.exe", . " \ "Ctrl+Shift+N", . " \ "My Notepad". " \ ) " " Arguments: " o {spath} :: Path to shortcut, must exist. " o {sname} :: Name of shortcut, extension ".lnk" not required. " o {target} :: Target (exe) of shortcut (can be empty ""). " o {key} :: Keyboard shortcut, e.g. "Ctrl+Shift+N". " o {desc} :: Brief description of shortcut, can be empty. " only if on Windows if !Cream_has("ms") call confirm( \ "Only available on Windows systems.\n" . \ "\n", "&Ok", 1, "Info") endif " warn if not 9x/NT/64 if has("win95") || has("win16") || has("win32unix") let n = confirm( \ "This has not been tested on this version of Windows, continue?\n" . \ "\n", "&Ok", 1, "Info") if n != 1 return endif endif " verify a:spath has trailing slash let spath = Cream_path_addtrailingslash(a:spath) " reject if a:spath doesn't point to a real directory if filewritable(spath) != 2 let n = confirm( \ "Path for shortcut doesn't exist, unable to continue.\n" . \ "\n", "&Ok", 1, "Info") return endif " a:sname--add .lnk if doesn't exist let sname = a:sname if strpart(sname, strlen(sname)-4) !=? ".lnk" let sname = sname . ".lnk" endif " warn if a:target doesn't point to a real file if filereadable(a:target) != 1 if filewritable(a:target) == 2 let n = confirm( \ "Ok that target points to a directory?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif else let n = confirm( \ "Target does not exist, create anyway?\n" . \ "\n", "&Ok\n&Cancel", 1, "Info") if n != 1 return endif endif endif " warn if a:desc is too long if strlen(a:desc) > 200 let n = confirm( \ "Description is too long for a tooltip, continue anyway?\n" . \ "\n", "&Ok", 1, "Info") if n != 1 return endif endif " cat valid VBS statements let @x = '' let @x = @x . 'set WshShell = WScript.CreateObject("WScript.Shell")' . "\n" let @x = @x . 'set oShortCutLink = WshShell.CreateShortcut("' . spath . '" & "' . sname . '")' . "\n" let @x = @x . 'oShortCutLink.TargetPath = "' . a:target . '"' . "\n" let @x = @x . 'oShortCutLink.WindowStyle = 1' . "\n" let @x = @x . 'oShortCutLink.Hotkey = "' . a:key . '"' . "\n" let @x = @x . 'oShortCutLink.Description = "' . a:desc . '"' . "\n" let @x = @x . 'oShortCutLink.Save' . "\n" " write as temp VBS file call Cream_file_new() put x let fname = tempname() . ".vbs" execute "saveas " . fname " run call Cream_file_open_defaultapp() " close it silent bwipeout! " delete file call delete(fname) " verify .lnk made if !filereadable(spath . sname) call confirm( \ "Error: Shortcut not made.\n" . \ "\n", "&Ok", 1, "Info") endif endfunction " 1}}} " vim:foldmethod=marker cream-0.43/multvals.vim0000644000076400007660000017311111156572442015507 0ustar digitectlocaluser" multvals.vim -- Array operations on Vim multi-values, or just another array. " Author: Hari Krishna Dara (hari_vim at yahoo dot com) " Last Modified: 26-Oct-2004 @ 19:03 " Requires: Vim-6.0, genutils.vim(1.2) for sorting support. " Version: 3.10.0 " Acknowledgements: " - MvRemoveElementAll was contributed by Steve Hall " "digitect at mindspring dot com" " - Misc. contributions of script or ideas by " - Naveen Chandra (Naveen dot Chandra at Sun dot COM) " - Thomas Link (t dot link02a at gmx dot net) " Licence: This program is free software; you can redistribute it and/or " modify it under the terms of the GNU General Public License. " See http://www.gnu.org/copyleft/gpl.txt " Download From: " http://www.vim.org/script.php?script_id=171 " Summary Of Features: {{{1 " The types in prototypes of the functions mimic Java. " Writer Functions: " All the writer functions return the new array after modifications. " String MvAddElement(String array, String sep, String ele, ...) " String MvInsertElementAt(String array, String sep, String ele, int ind, ...) " String MvRemoveElement(String array, String sep, String ele, ...) " String MvRemovePattern(String array, String sep, String pat, ...) " String MvRemoveElementAt(String array, String sep, int ind, ...) " String MvRemoveElementAll(String array, String sep, String ele, ...) " String MvRemovePatternAll(String array, String sep, String pat, ...) " String MvReplaceElementAt(String array, String sep, String ele, int ind, ...) " String MvPushToFront(String array, String sep, String ele, ...) " String MvPushToFrontElementAt(String array, String sep, int ind, ...) " String MvPullToBack(String array, String sep, String ele, ...) " String MvPullToBackElementAt(String array, String sep, int ind, ...) " String MvRotateLeftAt(String array, String sep, int ind, ...) " String MvRotateRightAt(String array, String sep, int ind, ...) " String MvSwapElementsAt(String array, String sep, int ind1, int ind2, " ...) " String MvQSortElements(String array, String sep, String cmp, int dir, ...) " String MvBISortElements(String array, String sep, String cmp, int dir, ...) " " Reader Functions: " int MvNumberOfElements(String array, String sep, ...) " int MvStrIndexOfElement(String array, String sep, String ele, ...) " int MvStrIndexOfPattern(String array, String sep, String pat, ...) " int MvStrIndexAfterElement(String array, String sep, String ele, ...) " int MvStrIndexAfterPattern(String array, String sep, String pat, ...) " int MvStrIndexOfElementAt(String array, String sep, int ind, ...) " int MvIndexOfElement(String array, String sep, int ind, ...) " int MvIndexOfPattern(String array, String sep, String pat, ...) " boolean MvContainsElement(String array, String sep, String ele, ...) " boolean MvContainsPattern(String array, String sep, String pat, ...) " String MvElementAt(String array, String sep, int ind, ...) " String MvElementLike(String array, String sep, String pat, ...) " String MvLastElement(String array, String sep, ...) " void MvIterCreate(String array, String sep, Sring iterName, ...) " void MvIterDestroy(String iterName) " boolean MvIterHasNext(String iterName) " String MvIterNext(String iterName) " String MvIterPeek(String iterName) " int MvCmpByPosition(String array, String sep, String ele, String " ele2, int dir, ...) " String MvPromptForElement(String array, String sep, String def, " String prompt, String skip, int useDialog, ...) " String MvPromptForElement2(String array, String sep, String def, " String prompt, String skip, int useDialog, " int nCols, ...) " int MvGetSelectedIndex() " String MvNumSearchNext(String array, String sep, String ele, int dir, ...) " " Utility Functions: " This function creates a pattern that avoids protected comma's from " getting treated as separators. The argument goes directly into the [] " atom, so make sure you pass in a valid string. " String MvCrUnProtectedCharsPattern(String sepChars) " " Usage: {{{1 " - An array is nothing but a string of multiple values separated by a " pattern. The simplest example being Vim's multi-value variables such as " tags. You can use the MvAddElement() function to create an array. " However, there is nothing special about this function, you can as well " make up the string by simply concatinating elements with the chosen " pattern as a separator. " - The separator can be any regular expression (which means that if you " want to use regex metacharacters in a non-regex pattern, then you need " to protect the metacharacters with backslashes). However, if a regular " expression is used as a separtor, you need to pass in a second separator, " which is a plain string that guarantees to match the separator regular " expression, as an additional argument (which was not the case with " earlier versions). When the array needs to be modified (which is " internally done by some of the reader functions also) this sample " separator is used to preserve the integrity of the array. " - If you for example want to go over the words in a sentence, then an easy " way would be to treat the sentence as an array with '\s\+' as a " separator pattern. Be sure not to have zero-width expressions in the " pattern as these could confuse the plugin. " - Suggested usage to go over the elements is to use the iterater functions " as shows in the below example " Ex Usage: " call MvIterCreate(&tags, MvCrUnProtectedCharsPattern(','), 'Tags', ',') " while MvIterHasNext('Tags') " call input('Next element: ' . MvIterNext('Tags')) " endwhile " call MvIterDestroy('Tags') " " ALMOST ALL OPERATIONS TAKE THE ARRAY AND THE SEPARATOR AS THE FIRST TWO " ARGUMENTS. " All element-indexes start from 0 (like in C++ or Java). " All string-indexes start from 0 (as it is for Vim built-in functions). " " ChangeLog: {{{1 " Changes in 3.10: " - New function MvBISortElements. " Changes in 3.9: " - The MvIterPeek function was marked script local, I guess a typo. " Changes in 3.8: " - Fixed bugs in the *StrIndex* functions, such that when the element is " not found, they always return the contracted -1 (instead of any -ve " value). This will fix problems with a number of other functions that " depend on them (such as MvPushToFront reported by Thomas Link). " Changes in 3.6: " - Changed MvNumberOfElements() to use "\r" as the temporary replacement " character instead of "x" which was more likely to occur at the end of " the array. The "\r" character rarely appears in Vim strings (they are " always stripped off while copying from the buffer). " - A new utility function MvCrUnProtectedCharsPattern(). " Changes in 3.5: " CAUTION: This version potentially introduces an incompatibility with that " of older versions because of the below change. If your plugin depended on " this undocumented behavior you will have to update your plugin immediately " to work with the new plugin. Even if you didn't know about behavior, it is " still better to check if your plugin accidentally depended on this. " - Now the plugin ignores the 'ignorecase' and 'smartcase' settings, so the " results are more consistent. This I think is the right thing to do for a " library. " - New function MvIterPeek. " Changes in 3.4: " - The plugin was not working correctly when there are *'s in the array. " - New function MvRemovePatternAll " - g:loaded_multvals now contains the version number for dependency cheking " (see ":help v:version" for format) " - Added prototypes for the functions in the header as per the suggestion " of Naveen Chandra. " Changes in 3.3: " - New functions MvRemoveElementAll, MvElementLike, MvGetSelectedIndex " Changes in 3.2: " - New function MvNumSearchNext. " Changes in 3.0: " - All functions can now be used with regular expressions as patterns. " - There is an API change. All functions now require a sample regular " separator to be passed in when using a regular expression as a separator " string. There is no impact if you don't use regular expressions as " separators. " - Some of the functions now have a variant that take a regex pattern " instead of an existing element. " - Fixed a bug in MvPromptForElement that was introduced in the previous " change, that sometimes ignores the last line in the prompt string. " Changes in 2.3: " - A variant of MvPromptForElement to specify the number of columns that " you want the elements to be formatted in. " - New functions MvQSortElements() and MvSwapElementsAt() " - Worked-around a bug in vim that effects MvElementAt() for last element " in a large array. " Changes in 2.1.1: " - Now all the operations work correctly with elements that have special " chars in them. " Changes in 2.1.0: " - Improved the read-only operations to work with regular expressions as " patterns. " Changes in 2.0.3: " - Fixed bugs in MvStrIndexOfElement(), MvIterHasNext() and MvCmpByPosition() " Changes in 2.0.3: " - New functions were added. " - The order of arguments for MvIterCreate has been changed for the sake of " consistency. " - Prefixed all the global functions with "Mv" to avoid global name " conflicts. " " TODO: {{{1 " - Add a utility function to strip the last separator out (Thomas Link). " - Why is MvElementAt('a\|b\\|c|d', '\\\@, '|') not " working as expected (MvNumberOfElements reports correctly)? " - More testing is required for regular expressions as separators. " - Some performance improvement should be possible in: MvElementAt, " MvSwapElementsAt, MvQSortElements, MvPushToFront (and friends), " MvRemoveElementAll. " - When regex is used as a separtor I should be careful in cases when I " prefix the array with an extra separator. If the first element of the " array is an empty element, and if the regex is sensitive to the " repetitiveness of any characters (such as ,, instead of ,), " the algorithm can get confused (e.g., MvStrIndexOfElementImpl). E.g., " using \%(^,,\|,\) as pattern for 'path' causes trouble when the first " element is empty element (indicating the current directory). " 1}}} if exists('loaded_multvals') finish endif if v:version < 600 echomsg 'multvals: You need at least Vim 6.0' finish endif let loaded_multvals = 310 " Make sure line-continuations won't cause any problem. This will be restored " at the end let s:save_cpo = &cpo set cpo&vim function! s:MyScriptId() map xx xx let s:sid = maparg("xx") unmap xx return substitute(s:sid, "xx$", "", "") endfunction let s:myScriptId = s:MyScriptId() delfunction s:MyScriptId " Writer functions {{{ " Adds an element and returns the new array. " Params: " ele - Element to be added to the array. " Returns: " the new array. function! MvAddElement(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = s:EnsureTrailingSeparator(a:array, a:sep, sep) return array . a:ele . sep endfunction " Insert the element before index and return the new array. Index starts from 0. " Params: " ele - Element to be inserted into the array. " index - The index before which the element should be inserted. " Returns: " the new array. function! MvInsertElementAt(array, sep, ele, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = s:EnsureTrailingSeparator(a:array, a:sep, sep) if a:index == 0 return a:ele . sep . array else let strIndex = MvStrIndexOfElementAt(array, a:sep, a:index, sep) if strIndex < 0 return array endif let sub1 = strpart(array, 0, strIndex) let sub2 = strpart(array, strIndex, strlen(array)) return sub1 . a:ele . sep . sub2 endif endfunction " Removes the element and returns the new array. " Params: " ele - Element to be removed from the array. " Returns: " the new array. function! MvRemoveElement(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvRemoveElementImpl(a:array, a:sep, a:ele, 0, sep) endfunction " Same as MvRemoveElement, except that a regex pattern can be used as a " element instead of a constant string. function! MvRemovePattern(array, sep, pat, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvRemoveElementImpl(a:array, a:sep, a:pat, 1, sep) endfunction function! s:MvRemoveElementImpl(array, sep, ele, asPattern, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = s:EnsureTrailingSeparator(a:array, a:sep, sep) if a:asPattern let strIndex = MvStrIndexOfPattern(array, a:sep, a:ele, sep) let strAfterIndex = MvStrIndexAfterPattern(array, a:sep, a:ele, sep) else let strIndex = MvStrIndexOfElement(array, a:sep, a:ele, sep) let strAfterIndex = MvStrIndexAfterElement(array, a:sep, a:ele, sep) endif " First remove this element. if strIndex != -1 let sub = strpart(array, 0, strIndex) let sub = sub . strpart(array, strAfterIndex, strlen(array)) else let sub = array endif return sub endfunction " Remove the element at index. Index starts from 0. " Params: " index - The index of the element that needs to be removed. " Returns: " the new array. function! MvRemoveElementAt(array, sep, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 let ele = MvElementAt(a:array, a:sep, a:index, sep) return MvRemoveElement(a:array, a:sep, ele, sep) endfunction " Remove the all occurances of element in array. " Contributed by Steve Hall "digitect at mindspring dot com" " Params: " ele - Element to be removed from the array. " Returns: " the new array. function! MvRemoveElementAll(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = a:array while 1 let ar = array let array = MvRemoveElement(array, a:sep, a:ele, sep) if ar ==# array break endif endwhile return array endfunction " Remove the all occurances of elements matching given pattern in array. " Params: " pat - Elements matching pattern to be removed from the array. " Returns: " the new array. function! MvRemovePatternAll(array, sep, pat, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = a:array while 1 let ar = array let array = MvRemovePattern(array, a:sep, a:pat, sep) if ar ==# array break endif endwhile return array endfunction " Replace the element at index with element " Contributed by Steve Hall " Params: " ele - The new element to replace in the array. " index - The index of the element that needs to be replaced. " Returns: " the new array. function! MvReplaceElementAt(array, sep, ele, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 " insert element let array = MvInsertElementAt(a:array, a:sep, a:ele, a:index, sep) " remove element following let array = MvRemoveElementAt(array, a:sep, a:index + 1, sep) return array endfunction " Rotates the array such that the element at index is on the left (the first). " Params: " index - The index of the element that needs to be rotated. " Returns: " the new array. function! MvRotateLeftAt(array, sep, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 if a:index <= 0 " If index is 0, there is nothing that needs to be done. return a:array endif let array = s:EnsureTrailingSeparator(a:array, a:sep, sep) let strIndex = MvStrIndexOfElementAt(array, a:sep, a:index, sep) if strIndex < 0 return array endif return strpart(array, strIndex) . strpart(array, 0, strIndex) endfunction " Rotates the array such that the element at index is on the right (the last). " Params: " index - The index of the element that needs to be rotated. " Returns: " the new array. function! MvRotateRightAt(array, sep, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 if a:index < 0 return a:array endif let array = s:EnsureTrailingSeparator(a:array, a:sep, sep) let strIndex = MvStrIndexOfElementAt(array, a:sep, a:index + 1, sep) if strIndex < 0 return array endif return strpart(array, strIndex) . strpart(array, 0, strIndex) endfunction " Moves the element to the front of the array. Useful for maintaining an MRU " list. Even if the element doesn't exist in the array, it is still added to " the front of the array. See selectbuf.vim at vim.sf.net for an example " usage. " Params: " ele - Element that needs to be pushed to the front. " Returns: " the new array. function! MvPushToFront(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = MvRemoveElement(a:array, a:sep, a:ele, sep) let array = a:ele . sep . array return array endfunction " Moves the element at the specified index to the front of the array. Useful " for maintaining an MRU list. Even if the element doesn't exist in the array, " it is still added to the front of the array. See selectbuf.vim at vim.sf.net " for an example usage. " Params: " index - Index of the element that needs to moved to the front of the array. " Returns: " the new array. function! MvPushToFrontElementAt(array, sep, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 let ele = MvElementAt(a:array, a:sep, a:index, sep) return MvPushToFront(a:array, a:sep, ele, sep) endfunction " Moves the element to the back of the array. Even if the element doesn't exist " in the array, it is still added to the back of the array. " Params: " ele - Element that needs to be pulled to the back. " Returns: " the new array. function! MvPullToBack(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = s:EnsureTrailingSeparator( \ MvRemoveElement(a:array, a:sep, a:ele, sep), a:sep, sep) let array = array . a:ele . sep return array endfunction " Moves the element at the specified index to the back of the array. Even if " the element doesn't exist in the array, it is still added to the back of " the array. " Params: " index - Index of the element that needs to moved to the back of the array. " Returns: " the new array. function! MvPullToBackElementAt(array, sep, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 let ele = MvElementAt(a:array, a:sep, a:index, sep) return MvPullToBack(a:array, a:sep, ele, sep) endfunction " Swaps the elements at the specified indexes. " Params: " index1 - index of one of the elements. " index2 - index of the other element. " Returns: " the new array with swapped elements. function! MvSwapElementsAt(array, sep, index1, index2, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = s:EnsureTrailingSeparator(a:array, a:sep, sep) if a:index1 == a:index2 return array endif if a:index1 > a:index2 let index1 = a:index2 let index2 = a:index1 else let index1 = a:index1 let index2 = a:index2 endif let ele1 = MvElementAt(a:array, a:sep, index1, sep) let ele2 = MvElementAt(a:array, a:sep, index2, sep) let array = MvRemoveElement(a:array, a:sep, ele1, sep) let array = MvRemoveElement(array, a:sep, ele2, sep) if index1 >= MvNumberOfElements(array, a:sep, sep) let array = MvAddElement(array, a:sep, ele2, sep) else let array = MvInsertElementAt(array, a:sep, ele2, index1, sep) endif if index2 >= MvNumberOfElements(array, a:sep, sep) let array = MvAddElement(array, a:sep, ele1, sep) else let array = MvInsertElementAt(array, a:sep, ele1, index2, sep) endif return array endfunction " Sorts the elements in the array using the given comparator and in the given " direction using quick sort algorithm. " Ex: " The following sorts the numbers in descending order using the bundled number " comparator (see genutils.vim). " " echo MvQSortElements('3,4,2,5,7,1,6', ',', 'CmpByNumber', -1) " " The following sorts the alphabet in ascending order again using the " bundled string comparator (see genutils.vim). " " echo MvQSortElements('e,a,d,b,f,c,g', ',', 'CmpByString', 1) " " Params: " cmp - name of the comparator function. You can use the names of standard " comparators specified in the genutils.vim script, such as " 'CmpByString', or define your own (which then needs to be a global " function or if it is a script local function, prepend it with your " script id. See genutils.vim for how to get your script id and for " examples on comparator functions (if you want to write your own). " direction - 1 for asending and -1 for descending. " Returns: " The new sorted array. " See: " QSort2() function from genutils.vim function! MvQSortElements(array, sep, cmp, direction, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvSortElements(a:array, a:sep, a:cmp, a:direction, 'QSort2', \ s:myScriptId . 'SortGetElementAt', s:myScriptId . 'SortSwapElements', \ sep) endfunction " Just like MvQSortElements(), except that it uses the faster BinInsertSort2() " functions instead of the QSort2() function. function! MvBISortElements(array, sep, cmp, direction, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvSortElements(a:array, a:sep, a:cmp, a:direction, 'BinInsertSort2', \ s:myScriptId . 'SortGetElementAt', s:myScriptId . 'SortMoveElement', \ sep) endfunction function! s:MvSortElements(array, sep, cmp, direction, sortFunc, acc, wrt, \ ...) let sep = (a:0 == 0) ? a:sep : a:1 let s:arrayForSort{'array'} = a:array let s:arrayForSort{'sep'} = a:sep let s:arrayForSort{'samplesep'} = sep let nElements = MvNumberOfElements(a:array, a:sep, sep) " Create an array containing indirection indexes. let s:sortArrayIndexes = '' let i = 0 while i < nElements let s:sortArrayIndexes = s:sortArrayIndexes . i . ',' let i = i + 1 endwhile call {a:sortFunc}(1, nElements, a:cmp, a:direction, a:acc, a:wrt, '') " Finally reconstruct the array from the sorted indexes. let array = '' let nextEle = '' call MvIterCreate(s:sortArrayIndexes, ',', 'MvSortElements', sep) while MvIterHasNext('MvSortElements') let nextEle = MvElementAt(a:array, a:sep, MvIterNext('MvSortElements'), \ sep) let array = MvAddElement(array, sep, nextEle) endwhile call MvIterDestroy('MvSortElements') return array endfunction function! s:SortGetElementAt(index, context) let index = MvElementAt(s:sortArrayIndexes, ',', a:index - 1) return MvElementAt(s:arrayForSort{'array'}, s:arrayForSort{'sep'}, index, \ s:arrayForSort{'samplesep'}) endfunction function! s:SortSwapElements(index1, index2, context) let s:sortArrayIndexes = MvSwapElementsAt(s:sortArrayIndexes, ',', \ a:index1 - 1, a:index2 - 1) endfunction function! s:SortMoveElement(from, to, context) let ele = MvElementAt(s:sortArrayIndexes, ',', a:from - 1) let s:sortArrayIndexes = MvRemoveElementAt(s:sortArrayIndexes, ',', a:from - 1) let s:sortArrayIndexes = MvInsertElementAt(s:sortArrayIndexes, ',', ele, \ a:to) endfunction " Writer functions }}} " Reader functions {{{ " Functions that are at the bottom of the stack, these don't use others {{{ " Returns the number of elements in the array. " Returns: " the number of elements that are present in the array. function! MvNumberOfElements(array, sep, ...) let array = a:array let pat = '\%(.\)\{-}\%(' . a:sep . '\)\{-1\}' " FIXME: Choosing "\r" because it is pretty rare to find it in Vim strings " (doesn't appear unless directly assigned). " Replace all the elements and the following separator with "\r" and count " the number of "\r"s. If the last one isn't followed by a separator, it will " not be replaced with an "\r". let replChar = "\r" let mod = substitute(array, pat, replChar, 'g') if strridx(mod, replChar) != (strlen(mod) - 1) let nElements = strlen(s:Matchstr(mod, '^'.replChar.'*', 0)) + 1 else let nElements = strlen(mod) endif return nElements endfunction " Returns the string-index of the element in the array, which can be used with " string manipulation functions such as strpart(). " Params: " ele - Element whose string-index is to be found. " Returns: " the string index of the element, starts from 0. function! MvStrIndexOfElement(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvStrIndexOfElementImpl(a:array, a:sep, a:ele, 0, sep) endfunction " Same as MvStrIndexOfElement, except that a regex pattern can be used as " element instead of a constant string. function! MvStrIndexOfPattern(array, sep, pat, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvStrIndexOfElementImpl(a:array, a:sep, a:pat, 1, sep) endfunction function! s:MvStrIndexOfElementImpl(array, sep, ele, asPattern, ...) let sep = (a:0 == 0) ? a:sep : a:1 if a:asPattern let ele = a:ele else let ele = s:Escape(a:ele) endif let array = sep . s:EnsureTrailingSeparator(a:array, a:sep, sep) let sub = s:Matchstr(array, a:sep . ele . a:sep, 0) let idx = stridx(array, sub) + strlen(s:Matchstr(sub, '^' . a:sep, 0)) - \ strlen(sep) return idx < 0 ? -1 : idx endfunction " Returns the index after the element. " Params: " ele - Element after which the index needs to be found. " Returns: " the string index after the element including the separator. Starts from 0. " Returns -1 if there is no such element. Returns one more than the last " char if it is the last element (like matchend()). function! MvStrIndexAfterElement(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvStrIndexAfterElementImpl(a:array, a:sep, a:ele, 0, sep) endfunction " Same as MvStrIndexAfterElement, except that a regex pattern can be used " as element instead of a constant string. function! MvStrIndexAfterPattern(array, sep, pat, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvStrIndexAfterElementImpl(a:array, a:sep, a:pat, 1, sep) endfunction function! s:MvStrIndexAfterElementImpl(array, sep, ele, asPattern, ...) let sep = (a:0 == 0) ? a:sep : a:1 if a:asPattern let ele = a:ele else let ele = s:Escape(a:ele) endif let array = sep . s:EnsureTrailingSeparator(a:array, a:sep, sep) let index = s:Matchend(array, a:sep . ele . a:sep, 0) if index == strlen(array) && ! s:HasTrailingSeparator(a:array, a:sep) let index = index - strlen(sep) endif if index >= 0 let index = index - strlen(sep) else let index = -1 endif return index endfunction " Returns the last element in the array. " Returns: " the last element in the array. function! MvLastElement(array, sep, ...) let sep = (a:0 == 0) ? a:sep : a:1 " Remove the last separator. let array = a:array let lastSepIndx = s:Match(a:array, a:sep . '$', 0) if lastSepIndx != -1 let array = strpart(a:array, 0, lastSepIndx) endif let pat = '\%(.\)\{-}\%(' . a:sep . '\)\{-1\}' " Remove the last element but everything else. return substitute(array, pat, '', 'g') endfunction " Functions that are at the bottom of the stack }}} " Returns the string-index of the element present at element-index, which can " be used with string manipulation functions such as strpart(). " Params: " index - Index of the element whose string-index needs to be found. " Returns: " the string index of the element, starts from 0. function! MvStrIndexOfElementAt(array, sep, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 if a:index < 0 return -1 elseif a:index == 0 return 0 endif let prevEle = MvElementAt(a:array, a:sep, a:index - 1, sep) return MvStrIndexAfterElement(a:array, a:sep, prevEle, sep) endfunction " Returns the element-index of the element in the array, which can be used with " other functions that accept element-index such as MvInsertElementAt, " MvRemoveElementAt etc. " Params: " ele - Element whose element-index is to be found. " Returns: " the element-index of the element, starts from 0. function! MvIndexOfElement(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvIndexOfElementImpl(a:array, a:sep, a:ele, 0, sep) endfunction " Same as MvIndexOfElement, except that a regex pattern can be used as element " instead of a constant string. function! MvIndexOfPattern(array, sep, pat, ...) let sep = (a:0 == 0) ? a:sep : a:1 return s:MvIndexOfElementImpl(a:array, a:sep, a:pat, 1, sep) endfunction function! s:MvIndexOfElementImpl(array, sep, ele, asPattern, ...) let sep = (a:0 == 0) ? a:sep : a:1 if a:asPattern let strIndex = MvStrIndexOfPattern(a:array, a:sep, a:ele, sep) else let strIndex = MvStrIndexOfElement(a:array, a:sep, a:ele, sep) endif if strIndex < 0 return -1 endif let sub = strpart(a:array, 0, strIndex) return MvNumberOfElements(sub, a:sep, sep) endfunction " Returns 1 (for true) if the element is contained in the array and 0 (for " false) if not. " Params: " ele - Element that needs to be tested for. " Returns: " 1 if element is contained and 0 if not. function! MvContainsElement(array, sep, ele, ...) let sep = (a:0 == 0) ? a:sep : a:1 if MvStrIndexOfElement(a:array, a:sep, a:ele, sep) >= 0 return 1 else return 0 endif endfunction " Same as MvContainsElement, except that a regex pattern can be used as " element instead of a constant string. function! MvContainsPattern(array, sep, pat, ...) let sep = (a:0 == 0) ? a:sep : a:1 if MvStrIndexOfPattern(a:array, a:sep, a:pat, sep) >= 0 return 1 else return 0 endif endfunction " Returns the index'th element in the array. The index starts from 0. " Inspired by the posts in the vimdev mailing list, by Charles E. Campbell & " Zdenek Sekera. " Params: " index - Index at which the element needs to be found. " Returns: " the element at the given index. function! MvElementAt(array, sep, index, ...) let sep = (a:0 == 0) ? a:sep : a:1 if a:index < 0 return "" endif let index = a:index + 1 let array = a:array let nElements = MvNumberOfElements(array, a:sep, sep) if index > nElements return "" endif let sub = "" if nElements == 1 if ! s:HasTrailingSeparator(array, a:sep) let sub = array else let sub = strpart(array, 0, \ (strlen(array) - strlen(s:Matchstr(array, a:sep, 0)))) endif " Work-around for vim taking too long for last element, if the string is " huge. elseif index > 1 && index == nElements " Last element. " Extract upto the previous element. let pat1 = '\(\(.\{-}' . a:sep . '\)\{' . (index - 1) . '}\).*$' let sub1 = substitute(array, pat1, '\1','') if strlen(sub1) != 0 let sub2 = strpart(array, strlen(sub1)) if strlen(sub2) != 0 let ind = s:Match(sub2, a:sep, 0) if ind == -1 let sub = sub2 else let sub = strpart(sub2, 0, ind) endif endif endif else let pat1 = '\(\(.\{-}' . a:sep . '\)\{' . index . '}\).*$' " Extract upto this element. let sub1 = substitute(array, pat1, '\1','') if strlen(sub1) != 0 && index > 1 let pat2 = '\(\(.\{-}' . a:sep . '\)\{' . (index - 1) . '}\).*$' " Extract upto the previous element. let sub2 = substitute(sub1, pat2, '\1','') if strlen(sub2) != 0 let sub3 = strpart(sub1, strlen(sub2)) if s:HasTrailingSeparator(sub3, a:sep) let sub = strpart(sub3, 0, \ (strlen(sub3) - strlen(s:Matchstr(sub3, a:sep, 0)))) else let sub = sub3 endif endif else let sub = strpart(sub1, 0, \ (strlen(sub1) - strlen(s:Matchstr(sub1, a:sep, 0)))) endif endif return sub endfunction function! MvElementLike(array, sep, pat, ...) let sep = (a:0 == 0) ? a:sep : a:1 let array = sep . s:EnsureTrailingSeparator(a:array, a:sep, sep) let str = s:Matchstr(array, a:sep.'\zs'.a:pat.'\ze'.a:sep, 0) return str endfunction " Creates a new iterator with the given name. This can be passed to " MvIterHasNext() and MvIterNext() to iterate over elements. Call " MvIterDestroy() to remove the space occupied by this iterator. " Do not modify the array while using the iterator. " Params: " iterName - A unique name that is used to identify this iterator. The " storage is alloted in the plugin's name space, so it is " important to make sure that you pass in a unique name that is " unlikely to collide with other callers. function! MvIterCreate(array, sep, iterName, ...) let sep = (a:0 == 0) ? a:sep : a:1 let s:{a:iterName}_array = a:array let s:{a:iterName}_sep = a:sep let s:{a:iterName}_samplesep = sep let s:{a:iterName}_max = MvNumberOfElements(a:array, a:sep, sep) let s:{a:iterName}_curIndex = 0 endfunction " Deallocates the space occupied by this iterator. " Params: " iterName - The name of the iterator to be destroyed that was previously " created using MvIterCreate. function! MvIterDestroy(iterName) unlet s:{a:iterName}_array unlet s:{a:iterName}_sep unlet s:{a:iterName}_samplesep unlet s:{a:iterName}_max unlet s:{a:iterName}_curIndex endfunction " Indicates if there are more elements in this array to be iterated. Always " call this before calling MvIterNext(). " Do not modify the array while using the iterator. " Params: " iterName - The name of the iterator that was previously created using " MvIterCreate. " Returns: " 1 (for true) if has more elements or 0 (for false). function! MvIterHasNext(iterName) if ! exists("s:{a:iterName}_curIndex") return 0 endif if s:{a:iterName}_max == 0 return 0 endif if s:{a:iterName}_curIndex < s:{a:iterName}_max return 1 else return 0 endif endfunction " Returns next value or "" if none. You should always call MvIterHasNext() " before calling this function. " Do not modify the array while using the iterator. " Params: " iterName - The name of the iterator that was previously created using " MvIterCreate. " Returns: " the next element in the iterator (array). function! MvIterNext(iterName) return s:MvIterNext(a:iterName, 0) endfunction function! MvIterPeek(iterName) return s:MvIterNext(a:iterName, 1) endfunction function! s:MvIterNext(iterName, peek) if ! exists("s:{a:iterName}_curIndex") return "" endif let curIndex = s:{a:iterName}_curIndex let array = s:{a:iterName}_array let sep = s:{a:iterName}_sep let samplesep = s:{a:iterName}_samplesep if curIndex >= 0 let ele = MvElementAt(array, sep, curIndex, samplesep) if ! a:peek let s:{a:iterName}_curIndex = (curIndex + 1) endif else let ele = "" endif return ele endfunction " Compares two elements based on the order of their appearance in the array. " Useful for sorting based on an MRU listing. " Params: " ele1 - first element to be compared by position. " ele2 - second element to be compared by position. " direction - the direction of sort, used for determining the return value. " Returns: " direction if ele2 comes before ele1 (for no swap), and 0 or -direction " otherwise (for swap). function! MvCmpByPosition(array, sep, ele1, ele2, direction, ...) let strIndex1 = MvStrIndexOfElement(a:array, a:sep, a:ele1) let strIndex2 = MvStrIndexOfElement(a:array, a:sep, a:ele2) if (strIndex1 == -1) && (strIndex2 != -1) let strIndex1 = strIndex2 + a:direction elseif (strIndex1 != -1) && (strIndex2 == -1) let strIndex2 = strIndex1 + a:direction endif if strIndex1 < strIndex2 return -a:direction elseif strIndex1 > strIndex2 return a:direction else return 0 endif endfunction " Function to prompt user for an element out of the passed in array. The " user will be prompted with a list of choices to make. The elements are " formatted in a single column with a number prefixed to them. User can " then enter the numer of the element to indicate the selection. Take a " look at the selectbuf.vim script(:SBS command) at vim.sf.net for an " example usage. " Params: " default - The default value for the selection. Default can be the " element-index or the element itself. If number, it is always " treated as an index, so if the elements are composed of " numbers themselves, then you need to compute the index before " calling this function. " msg - The message that should appear in the prompt (passed to input()). " skip - The element that needs to be skipped from selection (pass a " non-existent element to disable this, such as an empty value ''). " useDialog - if true, uses dialogs for prompts, instead of the command-line( " inputdialog() instead of input()). But personally, I don't " like this because the power user then can't use the " expression register. " Returns: " the selected element or empty string, "" if nothing is selected. " function! MvPromptForElement(array, sep, default, msg, skip, useDialog, ...) let sep = (a:0 == 0) ? a:sep : a:1 return MvPromptForElement2(a:array, a:sep, a:default, a:msg, a:skip, \ a:useDialog, 1, sep) endfunction " Same as above MvPromptForElement, except that a regex pattern can be used " as element instead of a constant string. function! MvPromptForElement2(array, sep, default, msg, skip, useDialog, nCols, \ ...) let sep = (a:0 == 0) ? a:sep : a:1 let nCols = a:nCols let index = 0 let line = "" let element = "" let optionsMsg = "" let colWidth = &columns / nCols - 1 " Leave a margin of one column as a gap. let curCol = 1 let nElements = MvNumberOfElements(a:array, a:sep, sep) let newArray = "" " Without the skip element. if MvContainsElement(a:array, a:sep, a:skip, sep) let nElements = nElements - 1 endif call MvIterCreate(a:array, a:sep, "MvPromptForElement", sep) while MvIterHasNext("MvPromptForElement") let element = MvIterNext("MvPromptForElement") if element ==# a:skip continue endif let newArray = newArray . element . sep let element = strpart(index." ", 0, 4) . element let eleColWidth = (strlen(element) - 1) / colWidth + 1 " Fill up the spacer for the rest of the partial column. let element = element . s:Spacer( \ eleColWidth * (colWidth + 1) - strlen(element) - 1) let wouldBeLength = strlen(line) + strlen(element) + 1 if wouldBeLength > (curCol * (colWidth + eleColWidth)) && \ wouldBeLength > &columns let splitLine = 2 " Split before adding the new element. elseif curCol == nCols let splitLine = 1 " Split after adding the new element. else let splitLine = 0 endif if splitLine == 2 if strlen(line) == &columns " Remove the last space as it otherwise results in an extra empty line " on the screen. let line = strpart(line, 0, strlen(line) - 1) endif let optionsMsg = optionsMsg . line . "\n" let line = element . ' ' let curCol = strlen(element) / (colWidth + 1) else let line = line . element . ' ' if splitLine == 1 if strlen(line) == &columns " Remove the last space as it otherwise results in an extra empty line " on the screen. let line = strpart(line, 0, strlen(line) - 1) endif let curCol = 0 " Reset col count. let optionsMsg = optionsMsg . line . "\n" let line = "" endif endif let curCol = curCol + 1 let index = index + 1 endwhile " Finally if there is anything left in line, then append that too. if line.'' != '' let optionsMsg = optionsMsg . line . "\n" let line = "" endif call MvIterDestroy("MvPromptForElement") let default = '' if s:Match(a:default, '^\d\+$', 0) != -1 let default = a:default + 0 elseif a:default.'' != '' let default = MvIndexOfElement(a:array, a:sep, a:default, sep) endif if a:default == -1 let default = "" endif while !exists("selectedElement") if a:useDialog let s:selection = inputdialog(optionsMsg . a:msg, default) else let s:selection = input(optionsMsg . a:msg, default) endif if s:selection.'' == '' let selectedElement = '' let s:selection = -1 else let s:selection = (s:selection !~# '^\d\+$') ? -1 : (s:selection + 0) if s:selection >= 0 && s:selection < nElements let selectedElement = MvElementAt(newArray, sep, s:selection) else echohl ERROR | echo "\nInvalid selection, please try again" | \ echohl NONE endif endif echo "\n" endwhile return selectedElement endfunction let s:selection = -1 " Returns the index of the element selected by the user in the previous " MvPromptForElement or MvPromptForElement2 calls. Returns -1 when the user " didn't select any element (aborted the selection). This function is useful " if there are empty empty or duplicate elements in the selection. function! MvGetSelectedIndex() return s:selection endfunction " This function searches and returns the element in the given array that comes " after the given element in the given dir (1 or -1). The array is expected " to be sorted. Only those that are not regular expressions are supported as " separators. function! MvNumSearchNext(array, sep, ele, dir, ...) let nextEle = '' if a:array.'' != '' let sep = (a:0 == 0) ? a:sep : a:1 let array = s:EnsureTrailingSeparator(a:array, a:sep, sep) let firstNum = s:Matchstr(array, '^\d\+', 0) let lastNum = s:Matchstr(array, '\(\d\+\)\ze\%(' . a:sep . '\)$', 0) if a:dir > 0 && a:ele < firstNum let nextEle = firstNum elseif a:dir < 0 && a:ele > lastNum let nextEle = lastNum endif if nextEle.'' == '' let nextEle = substitute(array, \ '\(\d\+\)\%(' . a:sep . '\)\%(\(\d\+\)\%(' . a:sep . '\)\|$\)\@=', \ '\=s:GetNextInOrder(' . a:ele . ', submatch(1), submatch(2), ' . \ a:dir . ')', 'g') endif endif return nextEle endfunction " This function returns val1 or val2 as the next value of val, depending on " the direction that is passed in. This is to be used mainly by the " substitute in s:NextBrkPt() function. function! s:GetNextInOrder(val, val1, val2, dir) if a:dir > 0 if a:val1 <= a:val && a:val < a:val2 return a:val2 endif else if a:val2 >= a:val && a:val > a:val1 return a:val1 endif endif return '' endfunction " Reader functions }}} " Utility functions {{{ let s:UNPROTECTED_CHAR_PRFX = '\%(\%([^\\]\|^\)\\\%(\\\\\)*\)\@ 1 let sep = '['.sep.']' endif return regex.sep endfunction " Make sure the array ha a trailing separator, returns the new array. function! s:EnsureTrailingSeparator(array, sep, ...) let sep = (a:0 == 0) ? a:sep : a:1 if strlen(a:array) == 0 return a:array endif let exists = 1 if ! s:HasTrailingSeparator(a:array, a:sep) let array = a:array . sep else let array = a:array endif return array endfunction function! s:HasTrailingSeparator(array, sep) return s:Match(a:array, a:sep . '$', 0) != -1 endfunction function! s:IsRegularExpression(str) return s:Match(a:str, '[.\\[\]{}*^$~]', 0) != -1 endfunction function! s:Escape(str) "return escape(a:str, "\\.[^$~*") " Use 'very nomagic' to avoid the special characters from being treated " specially (Thomas Link), instead of escaping them. return '\V'.escape(a:str, "\\").'\m' endfunction function! s:Spacer(width) return strpart(" ", \ 0, a:width) endfunction function! s:Match(expr, pat, start) return s:ExecMatchFunc('match', -1, a:expr, a:pat, a:start) endfunction function! s:Matchend(expr, pat, start) return s:ExecMatchFunc('matchend', -1, a:expr, a:pat, a:start) endfunction function! s:Matchstr(expr, pat, start) return s:ExecMatchFunc('matchstr', '', a:expr, a:pat, a:start) endfunction " Always match() with 'ignorecase' and 'smartcase' off. function! s:ExecMatchFunc(funcName, def, expr, pat, start) let _ic = &ignorecase let _scs = &smartcase let result = a:def "try set noignorecase set nosmartcase exec 'let result = '.a:funcName.'(a:expr, a:pat, a:start)' "finally let &ignorecase = _ic let &smartcase = _scs "endtry return result endfunction " Utility functions }}} " Testing {{{ "function! s:Assert(actual, expected, msg) " if a:actual !=# a:expected " call input("Failed: " . a:msg. ": actual: " . a:actual . " expected: " . a:expected) " endif "endfunction " "function! MvTestPrintAllWithIter(array, sep) " let elementCount = 0 " call MvIterCreate(a:array, a:sep, "MyIter") " while MvIterHasNext("MyIter") " call s:Assert(MvIterNext("MyIter"), elementCount+1, "MvIterNext with array: " . a:array . " and sep: " . a:sep . " for " . (elementCount+1)) " let elementCount = elementCount + 1 " endwhile " call MvIterDestroy("MyIter") "endfunction " "function! MvRunTests() " call MvTestPrintAllWithIter('1,,2,,3,,4,,', ',,') " call MvTestPrintAllWithIter('1,,2,,3,,4', ',,') " " " " " First test the read-only operations. " " " call s:Assert(MvStrIndexOfElement('1,,2,,3,,4,,', ',,', '3'), 6, 'MvStrIndexOfElement with array: 1,,2,,3,,4,, sep: ,, for element 3') " call s:Assert(MvStrIndexOfElement('1,,2,,3,,4', ',,', '4'), 9, 'MvStrIndexOfElement with array: 1,,2,,3,,4,, sep: ,, for element 4') " call s:Assert(MvStrIndexOfElement('1,,2,,3,,4,,', ',,', '1'), 0, 'MvStrIndexOfElement with array: 1,,2,,3,,4,, sep: ,, for element 1') " " Test a fix for a previous identified bug. " call s:Assert(MvStrIndexOfElement('11,,1,,2,,3,,', ',,', '1'), 4, 'MvStrIndexOfElement with array: 11,,1,,2,,3,, sep: ,, for element 1') " " call s:Assert(MvStrIndexOfElement('1xxxx2xxx3x4xxxx', 'x\+', '3', 'x'), 9, 'MvStrIndexOfElement with array: 1xxxx2xxx3x4xxxx for element 3') " call s:Assert(MvStrIndexOfElement('1xxxx2xxx3x4', 'x\+', '3', 'x'), 9, 'MvStrIndexOfElement with array: 1xxxx2xxx3x4 for element 3') " call s:Assert(MvStrIndexOfElement('1xxxx2xxx3x4', 'x\+', '4', 'x'), 11, 'MvStrIndexOfElement with array: 1xxxx2xxx3x4 for element 4') " call s:Assert(MvStrIndexOfElement('1xxxx2xxx3x4', 'x\+', '1', 'x'), 0, 'MvStrIndexOfElement with array: 1xxxx2xxx3x4 for element 1') " call s:Assert(MvStrIndexOfElement('1xxxx', 'x\+', '1', 'x'), 0, 'MvStrIndexOfElement with array: 1xxxx for element 1') " call s:Assert(MvStrIndexOfElement('1', 'x\+', '1', 'x'), 0, 'MvStrIndexOfElement with array: 1 for element 1') " " call s:Assert(MvStrIndexOfPattern('1a,1b,1c,1d,', ',', '.c'), 6, 'MvStrIndexOfPattern with array: 1a,1b,1c,1d, for pattern .c') " " call s:Assert(MvStrIndexOfElementAt('1,,2,,3,,4', ',,', 2), 6, 'MvStrIndexOfElementAt with array: 1,,2,,3,,4,, sep: ,, for index 2') " call s:Assert(MvStrIndexOfElementAt('1,,2,,3,,4,,', ',,', 3), 9, 'MvStrIndexOfElementAt with array: 1,,2,,3,,4,, sep: ,, for index 3') " call s:Assert(MvStrIndexOfElementAt('1,,2,,3,,4,,', ',,', 0), 0, 'MvStrIndexOfElementAt with array: 1,,2,,3,,4,, sep: ,, for index 0') " call s:Assert(MvStrIndexOfElementAt('1,,', ',,', 0), 0, 'MvStrIndexOfElementAt with array: 1,, sep: ,, for index 0') " call s:Assert(MvStrIndexOfElementAt('1', ',,', 0), 0, 'MvStrIndexOfElementAt with array: 1 sep: ,, for index 0') " " call s:Assert(MvStrIndexOfElementAt('1xxxx2xxx3x4xxxx', 'x\+', 2, 'x'), 9, 'MvStrIndexOfElementAt with array: 1xxxx2xxx3x4xxxx for index 2') " call s:Assert(MvStrIndexOfElementAt('1xxxx2xxx3x4xxxx', 'x\+', 0, 'x'), 0, 'MvStrIndexOfElementAt with array: 1xxxx2xxx3x4xxxx for index 1') " call s:Assert(MvStrIndexOfElementAt('1xxxx2xxx3x4xxxx', 'x\+', 3, 'x'), 11, 'MvStrIndexOfElementAt with array: 1xxxx2xxx3x4xxxx for index 3') " call s:Assert(MvStrIndexOfElementAt('1xxxx', 'x\+', 0, 'x'), 0, 'MvStrIndexOfElementAt with array: 1xxxx for index 0') " call s:Assert(MvStrIndexOfElementAt('1', 'x\+', 0, 'x'), 0, 'MvStrIndexOfElementAt with array: 1 for index 0') " " call s:Assert(MvElementAt('1,,2,,3,,4', ',,', 2), '3', 'MvElementAt with array: 1,,2,,3,,4 sep: ,, for index 2') " call s:Assert(MvElementAt('1,,2,,3,,4', ',,', 0), '1', 'MvElementAt with array: 1,,2,,3,,4 sep: ,, for index 0') " " call s:Assert(MvElementAt('1xxxx2xxx3x4xxxx', 'x\+', 2, 'x'), '3', 'MvElementAt with array: 1xxxx2xxx3x4xxxx for index 2') " call s:Assert(MvElementAt('1xxxx2xxx3x4', 'x\+', 0, 'x'), '1', 'MvElementAt with array: 1xxxx2xxx3x4 for index 0') " call s:Assert(MvElementAt('1xxxx', 'x\+', 0, 'x'), '1', 'MvElementAt with array: 1xxxx for index 0') " call s:Assert(MvElementAt('1', 'x\+', 0, 'x'), '1', 'MvElementAt with array: 1 for index 0') " " call s:Assert(MvIndexOfElement('1,,2,,3,,4', ',,', '3'), 2, 'MvIndexOfElement with array: 1,,2,,3,,4 sep: ,, for element 3') " call s:Assert(MvIndexOfElement('1,,2,,3,,4,,', ',,', '1'), 0, 'MvIndexOfElement with array: 1,,2,,3,,4,, sep: ,, for element 0') " " call s:Assert(MvIndexOfElement('1xxxx2xxx3x4xxxx', 'x\+', '3', 'x'), 2, 'MvIndexOfElement with array: 1xxxx2xxx3x4xxxx for element 3') " call s:Assert(MvIndexOfElement('1xxxx2xxx3x4', 'x\+', '4', 'x'), 3, 'MvIndexOfElement with array: 1xxxx2xxx3x4 for element 4') " call s:Assert(MvIndexOfElement('1xxxx', 'x\+', '1', 'x'), 0, 'MvIndexOfElement with array: 1xxxx for element 1') " call s:Assert(MvIndexOfElement('1', 'x\+', '1', 'x'), 0, 'MvIndexOfElement with array: 1 for element 1') " " call s:Assert(MvIndexOfPattern('1a,1b,1c,1d,', ',', '.c'), 2, 'MvIndexOfPattern with array: 1a,1b,1c,1d, for pattern .c') " " call s:Assert(MvNumberOfElements('1,,2,,3,,4', ',,'), 4, 'MvNumberOfElements with array: 1,,2,,3,,4 sep: ,,') " call s:Assert(MvNumberOfElements('1,,2,,3,,4', ',,'), 4, 'MvNumberOfElements with array: 1,,2,,3,,4 sep: ,,') " call s:Assert(MvNumberOfElements('1,,', ',,'), 1, 'MvNumberOfElements with array: 1,, sep: ,,') " call s:Assert(MvNumberOfElements('1', ',,'), 1, 'MvNumberOfElements with array: 1 sep: ,,') " " call s:Assert(MvNumberOfElements('1xxxx2xxx3x4xxxx', 'x\+'), 4, 'MvNumberOfElements with array: 1xxxx2xxx3x4xxxx') " call s:Assert(MvNumberOfElements('1xxxx2xxx3x4', 'x\+'), 4, 'MvNumberOfElements with array: 1xxxx2xxx3x4') " call s:Assert(MvNumberOfElements('1xxxx', 'x\+'), 1, 'MvNumberOfElements with array: 1xxxx') " call s:Assert(MvNumberOfElements('1', 'x\+'), 1, 'MvNumberOfElements with array: 1') " " call s:Assert(MvContainsElement('1,,2,,3,,4', ',,', '3'), 1, 'MvContainsElement with array: 1,,2,,3,,4 sep: ,, for element 3') " call s:Assert(MvContainsElement('1,,2,,3,,4,,', ',,', '1'), 1, 'MvContainsElement with array: 1,,2,,3,,4,, sep: ,, for element 1') " call s:Assert(MvContainsElement('1,,2,,3,,4,,', ',,', '0'), 0, 'MvContainsElement with array: 1,,2,,3,,4,, sep: ,, for element 0') " " call s:Assert(MvContainsElement('1xxxx2xxx3x4xxxx', 'x\+', '3', 'x'), 1, 'MvContainsElement with array: 1xxxx2xxx3x4xxxx for element 3') " call s:Assert(MvContainsElement('1xxxx2xxx3x4', 'x\+', '4', 'x'), 1, 'MvContainsElement with array: 1xxxx2xxx3x4 for element 4') " call s:Assert(MvContainsElement('1xxxx', 'x\+', '1', 'x'), 1, 'MvContainsElement with array: 1xxxx for element 1') " call s:Assert(MvContainsElement('1', 'x\+', '1', 'x'), 1, 'MvContainsElement with array: 1 for element 1') " " call s:Assert(MvLastElement('1,,2,,3,,4', ',,'), '4', 'MvLastElement with array: 1,,2,,3,,4 sep: ,,') " call s:Assert(MvLastElement('1,,2,,3,,4,,', ',,'), '4', 'MvLastElement with array: 1,,2,,3,,4,, sep: ,,') " " call s:Assert(MvLastElement('1xxxx2xxx3x4xxxx', 'x\+', 'x'), '4', 'MvLastElement with array: 1xxxx2xxx3x4xxxx') " call s:Assert(MvLastElement('1xxxx2xxx3x4', 'x\+', 'x'), '4', 'MvLastElement with array: 1xxxx2xxx3x4') " call s:Assert(MvLastElement('1xxxx', 'x\+', 'x'), '1', 'MvLastElement with array: 1xxxx') " call s:Assert(MvLastElement('1', 'x\+', 'x'), '1', 'MvLastElement with array: 1') " " " " " Now test the write operations. " " " call s:Assert(MvAddElement('1,,2,,3,,4', ',,', '5'), '1,,2,,3,,4,,5,,', 'MvAddElement with array: 1,,2,,3,,4 sep: ,, for element 5') " call s:Assert(MvAddElement('1,,2,,3,,4,,', ',,', '5'), '1,,2,,3,,4,,5,,', 'MvAddElement with array: 1,,2,,3,,4,, sep: ,, for element 5') " " call s:Assert(MvAddElement('1,,,2,,,,3,,4', ',\+', '5', ','), '1,,,2,,,,3,,4,5,', 'MvAddElement with array: 1,,,2,,,,3,,4 sep: ,\+ for element 5') " " call s:Assert(MvRemoveElement('1,,2,,3,,4', ',,', '3'), '1,,2,,4,,', 'MvRemoveElement with array: 1,,2,,3,,4 sep: ,, for element 3') " call s:Assert(MvRemoveElement('1,,2,,3,,4,,', ',,', '1'), '2,,3,,4,,', 'MvRemoveElement with array: 1,,2,,3,,4,, sep: ,, for element 1') " " call s:Assert(MvRemoveElement('1,,,2,,,,3,,4', ',\+', '2', ','), '1,,,3,,4,', 'MvRemoveElement with array: 1,,,2,,,,3,,4 sep: ,\+ for element 2') " " call s:Assert(MvRemoveElementAt('1,,2,,3,,4', ',,', 2), '1,,2,,4,,', 'MvRemoveElementAt with array: 1,,2,,3,,4 sep: ,, for index 2') " call s:Assert(MvRemoveElementAt('1,,2,,3,,4,,', ',,', 0), '2,,3,,4,,', 'MvRemoveElementAt with array: 1,,2,,3,,4,, sep: ,, for index 0') " " call s:Assert(MvRemoveElementAt('1,,,2,,,,3,,4', ',\+', 2, ','), '1,,,2,,,,4,', 'MvRemoveElementAt with array: 1,,,2,,,,3,,4 sep: ,\+ for index 2') " " call s:Assert(MvRemoveElementAll('1,,2,,1,,4', ',,', '1'), '2,,4,,', 'MvRemoveElementAll with array: 1,,2,,1,,4 sep: ,, for element 1') " call s:Assert(MvRemovePatternAll('abc,,123,,def,,456', ',,', '\d\+'), 'abc,,def,,', 'MvRemoveElementAll with array: abc,,123,,def,,456 sep: ,, for pattern \d\+') " " call s:Assert(MvPushToFront('1,,2,,3,,4', ',,', '3'), '3,,1,,2,,4,,', 'MvPushToFront with array: 1,,2,,3,,4 sep: ,, for element 3') " call s:Assert(MvPushToFront('1,,2,,3,,4,,', ',,', '4'), '4,,1,,2,,3,,', 'MvPushToFront with array: 1,,2,,3,,4,, sep: ,, for element 4') " " call s:Assert(MvPushToFront('1,,,2,,,,3,,4', ',\+', '2', ','), '2,1,,,3,,4,', 'MvPushToFront with array: 1,,,2,,,,3,,4 sep: ,\+ for element 2') " " call s:Assert(MvPushToFrontElementAt('1,,2,,3,,4', ',,', 2), '3,,1,,2,,4,,', 'MvPushToFrontElementAt with array: 1,,2,,3,,4 sep: ,, for index 2') " call s:Assert(MvPushToFrontElementAt('1,,2,,3,,4,,', ',,', 3), '4,,1,,2,,3,,', 'MvPushToFrontElementAt with array: 1,,2,,3,,4,, sep: ,, for index 3') " " call s:Assert(MvPushToFrontElementAt('1,,,2,,,,3,,4', ',\+', 2, ','), '3,1,,,2,,,,4,', 'MvPushToFrontElementAt with array: 1,,,2,,,,3,,4 sep: ,\+ for index 2') " call s:Assert(MvPushToFrontElementAt('1,2\,3,4,5', '\\\@ 1 if a:1 == "v" normal gv endif endif endfunction function! Cream_spell_altword(...) " Show alternate words " turn on temporarily, if not already if !exists("b:cream_spell") let spellontemp = 1 call Cream_spellcheck() endif "" TODO: broken, hangs with trailing "Hit any key..." "let mycmdheight = &cmdheight "set cmdheight=13 "set spellsuggest=10 "silent normal z= "let &cmdheight = mycmdheight " TEST WORD: spelll let word = expand("") if word != "" " rework Popup menu silent! unmenu PopUp silent! unmenu! PopUp amenu PopUp.Alternate\ spellings amenu PopUp.(pick\ to\ replace) amenu PopUp.--PopUp-- let max = 20 let words = spellsuggest(word, max) let i = 0 while i < max " add item to popup let item = get(words, i) execute 'imenu PopUp.' . item . ' :call Cream_spell_altword_replace("' . item . '")' execute 'vmenu PopUp.' . item . ' :call Cream_spell_altword_replace("' . item . '")' let i = i + 1 endwhile elseif word == "" call confirm( \ "Not currently on a word.\n" . \ "\n", "&Ok", 1, "Info") return 0 else " do normal right click behavior return -1 endif " display " silent causes first usage to do nothing (Win95, 2003-04-04) " BUG HACK: first time through, fails, do twice if !exists("g:cream_popup") let g:cream_popup = 1 silent! popup PopUp endif silent! popup PopUp "" un-backup space check "normal l " restore original state of spell check if exists("spellontemp") call Cream_spellcheck() endif " reselect if visual if a:0 > 1 if a:1 == "v" normal gv endif endif endfunction function! Cream_spell_altword_replace(word) " select word under cursor and replace with a:word normal viw let @x = a:word " paste over selection normal "xp endfunction cream-0.43/cream-pop.vim0000644000076400007660000004603511517300720015514 0ustar digitectlocaluser" " Filename: cream-pop.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " (http://www.gnu.org/licenses/gpl.html) " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Pops up a menu at the cursor upon "(" when the preceding word " matches a previously initialized variable (function name). This " variable is filetype specific, although general functions can be " made global by inclusion . " " We use the :popup function to display it at the cursor (Win32 only " support by Vim at the moment). If there's a match, the function is " popped; otherwise it's ignored. " " Notes: " * Default popup menu is restored via Cream_menu_popup() every " " function! Cream_pop(word) " pop up a menu matching the global variable passed " * Assumes a global menu variable (passed in the form "g:TestCow") " already exists (must verify before here!) " create popup menu item with same name as variable execute 'let mymenuname = a:word' " remove initial "g:" let mymenuname = strpart(mymenuname, 2) " remove initial encoding + "_" let mypos = match(mymenuname, "_") + 1 let mymenuname = strpart(mymenuname, mypos) execute 'let mydescription = ' . a:word . '_menu' " display call Cream_pop_menu(mydescription) " TODO: now loop and enter every char exactly as entered " until user hits Esc, Enter, motion or end parenthesis endfunction function! Cream_pop_words(filetype, word, menu) " create global based on the name and create the abbreviation " * First argument is intended filetype " * Second argument is function name (or, more generally, the object " to be completed on) " * Third argument is the description, to be explained between the " parenthesis " validate function name " no spaces allowed if match(a:word, " ") != -1 call confirm( \ "Invalid function name passed to Cream_pop_words():\n" . \ " \"" . a:word . "\"\n" . \ "\n" . \ "Quitting..." . \ "\n", "&Ok", 1, "Info") return endif " handle ampersands on Win32 if has("win32") let menu_contents = substitute(a:menu, '&', '&&', 'g') else let menu_contents = a:menu endif " expose global for name *** CONTAINS MENU NAME, minus filename + "_"! *** execute "let g:pop_" . a:filetype . "_" . a:word . ' = a:word' " expose global for menu contents execute "let g:pop_" . a:filetype . "_" . a:word . "_menu = \"" . menu_contents . "\"" endfunction function! Cream_pop_paren_map(...) " use parenthesis to pop up function def info (if global by same name " exists) " special arguments: " o (any) -- avoids "not found" dialog " o "autopop" -- avoids trying current function if a:0 > 0 let myarg = a:1 else let myarg = "" endif " back up behind parenthesis to check normal h " unless we are at the very end of the line, we need to go back in " order to find the last word typed. if virtcol('.') != virtcol('$') normal! h let myword = expand('') normal! l else let myword = expand('') endif ".......................................................... " try our conditioned environment first let word = "g:pop_nil_" . myword if exists(word) " do Pop call Cream_pop(word) return endif ".......................................................... " try filetype-specific next let word = "g:pop_" . &filetype . "_" . myword if exists(word) " do Pop call Cream_pop(word) return endif ".......................................................... " try remote function prototype via ctag let mytag = expand("") " remember pos and file let myvcol = virtcol('.') let myline = line('.') let mybufnr = bufnr("%") let mypos = Cream_pos() " do jump execute "silent! tag " . mytag if myvcol != virtcol('.') \|| myline != line('.') \|| mybufnr != bufnr("%") " get prototype let myprototype = Cream_Tlist_prototype() " jump back silent! pop " position execute mypos redraw " TODO: remove one from bottom of stack list (forget this jump) "... " display prototype call Cream_pop_menu(myprototype) return endif " don't jump back, we didn't move or add to stack ".......................................................... " quit here if if called via AutoPop if myarg ==? "autopop" " fix position normal l return endif ".......................................................... " try current function prototype let myprototype = Cream_Tlist_prototype() if myprototype != "" " popup call Cream_pop_menu("current: " . myprototype) return endif if myarg ==? "" " Dialog: no info available let n = confirm( \ "No information available for this word.\n" . \ "\n", "&Ok", 1, "Info") endif " fix position normal l endfunction function! Cream_pop_menu(menuitem) " pop up the prototype under the cursor if a:menuitem != "" silent! unmenu PopUp silent! unmenu! PopUp let menuitem_esc = escape(a:menuitem, ' \.') " handle ampersands on Win32 if has("win32") let menuitem_esc = substitute(menuitem_esc, '&', '&&', 'g') endif " provide a more free-form description execute 'imenu PopUp.' . menuitem_esc. ' ' . a:menuitem " display " silent causes first usage to do nothing (Win95, 2003-04-04) " BUG HACK: first time through, fails, do twice if !exists("g:cream_popup") let g:cream_popup = 1 silent! popup PopUp endif silent! popup PopUp " un-backup space check normal l return 1 endif return 0 endfunction function! Cream_pop_options() " allow user to control pop preference " * assumes global has been initialized prior to here " only windows has the :popup feature (for now) if !has("win32") && !has("gui_gtk") call confirm( \ "Sorry, Vim's \":popup\" feature is only supported on \n" . \ "the Windows and GTK platforms.\n" . \ "\n", "&Ok", 2, "Warning") return elseif has("gui_gtk") && v:version < 601 \ || has("gui_gtk") && v:version == 601 && !has("patch433") call confirm( \ "Support for Vim's \":popup\" feature on GTK \n" . \ "was added in version 6.1.433. Please upgrade to use.\n" . \ "\n", "&Continue\n&Quit", 2, "Warning") return endif let n = confirm( \ "Use auto-popup information feature? (Prototype indicated\n" . \ "every time an open parenthesis is typed.)\n" . \ "\n", "&Yes\n&No\n&Cancel", 1, "Info") if n == 1 let g:CREAM_POP_AUTO = 1 imap ( (:call Cream_pop_paren_map("autopop") elseif n == 2 let g:CREAM_POP_AUTO = 0 silent! iunmap ( endif endfunction function! Cream_pop_init() " initializes global auto-pop variable "" only windows has the :popup feature (for now) "if !has("win32") " return "endif " make pop automatic upon "(" (default: off) if !exists("g:CREAM_POP_AUTO") let g:CREAM_POP_AUTO = 0 endif " auto pop (require two parenthesis if off--and single will delay!) if g:CREAM_POP_AUTO == 1 imap ( (:call Cream_pop_paren_map("autopop") endif endfunction "= " List pop up items " " * Use "nil" for info boxes on words across any filetype. "" create fake popup items "call Cream_pop_words('nil', 'TestBob', ' NOPE!!!') "call Cream_pop_words('vim', 'TestCow', 'size, color, horns') " vim functions {{{1 "call Cream_pop_words('vim', 'append', 'append( {lnum}, {string} ) -- append {string} below line {lnum}') "call Cream_pop_words('vim', 'argc', 'argc() -- number of files in the argument list') "call Cream_pop_words('vim', 'argidx', 'argidx() -- current index in the argument list') "call Cream_pop_words('vim', 'argv', 'argv( {nr} ) -- {nr} entry of the argument list') "call Cream_pop_words('vim', 'browse', 'browse( {save}, {title}, {initdir}, {default} ) -- put up a file requester') "call Cream_pop_words('vim', 'bufexists', 'bufexists( {expr} ) -- TRUE if buffer {expr} exists') "call Cream_pop_words('vim', 'buflisted', 'buflisted( {expr} ) -- TRUE if buffer {expr} is listed') "call Cream_pop_words('vim', 'bufloaded', 'bufloaded( {expr} ) -- TRUE if buffer {expr} is loaded') "call Cream_pop_words('vim', 'bufname', 'bufname( {expr} ) -- Name of the buffer {expr}') "call Cream_pop_words('vim', 'bufnr', 'bufnr( {expr} ) -- Number of the buffer {expr}') "call Cream_pop_words('vim', 'bufwinnr', 'bufwinnr( {expr} ) -- window number of buffer {expr}') "call Cream_pop_words('vim', 'byte2line', 'byte2line( {byte} ) -- line number at byte count {byte}') "call Cream_pop_words('vim', 'char2nr', 'char2nr( {expr} ) -- ASCII value of first char in {expr}') "call Cream_pop_words('vim', 'cindent', 'cindent( {lnum} ) -- C indent for line {lnum}') "call Cream_pop_words('vim', 'col', 'col( {expr} ) -- column nr of cursor or mark') "call Cream_pop_words('vim', 'confirm', 'confirm( {msg} [, {choices} [, {default} [, {type}]]] ) -- number of choice picked by user') "call Cream_pop_words('vim', 'cscope_connection', 'cscope_connection( [{num} , {dbpath} [, {prepend}]] ) -- checks existence of cscope connection') "call Cream_pop_words('vim', 'cursor', 'cursor( {lnum}, {col} ) -- position cursor at {lnum}, {col}') "call Cream_pop_words('vim', 'delete', 'delete( {fname} ) -- delete file {fname}') "call Cream_pop_words('vim', 'did_filetype', 'did_filetype() -- TRUE if FileType autocommand event used') "call Cream_pop_words('vim', 'escape', 'escape( {string}, {chars} ) -- escape {chars} in {string} with \"\\\"') "call Cream_pop_words('vim', 'eventhandler', 'eventhandler() -- TRUE if inside an event handler') "call Cream_pop_words('vim', 'executable', 'executable( {expr} ) -- 1 if executable {expr} exists') "call Cream_pop_words('vim', 'exists', 'exists( {var} ) -- TRUE if {var} exists') "call Cream_pop_words('vim', 'expand', 'expand( {expr} ) -- expand special keywords in {expr}') "call Cream_pop_words('vim', 'filereadable', 'filereadable( {file} ) -- TRUE if {file} is a readable file') "call Cream_pop_words('vim', 'filewritable', 'filewritable( {file} ) -- TRUE if {file} is a writable file') "call Cream_pop_words('vim', 'fnamemodify', 'fnamemodify( {fname}, {mods} ) -- modify file name') "call Cream_pop_words('vim', 'foldclosed', 'foldclosed( {lnum} ) -- first line of fold at {lnum} if closed') "call Cream_pop_words('vim', 'foldclosedend', 'foldclosedend( {lnum} ) -- last line of fold at {lnum} if closed') "call Cream_pop_words('vim', 'foldlevel', 'foldlevel( {lnum} ) -- fold level at {lnum}') "call Cream_pop_words('vim', 'foldtext', 'foldtext() -- line displayed for closed fold') "call Cream_pop_words('vim', 'foreground', 'foreground() -- bring the Vim window to the foreground') "call Cream_pop_words('vim', 'getchar', 'getchar( [expr] ) -- get one character from the user') "call Cream_pop_words('vim', 'getcharmod', 'getcharmod() -- modifiers for the last typed character') "call Cream_pop_words('vim', 'getbufvar', 'getbufvar( {expr}, {varname} ) -- variable {varname} in buffer {expr}') "call Cream_pop_words('vim', 'getcwd', 'getcwd() -- the current working directory') "call Cream_pop_words('vim', 'getftime', 'getftime( {fname} ) -- last modification time of file') "call Cream_pop_words('vim', 'getfsize', 'getfsize( {fname} ) -- size in bytes of file') "call Cream_pop_words('vim', 'getline', 'getline( {lnum} ) -- line {lnum} from current buffer') "call Cream_pop_words('vim', 'getwinposx', 'getwinposx() -- X coord in pixels of GUI vim window') "call Cream_pop_words('vim', 'getwinposy', 'getwinposy() -- Y coord in pixels of GUI vim window') "call Cream_pop_words('vim', 'getwinvar', 'getwinvar( {nr}, {varname} ) -- variable {varname} in window {nr}') "call Cream_pop_words('vim', 'glob', 'glob( {expr}] ) -- expand file wildcards in {expr}') "call Cream_pop_words('vim', 'globpath', 'globpath( {path}, {expr} ) -- do glob({expr}) for all dirs in {path}') "call Cream_pop_words('vim', 'has', 'has( {feature} ) -- TRUE if feature {feature} supported') "call Cream_pop_words('vim', 'hasmapto', 'hasmapto( {what} [, {mode}] ) -- TRUE if mapping to {what} exists') "call Cream_pop_words('vim', 'histadd', 'histadd( {history},{item} ) -- add an item to a history') "call Cream_pop_words('vim', 'histdel', 'histdel( {history} [, {item}] ) -- remove an item from a history') "call Cream_pop_words('vim', 'histget', 'histget( {history} [, {index}] ) -- get the item {index} from a history') "call Cream_pop_words('vim', 'histnr', 'histnr( {history} ) -- highest index of a history') "call Cream_pop_words('vim', 'hlexists', 'hlexists( {name} ) -- TRUE if highlight group {name} exists') "call Cream_pop_words('vim', 'hlID', 'hlID( {name} ) -- syntax ID of highlight group {name}') "call Cream_pop_words('vim', 'hostname', 'hostname() -- name of the machine vim is running on') "call Cream_pop_words('vim', 'iconv', 'iconv( {expr}, {from}, {to} ) -- convert encoding of {expr}') "call Cream_pop_words('vim', 'indent', 'indent( {lnum} ) -- indent of line {lnum}') "call Cream_pop_words('vim', 'input', 'input( {prompt} [, {text}] ) -- get input from the user') "call Cream_pop_words('vim', 'inputdialog', 'inputdialog( {prompt} [, {text}] ) -- like input() but in a GUI dialog') "call Cream_pop_words('vim', 'inputsecret', 'inputsecret( {prompt} [, {text}] ) -- like input() but hiding the text') "call Cream_pop_words('vim', 'isdirectory', 'isdirectory( {directory} ) -- TRUE if {directory} is a directory') "call Cream_pop_words('vim', 'libcall', 'libcall( {lib}, {func}, {arg} ) -- call {func} in library {lib} with {arg}') "call Cream_pop_words('vim', 'libcallnr', 'libcallnr( {lib}, {func}, {arg} ) -- idem, but return a Number') "call Cream_pop_words('vim', 'line', 'line( {expr} ) -- line nr of cursor, last line or mark') "call Cream_pop_words('vim', 'line2byte', 'line2byte( {lnum} ) -- byte count of line {lnum}') "call Cream_pop_words('vim', 'lispindent', 'lispindent( {lnum} ) -- Lisp indent for line {lnum}') "call Cream_pop_words('vim', 'localtime', 'localtime() -- current time') "call Cream_pop_words('vim', 'maparg', 'maparg( {name}[, {mode}] ) -- rhs of mapping {name} in mode {mode}') "call Cream_pop_words('vim', 'mapcheck', 'mapcheck( {name}[, {mode}] ) -- check for mappings matching {name}') "call Cream_pop_words('vim', 'match', 'match( {expr}, {pat}[, {start}] ) -- position where {pat} matches in {expr}') "call Cream_pop_words('vim', 'matchend', 'matchend( {expr}, {pat}[, {start} ) -- position where {pat} ends in {expr}') "call Cream_pop_words('vim', 'matchstr', 'matchstr( {expr}, {pat}[, {start}] ) -- match of {pat} in {expr}') "call Cream_pop_words('vim', 'mode', 'mode() -- String current editing mode') "call Cream_pop_words('vim', 'nextnonblank', 'nextnonblank( {lnum} ) -- line nr of non-blank line >= {lnum}') "call Cream_pop_words('vim', 'nr2char', 'nr2char( {expr} ) -- single char with ASCII value {expr}') "call Cream_pop_words('vim', 'prevnonblank', 'prevnonblank( {lnum} ) -- line nr of non-blank line <= {lnum}') "call Cream_pop_words('vim', 'remote_expr', 'remote_expr( {server}, {string} [, {idvar}] ) -- send expression') "call Cream_pop_words('vim', 'remote_foreground', 'remote_foreground( {server} ) -- bring Vim server to the foreground') "call Cream_pop_words('vim', 'remote_peek', 'remote_peek( {serverid} [, {retvar}] ) -- check for reply string') "call Cream_pop_words('vim', 'remote_read', 'remote_read( {serverid} ) -- read reply string') "call Cream_pop_words('vim', 'remote_send', 'remote_send( {server}, {string} [, {idvar}] ) -- send key sequence') "call Cream_pop_words('vim', 'rename', 'rename( {from}, {to} ) -- rename (move) file from {from} to {to}') "call Cream_pop_words('vim', 'resolve', 'resolve( {filename} ) -- get filename a shortcut points to') "call Cream_pop_words('vim', 'search', 'search( {pattern} [, {flags}] ) -- search for {pattern}') "call Cream_pop_words('vim', 'searchpair', 'searchpair( {start}, {middle}, {end} [, {flags} [, {skip}]] ) -- search for other end of start/end pair') "call Cream_pop_words('vim', 'server2client', 'server2client( {serverid}, {string} ) -- send reply string') "call Cream_pop_words('vim', 'serverlist', 'serverlist() -- get a list of available servers') "call Cream_pop_words('vim', 'setbufvar', 'setbufvar( {expr}, {varname}, {val} ) -- set {varname} in buffer {expr} to {val}') "call Cream_pop_words('vim', 'setline', 'setline( {lnum}, {line} ) -- set line {lnum} to {line}') "call Cream_pop_words('vim', 'setwinvar', 'setwinvar( {nr}, {varname}, {val} ) -- set {varname} in window {nr} to {val}') "call Cream_pop_words('vim', 'strftime', 'strftime( {format}[, {time}] ) -- time in specified format') "call Cream_pop_words('vim', 'stridx', 'stridx( {haystack}, {needle} ) -- first index of {needle} in {haystack}') "call Cream_pop_words('vim', 'strlen', 'strlen( {expr} ) -- length of the String {expr}') "call Cream_pop_words('vim', 'strpart', 'strpart( {src}, {start}[, {len}] ) -- {len} characters of {src} at {start}') "call Cream_pop_words('vim', 'strridx', 'strridx( {haystack}, {needle} ) -- last index of {needle} in {haystack}') "call Cream_pop_words('vim', 'strtrans', 'strtrans( {expr} ) -- translate string to make it printable') "call Cream_pop_words('vim', 'submatch', 'submatch( {nr} ) -- specific match in \":substitute\"') "call Cream_pop_words('vim', 'substitute', 'substitute( {expr}, {pat}, {sub}, {flags} ) -- all {pat} in {expr} replaced with {sub}') "call Cream_pop_words('vim', 'synID', 'synID( {line}, {col}, {trans} ) -- syntax ID at {line} and {col}') "call Cream_pop_words('vim', 'synIDattr', 'synIDattr( {synID}, {what} [, {mode}] ) -- attribute {what} of syntax ID {synID}') "call Cream_pop_words('vim', 'synIDtrans', 'synIDtrans( {synID} ) -- translated syntax ID of {synID}') "call Cream_pop_words('vim', 'system', 'system( {expr} ) -- output of shell command {expr}') "call Cream_pop_words('vim', 'tempname', 'tempname() -- name for a temporary file') "call Cream_pop_words('vim', 'tolower', 'tolower( {expr} ) -- the String {expr} switched to lowercase') "call Cream_pop_words('vim', 'toupper', 'toupper( {expr} ) -- the String {expr} switched to uppercase') "call Cream_pop_words('vim', 'type', 'type( {name} ) -- type of variable {name}') "call Cream_pop_words('vim', 'virtcol', 'virtcol( {expr} ) -- screen column of cursor or mark') "call Cream_pop_words('vim', 'visualmode', 'visualmode() -- last visual mode used') "call Cream_pop_words('vim', 'winbufnr', 'winbufnr( {nr} ) -- buffer number of window {nr}') "call Cream_pop_words('vim', 'wincol', 'wincol() -- window column of the cursor') "call Cream_pop_words('vim', 'winheight', 'winheight( {nr} ) -- height of window {nr}') "call Cream_pop_words('vim', 'winline', 'winline() -- window line of the cursor') "call Cream_pop_words('vim', 'winnr', 'winnr() -- number of current window') "call Cream_pop_words('vim', 'winwidth', 'winwidth( {nr} ) -- width of window {nr}') " 1}}} " vim:foldmethod=marker cream-0.43/cream-filetype.vim0000644000076400007660000000576311517300720016542 0ustar digitectlocaluser" " cream-filetype.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Filetypes and filetype dependent behavior (comments) " "______________________________________________________________________ " File Type Support function! Cream_filetype(...) " detect and set conditions based on filetype " o {argument} (optional) is filetype to set, otherwise detected " for some reason, position is lost during this routine, remember let mypos = Cream_pos() " detection if a:0 > 0 execute "set filetype=" . a:1 " Not sure why this was being tested, ignore and re-detect "elseif &filetype == "" else filetype detect " catch undetected if &filetype == "" set filetype=txt endif endif " verify indention initialization (won't do it twice) call Cream_autoindent_init() " remove filebrowser filters let b:browsefilter="All Files\t*.*;*.*\n" " cream filetype if &filetype == "txt" \|| &filetype == "mail" call Cream_source($CREAM . "filetypes/txt.vim") else if hlexists("Sig") silent! syntax clear Sig endif if hlexists("EQuote1") silent! syntax clear EQuote1 endif if hlexists("EQuote2") silent! syntax clear EQuote2 endif if hlexists("EQuote3") silent! syntax clear EQuote3 endif if hlexists("Cream_txt_bullets") silent! syntax clear Cream_txt_bullets endif if hlexists("Cream_txt_charlines_half") silent! syntax clear Cream_txt_charlines_half endif if hlexists("Cream_txt_charlines_full") silent! syntax clear Cream_txt_charlines_full endif if hlexists("Cream_txt_stamp") silent! syntax clear Cream_txt_stamp endif if hlexists("Cream_txt_stamp_value") silent! syntax clear Cream_txt_stamp_value endif if hlexists("Cream_txt_foldtitles") silent! syntax clear Cream_txt_foldtitles endif endif if &filetype == "c" call Cream_source($CREAM . "filetypes/c.vim") endif if &filetype == "html" \|| &filetype == "php" call Cream_source($CREAM . "filetypes/html.vim") endif if &filetype == "lisp" call Cream_source($CREAM . "filetypes/lisp.vim") endif if &filetype == "vim" call Cream_source($CREAM . "filetypes/vim.vim") endif " restore position execute mypos endfunction cream-0.43/cream-keys.vim0000644000076400007660000004777311517300720015703 0ustar digitectlocaluser" " Filename: cream-keys " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Notes: " * Search on "non-function" to find all mappings which don't " completely rely on functions. " KEY TO UNIVERSE: **************************************** {{{1 " " Remap Ctrl+o to Ctrl+b " " o Frees to be used for File.Open mapping " o Avoids over-writing mappings for non-english characters (like " any Alt+___ would. " o Maintains the non-lossy position of (absent in ). " inoremap " " PROBLEMS: " o Ruins i18n keyboard entries. " o Scattered bugs that we couldn't track down. " "********************************************************************** 1}}} " Core " Apple/Mac {{{1 " In gvim on OS X the usual OS keymappings are defined in macmap.vim " and Command - f is a mapping for / in normal mode. Source the " macmap file as a quick fix. if has("mac") source $VIMRUNTIME/macmap.vim endif " Mouse {{{1 "imap :call Cream_menu_popup() inoremap :call Cream_menu_popup()a " Note: see " Cream_mouse_middle_init() for middle mouse control " Motion {{{1 " Home -- toggles position between first non-white char and first " char. (Functions with or without screen wrap.) imap :call Cream_motion_home() vmap :call Cream_motion_home() " End -- toggles position between last screen line char and last line " char. (Functions with/without screen wrap.) imap :call Cream_map_end() "vmap g$ " Up/Down -- move through line breaks maintaining line position with wrap on. " * Need to accommodate all the mappings that use [Up] or [Down] ? imap :call Cream_down("i") vmap :call Cream_down("v") vmap :call Cream_down("v") imap :call Cream_up("i") vmap :call Cream_up("v") vmap :call Cream_up("v") " [Ctrl]+[Arrow Up/Down] scroll up/down by line imap :call Cream_scroll_down() vmap :call Cream_scroll_down("v") imap :call Cream_scroll_up() vmap :call Cream_scroll_up("v") " hmmm.... "imap vh "vmap h " Ctrl+Home Top of document imap :call Cream_motion_doctop() vmap :call Cream_motion_doctop() " Ctrl+End Bottom of document imap :call Cream_motion_docbottom() vmap :call Cream_motion_docbottom() " PageUp -- ensure motion to top if in first page imap :call Cream_pageup() vmap :call Cream_pageup() " PageDown imap :call Cream_pagedown() vmap :call Cream_pagedown() " * necessary only for GTK " Go to top of current page imap :call Cream_motion_windowtop() vmap :call Cream_motion_windowtop() " Go to bottom of current page imap :call Cream_motion_windowbottom() vmap :call Cream_motion_windowbottom() " Go to middle of current page imap :call Cream_motion_windowmiddle() vmap :call Cream_motion_windowmiddle() imap :call Cream_motion_windowmiddle() vmap :call Cream_motion_windowmiddle() " delete in Visual mode vmap :call Cream_delete_v() " Shift+Backspace deletes word (see help for difference between "word" and "WORD") imap :call Cream_map_key_backspace() " Ctrl+Backspace deletes WORD imap :call Cream_map_key_backspace("WORD") " Selection {{{1 " Shift+Home " * Select from cursor to screen line beginning, with either wrap on or off. " * Toggle selection between first column and first character imap :call Cream_map_shift_home("i") vmap :call Cream_map_shift_home("v") " Shift+End -- select to end of screen line, not end of line imap :call Cream_map_shift_end() "*** Don't remap for visual mode *** (imap does the job) "vmap :call Cream_map_shift_end() " Shift+Up -- select up one line (w/ or w/o wrap on) and maintain line pos imap :call Cream_map_shift_up("i") vmap :call Cream_map_shift_up("v") " Shift+Down -- select down one line (w/ or w/o wrap on) and maintain line pos imap :call Cream_map_shift_down("i") vmap :call Cream_map_shift_down("v") " Shift+PageUp -- select to top of screen, then up one screen length imap :call Cream_map_shift_pageup("i") vmap :call Cream_map_shift_pageup("v") " Shift+PageDown -- select to bottom of screen, then down one screen length imap :call Cream_map_shift_pagedown("i") vmap :call Cream_map_shift_pagedown("v") " Selection -- go to end specified vmap :call Cream_visual_swappos("up") vmap :call Cream_visual_swappos("dn") " Mouse -- drag "*** Broken: This mapping breaks GTK2 (other?) dialogs, causing Vim " crash. "vmap "vmap "*** " Ctrl+A -- select all imap :call Cream_select_all() vmap :call Cream_select_all() " Replace mode (Insert) {{{1 " goes to gR not gr " NOTE: This is one of the rare situations where we can't have a clean " mapping to a single function because we want the key to change " modes, but a function always returns to insertmode. "imap =Cream_replacemode() imap :call Cream_replacemode_remap()gR " Folding {{{1 imap :call Cream_fold("down") imap :call Cream_fold("up") vmap :call Cream_fold_set("v") imap :call Cream_fold_openall() imap :call Cream_fold_closeall() imap :call Cream_fold_delete() imap :call Cream_fold_deleteall() " Wrap {{{1 " Word wrap toggle imap :call Cream_wrap("i") vmap :call Cream_wrap("v") " Auto wrap toggle imap :call Cream_autowrap("i") vmap :call Cream_autowrap("v") " Quick Wrap imap :call Cream_quickwrap("i") vmap :call Cream_quickwrap("v") " Quick UnWrap imap q :call Cream_quickunwrap("i") imap Q :call Cream_quickunwrap("i") imap :call Cream_quickunwrap("i") imap :call Cream_quickunwrap("i") vmap q :call Cream_quickunwrap("v") vmap Q :call Cream_quickunwrap("v") vmap :call Cream_quickunwrap("v") vmap :call Cream_quickunwrap("v") " Indent/Unindent vmap :call Cream_indent("v") imap :call Cream_unindent("i") vmap :call Cream_unindent("v") " 1}}} " General Mappings " Help {{{1 " general help imap :call Cream_help() vmap :call Cream_help() " go to specific topic imap :call Cream_help_find() " list possible matches imap :call Cream_help_listtopics() " File {{{1 " Open (with dialog) "********************************************************************** " Note: This is only possible due to Key to Universe map at beginning! " Normally, is a special Vim mapping. imap :call Cream_file_open() "********************************************************************** " Open file under cursor imap :call Cream_file_open_undercursor("i") vmap :call Cream_file_open_undercursor("v") " Save (only when changes) imap :call Cream_update("i") vmap :call Cream_update("v") " New imap :call Cream_file_new() " Close " Note: We kill this in gVim (see Terminal elsewhere) because we " assume the Window Manager will intercept. If it doesn't, or if the " user cancels (thereby returning to Vim) we don't want anything to " happen. imap :call Cream_exit() vmap :call Cream_exit() imap :call Cream_close() vmap :call Cream_close() " Cut/Copy/Paste {{{1 " Cut (two mappings) "imap imap vmap :call Cream_cut("v") vmap :call Cream_cut("v") " Copy (two mappings) imap imap vmap :call Cream_copy("v") vmap :call Cream_copy("v") " Paste imap x:call Cream_paste("i") imap x:call Cream_paste("i") vmap :call Cream_paste("v") vmap :call Cream_paste("v") " Undo/Redo {{{1 " Undo imap :call Cream_undo("i") vmap :call Cream_undo("v") " Redo "*** broken: fails (conflicts with ) "imap :call Cream_redo("i") "vmap :call Cream_redo("v") "*** " also imap :call Cream_redo("i") vmap :call Cream_redo("v") " Space exits insertmode. This allows undo to remember each word " rather than an entire insert. "inoremap i " Show Invisibles (list) {{{1 imap :call Cream_list_toggle("i") vmap :call Cream_list_toggle("v") " Window/Buffer/Document select {{{1 " Window/Buffer Next/Previous -- Switch between windows unless only " one open; then alternate between multiple buffers if existing imap :call Cream_nextwindow() vmap :call Cream_nextwindow() imap :call Cream_prevwindow() vmap :call Cream_prevwindow() " Printing {{{1 imap :call Cream_print("i") vmap :call Cream_print("v") " Find and Replace {{{1 "imap :call Cream_find() "imap :call Cream_replace() " Notes: " 1. Avoid calling wrapper functions, it breaks the dialog's " multi-modal behavior. " 2. Mac currently can't use the dialogs if !has("mac") imap :promptfind imap :promptrepl endif " Find, under cursor " * DO NOT use the 'g' option preceeding the search, because it will " only yield a match for the single letter under the cursor! " forward imap :call Cream_findunder("i") vmap :call Cream_findunder("v") " backward imap :call Cream_findunder_reverse("i") vmap :call Cream_findunder_reverse("v") " forward, case sensitive imap :call Cream_findunder_case("i") vmap :call Cream_findunder_case("v") " backward, case sensitive imap :call Cream_findunder_case_reverse("i") vmap :call Cream_findunder_case_reverse("v") " 1}}} " Misc " Completion, Word, Omni, Template {{{1 inoremap =Cream_complete_forward() inoremap =Cream_complete_backward() inoremap =Cream_complete_omni_forward() inoremap =Cream_complete_omni_backward() "imap =ProcessImapLeader() "inoremap =Cream_template_expand() inoremap =Cream_template_expand() " Tags, Goto {{{1 " web-like Forward/Back (good for help pages) imap :call Cream_tag_backward() imap :call Cream_tag_forward() imap :call Cream_tag_backclose() " go to tag under cursor imap :call Cream_tag_goto() " tag list imap :call Cream_Tlist_toggle() " Goto Line {{{1 imap :call Cream_goto() " Pop {{{1 " pop imap :call Cream_pop_paren_map() imap :call Cream_pop_paren_map() " auto-pop initialized and controled via autocmd and option preference " Expandtab {{{1 imap :call Cream_expandtab_toggle("i") vmap :call Cream_expandtab_toggle("v") " Insert, Character Lines {{{1 " type first character entered after mapping textwidth number of times imap :call Cream_charline() imap :call Cream_charline_lineabove() imap :call Cream_charline_lineabove() " Insert, Character by value, digraph {{{1 " decimal insert "inoremap imap :call Cream_insert_char() vmap :call Cream_insert_char() imap :call Cream_allchars_list() imap :call Cream_char_codes("i") vmap :call Cream_char_codes("v") " diagraph " (Ctrl+K insertion is a Vim keystroke) imap :call Cream_digraph_list() " Spell Check {{{1 if v:version >= 700 imap :call Cream_spellcheck() vmap :call Cream_spellcheck("v") " TODO: broken imap :call Cream_spell_altword() vmap :call Cream_spell_altword("v") "imap z= else " toggle error highlighting on/off imap :call Cream_spellcheck() " Next word (and turn on if not on) imap :call Cream_spell_next() " Previous word (and turn on if not on) imap :call Cream_spell_prev() " Save word to dictionary imap :call Cream_spell_saveword() "*** non-function vmap "xy:call Cream_spell_saveword_v() endif " Block comments (Enhanced Commentify) {{{1 imap :call Cream_commentify("i") vmap :call Cream_commentify("v") imap :call Cream_decommentify("i") vmap :call Cream_decommentify("v") imap :call Cream_commentify_noindent("i") vmap :call Cream_commentify_noindent("v") imap :call Cream_commentify_noindent("i") vmap :call Cream_commentify_noindent("v") " Macros {{{1 imap :call Cream_macro_record("q") " Note: Trailing backspace deletes the errant added newline. (Not " able to be done within the function.) imap :call Cream_macro_play("q") " Bookmarking {{{1 " Jump forward/backward and toggle 'anonymous' marks for lines (by using marks a-z) imap :call Cream_WOK_mark_next() imap :call Cream_WOK_mark_prev() imap :call Cream_WOK_mark_toggle() imap :call Cream_WOK_mark_killall() "imap :call Cream_ShowMarksToggle() " Calendar {{{1 imap :call Cream_calendar() vmap :call Cream_calendar() " Date/Time {{{1 " dialog imap :call Cream_insert_datetime(1) vmap :call Cream_insert_datetime(1) " last used imap :call Cream_insert_datetime() vmap :call Cream_insert_datetime() " Capitalization {{{1 " Title Case imap :call Cream_case_title("i") vmap :call Cream_case_title("v") " UPPERCASE imap :call Cream_case_upper("i") vmap :call Cream_case_upper("v") " lowercase imap :call Cream_case_lower("i") vmap :call Cream_case_lower("v") "" rEVERSE CASE "imap :call Cream_case_reverse("i") "vmap :call Cream_case_reverse("v") " Column Mode {{{1 "*** DEPRECATED: imap c :call Cream_columns() imap :call Cream_columns() imap C :call Cream_columns() imap :call Cream_columns() "*** imap :call Cream_columns() imap :call Cream_columns() imap :call Cream_columns() imap :call Cream_columns() imap :call Cream_columns() imap :call Cream_columns() imap :call Cream_columns() imap :call Cream_columns() vmap vmap vmap vmap vmap vmap vmap vmap " drag vmap vmap imap :call Cream_columns() vmap "*** BROKEN: Can't map mouse in visual-mode for some reason "vmap "*** " 1}}} " Terminal Spoofing "{{{1 if !has("gui_running") " console menus imap :emenu vmap :emenu " Quit "imap :call Cream_exit() "vmap :call Cream_exit() " File imap :emenu vmap :emenu " File.Save imap :wa vmap :wgv " File.SaveAs imap :browse confirm saveasi vmap :browse confirm saveasgv " File.Exit imap :q vmap :qgv endif " 1}}} " vim:foldmethod=marker cream-0.43/cream-colors.vim0000644000076400007660000002356111517300720016216 0ustar digitectlocaluser"= " cream-colors.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * This file responsible for setting colors, either directly or by " calling other color schemes. " * We're going to menu the typical Vim color schemes, but source " custom (and better coordinated) ones from here. That way we can " mandate that everything is better coordinated and complete. function! Cream_colors_reset() " turn on syntax highlighting (formerly cream-behavior.vim) " * Must follow menu setup syntax enable "" set 'background' back to the default. The value can't always be estimated "" and is then guessed. "highlight clear Normal "set background& " Remove all existing highlighting and set the defaults. highlight clear " guess background (will be adjusted/re-set in individual color schemes) if has("gui_running") set background=light else set background=dark endif " Load the syntax highlighting defaults, if it's enabled. if exists("syntax_on") syntax reset endif endfunction call Cream_colors_reset() function! Cream_colors(...) " source custom Cream color schemes " don't allow color choice in terminal if !has("gui_running") let mychoice = "terminal" " use argument elseif exists("a:1") let mychoice = a:1 " use global variable elseif exists("g:CREAM_COLORS") let mychoice = g:CREAM_COLORS " initialize else let mychoice = "cream" endif if mychoice == "terminal" call Cream_source($CREAM . "cream-colors-terminal.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("terminal") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "blackwhite" call Cream_source($CREAM . "cream-colors-blackwhite.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("vim") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "chocolateliquor" call Cream_source($CREAM . "cream-colors-chocolateliquor.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("chocolateliquor") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "dawn" call Cream_source($CREAM . "cream-colors-dawn.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("night") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "inkpot" call Cream_source($CREAM . "cream-colors-inkpot.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("night") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "matrix" call Cream_source($CREAM . "cream-colors-matrix.vim") " we don't offer the selection to others, this scheme only "" if called, change selection, too (otherwise don't change) "if exists("a:1") " call Cream_colors_selection("matrix") "elseif exists("g:CREAM_COLORS_SEL") " call Cream_colors_selection(g:CREAM_COLORS_SEL) "endif elseif mychoice == "night" call Cream_source($CREAM . "cream-colors-night.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("night") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "navajo" call Cream_source($CREAM . "cream-colors-navajo.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("navajo") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "navajo-night" call Cream_source($CREAM . "cream-colors-navajo-night.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("navajo-night") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "oceandeep" call Cream_source($CREAM . "cream-colors-oceandeep.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("oceandeep") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif elseif mychoice == "zenburn" call Cream_source($CREAM . "cream-colors-zenburn.vim") " if called, change selection, too (otherwise don't change) if exists("a:1") call Cream_colors_selection("zenburn") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif else let mychoice = "cream" call Cream_source($CREAM . "cream-colors-default.vim") " if called, change selection, too if exists("a:1") call Cream_colors_selection("reverseblack") elseif exists("g:CREAM_COLORS_SEL") call Cream_colors_selection(g:CREAM_COLORS_SEL) endif endif let g:CREAM_COLORS = mychoice call Cream_menu_settings_preferences() endfunction function! Cream_colors_selection(...) " * Changes the highlighting scheme for selections. " * Pass the selection theme name to change " * Retains final setting via global sessions variable. if exists("a:1") let mychoice = a:1 elseif exists("g:CREAM_COLORS_SEL") let mychoice = g:CREAM_COLORS_SEL else let mychoice = "reverseblack" endif " From gui_w48.c " Color Inverse " "Black", RGB(000000) (ffffff) " "DarkGray", RGB(808080) (7f7f7f) " "Gray", RGB(c0c0c0) (3f3f3f) " "LightGray", RGB(e0e0e0) (1f1f1f) " "White", RGB(ffffff) (000000) " "DarkRed", RGB(800000) (7fffff) " "Red", RGB(ff0000) (00ffff) " "LightRed", RGB(ffa0a0) (005f5f) " "DarkBlue", RGB(000080) (ffff7f) " "Blue", RGB(0000ff) (ffff00) " "LightBlue", RGB(a0a0ff) (5f5f00) " "DarkGreen", RGB(008000) (ff7fff) " "Green", RGB(00ff00) (ff00ff) " "LightGreen", RGB(a0ffa0) (5f005f) " "DarkCyan", RGB(008080) (ff7f7f) " "Cyan", RGB(00ffff) (ff0000) " "LightCyan", RGB(a0ffff) (5f0000) " "DarkMagenta", RGB(800080) (7fff7f) " "Magenta", RGB(ff00ff) (00ff00) " "LightMagenta", RGB(ffa0ff) (005f00) " "Brown", RGB(804040) (7fbfbf) " "Yellow", RGB(ffff00) (0000ff) " "LightYellow", RGB(ffffa0) (00005f) " "DarkYellow", RGB(bbbb00) (4444ff) " "SeaGreen", RGB(2e8b57) (d174a8) " "Orange", RGB(ffa500) (005aff) " "Purple", RGB(a020f0) (5fdf0f) " "SlateBlue", RGB(6a5acd) (95a532) " "Violet", RGB(ee82ee) (117d11) if mychoice == "reverseblack" " (default) " reverse white chars on black highlight Visual gui=bold guibg=#000000 guifg=White cterm=NONE ctermfg=White ctermbg=Black elseif mychoice == "reverseblue" " reverse white chars on blue highlight Visual gui=bold guifg=#ffffff guibg=#000080 cterm=NONE ctermfg=White ctermbg=DarkBlue elseif mychoice == "terminal" " (default) " reverse white chars on blue highlight Visual gui=none guifg=#000000 guibg=#cccccc cterm=NONE ctermfg=DarkBlue ctermbg=White elseif mychoice == "vim" " Vim grey highlight Visual gui=bold guifg=#000000 guibg=#c0c0c0 elseif mychoice == "chocolateliquor" " white on black highlight Visual gui=bold guifg=#1f0f0f guibg=#998866 elseif mychoice == "navajo" " reverse white chars on soft blue highlight Visual gui=bold guifg=#ffffff guibg=#553388 elseif mychoice == "navajo-night" " reverse white chars on soft blue highlight Visual gui=bold guifg=#000000 guibg=#aacc77 elseif mychoice == "night" " soft blue highlight Visual gui=bold guibg=#7070c0 guifg=#ffffff elseif mychoice == "oceandeep" " white on sea green highlight Visual gui=bold guibg=SeaGreen guifg=#ffffff elseif mychoice == "zenburn" " original "highlight Visual gui=bold guibg=#233323 guifg=#71d3b4 highlight Visual gui=bold guibg=#000000 guifg=#71d3b4 elseif mychoice == "cream" " my magenta highlight Visual gui=bold guibg=#ffccff guifg=#000000 cterm=NONE ctermfg=White ctermbg=Magenta " experimentations elseif mychoice == "ltmagenta" " ltmagenta highlight Visual gui=NONE guifg=#000000 guibg=#f0ccff elseif mychoice == "dkmagenta" " dkmagenta highlight Visual gui=NONE guifg=#000000 guibg=#ffaaff elseif mychoice == "blue" " blue highlight Visual gui=NONE guifg=#000000 guibg=#ddddff elseif mychoice == "orange" " orange highlight Visual gui=NONE guifg=#000000 guibg=#ffdd99 elseif mychoice == "green" " green highlight Visual gui=NONE guifg=#000000 guibg=#eeff99 elseif mychoice == "gold" " gold highlight Visual gui=NONE guifg=#000000 guibg=#eedd66 elseif mychoice == "purple" " purple highlight Visual gui=NONE guifg=#000000 guibg=#cc99cc elseif mychoice == "wheat" " wheat highlight Visual gui=NONE guifg=#000000 guibg=#eedd99 endif let g:CREAM_COLORS_SEL = mychoice endfunction cream-0.43/cream-templates.vim0000644000076400007660000003720011517300720016706 0ustar digitectlocaluser" " Filename: cream-templates.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " " Description: This is a template expander. While typing, a brief word " ("keyword") can be expanded into a larger body of standard text " ("template"). (Inspired by imaps.vim, by Srinath Avadhanula.) " " cursor placement marker let s:findchar = "{+}" "" mapping (expands valid keyword to template) "inoremap =Cream_template_expand() " Cream_template_expand() {{{1 function! Cream_template_expand() " test the word before the cursor and expand it if it matches " test the word before the cursor normal h let word = expand('') normal l let rhs = '' if exists('g:cream_template_' . &filetype . '_' . word) " first find out whether this word is a mapping in the current file-type. execute 'let rhs = g:cream_template_' . &filetype . '_' . word elseif exists('g:cream_template__' . word) " also check for general purpose mappings. execute 'let rhs = g:cream_template__' . word end " if this is a mapping if rhs != '' " erase the map's letters with equal number of backspaces let bkspc = "\" . substitute(word, ".", "\", 'ge') " is the cursor placement marker found? if stridx(rhs, s:findchar) != -1 let i = strlen(s:findchar) else let i = 0 endif if rhs =~ s:findchar if i > 0 let movement = "\\?" . s:findchar . "\" . i . "s" else let movement = "\\?" . s:findchar . "\" endif else let movement = "" end return bkspc . rhs . movement endif return '' endfunction " Cream_template_assign() {{{1 function! Cream_template_assign(ftype, mapping, template) " set (initialize) template mappings to be available " arguments: " {ftype} Filetype mapping is applicable in. Can be empty to " match all files. " {mapping} Word to complete template on. " {template} String to insert on completion. " " create variable " Note: Final template is stored here as a double-quoted string. " ALL ESCAPING MUST BE APPROPRIATE AS FOR A DOUBLE-QUOTED STRING, " NOT A LITERAL ONE! execute "let g:cream_template_" . a:ftype . "_" . a:mapping . " = \"" . a:template . "\"" " register with both filetype*s* array AND particular filetype array " * "g:cream_template" arrays all filetypes with templates available " * "g:cream_template . a:ftype" arrays each filetype's templates " initialize filetype's global ("g:cream_template_html") if !exists("g:cream_template_" . a:ftype) " verify filetype is registered (so we don't have to search " through all variables later) " initialize if !exists("g:cream_template") let g:cream_template = a:ftype . "\n" else " only add if not already in array if match(g:cream_template, a:ftype . "\\n") == -1 execute "let g:cream_template = g:cream_template . \"" . a:ftype . "\" . \"\\n\"" endif endif " initialize container execute "let g:cream_template_" . a:ftype . " = ''" endif " append current to global registration for that filetype execute "let g:cream_template_" . a:ftype . " = g:cream_template_" . a:ftype . " . \"" . a:mapping . "\" . \"\\n\"" endfunction " Cream_template_listing() {{{1 function! Cream_template_listing() " diaplay all registered templates " compose display string let mystr = "" " get variable for each filetype registered let x = MvNumberOfElements(g:cream_template, "\n") let i = 0 while i < x " form: "g:cream_template_html" let myvar = MvElementAt(g:cream_template, "\n", i) "let myarray = g:cream_template_{myvar} let y = MvNumberOfElements(g:cream_template_{myvar}, "\n") let j = 0 while j < y " form: "g:cream_template_html_table" let myword = MvElementAt(g:cream_template_{myvar}, "\n", j) let mytemplate = g:cream_template_{myvar}_{myword} " compose string " header if j == 0 let mystr = mystr . "\n" let mywidth = winwidth(0) - 1 let k = 0 while k < mywidth let mystr = mystr . "_" let k = k + 1 endwhile let mystr = mystr . "\n" " empty is applicable to all filetypes if myvar == "" let mystr = mystr . "General Templates (available in all files)" . "\n\n" else let mystr = mystr . toupper(myvar) . " Templates (available in " . myvar . " files only)\n\n" endif let mystr = mystr . "WORD TEMPLATE \n" let mystr = mystr . "--------- -------------------------------------------- \n" endif " remove *initial* newline or return let mytemplate = substitute(mytemplate, '^[\n\r]', '', 'g') " remove dec 001-007 chars let mytemplate = substitute(mytemplate, '[-]', '', 'g') " remove dec 008 () let mytemplate = substitute(mytemplate, '[]', '', 'g') " remove "" let mytemplate = substitute(mytemplate, '\', '', 'g') "" remove dec 009 () "let mytemplate = substitute(mytemplate, '[ ]', '', 'g') " remove dec 011-012 chars let mytemplate = substitute(mytemplate, '[ - ]', '', 'g') " remove dec 014-031 chars let mytemplate = substitute(mytemplate, '[-]', '', 'g') "" trim off remaining returns and replace with ellipses ("...") "let mytemplate = substitute(mytemplate, "\n.*$", "...", "") " remove s:findchar let mytemplate = substitute(mytemplate, s:findchar, '', 'g') " space off templates from left margin let myspacer = " " " preceed entries containing return second lines with a spacer if match(mytemplate, "\n") != -1 let mytemplate = substitute(mytemplate, "\n", "\n" . myspacer, "g") endif " space single/first string let myspacerlen = strlen(myspacer) let myspacer = "" " insert character &textwidth number of times let k = 0 while k < myspacerlen - strlen(myword) let myspacer = myspacer . " " let k = k + 1 endwhile " cat let mystr = mystr . myword . myspacer . mytemplate . "\n" let j = j + 1 endwhile let i = i + 1 endwhile " set margin, right let k = 0 let myright = "" while k < 1 let myright = myright . " " let k = k + 1 endwhile let mystr = substitute(mystr, "\n", '\n' . myright, 'g') " set margin, left let mywidth = winwidth(0) - 1 let mystr = substitute(mystr, "\\v([^\n]{," . mywidth . "})[^\n]*", '\1', 'g') " now add pre-header explanation, so it can wrap/return without concerns let mystr = \ "\n" . \ " The listing below indicates words that can be expanded\n" . \ " into the adjacent template. The templates are grouped \n" . \ " by the file type in which each is available.\n" . \ "\n" . \ " Simply press Shift+Space(x2) with the cursor at the end\n" . \ " of the word. (Note that the word must be separated\n" . \ " by a space or return from the following word.)\n" . \ "\n" . \ " Press the Space Bar to continue... (Esc to quit)\n" . \ mystr echo mystr endfunction " 1}}} " Templates " General {{{1 " date: "20 November 2002" (See F11 for stamps) call Cream_template_assign("", "date", "\=strftime('%d %B %Y')\") " datestamp: "2002-12-04T11:16:27EST" (Same as F11x4) call Cream_template_assign("", "datestamp", "\\=strftime('%Y-%m-%dT%H:%M:%S%Z')\") " URLs call Cream_template_assign("", "url", "http://www.") call Cream_template_assign("", "urlcream", "http://cream.sourceforge.net") call Cream_template_assign("", "urlvim", "http://www.vim.org") call Cream_template_assign("", "urlgpl", "http://www.gnu.org/licenses/gpl.html") call Cream_template_assign("", "urlpi", "http://3.141592653589793238462643383279502884197169399375105820974944592.com/") " ASCII chars 32-126 (Note "!" and " " are swapped for readibility) call Cream_template_assign("", "ascii", "! \\\"#$%&'()*+,-./0123456789:;\<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{\|}~") " a "ruler" -- nice for counting the length of words call Cream_template_assign("", "ruler", "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\n" . \ " 10^ 20^ 30^ 40^ 50^ 60^ 70^ 80^ 90^ 100^\n") " some important numbers call Cream_template_assign("", "e", "2.7182818284590452353602874713526624977573") call Cream_template_assign("", "pi", "3.1415926535897932384626433832795028841972") " pi to 1,000 places call Cream_template_assign("", "PI", \ "3.\n" . \ "1415926535 8979323846 2643383279 5028841971 6939937510\n" . \ "5820974944 5923078164 0628620899 8628034825 3421170679\n" . \ "8214808651 3282306647 0938446095 5058223172 5359408128\n" . \ "4811174502 8410270193 8521105559 6446229489 5493038196\n" . \ "4428810975 6659334461 2847564823 3786783165 2712019091\n" . \ "4564856692 3460348610 4543266482 1339360726 0249141273\n" . \ "7245870066 0631558817 4881520920 9628292540 9171536436\n" . \ "7892590360 0113305305 4882046652 1384146951 9415116094\n" . \ "3305727036 5759591953 0921861173 8193261179 3105118548\n" . \ "0744623799 6274956735 1885752724 8912279381 8301194912\n" . \ "9833673362 4406566430 8602139494 6395224737 1907021798\n" . \ "6094370277 0539217176 2931767523 8467481846 7669405132\n" . \ "0005681271 4526356082 7785771342 7577896091 7363717872\n" . \ "1468440901 2249534301 4654958537 1050792279 6892589235\n" . \ "4201995611 2129021960 8640344181 5981362977 4771309960\n" . \ "5187072113 4999999837 2978049951 0597317328 1609631859\n" . \ "5024459455 3469083026 4252230825 3344685035 2619311881\n" . \ "7101000313 7838752886 5875332083 8142061717 7669147303\n" . \ "5982534904 2875546873 1159562863 8823537875 9375195778\n" . \ "1857780532 1712268066 1300192787 6611195909 2164201989\n" . \ " For more: http://www.piday.org/\n") " standard abbreviations call Cream_template_assign("", "i18n", "internationalization") call Cream_template_assign("", "l10n", "localization") " HTML {{{1 call Cream_template_assign("html", "html", \ '\' . \ '\' . \ '\' . \ '\\' . \ '\' . \ '\' . \ '\' . \ '\' . \ '\\' . \ '\' . \ '' . s:findchar . '\' . \ '\' . \ '\') call Cream_template_assign("html", "table", \ '\' . \ '\' . \ '\\' . \ '\\' . \ '
    ' . s:findchar . '
    \') call Cream_template_assign("html", "tr", \ '\' . \ '\' . s:findchar . '\' . \ '\\') call Cream_template_assign("html", "td", '' . s:findchar . '\') call Cream_template_assign("html", "p", '

    ' . s:findchar . '

    \') call Cream_template_assign("html", "a", '') call Cream_template_assign("html", "mail", '') call Cream_template_assign("html", "b", '' . s:findchar . '') call Cream_template_assign("html", "i", '' . s:findchar . '') call Cream_template_assign("html", "u", '' . s:findchar . '') call Cream_template_assign("html", "ol", '
      \
    1. ' . s:findchar . '
    2. \
    \') call Cream_template_assign("html", "ul", '
      \
    • ' . s:findchar . '
    • \
    \') call Cream_template_assign("html", "li", '
  • ' . s:findchar . '
  • \') call Cream_template_assign("html", "h1", '

    ' . s:findchar . '

    \') call Cream_template_assign("html", "h2", '

    ' . s:findchar . '

    \') call Cream_template_assign("html", "h3", '

    ' . s:findchar . '

    \') call Cream_template_assign("html", "h4", '

    ' . s:findchar . '

    \') call Cream_template_assign("html", "h5", '
    ' . s:findchar . '
    \') call Cream_template_assign("html", "h6", '
    ' . s:findchar . '
    \') " HTML character equivilences {{{1 " " Are these really helpful? A list would be better. call Cream_template_assign("html", "_", "\ \n\" . s:findchar) " HTML greek characters {{{1 " " Cream: single letters are more valuable otherwise "let s:imaps_html_a = "\α" "let s:imaps_html_b = "\β" "let s:imaps_html_c = "\χ" "let s:imaps_html_d = "\δ" "let s:imaps_html_e = "\ε" "let s:imaps_html_f = "\φ" "let s:imaps_html_g = "\γ" "let s:imaps_html_h = "\η" "let s:imaps_html_k = "\κ" "let s:imaps_html_l = "\λ" "let s:imaps_html_m = "\μ" "let s:imaps_html_n = "\ν" "let s:imaps_html_p = "\π" "let s:imaps_html_q = "\θ" "let s:imaps_html_r = "\ρ" "let s:imaps_html_s = "\σ" "let s:imaps_html_t = "\τ" "let s:imaps_html_u = "\υ" "let s:imaps_html_v = "\ς" "let s:imaps_html_w = "\ω" "let s:imaps_html_x = "\ξ" "let s:imaps_html_y = "\ψ" "let s:imaps_html_z = "\ζ" "let s:imaps_html_A = "\Α" "let s:imaps_html_B = "\Β" "let s:imaps_html_C = "\Χ" "let s:imaps_html_D = "\Δ" "let s:imaps_html_E = "\Ε" "let s:imaps_html_F = "\Φ" "let s:imaps_html_G = "\Γ" "let s:imaps_html_H = "\Η" "let s:imaps_html_K = "\Κ" "let s:imaps_html_L = "\Λ" "let s:imaps_html_M = "\Μ" "let s:imaps_html_N = "\Ν" "let s:imaps_html_P = "\Π" "let s:imaps_html_Q = "\Θ" "let s:imaps_html_R = "\Ρ" "let s:imaps_html_S = "\Σ" "let s:imaps_html_T = "\Τ" "let s:imaps_html_U = "\Υ" "let s:imaps_html_V = "\&Varsigma;" "let s:imaps_html_W = "\Ω" "let s:imaps_html_X = "\Ξ" "let s:imaps_html_Y = "\Ψ" "let s:imaps_html_Z = "\Ζ" " Vim {{{1 call Cream_template_assign("vim", "function", \ "function! \" . s:findchar . \"()\n" . \ "\n" . \ "endfunction\n") call Cream_template_assign("vim", "while", \ "let i = 0\n" . \ "while i \< \" . s:findchar . \"\n" . \ "\n" . \ "\let i = i + 1\n" . \ "\endwhile\n") call Cream_template_assign("vim", "debug", \ '\"*** DEBUG:\\\' . \ '\let n = confirm(\' . \ '\\\ \"DEBUG:\\n\" .\' . \ '\\ \" ' . s:findchar . 'myvar = \\\"\" . myvar . \"\\\"\\n\" .\' . \ '\\ \"\\n\", \"&Ok\\n&Cancel\", 1, \"Info\")\' . \ 'if n != 1\' . \ 'return\' . \ '\endif\' . \ '\"***\\') call Cream_template_assign("vim", "confirm", \ "call confirm(\\n" . \ "\\\\\ \\\"\" . s:findchar . \"\\\\n\\\" .\\n" . \ "\\\\ \\\"\\\\n\\\", \\\"&Ok\\\", 1, \\\"Info\\\")\n\") " VB (Basic) {{{1 call Cream_template_assign("basic", "debug", \ "\'*** DEBUG:\\n" . \ "\Msg (\\\"Progress to here!\\\" & Chr(13) & _\\n" . \ "\\\\\" \" . s:findchar . \"myvar = \\\" & myvar & Chr(13) & _\\n" . \ "Chr(13))\\n" . \ "\'***\\n" . \ "") " Lisp {{{1 call Cream_template_assign("lisp", "debug", \ '\(princ \"DEBUG: \"' . s:findchar . 'myvar : \") (princ myvar) (princ \"\\n\")\\') "1}}} " vim:foldmethod=marker cream-0.43/cream.png0000644000076400007660000000153011156572440014711 0ustar digitectlocaluserPNG  IHDR00WbKGD pHYs  tIMEIDAThKQǿg殮@P!K,*,߂CHac@o>?[APRk/ڪn==ؚ. y39 `snl8s"%+þO*(  ^D {Mxt}Hu\}K UE83nJڬ%h8~ls'9B/ZKNa +k~Ah/I%jt˕10#{iuwnm-^0V]/zؔv8TTLM:n=uUSz<ϟhw*uz:~Զ$ڮ`K03;Doٺ ڣZY2-; n2ߙ TXf^OϨi{܈Dw V ln8dKv }^ @,AZ ʶHm¿:=(eʌH.J^ dECbJ+KobzWzg83 h20kH?=RL>hȹ EE̿mA,$kK1 ]8ҌPo i1O p [O~욁=6/!7;P@.>i l[Cm(2j?ĔȔ/d0}*ycˀ*t5$Md+ lr#4fT,vQFAc?7=IENDB`cream-0.43/cream-menu-format.vim0000644000076400007660000004051211517300720017142 0ustar digitectlocaluser" " cream-menu-format.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. imenu 50.100 Fo&rmat.&Quick\ Wrap\ (selection\ or\ current\ paragraph)Ctrl+Q :call Cream_quickwrap("i") vmenu 50.101 Fo&rmat.&Quick\ Wrap\ (selection\ or\ current\ paragraph)Ctrl+Q :call Cream_quickwrap("v") imenu 50.102 Fo&rmat.Quick\ &Un-Wrap\ (selection\ or\ current\ paragraph)Alt+Q,\ Q :call Cream_quickunwrap("i") vmenu 50.103 Fo&rmat.Quick\ &Un-Wrap\ (selection\ or\ current\ paragraph)Alt+Q,\ Q :call Cream_quickunwrap("v") anoremenu 50.200 Fo&rmat.-Sep200- imenu 50.201 Fo&rmat.Capitalize,\ Title\ CaseF5 :call Cream_case_title("i") vmenu 50.202 Fo&rmat.Capitalize,\ Title\ CaseF5 :call Cream_case_title("v") imenu 50.203 Fo&rmat.Capitalize,\ UPPERCASEShift+F5 :call Cream_case_upper("i") vmenu 50.204 Fo&rmat.Capitalize,\ UPPERCASEShift+F5 :call Cream_case_upper("v") imenu 50.205 Fo&rmat.Capitalize,\ lowercaseAlt+F5 :call Cream_case_lower("i") vmenu 50.206 Fo&rmat.Capitalize,\ lowercaseAlt+F5 :call Cream_case_lower("v") "imenu 50.207 Fo&rmat.Capitalize,\ rEVERSECtrl+F5 :call Cream_case_reverse("i") "vmenu 50.208 Fo&rmat.Capitalize,\ rEVERSECtrl+F5 :call Cream_case_reverse("v") anoremenu 50.300 Fo&rmat.-Sep300- imenu 50.301 Fo&rmat.Justify,\ Left :call Cream_quickwrap_set("i", "left") vmenu 50.302 Fo&rmat.Justify,\ Left :call Cream_quickwrap_set("v", "left") imenu 50.303 Fo&rmat.Justify,\ Center :call Cream_quickwrap_set("i", "center") vmenu 50.304 Fo&rmat.Justify,\ Center :call Cream_quickwrap_set("v", "center") imenu 50.305 Fo&rmat.Justify,\ Right :call Cream_quickwrap_set("i", "full") vmenu 50.306 Fo&rmat.Justify,\ Right :call Cream_quickwrap_set("v", "right") imenu 50.307 Fo&rmat.Justify,\ Full :call Cream_quickwrap_set("i", "full") vmenu 50.308 Fo&rmat.Justify,\ Full :call Cream_quickwrap_set("v", "full") " utilities anoremenu 50.600 Fo&rmat.-Sep600- imenu 50.601 Fo&rmat.Remove\ &Leading\ Whitespace :call Cream_whitespace_trim_leading("i") vmenu 50.602 Fo&rmat.Remove\ &Leading\ Whitespace :call Cream_whitespace_trim_leading("v") imenu 50.603 Fo&rmat.&Remove\ Trailing\ Whitespace :call Cream_whitespace_trim_trailing("i") vmenu 50.604 Fo&rmat.&Remove\ Trailing\ Whitespace :call Cream_whitespace_trim_trailing("v") anoremenu 50.605 Fo&rmat.&Collapse\ All\ Empty\ Lines\ to\ One :call Cream_emptyline_collapse() anoremenu 50.606 Fo&rmat.&Delete\ All\ Empty\ Lines :call Cream_emptyline_delete() vmenu 50.607 Fo&rmat.&Join\ Lines\ (selection) :call Cream_joinlines("v") anoremenu 50.608 Fo&rmat.Con&vert\ Tabs\ To\ Spaces :call Cream_retab() anoremenu 50.650 Fo&rmat.-Sep50650- anoremenu 50.651 Fo&rmat.&File\ Format\.\.\. :call Cream_fileformat() anoremenu 50.700 Fo&rmat.-Sep50700- " Vim encodings " " iso-8859-n ISO_8859 variant (n = 2 to 15) " " latin1 8-bit characters (ISO 8859-1) " ansi same as latin1 (obsolete, for backward compatibility) " " cp{number} MS-Windows: any installed double-byte codepage (ex: "8bit-cp1252") " cp{number} MS-Windows: any installed single-byte codepage " 2byte-{name} Unix: any double-byte encoding (Vim specific name) " 8bit-{name} any 8-bit encoding (Vim specific name) " " big5 traditional Chinese (on Windows alias for cp950) " cp950 traditional Chinese (on Unix alias for big5) " " chinese same as "prc" " prc simplified Chinese: on Unix "euc-cn", on MS-Windows cp936 " cp936 simplified Chinese (Windows only) " " japan Japanese: on Unix "euc-jp", on MS-Windows cp932 " cp932 Japanese (Windows only) " euc-jp Japanese (Unix only) " " korea Korean: on Unix "euc-kr", on MS-Windows cp949 " euc-kr Korean (Unix only) " cp949 Korean (Unix and Windows) " " taiwan traditional Chinese: on Unix "euc-tw", on MS-Windows cp950 " euc-tw traditional Chinese (Unix only) " " koi8-r Russian " " koi8-u Ukrainian " " ucs-2 16 bit UCS-2 encoded Unicode (ISO/IEC 10646-1) " unicode same as ucs-2 " ucs2be same as ucs-2 (big endian) " ucs-2be same as ucs-2 (big endian) " " ucs-2le like ucs-2, little endian " " utf-16 ucs-2 extended with double-words for more characters " " utf-16le like utf-16, little endian " " ucs-4 32 bit UCS-4 encoded Unicode (ISO/IEC 10646-1) " ucs-4be same as ucs-4 (big endian) " " ucs-4le like ucs-4, little endian " " utf-8 32 bit UTF-8 encoded Unicode (ISO/IEC 10646-1) " utf8 same as utf-8 " " ..................................................................... " Not available below (not multi-platform) " " euc-cn simplified Chinese (Unix only) " " sjis Japanese (Unix only) " " General " " Note: This list is re-used at print encoding. " " Unicode (UTF-8) -------------------------------------------------- anoremenu 50.701 Fo&rmat.File\ &Encoding.Unicode.Unicode\ (UTF-8)[utf-8\ --\ 32-bit\ Unicode\ (ISO/IEC\ 10646-1)] :call Cream_fileencoding_set("utf-8") anoremenu 50.702 Fo&rmat.File\ &Encoding.Unicode.-Sep50702- " unicode (UCS-2) anoremenu 50.703 Fo&rmat.File\ &Encoding.Unicode.Unicode\ (UCS-2)[ucs-2\ --\ 16-bit\ Unicode\ (ISO/IEC\ 10646-1)] :call Cream_fileencoding_set("ucs-2") " unicode (UCS-2le) anoremenu 50.704 Fo&rmat.File\ &Encoding.Unicode.Unicode\ (UCS-2le)[ucs-2le\ --\ UCS-2,\ little\ endian] :call Cream_fileencoding_set("ucs-2le") " unicode (UCS-16) anoremenu 50.705 Fo&rmat.File\ &Encoding.Unicode.Unicode\ (UTF-16)[utf-16\ --\ UCS-2\ extended] :call Cream_fileencoding_set("utf-16") " unicode (UCS-16le) anoremenu 50.706 Fo&rmat.File\ &Encoding.Unicode.Unicode\ (UTF-16le)[utf-16le\ --\ UTF-16,\ little\ endian] :call Cream_fileencoding_set("utf-16le") " unicode (UCS-4) anoremenu 50.707 Fo&rmat.File\ &Encoding.Unicode.Unicode\ (UCS-4)[ucs-4\ --\ 32\ bit\ Unicode\ (ISO/IEC\ 10646-1)] :call Cream_fileencoding_set("ucs-4") " unicode (UCS-4le) anoremenu 50.708 Fo&rmat.File\ &Encoding.Unicode.Unicode\ (UCS-4le)[ucs-4le\ --\ UCS-4,\ little\ endian] :call Cream_fileencoding_set("ucs-4le") " Unicode (UTF-7) anoremenu 50.710 Fo&rmat.File\ &Encoding.-Sep50710- " Western European --------------------------------------------------- " Western (ISO-8859-1) anoremenu 50.711 Fo&rmat.File\ &Encoding.Western\ European.Western\ (ISO-8859-1)[latin1\ (8-bit\ ANSI)] :call Cream_fileencoding_set("latin1") " Western (ISO-8859-15) anoremenu 50.712 Fo&rmat.File\ &Encoding.Western\ European.Western\ (ISO-8859-15) :call Cream_fileencoding_set("iso-8859-15") " Western (IBM-850) " Western (MacRoman) " Western (Windows-1252) anoremenu 50.715 Fo&rmat.File\ &Encoding.Western\ European.Western\ (Windows-1252)[8bit-cp1252] :call Cream_fileencoding_set("8bit-cp1252") " Celtic (ISO-8859-14) anoremenu 50.716 Fo&rmat.File\ &Encoding.Western\ European.Celtic\ (ISO-8859-14) :call Cream_fileencoding_set("iso-8859-14") " Greek (ISO-8859-7) anoremenu 50.717 Fo&rmat.File\ &Encoding.Western\ European.Greek\ (ISO-8859-7) :call Cream_fileencoding_set("iso-8859-7") " Greek (MacGreek) " Greek (Windows-1253) anoremenu 50.719 Fo&rmat.File\ &Encoding.Western\ European.Greek\ (Windows-1253)[8bit-cp1253] :call Cream_fileencoding_set("8bit-cp1253") " Icelandic (MacIcelandic) " Nordic (ISO-8859-10) anoremenu 50.721 Fo&rmat.File\ &Encoding.Western\ European.Nordic\ (ISO-8859-10) :call Cream_fileencoding_set("iso-8859-10") " Polish (ISO-8859-2) anoremenu 50.722 Fo&rmat.File\ &Encoding.Western\ European.Polish\ (ISO-8859-2) :call Cream_fileencoding_set("iso-8859-2") " South European (ISO-8859-3) anoremenu 50.723 Fo&rmat.File\ &Encoding.Western\ European.South\ European\ (ISO-8859-3) :call Cream_fileencoding_set("iso-8859-3") " East European ------------------------------------------------------ " Baltic (ISO-8859-4) anoremenu 50.724 Fo&rmat.File\ &Encoding.Eastern\ European.Baltic\ (ISO-8859-4) :call Cream_fileencoding_set("iso-8859-4") " Baltic (ISO-8859-13) anoremenu 50.725 Fo&rmat.File\ &Encoding.Eastern\ European.Baltic\ (ISO-8859-13) :call Cream_fileencoding_set("iso-8859-13") " Baltic (Windows-1257) anoremenu 50.726 Fo&rmat.File\ &Encoding.Eastern\ European.Baltic\ (Windows-1257)[8bit-cp1257] :call Cream_fileencoding_set("8bit-cp1257") " Central European (IBM-852) " Central European (MacCE) " Central European (Windows 1250) anoremenu 50.728 Fo&rmat.File\ &Encoding.Eastern\ European.Central\ European\ (Windows-1250)[8bit-cp1250] :call Cream_fileencoding_set("8bit-cp1250") " Croatian (MacCroatian) " Cyrillic (IBM-855) " Cyrillic (ISO-8859-5) anoremenu 50.731 Fo&rmat.File\ &Encoding.Eastern\ European.Cyrillic\ (ISO-8859-5) :call Cream_fileencoding_set("iso-8859-5") " Cyrillic (ISO-IR-111) " Cyrillic (KO18-R) anoremenu 50.733 Fo&rmat.File\ &Encoding.Eastern\ European.Cyrillic/Russian\ (KO18-R)[koi8-r] :call Cream_fileencoding_set("koi8-r") " Cyrillic (MacCyrillic) " Cyrillic (Windows-1251) anoremenu 50.735 Fo&rmat.File\ &Encoding.Eastern\ European.Cyrillic\ (Windows-1251)[8bit-cp1251] :call Cream_fileencoding_set("8bit-cp1251") " Cyrillic/Russian (CP-866) " Cyrillic/Ukrainian (KO18-U) anoremenu 50.737 Fo&rmat.File\ &Encoding.Eastern\ European.Cyrillic/Ukrainian\ (KO18-U)[koi8-u] :call Cream_fileencoding_set("koi8-u") " Cyrillic/Ukrainian (MacUkrainian) " Romanian (ISO-8859-16) anoremenu 50.739 Fo&rmat.File\ &Encoding.Eastern\ European.Romanian\ (ISO-8859-16) :call Cream_fileencoding_set("iso-8859-16") " Romanian (MacRomanian) " Armenian (ARMSCII-8) " Georgian (GEOSTD8) " Thai (TIS-620) " Turkish (IBM-857) " Turkish (ISO-8859-9) anoremenu 50.740 Fo&rmat.File\ &Encoding.Eastern\ European.Turkish\ (ISO-8859-9) :call Cream_fileencoding_set("iso-8859-9") " Turkish (MacTurkish) " Turkish (Windows-1254) anoremenu 50.741 Fo&rmat.File\ &Encoding.Eastern\ European.Turkish\ (Windows-1254)[8bit-cp1254] :call Cream_fileencoding_set("8bit-cp1254") " Asian -------------------------------------------------------------- " Simplified Chinese (ISO-2022-CN) anoremenu 50.745 Fo&rmat.File\ &Encoding.Asian.Simplified\ Chinese\ (ISO-2022-CN)[chinese\ (simplified\ Chinese:\ Unix\ "euc-cn",\ MS-Windows\ "cp936")] :call Cream_fileencoding_set("chinese") " Chinese Simplified (GB2312) " Chinese Simplified (GBK) " Chinese Simplified (GB18030) " Chinese Simplified (HZ) " Chinese Traditional (Big5) anoremenu 50.746 Fo&rmat.File\ &Encoding.Asian.Chinese\ Traditional\ (Big5)[big5\ (traditional\ Chinese)] :call Cream_fileencoding_set("big5") " Chinese Traditional (Big5-HKSCS) " Chinese Traditional (EUC-TW) anoremenu 50.747 Fo&rmat.File\ &Encoding.Asian.Chinese\ Traditional\ (EUC-TW)[taiwan\ (Unix\ "euc-tw",\ MS-Windows\ "cp950")] :call Cream_fileencoding_set("taiwan") anoremenu 50.748 Fo&rmat.File\ &Encoding.Asian.Korean[korea\ (Unix\ "euc-kr",\ MS-Windows\ "cp949")] :call Cream_fileencoding_set("korea") " Korean (EUC-KR) " Korean (UHC) " Korean (JOHAB) " Korean (ISO-2022-KR) anoremenu 50.749 Fo&rmat.File\ &Encoding.Asian.Japanese[japan\ (Unix\ "euc-jp",\ MS-Windows\ "cp932")] :call Cream_fileencoding_set("japan") " Japanese (EUC-JP) " Japanese (ISO-2022-JP) " Japanese (Shift_JIS) " Thai (ISO-8859-11) anoremenu 50.750 Fo&rmat.File\ &Encoding.Asian.Thai\ (ISO-8859-11) :call Cream_fileencoding_set("iso-8859-11") " Vietnamese (TCVN) " Vietnamese (VISCII) " Vietnamese (VPS) " Vietnamese (Windows-1258) anoremenu 50.751 Fo&rmat.File\ &Encoding.Asian.Vietnamese\ (Windows-1258)[8bit-cp1258] :call Cream_fileencoding_set("8bit-cp1258") " Hindi (MacDevanagari) " Gujarati (MacGujarati) " Gurmukhi (MacGurmukhi) " Middle Eastern ----------------------------------------------------- " Arabic (ISO-8859-6) anoremenu 50.775 Fo&rmat.File\ &Encoding.Middle\ Eastern.Arabic\ (ISO-8859-6) :call Cream_fileencoding_set("iso-8859-6") " Arabic (Windows-1256) anoremenu 50.776 Fo&rmat.File\ &Encoding.Middle\ Eastern.Arabic\ (Windows-1256)[8bit-cp1256] :call Cream_fileencoding_set("8bit-cp1256") " Arabic (IBM-864) " Arabic (MacArabic) " Farsi (MacFarsi) " Hebrew (ISO-8859-8-I) " Hebrew (Windows-1255) anoremenu 50.782 Fo&rmat.File\ &Encoding.Middle\ Eastern.Hebrew\ (Windows-1255)[8bit-cp1255] :call Cream_fileencoding_set("8bit-cp1255") " Hebrew Visual (ISO-8859-8) anoremenu 50.783 Fo&rmat.File\ &Encoding.Middle\ Eastern.Hebrew\ Visual\ (ISO-8859-8) :call Cream_fileencoding_set("iso-8859-8") " Hebrew (IBM-862) " Hebrew (MacHebrew) " Character Encoding listing (Mozilla 1.2) {{{1 " " Western European " Western (ISO-8859-1) " Western (ISO-8859-15) " Western (IBM-850) " Western (MacRoman) " Western (Windows-1252) " Celtic (ISO-8859-14) " Greek (ISO-8859-7) " Greek (MacGreek) " Greek (Windows-1253) " Icelandic (MacIcelandic) " Nordic (ISO-8859-10) " South European (ISO-8859-3) " " East European " Baltic (ISO-8859-4) " Baltic (ISO-8859-13) " Baltic (Windows-1257) " Central European (IBM-852) " Central European (MacCE) " Central European (Windows 1250) " Croatian (MacCroatian) " Cyrillic (IBM-855) " Cyrillic (ISO-8859-5) " Cyrillic (ISO-IR-111) " Cyrillic (KO18-R) " Cyrillic (MacCyrillic) " Cyrillic (Windows-1251) " Cyrillic/Russian (CP-866) " Cyrillic/Ukrainian (KO18-U) " Cyrillic/Ukrainian (MacUkrainian) " Romanian (ISO-8859-16) " Romanian (MacRomanian) " " East Asian " Chinese Simplified (GB2312) " Chinese Simplified (GBK) " Chinese Simplified (GB18030) " Chinese Simplified (HZ) " Chinese Traditional (Big5) " Chinese Traditional (Big5-HKSCS) " Chinese Traditional (EUC-TW) " Japanese (EUC-JP) " Japanese (ISO-2022-JP) " Japanese (Shift_JIS) " Korean (EUC-KR) " Korean (UHC) " Korean (JOHAB) " Korean (ISO-2022-KR) " " SE & SW Asian " Armenian (ARMSCII-8) " Georgian (GEOSTD8) " Thai (TIS-620) " Turkish (IBM-857) " Turkish (ISO-8859-9) " Turkish (MacTurkish) " Turkish (Windows-1254) " Vietnamese (TCVN) " Vietnamese (VISCII) " Vietnamese (VPS) " Vietnamese (Windows-1258) " Hindi (MacDevanagari) " Gujarati (MacGujarati) " Gurmukhi (MacGurmukhi) " " Middle Eastern " Arabic (ISO-8859-6) " Arabic (Windows-1256) " Arabic (IBM-864) " Arabic (MacArabic) " Farsi (MacFarsi) " Hebrew (ISO-8859-8-I) " Hebrew (Windows-1255) " Hebrew Visual (ISO-8859-8) " Hebrew (IBM-862) " Hebrew (MacHebrew) " " 1}}} " vim:foldmethod=marker cream-0.43/cream-autocmd.vim0000644000076400007660000001631711517300716016357 0ustar digitectlocaluser" " Filename: cream-autocmd.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " TEST: What autocmds are activated? "function! Cream_test_1(word) " call confirm( " \ "AutoCmd: " . a:word . "\n" . " \ "\n", "&Ok", 1, "Info") "endfunction "autocmd VimEnter * call Cream_test_1("VimEnter") "autocmd TabEnter * call Cream_test_1("TabEnter") "autocmd WinEnter * call Cream_test_1("WinEnter") "autocmd BufEnter * call Cream_test_1("BufEnter") " behavior (Cream/CreamLite/Vim/Vi) {{{1 " * Note that this is called only for the condition that the over-ride " setting in cream-conf differs from default "cream". Isn't it " ironic that neither Vim nor Vi settings can retain this. ;) autocmd VimEnter * call Cream_behave_init() " single server {{{1 autocmd VimEnter * call Cream_singleserver_init() autocmd VimEnter * call Cream_singleserver() " initialize (fix vars, etc.) {{{1 autocmd VimEnter * call Cream_var_manage() " conf {{{1 " (testing for existance checks if even available) if exists("*Cream_conf_override") autocmd BufEnter * call Cream_conf_override() endif " lib {{{1 " fix version 6.0 hang in normal mode... autocmd BufEnter * call Cream_bufenter_fix() " helps if user exits via window manager close function augroup CreamExit autocmd! autocmd VimLeavePre * call Cream_exit() augroup END " path and filename {{{1 autocmd VimEnter * call Cream_buffers_pathfile() autocmd BufEnter,BufWritePost * call Cream_buffer_pathfile() " tabpages and last buffer restore {{{1 " NOTES: " * DO NOT USE BufEnter HERE!! We only need it once. " * Must precede last buffer restore (so file is correctly displayed in " the active tab). autocmd VimEnter * call Cream_tabpages_init() " (must follow tabpages init) autocmd VimEnter * call Cream_last_buffer_restore() " fix tab mis-count issue autocmd FocusLost * call Cream_tabs_focuslost() autocmd FocusGained * call Cream_tabs_focusgained() " filetype and syntax highlighting {{{1 "" first buffer isn't detected "autocmd VimEnter * filetype detect " re-detect new or changed buffers autocmd VimEnter,BufEnter,FileType * call Cream_filetype() " syntax highlighting (must follow filetype detection) autocmd VimEnter * call Cream_syntax_init() " settings {{{1 " view load autocmd BufRead * if &buftype != "quickfix" | loadview | endif " view save autocmd BufWrite * mkview autocmd BufEnter,BufNewFile * call Cream_autoindent_init() autocmd BufEnter,BufNewFile * call Cream_tabstop_init() autocmd BufEnter,BufNewFile * call Cream_wrap_init() autocmd BufEnter,BufNewFile * call Cream_autowrap_init() autocmd BufEnter,BufNew * call Cream_expandtab_init() autocmd BufEnter,BufNew * call Cream_linenumbers_init() autocmd BufEnter,BufNewFile * call Cream_search_highlight_init() " printer settings autocmd VimEnter * call Cream_print_init() " window titling autocmd VimEnter * call Cream_titletext_init() " statusline autocmd VimEnter * call Cream_statusline_init() " show invisibles (list) autocmd BufEnter,BufNewFile * call Cream_list_init() " keymap autocmd VimEnter * call Cream_keymap_init() " current working directory autocmd VimEnter,BufEnter * call Cream_cwd() " modelines autocmd VimEnter,BufEnter,BufWrite * call SecureModelines_DoModelines() " colors {{{1 autocmd VimEnter * call Cream_colors() " GTK1 seems to have trouble remembering these across buffers... autocmd VimEnter * call Cream_colors_selection() " gui {{{1 " font must preceed Cream_screen_init() if has("gui") autocmd VimEnter * call Cream_font_init() endif if has("gui") autocmd VimEnter * call Cream_winpos_init() endif if has("gui") autocmd VimEnter * call Cream_screen_init() endif " NOTE: tabpages initialization must occur before last buffer restore. " errorbells (must occur after GUI starts) autocmd VimEnter * call Cream_errorbells_off() " features {{{1 " bookmarks autocmd VimEnter,BufEnter * call Cream_ShowMarks() " fold, open current autocmd VimEnter * call Cream_fold_init() " middle mouse button behavior autocmd VimEnter * call Cream_mouse_middle_init() " current line highlighting autocmd BufEnter * call Cream_highlight_currentline_init() "" spell check "autocmd VimEnter * call Cream_spell_init() " auto-correct (abbreviations) autocmd VimEnter * call Cream_autocorrect_init() " expertmode autocmd VimEnter * call Cream_expertmode_init() " calendar autocmd VimEnter * call Cream_calendar_init() " auto-popup autocmd VimEnter * call Cream_pop_init() " bracket match flashing autocmd VimEnter * call Cream_bracketmatch_init() " diff updating autocmd BufEnter,BufWritePost * call Cream_diffmode_update() " menus {{{1 " Note: Menus are late since they are slow. This allows the user to see Vim " starting earlier, although the tradeoff is slightly more flutter as they see " final setup. " Settings menu autocmd VimEnter * call Cream_menu_settings() autocmd VimEnter * call Cream_menu_settings_invisibles() autocmd VimEnter * call Cream_menu_settings_linenumbers() autocmd VimEnter * call Cream_menu_settings_wordwrap() autocmd VimEnter * call Cream_menu_settings_autowrap() autocmd VimEnter * call Cream_menu_settings_highlightwrapwidth() autocmd VimEnter * call Cream_menu_settings_expandtab() autocmd VimEnter * call Cream_menu_settings_autoindent() autocmd VimEnter * call Cream_menu_settings_highlightsearch() autocmd VimEnter * call Cream_menu_settings_highlightcurrentline() autocmd VimEnter * call Cream_menu_settings_syntax() " Settings > Preferences autocmd VimEnter * call Cream_menu_settings_preferences() " Colors autocmd VimEnter * call Cream_menu_colors() " Most recent used (MRU) autocmd VimEnter * call MRUInitialize() autocmd BufEnter * call MRUAddToList() " Window.Buffer menu " TODO: We are unable to react when an unnamed buffer becomes modified " since Vim has no event for this. autocmd VimEnter,BufWinEnter,BufEnter,BufNew,WinEnter * call BMShow() " Developer menu if exists("g:cream_dev") autocmd VimEnter * call Cream_menu_devel() endif " Toolbar if has("gui_running") autocmd VimEnter * call Cream_toolbar_init() endif " load menu autocmd VimEnter * set guioptions+=m " user location {{{1 " Note: This is placed penultimatly here so it over-rides all prior " except addons. This enables the alphabetical menuization of user " addons with the default addons. autocmd VimEnter * call Cream_load_user() " add-ons {{{1 autocmd VimEnter * call Cream_addon_loadall() autocmd VimEnter * call Cream_addon_menu() autocmd VimEnter * call Cream_addon_maps_init() " 1}}} " vim:foldmethod=marker cream-0.43/bitmaps/0000755000076400007660000000000011517421112014542 5ustar digitectlocalusercream-0.43/bitmaps/undo.xpm0000644000076400007660000000171411156572440016252 0ustar digitectlocaluser/* XPM */ static char * undo_xpm[] = { "18 18 35 1", " c None", ". c #000000", "+ c #F7F3DF", "@ c #F9F6EA", "# c #EED680", "$ c #303030", "% c #F9F5E4", "& c #F4E4AD", "* c #F7EECC", "= c #EFE4C2", "- c #948A6F", "; c #F9F5E6", "> c #F1DD97", ", c #D1B051", "' c #F2EFE4", ") c #C0A048", "! c #C3A970", "~ c #D1940C", "{ c #E0B74C", "] c #D9C374", "^ c #BCA36B", "/ c #D59D1C", "( c #B1933F", "_ c #BEA56F", ": c #986B07", "< c #DFB74A", "[ c #CCB76D", "} c #BC9F5F", "| c #B8820A", "1 c #D9A72E", "2 c #D4B150", "3 c #A39256", "4 c #E2CB79", "5 c #C9B46B", "6 c #8D7E4A", " ", " . ", " .. ", " .+. ", " .@#.... ", " $%##&*=-.. ", " .;>######,.. ", " .'>########). ", " .!~~~~~~{#]. ", " .^~~~~~~/#(. ", " ._~...:~<[. ", " .}. .|1#. ", " .. .~#. ", " . .23. ", " .4. ", " .56. ", " .. ", " "}; cream-0.43/bitmaps/exit.xpm0000644000076400007660000000256011156572440016256 0ustar digitectlocaluser/* XPM */ static char * exit_xpm[] = { "18 18 63 1", " c None", ". c #000000", "+ c #E2E2E0", "@ c #D3D3D0", "# c #C0C0BD", "$ c #ADADAB", "% c #929291", "& c #B7B7B5", "* c #9A9A98", "= c #E46245", "- c #DEDEDC", "; c #C1C1BE", "> c #B9B9B7", ", c #9C9C9B", "' c #060806", ") c #070907", "! c #E7755B", "~ c #B3533E", "{ c #D0D0CD", "] c #0E110C", "^ c #0F120D", "/ c #DF421E", "( c #B14D36", "_ c #BDBDBB", ": c #A4A4A2", "< c #161C14", "[ c #191F16", "} c #B0160A", "| c #B11B10", "1 c #993929", "2 c #797977", "3 c #5B5B5A", "4 c #1D251B", "5 c #20281D", "6 c #990000", "7 c #880000", "8 c #AA3F2C", "9 c #6C6C6A", "0 c #273124", "a c #2A3526", "b c #C83E2B", "c c #A1100B", "d c #A3140E", "e c #2B3727", "f c #313D2C", "g c #D4D4D1", "h c #354331", "i c #B4B4B2", "j c #8D8D8B", "k c #2D3A29", "l c #3B4A35", "m c #E0E0DE", "n c #C9C9C7", "o c #939491", "p c #51544F", "q c #34412F", "r c #42543D", "s c #495D43", "t c #5C6059", "u c #495C42", "v c #4F6448", "w c #53684B", "x c #546A4D", " ", " ", " .......... ", " .+@#$%.... ", " ...+@#&*.... ", " .=.-@;>,.'). ", " ....!~.{;>,.]^. ", " .====/(._:,.<[. ", " .=}}}}|1.23.45. ", " .=666678.9,.0a. ", " .bcd778.;>,.ef. ", " ....78.g;>,.ah. ", " .8.+g;ij.kl. ", " ...mnop.qrs. ", " .&t.luvwx. ", " .......... ", " ", " "}; cream-0.43/bitmaps/text_align_left.xpm0000644000076400007660000000074711156572440020462 0ustar digitectlocaluser/* XPM */ static char * text_align_left_xpm[] = { "18 18 2 1", " c None", ". c #000000", " ", " ", " ", " .. ... .. ", " ", " ..... ..... ", " ", " .. .... . ", " ", " ..... ....... ", " ", " ... ..... . ", " ", " ..... .. ", " ", " ", " ", " "}; cream-0.43/bitmaps/save_as.bmp0000644000076400007660000000051611156572440016677 0ustar digitectlocaluserBMNv(` ` D4 WH3(O]tgXr]ygtGɺ̾PIfEa Ym] йm] й- й&d йffffd йd й0d й 0^d й d й0nd й йwp0d 0 cream-0.43/bitmaps/search_and_replace.bmp0000644000076400007660000000051611156572440021040 0ustar digitectlocaluserBMNv(0 0 +++AO+MXJc2Yeccc&>tG8 0 Pfl tl1c cream-0.43/bitmaps/text_align_right.xpm0000644000076400007660000000075011156572440020637 0ustar digitectlocaluser/* XPM */ static char * text_align_right_xpm[] = { "18 18 2 1", " c None", ". c #000000", " ", " ", " ", " ... ... .. ", " ", " ...... ..... ", " ", " . .... .. ", " ", " ....... ..... ", " ", " .. ..... ... ", " ", " ... ..... ", " ", " ", " ", " "}; cream-0.43/bitmaps/copy_alt.xpm0000644000076400007660000000455311156572440017123 0ustar digitectlocaluser/* XPM */ static char * copy_alt_xpm[] = { "18 18 95 2", " c None", ". c #000000", "+ c #CFCFCF", "@ c #D7D7D7", "# c #545454", "$ c #6F6F6F", "% c #CACACA", "& c #BCBCBC", "* c #9E9E9E", "= c #727272", "- c #DCDCDC", "; c #B2B2B2", "> c #848383", ", c #5E5D5E", "' c #707070", ") c #1B1A1A", "! c #A9A8A8", "~ c #939292", "{ c #C7C6C6", "] c #BDBAB9", "^ c #97928E", "/ c #201D1C", "( c #BBBBBB", "_ c #9D9997", ": c #B8B2AB", "< c #CEC3BA", "[ c #433D37", "} c #737373", "| c #B3B2B2", "1 c #C8C4C1", "2 c #A49D97", "3 c #ADA298", "4 c #C1B3A5", "5 c #423A32", "6 c #767676", "7 c #AAAAAA", "8 c #B2B0AF", "9 c #9C9896", "0 c #9B938D", "a c #ACA196", "b c #96877B", "c c #CFBCAA", "d c #41372E", "e c #393939", "f c #9D9D9D", "g c #B9B6B2", "h c #8E8780", "i c #A2968D", "j c #968779", "k c #B09D8C", "l c #BCA48D", "m c #40332A", "n c #626262", "o c #C7C7C7", "p c #BEBEBE", "q c #999999", "r c #212121", "s c #D6D6D5", "t c #9C9795", "u c #99928C", "v c #AB9F95", "w c #AA9B8D", "x c #B09D8A", "y c #9B836E", "z c #BA9D80", "A c #3E3026", "B c #3E3E3E", "C c #D9D9D9", "D c #D4D4D4", "E c #414141", "F c #D6D3D0", "G c #DFD8D1", "H c #DED2C8", "I c #DCCDBE", "J c #DAC6B4", "K c #D7BFA8", "L c #D6B89C", "M c #D3B08E", "N c #3D2D21", "O c #B3B3B3", "P c #474747", "Q c #464442", "R c #443E3A", "S c #433B35", "T c #423931", "U c #40362D", "V c #3F3229", "W c #3E2F25", "X c #130E0A", "Y c #535353", "Z c #787878", "` c #9B9B9B", " . c #6D6B6B", ".. c #E4E4E4", "+. c #171717", " ", " . . . . . . ", " . + @ @ @ @ # $ ", " . @ % & % * = - $ ", " . @ * % ; * > , ' ) ", " . @ ! % & ~ { ] ^ / . . . ", " . @ * ; % ( _ : < [ } @ # $ ", " . @ * ; | 1 2 3 4 5 6 7 = - $ ", " . @ * 8 9 0 a b c d e & > , ' ) ", " . @ f g h i j k l m n ; o p q r ", " . s t u v w x y z A B C * & D E ", " . F G H I J K L M N B O ! O % P ", " . Q R S T U V W N X Y ~ ; * C P ", " . ( Z ` .! * & % P ", " . @ * * ; O & ! % P ", " . @ ..............P ", " . P P P P P P P P +. ", " "}; cream-0.43/bitmaps/save.bmp0000644000076400007660000000051611156572440016214 0ustar digitectlocaluserBMNv(P P D4 WH3rcPr]~gt~zȺͿݐ9UDQ E^N ^N . %S UUUUS 髻S S S S S vfffh ̻ cream-0.43/bitmaps/search.xpm0000644000076400007660000000252411156572440016552 0ustar digitectlocaluser/* XPM */ static char * search_xpm[] = { "18 18 61 1", " c None", ". c #000000", "+ c #FEFEFE", "@ c #FDFDFD", "# c #E0E0E0", "$ c #C1C1C1", "% c #F1F1F1", "& c #C3C3C3", "* c #FBFBFB", "= c #A8A8A8", "- c #ADADAD", "; c #767676", "> c #5D5D5D", ", c #404040", "' c #898989", ") c #E2E2E2", "! c #858585", "~ c #4B4B49", "{ c #161616", "] c #888888", "^ c #6C6C6C", "/ c #D6D6D6", "( c #F3F3F3", "_ c #EEEEEE", ": c #C5C5C5", "< c #EFEFEF", "[ c #CACACA", "} c #F6F6F6", "| c #D2D2D2", "1 c #ECECEC", "2 c #C4C4C4", "3 c #B4B4B4", "4 c #E7E7E7", "5 c #F9F9F9", "6 c #E3E3E3", "7 c #EBEBEB", "8 c #EDEDED", "9 c #838383", "0 c #666666", "a c #B3B3B3", "b c #6B6B6B", "c c #6F6F6F", "d c #CFCFCF", "e c #EAEAEA", "f c #E8E8E8", "g c #848484", "h c #5B5B5B", "i c #CDCDCD", "j c #C0C0C0", "k c #E9E9E9", "l c #A9A9A9", "m c #E6E6E6", "n c #E5E5E5", "o c #B2B2B2", "p c #E4E4E4", "q c #A5A5A5", "r c #C2C2C2", "s c #BDBDBD", "t c #BCBCBC", "u c #BBBBBB", "v c #A0A0A0", " ", " ......... ", " .++++++@#$. ", " .+%%%%%%&*=. ", " .+%%%%%%-;>,. ", " .+%%'..')!~{. ", " .+%]^/(^]__:. ", " .+<.[}+(.|12. ", " .@_.3456.|7&. ", " .@890a$bcde$. ", " .@7fg..h..ij. ", " .@eekkfi...l. ", " .@fmmmmm3.... ", " .@44mmmnno... ", " .@mnnnpp66oq. ", " .rsssttuuuuv. ", " ........... ", " "}; cream-0.43/bitmaps/spellcheck.bmp0000644000076400007660000000051611156572440017373 0ustar digitectlocaluserBMNv(S S ,Y[lmvwş˨ָЧ݀ 0 `  ]  cream-0.43/bitmaps/exit.bmp0000644000076400007660000000051611156572440016227 0ustar digitectlocaluserBMNv(S S 2F7=TBTcX:P+>BGd 030 0  ʩPʩdDE DDP9DDP3u P ʩ ʩ ʙcream-0.43/bitmaps/font.bmp0000644000076400007660000000051611156572440016224 0ustar digitectlocaluserBMNv(S S  "(-!7=#;B,KS:cmgoqDu!IQ* L+<,,3Q,,dcream-0.43/bitmaps/text_align_center.bmp0000644000076400007660000000051611156572440020754 0ustar digitectlocaluserBMNv(S S (((^^^UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUPUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUPUUUUUUUUUUUUU&UUUUUUUUUUUUUpUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUcream-0.43/bitmaps/undo.bmp0000644000076400007660000000051611156572440016223 0ustar digitectlocaluserBMNv( ///uuukJ~$fXv@,̠{ `{ p7 gwww www뻻`,,cream-0.43/bitmaps/text_align_right.bmp0000644000076400007660000000051611156572440020611 0ustar digitectlocaluserBMNv(S S 333333333333333333333333333333333333333333333333330333333333333333333333334@3333333333303333333333330@3333333333333333333333333333cream-0.43/bitmaps/redo.xpm0000644000076400007660000000216111156572440016233 0ustar digitectlocaluser/* XPM */ static char * redo_xpm[] = { "18 18 46 1", " c None", ". c #000000", "+ c #9FA59A", "@ c #E3EBD8", "# c #92998C", "$ c #292929", "% c #A5A99E", "& c #EAEEE8", "* c #E8EDDF", "= c #EAF0E3", "- c #D5E2C5", "; c #C2D6A9", "> c #99A28F", ", c #CFD9CE", "' c #EAEFE3", ") c #CFDDBE", "! c #D2E0BF", "~ c #C5D7AE", "{ c #BAD09D", "] c #919889", "^ c #B2BBA9", "/ c #EAEFE5", "( c #D4E1C3", "_ c #D1DFBE", ": c #BFD3A6", "< c #616B54", "[ c #4E4E4E", "} c #DEE3DA", "| c #DAE5CE", "1 c #92AD62", "2 c #7C9B40", "3 c #59702D", "4 c #B7BEAD", "5 c #DFE9D4", "6 c #85A24D", "7 c #53692A", "8 c #D7DFCF", "9 c #9BB572", "0 c #D5E1C4", "a c #6D8839", "b c #C7D9B0", "c c #657255", "d c #98AF74", "e c #AFC394", "f c #6D7A5B", "g c #9CAF84", " ", " . ", " .. ", " .+. ", " ....@#. ", " $%&*=-;>. ", " .,')!~{{{]. ", " .^/(_:{{{{{<. ", " .[}|12222223. ", " .4562222227. ", " .8923...27. ", " .02a. .3. ", " .b2.. .. ", " .cd. . ", " .e. ", " .fg. ", " ... ", " "}; cream-0.43/bitmaps/paste.xpm0000644000076400007660000000314111156572440016415 0ustar digitectlocaluser/* XPM */ static char * paste_xpm[] = { "18 18 79 1", " c None", ". c #000000", "+ c #8E8E8E", "@ c #E3E3E3", "# c #696969", "$ c #F1F0E1", "% c #ECE9D5", "& c #EDEBD8", "* c #2E2D29", "= c #7E7D76", "- c #5D5C58", "; c #53534F", "> c #21211E", ", c #79776C", "' c #979487", ") c #8C866C", "! c #EBE7D3", "~ c #C1B485", "{ c #343124", "] c #ABA89E", "^ c #EFECE0", "/ c #AEABA3", "( c #6C6A66", "_ c #26241A", ": c #8F8663", "< c #7A7251", "[ c #988E69", "} c #353225", "| c #26231A", "1 c #302D21", "2 c #333023", "3 c #6E674C", "4 c #A69B72", "5 c #7A7051", "6 c #EBE8D4", "7 c #D8D0B3", "8 c #58523D", "9 c #E9E6D2", "0 c #FFFFFF", "a c #0C0C0C", "b c #0F0F0F", "c c #0B0B0B", "d c #0E0E0E", "e c #161616", "f c #DCDCDC", "g c #E9E6D1", "h c #141414", "i c #86AF83", "j c #9CB599", "k c #5A7E51", "l c #A9A9A9", "m c #E9E6D0", "n c #0A0A0A", "o c #85AF82", "p c #99B496", "q c #5C8054", "r c #9D9D9D", "s c #E8E5D0", "t c #A39870", "u c #1B1B1B", "v c #ADCAAB", "w c #83AF81", "x c #608058", "y c #6D8463", "z c #080808", "A c #BDBDBD", "B c #B8D1B8", "C c #9CB899", "D c #5D8155", "E c #090909", "F c #787878", "G c #EDEAD7", "H c #9BB798", "I c #E9E5CE", "J c #898267", "K c #746A45", "L c #6B623D", "M c #655A37", "N c #A3A3A3", " ", " ... ", " ....+@#.... ", " .$%&*=-;>,'). ", " .!~{]^^/(_:<. ", " .%~[}|1|2345. ", " .6~~78......... ", " .9~[~.000000000. ", " .9~~7.00abcdef0. ", " .g~[~.00hijkhl0. ", " .m~~7.00nopqcr0. ", " .s~t~.0uvwpxyzA. ", " .s~~7.0AdBCDEFA. ", " .G~t~.00AuHaFA0. ", " .I~~~.000AuFA00. ", " .JKLM.0000Nf000. ", " .............. ", " "}; cream-0.43/bitmaps/help.xpm0000644000076400007660000000464411156572440016242 0ustar digitectlocaluser/* XPM */ static char * help_xpm[] = { "18 18 106 2", " c None", ". c #000000", "+ c #0C0C0C", "@ c #272522", "# c #767371", "$ c #D8D5D1", "% c #F2F1ED", "& c #F2F1EB", "* c #E7E4DE", "= c #BAB7B5", "- c #646361", "; c #0B0A0A", "> c #E8A291", ", c #F0D2C7", "' c #E8E5E1", ") c #E4E3DF", "! c #ECEBE7", "~ c #EDEAE6", "{ c #E38C74", "] c #A83419", "^ c #E8B1A5", "/ c #F0AA97", "( c #D67D69", "_ c #C9BBB4", ": c #B4B3AD", "< c #C0BEB7", "[ c #E1E0DA", "} c #E8C9BF", "| c #E4512F", "1 c #DF4926", "2 c #6F2312", "3 c #010000", "4 c #1D1D1C", "5 c #51504E", "6 c #F1A998", "7 c #D76348", "8 c #943019", "9 c #645551", "0 c #1F1E1E", "a c #903F2D", "b c #EA7B61", "c c #E86141", "d c #CC4B2D", "e c #644E47", "f c #2E2C2B", "g c #E6E2E1", "h c #DEA191", "i c #BA4429", "j c #3B3938", "k c #C4624B", "l c #ED917C", "m c #E1B3A6", "n c #65615C", "o c #D0CFCB", "p c #A68E85", "q c #F4E9E3", "r c #E2DFDB", "s c #86837D", "t c #F3F0EA", "u c #D4D1CF", "v c #B1AEA8", "w c #F3F2EE", "x c #D8D7D3", "y c #75736E", "z c #E7E2DE", "A c #DDDBD8", "B c #CBCAC6", "C c #F0EDEB", "D c #CAC7C5", "E c #EAE6E3", "F c #E3BAAE", "G c #9B5B4C", "H c #D39382", "I c #D9B9B0", "J c #B6B3AF", "K c #3C3C3B", "L c #E38166", "M c #E97454", "N c #EE977F", "O c #C87561", "P c #D69383", "Q c #D36E56", "R c #CC4829", "S c #935D4E", "T c #454242", "U c #A8351B", "V c #DF5130", "W c #E96C4A", "X c #EEA895", "Y c #F2EEEB", "Z c #F5F2EE", "` c #F4E3DD", " . c #D06B53", ".. c #D44929", "+. c #912D16", "@. c #CA5535", "#. c #DCBCB1", "$. c #DDDCD6", "%. c #D4D3CF", "&. c #C8C7C3", "*. c #AD7868", "=. c #080605", "-. c #84817D", ";. c #7E7C75", ">. c #7E7D77", ",. c #595552", " ", " . . . . . . . . + . . ", " . @ . # $ % & * = - ; . ", " . . > , ' ) ' ! ~ { ] . . ", " . ^ / ( _ : < [ } | 1 2 3 ", " 4 5 6 7 8 9 0 . 5 a b c d e f ", " . g h i j . . k l m n . ", " . % o p j j q r s . ", " . t u v . . w x y . ", " . z A B j j C D y . ", " . = E F G . . H I J K . ", " ; 5 L M N O . . . P Q R S T + ", " . U V W X Y Z ` ...+.+.. . ", " . . 2 @.#.$.%.&.*.+.+.. . . ", " . =.. 5 -.;.>.# ,.. . . . ", " . . . . . . . . . ", " ", " "}; cream-0.43/bitmaps/open.xpm0000644000076400007660000000257711156572440016256 0ustar digitectlocaluser/* XPM */ static char * open_xpm[] = { "18 18 64 1", " c None", ". c #000000", "+ c #E4E5DF", "@ c #D5D6CB", "# c #D6D7CA", "$ c #A3A39D", "% c #F5F6F0", "& c #8D907B", "* c #92957E", "= c #90937D", "- c #979B84", "; c #6D705F", "> c #EAECDB", ", c #8A8C7D", "' c #8E917B", ") c #91947F", "! c #8B8E7A", "~ c #999B87", "{ c #919480", "] c #989B86", "^ c #B1B4A2", "/ c #A2A394", "( c #F7F7F7", "_ c #878A75", ": c #666858", "< c #4B4D3F", "[ c #4D4F40", "} c #404135", "| c #424337", "1 c #434437", "2 c #404236", "3 c #3C3D32", "4 c #48493C", "5 c #1A1A16", "6 c #C6C6BE", "7 c #848672", "8 c #25261F", "9 c #F1F2E9", "0 c #DDE0C7", "a c #D6DABB", "b c #CDD2AC", "c c #C7CCA7", "d c #989C80", "e c #C6C7BE", "f c #5F6152", "g c #888980", "h c #A7AB8C", "i c #878A70", "j c #9FA19A", "k c #EFF0E5", "l c #9EA284", "m c #80817B", "n c #96968D", "o c #E3E5D1", "p c #83866D", "q c #97998D", "r c #EDEFE2", "s c #A2A688", "t c #767671", "u c #E7E9DA", "v c #D1D3BD", "w c #BBBF9D", "x c #989B80", "y c #6E715C", " ", " ", " ", " .... ", " .+@#$. ", " .%&*=-;..... ", " .>,')!~{]{^/. ", " .(_:<[}||12345 ", " .67890abbbbbcd. ", " .efg0bbbbbbbhi. ", " .j8kabbbbbbbl. ", " .mnobbbbbbbbp. ", " .qrbbbbbbbbs. ", " .tuvwwwwwwxy. ", " ........... ", " ", " ", " "}; cream-0.43/bitmaps/book.bmp0000644000076400007660000000051611156572440016210 0ustar digitectlocaluserBMNv( mhdB;330-ƻrQMHn^NpWwaLmQ5I=/ "ARBq Z wwwqflDzx7 %l rVpH%lpݲ"""" cream-0.43/bitmaps/broken_image.xpm0000644000076400007660000000207511156572440017730 0ustar digitectlocaluser/* XPM */ static char * broken_image_xpm[] = { "18 18 42 1", " c None", ". c #000000", "+ c #FEFEFE", "@ c #FDFDFD", "# c #E0E0E0", "$ c #C1C1C1", "% c #F1F1F1", "& c #C3C3C3", "* c #FBFBFB", "= c #A8A8A8", "- c #ADADAD", "; c #767676", "> c #5D5D5D", ", c #404040", "' c #F0F0F0", ") c #E2E2E2", "! c #858585", "~ c #4B4B49", "{ c #161616", "] c #EFEFEF", "^ c #EEEEEE", "/ c #C5C5C5", "( c #DF421E", "_ c #ECECEC", ": c #C4C4C4", "< c #EBEBEB", "[ c #EDEDED", "} c #EAEAEA", "| c #E8E8E8", "1 c #C0C0C0", "2 c #E7E7E7", "3 c #BFBFBF", "4 c #E6E6E6", "5 c #E5E5E5", "6 c #BEBEBE", "7 c #E4E4E4", "8 c #BDBDBD", "9 c #E3E3E3", "0 c #BBBBBB", "a c #C2C2C2", "b c #BCBCBC", "c c #A0A0A0", " ", " ......... ", " .++++++@#$. ", " .+%%%%%%&*=. ", " .+%%%%%%-;>,. ", " .+%%%%%')!~{. ", " .+%]]]]]]^^/. ", " .+]]((^((^_:. ", " .@^^(((((^<&. ", " .@[__(((}}}$. ", " .@<|(((((||1. ", " .@}}((|((223. ", " .@|444444456. ", " .@2244455778. ", " .@4555779990. ", " .a888bb0000c. ", " ........... ", " "}; cream-0.43/bitmaps/text_align_justify.xpm0000644000076400007660000000077111156572440021222 0ustar digitectlocaluser/* XPM */ static char * text_align_justify_xpm[] = { "18 18 3 1", " c None", ". c #000000", "+ c #121212", " ", " ", " ", " .. ... .. .. ", " ", " ..... .....+ ", " ", " .. .... .... ", " ", " ..... ...... ", " ", " ... ..... .. ", " ", " ..... .... . ", " ", " ", " ", " "}; cream-0.43/bitmaps/save_all.xpm0000644000076400007660000000633011156572440017072 0ustar digitectlocaluser/* XPM */ static char * save_all_xpm[] = { "18 18 157 2", " c None", ". c #6D6D6D", "+ c #0E0E0F", "@ c #090809", "# c #090201", "$ c #0B0201", "% c #090606", "& c #080B0D", "* c #4C4D4E", "= c #0E0F0F", "- c #EEF5FA", "; c #B5ADB2", "> c #A06960", ", c #A46C62", "' c #A56C63", ") c #9E8789", "! c #95A7B8", "~ c #272E33", "{ c #717171", "] c #0B0D0E", "^ c #C0CCD6", "/ c #535353", "( c #44474B", "_ c #3B3131", ": c #3C2521", "< c #3D2522", "[ c #3E2622", "} c #39373A", "| c #374046", "1 c #0B0C0E", "2 c #A3B1BC", "3 c #47494C", "4 c #D7E5F1", "5 c #BCA5A8", "6 c #CE8478", "7 c #D28275", "8 c #D28273", "9 c #D5877A", "0 c #B9B2BD", "a c #96AEC3", "b c #020507", "c c #3E4448", "d c #B8CFE1", "e c #B1B1B9", "f c #E3C1BB", "g c #EEC5BE", "h c #EEC6C0", "i c #EEC8C3", "j c #A9B2C0", "k c #587085", "l c #000000", "m c #3D4348", "n c #B5CDE0", "o c #BAC7D1", "p c #E7E7E7", "q c #EDEDED", "r c #ECECEC", "s c #F6F6F6", "t c #A9BDCC", "u c #516B7E", "v c #F5F5F5", "w c #FFFFFF", "x c #FCFCFC", "y c #EFEFEF", "z c #A8BBCA", "A c #4F687D", "B c #E1E1E1", "C c #E3E3E3", "D c #DEDEDE", "E c #D0D0D0", "F c #CFCFCF", "G c #C3D2DD", "H c #FCFFFF", "I c #F7F8FA", "J c #EFF0F1", "K c #EEF0F2", "L c #A4B7C6", "M c #9CB6CA", "N c #B8CBD9", "O c #BCCBD8", "P c #B5C5D3", "Q c #B3C4D2", "R c #A5BACB", "S c #88A3B7", "T c #8CABC2", "U c #91ACC1", "V c #96ABBB", "W c #98ABB9", "X c #9CAFBD", "Y c #A4B7C5", "Z c #97A9B9", "` c #758C9D", " . c #70879B", ".. c #7E98AD", "+. c #050608", "@. c #7C8993", "#. c #89A8C0", "$. c #A8B6C3", "%. c #C6C7CA", "&. c #7E8991", "*. c #929CA4", "=. c #E5E5E5", "-. c #C7C7C7", ";. c #69767D", ">. c #455967", ",. c #8092A3", "'. c #51697D", "). c #3C3D3D", "!. c #191E22", "~. c #B2CCDD", "{. c #84A2B9", "]. c #B1BBC3", "^. c #CECECE", "/. c #2D4353", "(. c #516678", "_. c #6D7980", ":. c #30495B", "<. c #8395A2", "[. c #566C7D", "}. c #A3A3A3", "|. c #3A3A3A", "1. c #24292E", "2. c #879EAF", "3. c #819DB3", "4. c #B5BEC5", "5. c #304556", "6. c #647C8D", "7. c #CACACA", "8. c #C3C3C3", "9. c #68767C", "0. c #304B5C", "a. c #8697A2", "b. c #566D7D", "c. c #A2A2A2", "d. c #434445", "e. c #2F3840", "f. c #586D7D", "g. c #8F989E", "h. c #C6C6C6", "i. c #7E8387", "j. c #858B8F", "k. c #8F8F8F", "l. c #818181", "m. c #565D65", "n. c #2E4150", "o. c #6D7984", "p. c #314656", "q. c #3B3C3C", "r. c #0D0F10", "s. c #1D1D1E", "t. c #0D0D0D", "u. c #030303", "v. c #020202", "w. c #010101", "x. c #050607", "y. c #0E1011", "z. c #6B6B6B", " ", " . + @ # $ $ $ $ $ $ $ % & * ", " = - ; > , , , , , , ' ) ! ~ { ", " ] ^ / ( _ : < < < < < < [ } | * ", " 1 2 3 4 5 6 7 7 7 7 8 7 9 0 a b ", " 1 2 c d e f g g g g g h i j k l ", " 1 2 m n o p q q q q q r s t u l ", " 1 2 m n o v w w w x v y s z A l ", " 1 2 m n o B C C D E F F p z A l ", " 1 2 m n G H w I J J J J K L A l ", " 1 2 m n M N O P P P P Q R S A l ", " 1 2 m n T U V W X Y Z ` ...A l ", " +.@.m n #.$.%.&.*.=.-.;.>.,.'.l ", " ).!.m ~.{.].^./.(.E -._.:.<.[.l ", " }.|.1.2.3.4.B 5.6.7.8.9.0.a.b.l ", " c.d.e.f.g.h.i.j.k.l.m.n.o.p.l ", " }.q.r.s.t.u.v.w.l x.y.x.l z. ", " "}; cream-0.43/bitmaps/save.xpm0000644000076400007660000000323411156572440016242 0ustar digitectlocaluser/* XPM */ static char * save_xpm[] = { "18 18 83 1", " c None", ". c #000000", "+ c #F7F8FA", "@ c #CBDDEB", "# c #C88A80", "$ c #D18F84", "% c #D19084", "& c #D39186", "* c #BFD5E8", "= c #DBE7F1", "- c #8DA9BE", "; c #B7877E", "> c #C77568", ", c #C77467", "' c #C77466", ") c #C87668", "! c #CD867A", "~ c #54697C", "{ c #CFE0ED", "] c #D7D7D7", "^ c #FEFEFE", "/ c #F9F9F9", "( c #84A0B5", "_ c #4F6475", ": c #D6D6D6", "< c #F1F1F1", "[ c #819AAE", "} c #496072", "| c #FCFCFC", "1 c #F4F4F4", "2 c #EBEBEB", "3 c #D4D4D4", "4 c #C5C5C5", "5 c #EEEEEE", "6 c #F2F2F2", "7 c #AEBFCD", "8 c #CAD6DF", "9 c #C7CFDA", "0 c #BFCBD6", "a c #A1B6C4", "b c #89A6BC", "c c #7F9AAE", "d c #7E99AD", "e c #7D97AC", "f c #8CA8BD", "g c #A8B1BD", "h c #CECECE", "i c #9C9D9D", "j c #2F4656", "k c #80868C", "l c #183042", "m c #33495A", "n c #B9B9B9", "o c #132D3C", "p c #586D80", "q c #97A5B0", "r c #86A4B9", "s c #CDCDCD", "t c #2E4353", "u c #5A7082", "v c #BFBFBF", "w c #112835", "x c #9DA9B0", "y c #6B7882", "z c #839EB2", "A c #E6E6E6", "B c #213648", "C c #5F7989", "D c #C2C2C2", "E c #B2B2B2", "F c #112C3A", "G c #9FA9B0", "H c #59636D", "I c #A1A1A1", "J c #C0C0C0", "K c #909090", "L c #868686", "M c #6E6E6E", "N c #7A7A7A", "O c #2D3949", "P c #3E4F5C", "Q c #80878F", "R c #1A3140", " ", " .............. ", " .+@#$$$$$$%$&**. ", " .=-;>,,,,',)!-~. ", " .{-]^^^^^^^^/(_. ", " .{-]]]]]]]]:<[}. ", " .{-]^^^^|122<[}. ", " .{-]]]]34444<[}. ", " .{-5^^6222225[}. ", " .{-789000000a[}. ", " .{--bc[[[[de[[}. ", " .{-fg44h2]ijk[}. ", " .{-(44lm:4nopq}. ", " .{r[4stu44vwux}. ", " .yz[sABC4DEFuG}. ", " .H_IJKKLMNOPQR. ", " ............. ", " "}; cream-0.43/bitmaps/cut_alt.xpm0000644000076400007660000000136711156572440016744 0ustar digitectlocaluser/* XPM */ static char * cut_alt_xpm[] = { "18 18 18 1", " c None", ". c #494949", "+ c #1D1D1D", "@ c #838383", "# c #000000", "$ c #2E2E2E", "% c #D8D8D8", "& c #E4E4E4", "* c #969696", "= c #A8A8A8", "- c #E1E1E1", "; c #929292", "> c #444444", ", c #B3B3B3", "' c #232323", ") c #A5A5A5", "! c #0D0D0D", "~ c #3A3A3A", " ", " ", " .+ @# ", " $%+ @&$ ", " *%+ @&+ ", " #=%+ @-+ ", " +&%+ @&; ", " +&%>,=# ", " '&)!# ", " ~++# ", " ##+### ", " #### #### ", " # ## ## # ", " ## # # ## ", " # # # # ", " # # # # ", " ## ## ", " "}; cream-0.43/bitmaps/text_align_left.bmp0000644000076400007660000000051611156572440020426 0ustar digitectlocaluserBMNv(S S YYYDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@PDDDDDDDDDDDDD@0P$DDDDDDDDDDD@PDDDDDDDDDDD@PTDDDDDDDDDDDD@PTDDDDDDDDDDD@4DDDDDDDDDDDDDDDDDDDDDDDDDDDDDcream-0.43/bitmaps/book.xpm0000644000076400007660000000470411156572440016241 0ustar digitectlocaluser/* XPM */ static char * book_xpm[] = { "18 18 108 2", " c None", ". c #22272E", "+ c #000000", "@ c #0E0E0E", "# c #9AAABC", "$ c #5D7894", "% c #536D8A", "& c #45617D", "* c #3D5974", "= c #3C5874", "- c #3F5A75", "; c #425C78", "> c #4E5F71", ", c #ABBAC9", "' c #657F9B", ") c #4F6B89", "! c #44607E", "~ c #365371", "{ c #314E6B", "] c #324E6B", "^ c #496078", "/ c #3E4C57", "( c #252525", "_ c #9BADBF", ": c #5A7693", "< c #4A6684", "[ c #3F5C7A", "} c #33506E", "| c #324F6B", "1 c #35526E", "2 c #4E565D", "3 c #A4B1BF", "4 c #66809C", "5 c #526E8C", "6 c #395674", "7 c #324F6C", "8 c #4A627A", "9 c #3D4A57", "0 c #494C4E", "a c #707173", "b c #3C3C3C", "c c #8DA0B6", "d c #587492", "e c #4D6987", "f c #35516F", "g c #34516D", "h c #53677C", "i c #2E353B", "j c #565759", "k c #AFBBC9", "l c #6B85A1", "m c #536F8D", "n c #486482", "o c #3A5775", "p c #4E657C", "q c #2F3D49", "r c #676A6D", "s c #4E4E4E", "t c #8298B1", "u c #607B98", "v c #375371", "w c #4D6071", "x c #333B42", "y c #42474B", "z c #9EA5AF", "A c #7E8F9F", "B c #7A8A9B", "C c #748596", "D c #6E7F90", "E c #5E7184", "F c #5D6F83", "G c #596C80", "H c #45505C", "I c #585B5F", "J c #586069", "K c #2E2F34", "L c #45494E", "M c #4B4E51", "N c #45484C", "O c #41464C", "P c #42474C", "Q c #464B50", "R c #65696E", "S c #626569", "T c #616A73", "U c #626669", "V c #AEB0B2", "W c #E7E8E9", "X c #E6E6E8", "Y c #EFF0F0", "Z c #EEEFF0", "` c #EBEDEE", " . c #CBCCCD", ".. c #8F9499", "+. c #1D2023", "@. c #3A444E", "#. c #636F7C", "$. c #9EABB9", "%. c #DDE1E4", "&. c #E4E7E9", "*. c #F0F1F2", "=. c #BBBDC0", "-. c #5B5E61", ";. c #222C34", ">. c #5B6269", ",. c #AAB2BA", "'. c #0D1115", "). c #161D24", " ", " ", " . + + + + + + + + + ", " @ # $ % & * = - ; > + ", " + , ' ) ! ~ { { ] ^ / ", " ( _ : < [ } { | 1 > 2 + ", " + 3 4 5 ! 6 { { 7 8 9 0 a ", " b c d e [ f { { g h i j + ", " + k l m n o 7 { { p q r + ", " s t u ) ! v { { { w x y + ", " + z A B C D E F F G H I + ", " + J K L M M N O P Q R S + ", " + T U V W X Y Z ` ...+ ", " +.+ + @.#.$.%.&.*.=.-.+ ", " + + + + ;.>.,.+ ", " '.+ + ). ", " ", " "}; cream-0.43/bitmaps/print.bmp0000644000076400007660000000051611156572440016412 0ustar digitectlocaluserBMNv(S S  578=?@?BBGJLY^a~EUUD32 ffff   cream-0.43/bitmaps/print.xpm0000644000076400007660000000335011156572440016437 0ustar digitectlocaluser/* XPM */ static char * print_xpm[] = { "18 18 88 1", " c None", ". c #000000", "+ c #FFFFFF", "@ c #ECECEC", "# c #353535", "$ c #D3D3D3", "% c #131313", "& c #C7C7C7", "* c #D7D7D7", "= c #EBEBEB", "- c #E9E9E9", "; c #DBDBDB", "> c #4D4D4D", ", c #A4A4A4", "' c #414141", ") c #8C8C8C", "! c #979797", "~ c #BCBBBB", "{ c #D4D4D3", "] c #D0D0CF", "^ c #B5B5B5", "/ c #C2C2C2", "( c #FBFBFB", "_ c #FAFAFA", ": c #F8F8F8", "< c #F4F4F3", "[ c #ECECEB", "} c #AEADAB", "| c #F7F7F7", "1 c #E5E5E4", "2 c #8D8D8D", "3 c #F1F1F1", "4 c #A0A0A0", "5 c #E2E2E2", "6 c #D9D9D8", "7 c #DEDDDC", "8 c #DCDCDA", "9 c #D8D7D4", "0 c #B3B2B0", "a c #CCCAC6", "b c #1B1B1B", "c c #969594", "d c #D6D4D2", "e c #DDDBDA", "f c #DCDCDB", "g c #DEDDDD", "h c #DFDEDD", "i c #DDDCDB", "j c #DBDBD9", "k c #DAD9D7", "l c #D9D8D6", "m c #81807E", "n c #9F9E9A", "o c #A8A7A6", "p c #9E9D9C", "q c #615E59", "r c #54514E", "s c #54524E", "t c #514F4B", "u c #52504C", "v c #504D49", "w c #4D4B47", "x c #4F4D49", "y c #514F4C", "z c #939291", "A c #9B9A97", "B c #B4B3B1", "C c #C0BFBC", "D c #B9B8B5", "E c #B3B1AF", "F c #B1B1AE", "G c #AFAEAC", "H c #B0AEAC", "I c #ACACA9", "J c #A6A6A4", "K c #ABAAA7", "L c #AEADAA", "M c #AAA9A6", "N c #201F1E", "O c #403F3D", "P c #444341", "Q c #454542", "R c #42423F", "S c #3F3E3C", "T c #3A3936", "U c #393835", "V c #31302D", "W c #1E1D1B", " ", " ", " ......... ", " .++++++@. ", " .+#$.%&*. ", " .+=---=;. ", " .+>.=.,;. ", " .+=====;. ", " ..+'=).!;.. ", " .~{+------]^. ", " ./(+_+_((_:<[}. ", " ._|1234567890ab ", " .cdefghi6jklmn. ", " .opqrstuvwxyzA. ", " .BCDEFGHIJKLGM. ", " .NOPQQQROSTUVW. ", " ............. ", " "}; cream-0.43/bitmaps/font.xpm0000644000076400007660000000216111156572440016250 0ustar digitectlocaluser/* XPM */ static char * font_xpm[] = { "18 18 46 1", " c None", ". c #70653B", "+ c #463F24", "@ c #6B6139", "# c #1B180D", "$ c #2C2818", "% c #595030", "& c #252112", "* c #292516", "= c #70643B", "- c #827544", "; c #3D3721", "> c #37311D", ", c #3E3721", "' c #302B1A", ") c #5C5331", "! c #010101", "~ c #1A170E", "{ c #1E1A10", "] c #403922", "^ c #584F2F", "/ c #16140C", "( c #1E1B10", "_ c #312B1A", ": c #0F0D07", "< c #2D2818", "[ c #322D1A", "} c #231F11", "| c #3C3620", "1 c #5A5230", "2 c #332E1B", "3 c #12100A", "4 c #4F472A", "5 c #413A23", "6 c #302B19", "7 c #342E1B", "8 c #4A4227", "9 c #6E633A", "0 c #080704", "a c #2F2919", "b c #4C4529", "c c #51472B", "d c #242113", "e c #322D1B", "f c #5E5432", "g c #211E12", " ", " ", " .+ ", " @ # ", " $ ", " %&* ", " = * -;> ", " , ' )!~ ", " { !] ^!/ (_ ", " :<[ }| 1!2www ̐߻  cream-0.43/bitmaps/copy_alt.bmp0000644000076400007660000000051611156572440017070 0ustar digitectlocaluserBMNv( <<<hhih"""" )g|)cv)!"!g|)̈w{)ffVƬ)ƥeg vf[4 Ƨxtę|{$Il3d4 ̬dęF333cream-0.43/bitmaps/new.xpm0000644000076400007660000000206411156572440016075 0ustar digitectlocaluser/* XPM */ static char * new_xpm[] = { "18 18 42 1", " c None", ". c #000000", "+ c #FEFEFE", "@ c #FDFDFD", "# c #E0E0E0", "$ c #C1C1C1", "% c #F1F1F1", "& c #C3C3C3", "* c #FBFBFB", "= c #A8A8A8", "- c #ADADAD", "; c #767676", "> c #5D5D5D", ", c #404040", "' c #F0F0F0", ") c #E2E2E2", "! c #858585", "~ c #4B4B49", "{ c #161616", "] c #EFEFEF", "^ c #EEEEEE", "/ c #C5C5C5", "( c #ECECEC", "_ c #C4C4C4", ": c #EBEBEB", "< c #EDEDED", "[ c #EAEAEA", "} c #E8E8E8", "| c #C0C0C0", "1 c #E9E9E9", "2 c #E7E7E7", "3 c #BFBFBF", "4 c #E6E6E6", "5 c #E5E5E5", "6 c #BEBEBE", "7 c #E4E4E4", "8 c #BDBDBD", "9 c #E3E3E3", "0 c #BBBBBB", "a c #C2C2C2", "b c #BCBCBC", "c c #A0A0A0", " ", " ......... ", " .++++++@#$. ", " .+%%%%%%&*=. ", " .+%%%%%%-;>,. ", " .+%%%%%')!~{. ", " .+%]]]]]]^^/. ", " .+]]]^^^^^(_. ", " .@^^^^^^^^:&. ", " .@<(((::[[[$. ", " .@:}}}}}}}}|. ", " .@[[11}}}223. ", " .@}444444456. ", " .@2244455778. ", " .@4555779990. ", " .a888bb0000c. ", " ........... ", " "}; cream-0.43/bitmaps/save_as.xpm0000644000076400007660000000476711156572440016741 0ustar digitectlocaluser/* XPM */ static char * save_as_xpm[] = { "18 18 111 2", " c None", ". c #000000", "+ c #F7F8FA", "@ c #CBDDEB", "# c #C88A80", "$ c #D18F84", "% c #CF8D82", "& c #A49626", "* c #634A1E", "= c #A8BBCC", "- c #BFD5E8", "; c #DBE7F1", "> c #8DA9BE", ", c #B7877E", "' c #C77568", ") c #C77467", "! c #C57366", "~ c #FCEB3D", "{ c #F7B544", "] c #61522E", "^ c #72899A", "/ c #54697C", "( c #CFE0ED", "_ c #D7D7D7", ": c #FEFEFE", "< c #FCFCFC", "[ c #F9DF39", "} c #F7B545", "| c #6C5F34", "1 c #B4B4B4", "2 c #84A0B5", "3 c #4F6475", "4 c #D6D6D6", "5 c #F8D837", "6 c #EFB44D", "7 c #584D2B", "8 c #8F8F8F", "9 c #F1F1F1", "0 c #819AAE", "a c #496072", "b c #FDFDFD", "c c #F6D236", "d c #EDA43E", "e c #584E2B", "f c #AAAAAA", "g c #D3D3D3", "h c #485F71", "i c #D5D5D5", "j c #D7AE74", "k c #61562F", "l c #737373", "m c #C5C5C5", "n c #B0B0B0", "o c #7F98AC", "p c #EDEDED", "q c #4F4115", "r c #8D8D8D", "s c #EBEBEB", "t c #ECECEC", "u c #ACBDCB", "v c #6F767D", "w c #9AA3AC", "x c #BFCBD6", "y c #BDC9D4", "z c #A1B6C4", "A c #8BA7BC", "B c #809CB0", "C c #6C8394", "D c #7D97AB", "E c #7D97AC", "F c #A4ACB8", "G c #B9B9B9", "H c #C7C7C7", "I c #E1E1E1", "J c #D4D4D4", "K c #9C9D9D", "L c #2F4656", "M c #80868C", "N c #183042", "O c #33495A", "P c #132D3C", "Q c #586D80", "R c #97A5B0", "S c #86A4B9", "T c #CDCDCD", "U c #2E4353", "V c #5A7082", "W c #BFBFBF", "X c #112835", "Y c #9DA9B0", "Z c #6B7882", "` c #829DB1", " . c #CBCBCB", ".. c #E5E5E5", "+. c #213648", "@. c #5F7989", "#. c #C2C2C2", "$. c #B2B2B2", "%. c #112C3A", "&. c #9FA9B0", "*. c #59636D", "=. c #A1A1A1", "-. c #C0C0C0", ";. c #909090", ">. c #868686", ",. c #6E6E6E", "'. c #7A7A7A", "). c #2D3949", "!. c #3E4F5C", "~. c #80878F", "{. c #1A3140", " ", " . . . . . . . . . . . . . . ", " . + @ # $ $ $ $ % . & * . = - . ", " . ; > , ' ) ) ! . ~ { ] . ^ / . ", " . ( > _ : : < . [ } | . 1 2 3 . ", " . ( > _ _ 4 . 5 6 7 . 8 9 0 a . ", " . ( > _ b . c d e . f g 9 0 h . ", " . ( > _ i . j k . l m n 9 o a . ", " . ( > p . q . . r g s s t 0 a . ", " . ( > u . . v w x x x y z 0 a . ", " . ( > A B C 0 0 0 0 D E 0 0 a . ", " . ( > A F G G H I J K L M 0 a . ", " . ( > 2 m m N O i m G P Q R a . ", " . ( S 0 m T U V m m W X V Y a . ", " . Z ` o ...+.@.m #.$.%.V &.a . ", " . . *.3 =.-.;.;.>.,.'.).!.~.{.. ", " . . . . . . . . . . . . . . ", " "}; cream-0.43/bitmaps/search.bmp0000644000076400007660000000051611156572440016523 0ustar digitectlocaluserBMNv(0 0 +++DEE\\\kkkvvv +    p Z\   ]~ p1 C  cream-0.43/bitmaps/text_align_center.xpm0000644000076400007660000000075111156572440021003 0ustar digitectlocaluser/* XPM */ static char * text_align_center_xpm[] = { "18 18 2 1", " c None", ". c #000000", " ", " ", " ", " .. .. ", " ", " ... ..... ... ", " ", " .. . ", " ", " ... .. ", " ", " ... ..... ... ", " ", " .... . ", " ", " ", " ", " "}; cream-0.43/bitmaps/help.bmp0000644000076400007660000000051611156572440016206 0ustar digitectlocaluserBMNv(  'r_ad1)DXg,MSn}u, Т РS2 gv3)ype"Ҭ ΀Π΀΁̀A- +s 7v( a Р0Ш̢  cream-0.43/bitmaps/paste.bmp0000644000076400007660000000051611156572440016372 0ustar digitectlocaluserBMNv(0 0 ;Zb`noYakͲ|A ڪ, J ګ0, J f3 ګf0^ Jf0~ ګ J ګ|A$ r "%@]  cream-0.43/bitmaps/spellcheck.xpm0000644000076400007660000000115211156572440017416 0ustar digitectlocaluser/* XPM */ static char * spellcheck_xpm[] = { "18 18 11 1", " c None", ". c #000000", "+ c #5B9159", "@ c #8ABA88", "# c #132C13", "$ c #77A676", "% c #A8CBA6", "& c #6D9D6C", "* c #B8D6B8", "= c #9FC59D", "- c #93BE92", " ", " ", " ... .... ", " .. . .. . ", " .. . .... ", " ..... .. . ", " .. . .. . ", " .. . .... . ", " .+. ", " .. .+. ", " .@. .+. ", " #$. .+. ", " .%&..+. ", " .*++. ", " .=-. ", " .. ", " ", " "}; cream-0.43/bitmaps/cut_alt.bmp0000644000076400007660000000051611156572440016711 0ustar digitectlocaluserBMNv( %%%:::BBB||| 3 30 0 9[i8k[)Scream-0.43/bitmaps/save_all.bmp0000644000076400007660000000051611156572440017044 0ustar digitectlocaluserBMNv( @8/MC7lbTweyakuŵɶ<̂UU2B $BT #BS RXCS US ϓ wwww !,ffffX,cream-0.43/bitmaps/text_align_justify.bmp0000644000076400007660000000051611156572440021171 0ustar digitectlocaluserBMNv(0 0 HHHDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@PDDDDDDDDDDD@0PDDDDDDDDDDD@PDDDDDDDDDDD@PDDDDDDDDDDD@PDDDDDDDDDDD@0DDDDDDDDDDDDDDDDDDDDDDDDDDDDcream-0.43/bitmaps/search_and_replace.xpm0000644000076400007660000000310111156572440021057 0ustar digitectlocaluser/* XPM */ static char * search_and_replace_xpm[] = { "18 18 76 1", " c None", ". c #000000", "+ c #FEFEFE", "@ c #FDFDFD", "# c #E0E0E0", "$ c #C1C1C1", "% c #F1F1F1", "& c #C3C3C3", "* c #FBFBFB", "= c #A8A8A8", "- c #898989", "; c #ADADAD", "> c #767676", ", c #5D5D5D", "' c #404040", ") c #6C6C6C", "! c #F5F5F5", "~ c #D8D8D8", "{ c #E2E2E2", "] c #858585", "^ c #4B4B49", "/ c #161616", "( c #F3F3F3", "_ c #F7F7F7", ": c #CACACA", "< c #EFEFEF", "[ c #EEEEEE", "} c #C4C4C4", "| c #E4E4E4", "1 c #F9F9F9", "2 c #E7E7E7", "3 c #B4B4B4", "4 c #EAEAEA", "5 c #A49626", "6 c #634A1E", "7 c #707070", "8 c #6B6B6B", "9 c #B5B5B5", "0 c #666666", "a c #848484", "b c #ECECEC", "c c #FCEB3D", "d c #F7B544", "e c #5F522D", "f c #868686", "g c #EBEBEB", "h c #E8E8E8", "i c #F9DF39", "j c #F7B545", "k c #6C5F34", "l c #F8D837", "m c #EFB44D", "n c #584D2B", "o c #878787", "p c #CFCFCF", "q c #E9E9E9", "r c #F6D236", "s c #EDA43E", "t c #584E2B", "u c #CDCDCD", "v c #E6E6E6", "w c #D7AE74", "x c #61562F", "y c #6F6F6F", "z c #E5E5E5", "A c #4F4115", "B c #A9A9A9", "C c #E3E3E3", "D c #B7B7B7", "E c #BBBBBB", "F c #C2C2C2", "G c #BDBDBD", "H c #BABABA", "I c #B0B0B0", "J c #9F9F9F", "K c #A0A0A0", " ", " ......... ", " .++++++@#$. ", " .+%%%%%%&*=. ", " .+%-..-%;>,'. ", " .+-)!~)-{]^/. ", " .+.(+_:.<[[}.. ", " .+.|123.[[4.56. ", " .@78}90a[b.cde. ", " ...,..fgh.ijk. ", " ...fhhh2.lmn. ", " ...opqq2.rst.. ", " ..=uvvv|.wx.y. ", " .@22vz.A..-B. ", " .@vzzC..aDCE. ", " .FGGGHIJEEEK. ", " ........... ", " "}; cream-0.43/bitmaps/new.bmp0000644000076400007660000000051611156572440016047 0ustar digitectlocaluserBMNv(0 0 +++DEE]]]vvvp -         1 C ߠ ݠcream-0.43/cream-macros.vim0000644000076400007660000000761111517300720016177 0ustar digitectlocaluser" " Filename: cream-macros.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " (http://cream.sourceforge.net) Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " (http://www.gnu.org/licenses/gpl.html) " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Cream_macro_record() {{{1 function! Cream_macro_record(...) " Record to register. Optional argument is register letter if exists("a:1") " test single register if strlen(a:1) > 1 call confirm( \ "Error: Multiple characters passed to Cream_macro_record().\n" . \ "\n", "&Ok", 1, "Info") return endif " test non-alpha if match(a:1, '\a') == -1 call confirm( \ "Error: Non-character argument in Cream_macro_record().\n" . \ "\n", "&Ok", 1, "Info") return endif let myreg = a:1 else let myreg = Cream_macro_getregister() if myreg == -1 return endif endif if exists("g:recording") " stop unlet g:recording let g:recording_fix = 1 normal q " fixes execute "let x = @" . myreg " remove trailing mapping "let x = substitute(x, nr2char(128) . nr2char(253) . nr2char(13) . "$", "", "") "let x = substitute(x, " ", '', '') let x = substitute(x, "...$", '', '') execute "let @" . myreg . " = x" else " start let g:recording = 1 execute "normal q" . myreg endif endfunction " Cream_macro_play() {{{1 function! Cream_macro_play(...) if exists("a:1") " test single register if strlen(a:1) > 1 call confirm( \ "Error: Multiple characters passed to Cream_macro_play().\n" . \ "\n", "&Ok", 1, "Info") return endif " test non-alpha if match(a:1, '\a') == -1 call confirm( \ "Error: Non-character argument in Cream_macro_play().\n" . \ "\n", "&Ok", 1, "Info") return endif let myreg = a:1 else let myreg = Cream_macro_getregister() if myreg == -1 return endif endif " add an insertmode call to temp register depending on col position execute "let x = @" . myreg if col('.') != col('$') \ && col('.') != col('$') - 1 let posfix = "i" else let posfix = "a" endif let @1 = posfix . x " play register normal @1 " fix position unless on first column of empty line if col('.') != col('$') \ && col('.') != col('$') - 1 normal l endif """let myline = ('.') """normal l """if line('.') > myline """ normal ha """endif endfunction " Cream_macro_getregister() {{{1 function! Cream_macro_getregister() " get register from user let myreg = Inputdialog( \ "Enter a register (A-z) to use for macro\n(only first letter used):", "q") " test cancel if myreg == "{cancel}" " No warning, just quit silently. return -1 endif " test at least one character if myreg == "" call confirm( \ "One alphabetic character is required.\n" . \ "\n", "&Ok", 1, "Info") return -1 endif " test at least one character if myreg == "" " No warning, just quit silently. return -1 endif " test single register if strlen(myreg) > 1 call confirm( \ "Only one character is allowed.\n" . \ "\n", "&Ok", 1, "Info") return -1 endif " test non-alpha if match(myreg, '\a') == -1 call confirm( \ "Register must be a letter (upper or lower case) A-Z, a-z.\n" . \ "\n", "&Ok", 1, "Info") return -1 endif return myreg endfunction " 1}}} " vim:foldmethod=marker cream-0.43/cream-menu-file.vim0000644000076400007660000004321111517300720016570 0ustar digitectlocaluser" " cream-menu-file.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Note: Recent File menu is called at bottom. " function! Cream_menu_load_file() " This is functionalized so that buffers can restore it after deleting the File menu for each refresh. anoremenu 10.101 &File.&NewCtrl+N :call Cream_file_new() anoremenu 10.102 &File.&Open\.\.\.Ctrl+O :call Cream_file_open() vmenu 10.103 &File.&Open\ (selection)Ctrl+Enter :call Cream_file_open_undercursor("v") anoremenu 10.104 &File.&Open\ (Read-Only)\.\.\. :call Cream_file_open_readonly() anoremenu 10.105 &File.&Close\ FileCtrl+F4 :call Cream_close() anoremenu 10.106 &File.C&lose\ All\ Files :call Cream_close_all() anoremenu 10.107 &File.-SEP1- anoremenu 10.108 &File.&SaveCtrl+S :call Cream_save() anoremenu 10.109 &File.Save\ &As\.\.\. :call Cream_saveas() anoremenu 10.110 &File.Sa&ve\ All\.\.\. :call Cream_saveall() "if has("diff") " anoremenu 10.400 &File.-SEP2- : " anoremenu 10.410 &File.Split\ &Diff\ with\.\.\. :browse vert diffsplit " anoremenu 10.420 &File.Split\ Patched\ &By\.\.\. :browse vert diffpatch "endif " support for :hardcopy exists if has("printer") " Print anoremenu 10.500 &File.-SEP10500- imenu 10.510 &File.&Print\.\.\. :call Cream_print("i") vmenu 10.510 &File.&Print\.\.\. :call Cream_print("v") " Print setup {{{1 " &printoptions only supported in 6.2+ if version >= 602 imenu 10.521 &File.Prin&t\ Setup.Paper\ Size.&Statement\ (5-1/2\ x\ 8-1/2) :call Cream_print_set("i", "paper:statement") vmenu 10.521 &File.Prin&t\ Setup.Paper\ Size.&Statement\ (5-1/2\ x\ 8-1/2) :call Cream_print_set("v", "paper:statement") imenu 10.522 &File.Prin&t\ Setup.Paper\ Size.&Letter\ (8-1/2\ x\ 11) :call Cream_print_set("i", "paper:letter") vmenu 10.522 &File.Prin&t\ Setup.Paper\ Size.&Letter\ (8-1/2\ x\ 11) :call Cream_print_set("v", "paper:letter") imenu 10.523 &File.Prin&t\ Setup.Paper\ Size.&Legal\ (11\ x\ 14) :call Cream_print_set("i", "paper:letter") vmenu 10.523 &File.Prin&t\ Setup.Paper\ Size.&Legal\ (11\ x\ 14) :call Cream_print_set("v", "paper:letter") imenu 10.524 &File.Prin&t\ Setup.Paper\ Size.&Ledger\ (17\ x\ 11) :call Cream_print_set("i", "paper:ledger") vmenu 10.524 &File.Prin&t\ Setup.Paper\ Size.&Ledger\ (17\ x\ 11) :call Cream_print_set("v", "paper:ledger") imenu 10.525 &File.Prin&t\ Setup.Paper\ Size.&A3 :call Cream_print_set("i", "paper:A3") vmenu 10.525 &File.Prin&t\ Setup.Paper\ Size.&A3 :call Cream_print_set("v", "paper:A3") imenu 10.526 &File.Prin&t\ Setup.Paper\ Size.&A4 :call Cream_print_set("i", "paper:A4") vmenu 10.526 &File.Prin&t\ Setup.Paper\ Size.&A4 :call Cream_print_set("v", "paper:A4") imenu 10.527 &File.Prin&t\ Setup.Paper\ Size.&A5 :call Cream_print_set("i", "paper:A5") vmenu 10.527 &File.Prin&t\ Setup.Paper\ Size.&A5 :call Cream_print_set("v", "paper:A5") imenu 10.528 &File.Prin&t\ Setup.Paper\ Size.&B4 :call Cream_print_set("i", "paper:B4") vmenu 10.528 &File.Prin&t\ Setup.Paper\ Size.&B4 :call Cream_print_set("v", "paper:B4") imenu 10.529 &File.Prin&t\ Setup.Paper\ Size.&B5 :call Cream_print_set("i", "paper:B5") vmenu 10.529 &File.Prin&t\ Setup.Paper\ Size.&B5 :call Cream_print_set("v", "paper:B5") imenu 10.541 &File.Prin&t\ Setup.Paper\ Orientation.&Portrait :call Cream_print_set("i", "portrait:y") vmenu 10.541 &File.Prin&t\ Setup.Paper\ Orientation.&Portrait :call Cream_print_set("v", "portrait:y") imenu 10.542 &File.Prin&t\ Setup.Paper\ Orientation.&Landscape :call Cream_print_set("i", "portrait:n") vmenu 10.542 &File.Prin&t\ Setup.Paper\ Orientation.&Landscape :call Cream_print_set("v", "portrait:n") imenu 10.553 &File.Prin&t\ Setup.Margins.&Top\.\.\. :call Cream_print_set_margin_top("i") vmenu 10.553 &File.Prin&t\ Setup.Margins.&Top\.\.\. :call Cream_print_set_margin_top("v") imenu 10.551 &File.Prin&t\ Setup.Margins.&Left\.\.\. :call Cream_print_set_margin_left("i") vmenu 10.551 &File.Prin&t\ Setup.Margins.&Left\.\.\. :call Cream_print_set_margin_left("v") imenu 10.552 &File.Prin&t\ Setup.Margins.&Right\.\.\. :call Cream_print_set_margin_right("i") vmenu 10.552 &File.Prin&t\ Setup.Margins.&Right\.\.\. :call Cream_print_set_margin_right("v") imenu 10.554 &File.Prin&t\ Setup.Margins.&Bottom\.\.\. :call Cream_print_set_margin_bottom("i") vmenu 10.554 &File.Prin&t\ Setup.Margins.&Bottom\.\.\. :call Cream_print_set_margin_bottom("v") imenu 10.561 &File.Prin&t\ Setup.Header.Height\.\.\. :call Cream_print_set_header("i") vmenu 10.561 &File.Prin&t\ Setup.Header.Height\.\.\. :call Cream_print_set_header("v") endif imenu 10.562 &File.Prin&t\ Setup.Header.Text\.\.\. :call Cream_print_set_headertext("i") vmenu 10.562 &File.Prin&t\ Setup.Header.Text\.\.\. :call Cream_print_set_headertext("v") anoremenu 10.565 &File.Prin&t\ Setup.--Sep10565-- imenu 10.565 &File.Prin&t\ Setup.Syntax\ Highlighting\.\.\. :call Cream_print_set_syntax("i") vmenu 10.565 &File.Prin&t\ Setup.Syntax\ Highlighting\.\.\. :call Cream_print_set_syntax("v") imenu 10.566 &File.Prin&t\ Setup.Line\ Numbering\.\.\. :call Cream_print_set_number("i") vmenu 10.566 &File.Prin&t\ Setup.Line\ Numbering\.\.\. :call Cream_print_set_number("v") imenu 10.567 &File.Prin&t\ Setup.Wrap\ at\ Margins\.\.\. :call Cream_print_set_wrap("i") vmenu 10.567 &File.Prin&t\ Setup.Wrap\ at\ Margins\.\.\. :call Cream_print_set_wrap("v") anoremenu 10.600 &File.Prin&t\ Setup.--Sep600-- imenu 10.601 &File.Prin&t\ Setup.Font\.\.\. :call Cream_print_set_font("i") vmenu 10.602 &File.Prin&t\ Setup.Font\.\.\. :call Cream_print_set_font("v") " print encoding (10.600s) {{{2 " &printencoding only supported in Vim 6.2+ if version >= 602 " (swiped from file encoding menu) anoremenu 10.603 &File.Prin&t\ Setup.&Encoding.Unicode.Unicode\ (UTF-8)[utf-8\ --\ 32\ bit\ UTF-8\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] :call Cream_print_set("i", "encoding", "utf-8") anoremenu 10.604 &File.Prin&t\ Setup.&Encoding.Unicode.-Sep10604- anoremenu 10.605 &File.Prin&t\ Setup.&Encoding.Unicode.Unicode\ (UCS-2)[ucs-2\ --\ 16\ bit\ UCS-2\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] :call Cream_print_set("i", "encoding", "ucs-2") anoremenu 10.606 &File.Prin&t\ Setup.&Encoding.Unicode.Unicode\ (UCS-2le)[ucs-2le\ --\ like\ ucs-2,\ little\ endian] :call Cream_print_set("i", "encoding", "ucs-2le") anoremenu 10.607 &File.Prin&t\ Setup.&Encoding.Unicode.Unicode\ (UTF-16)[utf-16\ --\ UCS-2\ extended\ with\ double-words\ for\ more\ characters] :call Cream_print_set("i", "encoding", "utf-16") anoremenu 10.608 &File.Prin&t\ Setup.&Encoding.Unicode.Unicode\ (UTF-16le)[utf-16le\ --\ like\ UTF-16,\ little\ endian] :call Cream_print_set("i", "encoding", "utf-16le") anoremenu 10.609 &File.Prin&t\ Setup.&Encoding.Unicode.Unicode\ (UCS-4)[ucs-4\ --\ 32\ bit\ UCS-4\ encoded\ Unicode\ (ISO/IEC\ 10646-1)] :call Cream_print_set("i", "encoding", "ucs-4") anoremenu 10.610 &File.Prin&t\ Setup.&Encoding.Unicode.Unicode\ (UCS-4le)[ucs-4le\ --\ like\ ucs-4,\ little\ endian] :call Cream_print_set("i", "encoding", "ucs-4le") anoremenu 10.611 &File.Prin&t\ Setup.&Encoding.-Sep10611- anoremenu 10.612 &File.Prin&t\ Setup.&Encoding.Western\ European.Western\ (ISO-8859-1)[latin1/ANSI\ --\ 8-bit\ characters] :call Cream_print_set("i", "encoding", "latin1") anoremenu 10.613 &File.Prin&t\ Setup.&Encoding.Western\ European.Western\ (ISO-8859-15)[iso-8859-15\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-15") anoremenu 10.614 &File.Prin&t\ Setup.&Encoding.Western\ European.Western\ (Windows-1252)[8bit-cp1252\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1252") anoremenu 10.615 &File.Prin&t\ Setup.&Encoding.Western\ European.Celtic\ (ISO-8859-14)[iso-8859-14\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-14") anoremenu 10.616 &File.Prin&t\ Setup.&Encoding.Western\ European.Greek\ (ISO-8859-7)[iso-8859-7\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-7") anoremenu 10.617 &File.Prin&t\ Setup.&Encoding.Western\ European.Greek\ (Windows-1253)[8bit-cp1253\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1253") anoremenu 10.618 &File.Prin&t\ Setup.&Encoding.Western\ European.Nordic\ (ISO-8859-10)[iso-8859-10\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-10") anoremenu 10.619 &File.Prin&t\ Setup.&Encoding.Western\ European.South\ European\ (ISO-8859-3)[iso-8859-3\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-3") anoremenu 10.620 &File.Prin&t\ Setup.&Encoding.Eastern\ European.Baltic\ (ISO-8859-4)[iso-8859-4\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-4") anoremenu 10.621 &File.Prin&t\ Setup.&Encoding.Eastern\ European.Baltic\ (ISO-8859-13)[iso-8859-13\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-13") anoremenu 10.622 &File.Prin&t\ Setup.&Encoding.Western\ European.Baltic\ (Windows-1257)[8bit-cp1257\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1257") anoremenu 10.623 &File.Prin&t\ Setup.&Encoding.Western\ European.Central\ European\ (Windows-1250)[8bit-cp1250\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1250") anoremenu 10.624 &File.Prin&t\ Setup.&Encoding.Eastern\ European.Cyrillic\ (ISO-8859-5)[iso-8859-5\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-5") anoremenu 10.625 &File.Prin&t\ Setup.&Encoding.Eastern\ European.Cyrillic\ (KO18-R)[koi8-r\ --\ Russian] :call Cream_print_set("i", "encoding", "koi8-r") anoremenu 10.626 &File.Prin&t\ Setup.&Encoding.Western\ European.Cyrillic\ (Windows-1251)[8bit-cp1251\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1251") anoremenu 10.627 &File.Prin&t\ Setup.&Encoding.Eastern\ European.Cyrillic/Ukrainian\ (KO18-U)[koi8-u\ --\ Ukrainian] :call Cream_print_set("i", "encoding", "koi8-u") anoremenu 10.628 &File.Prin&t\ Setup.&Encoding.Eastern\ European.Romanian\ (ISO-8859-16)[iso-8859-16\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-16") anoremenu 10.629 &File.Prin&t\ Setup.&Encoding.East\ Asian.Simplified\ Chinese\ (ISO-2022-CN)[chinese\ --\ simplified\ Chinese:\ on\ Unix\ "euc-cn",\ on\ MS-Windows\ cp936] :call Cream_print_set("i", "encoding", "chinese") anoremenu 10.630 &File.Prin&t\ Setup.&Encoding.East\ Asian.Chinese\ Traditional\ (Big5)[big5\ --\ traditional\ Chinese] :call Cream_print_set("i", "encoding", "big5") anoremenu 10.631 &File.Prin&t\ Setup.&Encoding.East\ Asian.Chinese\ Traditional\ (EUC-TW)[taiwan\ --\ on\ Unix\ "euc-tw",\ on\ MS-Windows\ cp950] :call Cream_print_set("i", "encoding", "taiwan") anoremenu 10.632 &File.Prin&t\ Setup.&Encoding.East\ Asian.Japanese[japan\ --\ on\ Unix\ "euc-jp",\ on\ MS-Windows\ cp932] :call Cream_print_set("i", "encoding", "japan") anoremenu 10.633 &File.Prin&t\ Setup.&Encoding.East\ Asian.Korean[korea\ --\ on\ Unix\ "euc-kr",\ on\ MS-Windows\ cp949] :call Cream_print_set("i", "encoding", "korea") anoremenu 10.634 &File.Prin&t\ Setup.&Encoding.SE\ and\ SW\ Asian.Turkish\ (ISO-8859-9)[iso-8859-6\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-9") anoremenu 10.635 &File.Prin&t\ Setup.&Encoding.Western\ European.Turkish\ (Windows-1254)[8bit-cp1254\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1254") anoremenu 10.636 &File.Prin&t\ Setup.&Encoding.Western\ European.Vietnamese\ (Windows-1258)[8bit-cp1258\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1258") anoremenu 10.637 &File.Prin&t\ Setup.&Encoding.Middle\ Eastern.Arabic\ (ISO-8859-6)[iso-8859-6\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-6") anoremenu 10.638 &File.Prin&t\ Setup.&Encoding.Western\ European.Arabic\ (Windows-1256)[8bit-cp1256\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1256") anoremenu 10.639 &File.Prin&t\ Setup.&Encoding.Western\ European.Hebrew\ (Windows-1255)[8bit-cp1255\ --\ MS-Windows\ double-byte\ codepage] :call Cream_print_set("i", "encoding", "8bit-cp1255") anoremenu 10.640 &File.Prin&t\ Setup.&Encoding.Middle\ Eastern.Hebrew\ Visual\ (ISO-8859-8)[iso-8859-8\ --\ ISO_8859\ variant] :call Cream_print_set("i", "encoding", "iso-8859-8") endif " 2}}} imenu 10.650 &File.Prin&t\ Setup.Obey\ Formfeeds\.\.\. :call Cream_print_set_formfeed("i") vmenu 10.651 &File.Prin&t\ Setup.Obey\ Formfeeds\.\.\. :call Cream_print_set_formfeed("v") anoremenu 10.660 &File.Prin&t\ Setup.--Sep10660-- imenu 10.661 &File.Prin&t\ Setup.Collate\.\.\. :call Cream_print_set_collate("i") vmenu 10.662 &File.Prin&t\ Setup.Collate\.\.\. :call Cream_print_set_collate("v") imenu 10.670 &File.Prin&t\ Setup.Duplex\.\.\. :call Cream_print_set_duplex("i") vmenu 10.671 &File.Prin&t\ Setup.Duplex\.\.\. :call Cream_print_set_duplex("v") imenu 10.680 &File.Prin&t\ Setup.Job\ Split\ Copies\.\.\. :call Cream_print_set_jobsplit("i") vmenu 10.681 &File.Prin&t\ Setup.Job\ Split\ Copies\.\.\. :call Cream_print_set_jobsplit("v") anoremenu 10.690 &File.Prin&t\ Setup.--Sep10690-- " we don't need this functionality (READ :help 'printdevice) "imenu 10.691 &File.Prin&t\ Setup.Device\.\.\. :call Cream_print_set_device("i") "vmenu 10.692 &File.Prin&t\ Setup.Device\.\.\. :call Cream_print_set_device("v") imenu 10.693 &File.Prin&t\ Setup.Printer\ Expression\.\.\. :call Cream_print_set_expr("i") vmenu 10.694 &File.Prin&t\ Setup.Printer\ Expression\.\.\. :call Cream_print_set_expr("v") " 1}}} elseif has("unix") anoremenu 10.500 &File.-SEP10500- anoremenu 10.510 &File.&Print\.\.\. :w !lpr vunmenu &File.&Print\.\.\. vmenu &File.&Print\.\.\. :w !lpr elseif has("vms") anoremenu 10.500 &File.-SEP10500- anoremenu 10.510 &File.&Print\.\.\. :call VMSPrint(":") vunmenu &File.&Print\.\.\. vmenu &File.&Print\.\.\. :call VMSPrint(":'<,'>") if !exists("*VMSPrint") function VMSPrint(range) let mod_save = &mode let ttt = tempname() execute a:range . "w! " . ttt let &mode = mod_save execute "!print/delete " . ttt endfunction endif endif anoremenu 10.800 &File.-SEP4- anoremenu 10.801 &File.E&xitAlt+F4 :call Cream_exit() anoremenu 10.821 &File.Save\ All\ and\ &Exit :call Cream_save_exit() endfunction call Cream_menu_load_file() "---------------------------------------------------------------------- " Recent File menu function! Cream_load_menu_mru() if filereadable($CREAM . "cream-menu-mru.vim") > 0 execute "source " . $CREAM . "cream-menu-mru.vim" endif endfunction call Cream_load_menu_mru() " vim:foldmethod=marker cream-0.43/cream-menu-settings.vim0000644000076400007660000006652211517300720017523 0ustar digitectlocaluser" " cream-menu-settings.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. function! Cream_menu_settings() " functionalized so we can toggle texts based on state " remove menu and restore silent! unmenu &Settings silent! unmenu! &Settings " status check mark (GTK2) if has("gui_gtk2") && &encoding == "utf8" || &encoding == "utf-8" " try various chars, verifying they are one char width if strlen(substitute(strtrans(nr2char(0x2713)), ".", "x", "g")) == 1 let s:on = nr2char(0x2713) . '\ ' " ✓ let s:off = '\ \ \ ' elseif strlen(substitute(strtrans(nr2char(0x221a)), ".", "x", "g")) == 1 let s:on = nr2char(0x221a) . '\ ' " √ let s:off = '\ \ \ ' elseif strlen(substitute(strtrans(nr2char(0x2714)), ".", "x", "g")) == 1 let s:on = nr2char(0x2714) . '\ ' " ✔ let s:off = '\ \ \ ' endif endif " catch all platforms and GTK2 failures if !exists("s:on") "let s:on = nr2char(215) . '\ ' let s:on = '*\ ' let s:off = '\ \ \ ' endif " Main Menu {{{1 " invisibles function! Cream_menu_settings_invisibles() if exists("g:LIST") && g:LIST == 1 silent! execute 'iunmenu &Settings.' . s:off . '&Show/Hide\ InvisiblesF4' silent! execute 'vunmenu &Settings.' . s:off . '&Show/Hide\ InvisiblesF4' execute 'imenu 60.001 &Settings.' . s:on . '&Show/Hide\ InvisiblesF4 :call Cream_list_toggle("i")' execute 'vmenu 60.002 &Settings.' . s:on . '&Show/Hide\ InvisiblesF4 :call Cream_list_toggle("v")' elseif exists("g:LIST") && g:LIST == 0 silent! execute 'iunmenu &Settings.' . s:on . '&Show/Hide\ InvisiblesF4' silent! execute 'vunmenu &Settings.' . s:on . '&Show/Hide\ InvisiblesF4' execute 'imenu 60.001 &Settings.' . s:off . '&Show/Hide\ InvisiblesF4 :call Cream_list_toggle("i")' execute 'vmenu 60.002 &Settings.' . s:off . '&Show/Hide\ InvisiblesF4 :call Cream_list_toggle("v")' endif endfunction " line numbers function! Cream_menu_settings_linenumbers() if exists("g:CREAM_LINENUMBERS") && g:CREAM_LINENUMBERS == 1 silent! execute 'aunmenu &Settings.' . s:off . 'Line\ &Numbers' execute 'anoremenu 60.003 &Settings.' . s:on . 'Line\ &Numbers :call Cream_linenumbers_toggle()' elseif exists("g:CREAM_LINENUMBERS") && g:CREAM_LINENUMBERS == 0 silent! execute 'aunmenu &Settings.' . s:on . 'Line\ &Numbers' execute 'anoremenu 60.003 &Settings.' . s:off . 'Line\ &Numbers :call Cream_linenumbers_toggle()' endif endfunction anoremenu 60.004 &Settings.-Sep004- " word wrap function! Cream_menu_settings_wordwrap() if exists("g:CREAM_WRAP") && g:CREAM_WRAP == 1 silent! execute 'aunmenu &Settings.' . s:off . '&Word\ WrapCtrl+W' execute 'anoremenu 60.005 &Settings.' . s:on . '&Word\ WrapCtrl+W :call Cream_wrap("i")' elseif exists("g:CREAM_WRAP") && g:CREAM_WRAP == 0 silent! execute 'aunmenu &Settings.' . s:on . '&Word\ WrapCtrl+W' execute 'anoremenu 60.005 &Settings.' . s:off . '&Word\ WrapCtrl+W :call Cream_wrap("i")' endif endfunction " auto wrap function! Cream_menu_settings_autowrap() if exists("g:CREAM_AUTOWRAP") && g:CREAM_AUTOWRAP == 1 silent! execute 'aunmenu &Settings.' . s:off . 'A&uto\ WrapCtrl+E' execute 'anoremenu 60.006 &Settings.' . s:on . 'A&uto\ WrapCtrl+E :call Cream_autowrap("i")' elseif exists("g:CREAM_AUTOWRAP") && g:CREAM_AUTOWRAP == 0 silent! execute 'aunmenu &Settings.' . s:on . 'A&uto\ WrapCtrl+E' execute 'anoremenu 60.006 &Settings.' . s:off . 'A&uto\ WrapCtrl+E :call Cream_autowrap("i")' endif endfunction " wrap width anoremenu 60.007 &Settings.&Set\ Wrap\ Width\.\.\. :call Cream_autowrap_setwidth() " highlight wrap width function! Cream_menu_settings_highlightwrapwidth() if exists("b:cream_col_highlight") silent! execute 'aunmenu &Settings.' . s:off . '&Highlight\ Wrap\ Width' execute 'anoremenu 60.008 &Settings.' . s:on . '&Highlight\ Wrap\ Width :call Cream_highlight_columns(g:CREAM_AUTOWRAP_WIDTH)' else silent! execute 'aunmenu &Settings.' . s:on . '&Highlight\ Wrap\ Width' execute 'anoremenu 60.008 &Settings.' . s:off . '&Highlight\ Wrap\ Width :call Cream_highlight_columns(g:CREAM_AUTOWRAP_WIDTH)' endif endfunction " tabs anoremenu 60.010 &Settings.-Sep010- anoremenu 60.011 &Settings.&Tabstop\ Width\.\.\. :call Cream_tabstop() anoremenu 60.012 &Settings.Soft\ Ta&bstop\ Width\.\.\. :call Cream_softtabstop() " expand tab function! Cream_menu_settings_expandtab() if exists("g:CREAM_EXPANDTAB") && g:CREAM_EXPANDTAB == 1 silent! execute 'iunmenu &Settings.' . s:off . 'Tab\ &ExpansionCtrl+T' silent! execute 'vunmenu &Settings.' . s:off . 'Tab\ &ExpansionCtrl+T' execute 'imenu 60.014 &Settings.' . s:on . 'Tab\ &ExpansionCtrl+T :call Cream_expandtab_toggle("i")' execute 'vmenu 60.015 &Settings.' . s:on . 'Tab\ &ExpansionCtrl+T :call Cream_expandtab_toggle("v")' elseif exists("g:CREAM_EXPANDTAB") && g:CREAM_EXPANDTAB == 0 silent! execute 'iunmenu &Settings.' . s:on . 'Tab\ &ExpansionCtrl+T' silent! execute 'vunmenu &Settings.' . s:on . 'Tab\ &ExpansionCtrl+T' execute 'imenu 60.014 &Settings.' . s:off . 'Tab\ &ExpansionCtrl+T :call Cream_expandtab_toggle("i")' execute 'vmenu 60.015 &Settings.' . s:off . 'Tab\ &ExpansionCtrl+T :call Cream_expandtab_toggle("v")' endif endfunction " autoindent function! Cream_menu_settings_autoindent() if exists("g:CREAM_AUTOINDENT") && g:CREAM_AUTOINDENT == 1 silent! execute 'aunmenu &Settings.' . s:off . '&Auto-indent' execute 'anoremenu 60.016 &Settings.' . s:on . '&Auto-indent :call Cream_autoindent_toggle()' elseif exists("g:CREAM_AUTOINDENT") && g:CREAM_AUTOINDENT == 0 silent! execute 'aunmenu &Settings.' . s:on . '&Auto-indent' execute 'anoremenu 60.016 &Settings.' . s:off . '&Auto-indent :call Cream_autoindent_toggle()' endif endfunction anoremenu 60.020 &Settings.-Sep020- " highlight find function! Cream_menu_settings_highlightsearch() if exists("g:CREAM_SEARCH_HIGHLIGHT") && g:CREAM_SEARCH_HIGHLIGHT == 1 silent! execute 'aunmenu &Settings.' . s:off . 'Highlight\ Find' execute 'anoremenu 60.021 &Settings.' . s:on . 'Highlight\ Find :call Cream_search_highlight_toggle()' elseif exists("g:CREAM_SEARCH_HIGHLIGHT") && g:CREAM_SEARCH_HIGHLIGHT == 0 silent! execute 'aunmenu &Settings.' . s:on . 'Highlight\ Find' execute 'anoremenu 60.021 &Settings.' . s:off . 'Highlight\ Find :call Cream_search_highlight_toggle()' endif endfunction " clear find imenu 60.022 &Settings.Highlight\ Find\ &Clear :nohlsearch vmenu 60.022 &Settings.Highlight\ Find\ &Clear :nohlsearch anoremenu 60.024 &Settings.-Sep024- " highlight current line function! Cream_menu_settings_highlightcurrentline() if exists("g:CREAM_HIGHLIGHT_CURRENTLINE") silent! execute 'aunmenu &Settings.' . s:off . 'Highlight\ Current\ Line' execute 'anoremenu 60.025 &Settings.' . s:on . 'Highlight\ Current\ Line :call Cream_highlight_currentline_toggle()' else silent! execute 'aunmenu &Settings.' . s:on . 'Highlight\ Current\ Line' execute 'anoremenu 60.025 &Settings.' . s:off . 'Highlight\ Current\ Line :call Cream_highlight_currentline_toggle()' endif endfunction " syntax menu function! Cream_menu_settings_syntax() if exists("g:CREAM_SYNTAX") && g:CREAM_SYNTAX == 1 silent! execute 'iunmenu &Settings.' . s:off . 'Syntax\ Highlighting' silent! execute 'vunmenu &Settings.' . s:off . 'Syntax\ Highlighting' execute 'imenu 60.030 &Settings.' . s:on . 'Syntax\ Highlighting :call Cream_syntax_toggle("i")' execute 'vmenu 60.030 &Settings.' . s:on . 'Syntax\ Highlighting :call Cream_syntax_toggle("v")' elseif exists("g:CREAM_SYNTAX") && g:CREAM_SYNTAX == 0 silent! execute 'iunmenu &Settings.' . s:on . 'Syntax\ Highlighting' silent! execute 'vunmenu &Settings.' . s:on . 'Syntax\ Highlighting' execute 'imenu 60.030 &Settings.' . s:off . 'Syntax\ Highlighting :call Cream_syntax_toggle("i")' execute 'vmenu 60.030 &Settings.' . s:off . 'Syntax\ Highlighting :call Cream_syntax_toggle("v")' endif endfunction " Filetypes {{{1 """function! Cream_menu_settings_filetypes() """" *** called via VimEnter command on startup, so filetypes_list() is available *** """" "menu-izes" the aviable filetypes """ """ let idx = 200 """ execute "anoremenu \ 60." . idx . " &Settings.-Sep200- \" """ let idx = idx + 1 """ """ let myfiletypes = Cream_vim_syntax_list() . "\n" """ "let myfiletypes = Cream_get_filetypes() . "\n" """ " use destructive process, multvals too slow """ let i = 0 " itteration index """ while myfiletypes != "" """ let pos = stridx(myfiletypes, "\n") """ let myitem = strpart(myfiletypes, 0, pos) """ let myfiletypes = strpart(myfiletypes, pos + 1) """ """ let letters = "[" . toupper(myitem[0]) . "]" """ """ let command = "anoremenu \ 60." . (i + idx) . " &Settings.&Filetype." . letters . "." . myitem . " :call Cream_filetype(\"" . myitem . "\")\" """ """ execute command """ """ let i = i + 1 """ endwhile """ """endfunction " TODO: Experimentation with caching filetype menu and loading it " only when the user requests it. anoremenu 60.100 &Settings.-Sep100- function! Cream_menu_filetypes_init() " Initialize Filetypes submenu if cache exists. let myfile = g:cream_user . "menu-filetype.vim" " load if exists if filereadable(myfile) call Cream_source(myfile) anoremenu 60.101 &Settings.&Filetype.-Sep101- anoremenu 60.102 &Settings.&Filetype.Re-fresh\ Available\ Filetypes\.\.\. :call Cream_menu_filetypes("refresh") else anoremenu 60.101 &Settings.&Filetype.Menu\ the\ Available\ Filetypes\.\.\. :call Cream_menu_filetypes() endif endfunction call Cream_menu_filetypes_init() function! Cream_menu_filetypes(...) " Filetype submenu when user requests, either initially or to re-fresh. " " Notes: " o Called via VimEnter command on startup, so filetypes_list() is " available! (We parse autocmds.) " o This submenu optimized for speed. Parsing each " time is slow, so we cache it in g:cream_user / menu-filetype.vim. " The function below creates the cache if it doesn't exist and then " loads the menu from it. let myfile = g:cream_user . "menu-filetype.vim" " reasons to re-cache " 1. arg is "refresh" if a:0 > 0 && a:1 == "refresh" let flag = 1 endif " 2. every 10 times used let mytime = localtime() if mytime[9] == "9" let flag = 1 endif " delete cache if exists("flag") call delete(myfile) endif " cache if doesn't exist if !filereadable(myfile) call Cream_menu_filetypes_cache() endif " remove any existing submenu silent! unmenu &Settings.&Filetype silent! unmenu! &Settings.&Filetype " load anoremenu 60.105 &Settings.&Filetype.-Sep105- anoremenu 60.106 &Settings.&Filetype.Re-fresh\ Available\ Filetypes\.\.\. :call Cream_menu_filetypes("refresh") call Cream_source(myfile) endfunction function! Cream_menu_filetypes_cache() " Re/creates filetype menu cache, overwriting any existing. let @x = "" let i = 0 let idx = 110 let myfts = Cream_vim_syntax_list() . "\n" " use destructive process, multvals too slow while myfts != "" let pos = stridx(myfts, "\n") let myitem = strpart(myfts, 0, pos) let myfts = strpart(myfts, pos + 1) let letters = "[" . toupper(myitem[0]) . "]" let @x = @x . "anoremenu \ 60." . (i + idx) . " &Settings.&Filetype." . letters . "." . myitem . ' :call Cream_filetype("' . myitem . '")' . "\n" let i = i + 1 endwhile " TODO: Fix windowing mistakes inherant in this... " mark place let mypos = Cream_pos() " TODO: use Vim7 to write var to file. " open temp buffer silent! enew silent! put x " save as silent! execute "silent! write! " . g:cream_user . "menu-filetype.vim" " close buffer silent! bwipeout! " return execute mypos call confirm( \ "Settings > Filetype menu filled.\n" . \ "\n", "&Ok", 1, "Info") endfunction " Preferences {{{1 anoremenu 60.600 &Settings.-Sep600- function! Cream_menu_settings_preferences() " remove menu and restore silent! unmenu &Settings.P&references silent! unmenu! &Settings.P&references if has("gui") anoremenu 60.601 &Settings.P&references.Font\.\.\. :call Cream_font_set() endif " toolbar if exists("g:CREAM_TOOLBAR") && g:CREAM_TOOLBAR == 1 execute 'anoremenu 60.602 &Settings.P&references.' . s:on . 'Toolbar :call Cream_toolbar_toggle()' else execute 'anoremenu 60.602 &Settings.P&references.' . s:off . 'Toolbar :call Cream_toolbar_toggle()' endif " statusline if exists("g:CREAM_STATUSLINE") && g:CREAM_STATUSLINE == 1 execute 'anoremenu 60.604 &Settings.P&references.' . s:on . 'Statusline :call Cream_statusline_toggle()' else execute 'anoremenu 60.604 &Settings.P&references.' . s:off . 'Statusline :call Cream_statusline_toggle()' endif " tabpages if exists("g:CREAM_TABPAGES") && g:CREAM_TABPAGES == 1 execute 'anoremenu 60.606 &Settings.P&references.' . s:on . 'Tabbed\ Documents :call Cream_tabpages_toggle()' else execute 'anoremenu 60.606 &Settings.P&references.' . s:off . 'Tabbed\ Documents :call Cream_tabpages_toggle()' endif " Preferences, Color {{{2 if has("gui") if exists("g:cream_dev") " color themes, selection anoremenu 60.610 &Settings.P&references.-Sep610- anoremenu 60.611 &Settings.P&references.&Color\ Themes.Selection.Reverse\ Black\ (default) :call Cream_colors_selection("reverseblack") anoremenu 60.612 &Settings.P&references.&Color\ Themes.Selection.Reverse\ Blue :call Cream_colors_selection("reverseblue") anoremenu 60.613 &Settings.P&references.&Color\ Themes.Selection.Terminal :call Cream_colors_selection("terminal") anoremenu 60.614 &Settings.P&references.&Color\ Themes.Selection.Navajo :call Cream_colors_selection("navajo") anoremenu 60.615 &Settings.P&references.&Color\ Themes.Selection.Navajo-Night :call Cream_colors_selection("navajo-night") anoremenu 60.616 &Settings.P&references.&Color\ Themes.Selection.Night :call Cream_colors_selection("night") anoremenu 60.617 &Settings.P&references.&Color\ Themes.Selection.Vim :call Cream_colors_selection("vim") anoremenu 60.618 &Settings.P&references.&Color\ Themes.Selection.Magenta :call Cream_colors_selection("magenta") " experimental anoremenu 60.620 &Settings.P&references.&Color\ Themes.Selection.-Sep620- anoremenu 60.621 &Settings.P&references.&Color\ Themes.Selection.(experimental\ below) anoremenu 60.622 &Settings.P&references.&Color\ Themes.Selection.-Sep622- anoremenu 60.623 &Settings.P&references.&Color\ Themes.Selection.Lt\.\ Magenta :call Cream_colors_selection("ltmagenta") anoremenu 60.624 &Settings.P&references.&Color\ Themes.Selection.Dk\.\ Magenta :call Cream_colors_selection("dkmagenta") anoremenu 60.625 &Settings.P&references.&Color\ Themes.Selection.Magenta :call Cream_colors_selection("magenta") anoremenu 60.626 &Settings.P&references.&Color\ Themes.Selection.Blue :call Cream_colors_selection("blue") anoremenu 60.627 &Settings.P&references.&Color\ Themes.Selection.Orange :call Cream_colors_selection("orange") anoremenu 60.628 &Settings.P&references.&Color\ Themes.Selection.Green :call Cream_colors_selection("green") anoremenu 60.629 &Settings.P&references.&Color\ Themes.Selection.Gold :call Cream_colors_selection("gold") anoremenu 60.630 &Settings.P&references.&Color\ Themes.Selection.Purple :call Cream_colors_selection("purple") anoremenu 60.631 &Settings.P&references.&Color\ Themes.Selection.Wheat :call Cream_colors_selection("wheat") anoremenu 60.632 &Settings.P&references.&Color\ Themes.-Sep632- endif " color schemes (Cream) if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "cream" execute 'anoremenu 60.633 &Settings.P&references.&Color\ Themes.' . s:on . 'Cream\ (default) :call Cream_colors("cream")' else execute 'anoremenu 60.633 &Settings.P&references.&Color\ Themes.' . s:off . 'Cream\ (default) :call Cream_colors("cream")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "blackwhite" execute 'anoremenu 60.634 &Settings.P&references.&Color\ Themes.' . s:on . 'Black\ and\ White :call Cream_colors("blackwhite")' else execute 'anoremenu 60.634 &Settings.P&references.&Color\ Themes.' . s:off . 'Black\ and\ White :call Cream_colors("blackwhite")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "chocolateliquor" execute 'anoremenu 60.635 &Settings.P&references.&Color\ Themes.' . s:on . 'Chocolate\ Liquor :call Cream_colors("chocolateliquor")' else execute 'anoremenu 60.635 &Settings.P&references.&Color\ Themes.' . s:off . 'Chocolate\ Liquor :call Cream_colors("chocolateliquor")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "dawn" execute 'anoremenu 60.636 &Settings.P&references.&Color\ Themes.' . s:on . 'Dawn :call Cream_colors("dawn")' else execute 'anoremenu 60.636 &Settings.P&references.&Color\ Themes.' . s:off . 'Dawn :call Cream_colors("dawn")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "inkpot" execute 'anoremenu 60.637 &Settings.P&references.&Color\ Themes.' . s:on . 'Inkpot :call Cream_colors("inkpot")' else execute 'anoremenu 60.637 &Settings.P&references.&Color\ Themes.' . s:off . 'Inkpot :call Cream_colors("inkpot")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "matrix" execute 'anoremenu 60.638 &Settings.P&references.&Color\ Themes.' . s:on . 'Matrix :call Cream_colors("matrix")' else execute 'anoremenu 60.638 &Settings.P&references.&Color\ Themes.' . s:off . 'Matrix :call Cream_colors("matrix")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "navajo" execute 'anoremenu 60.639 &Settings.P&references.&Color\ Themes.' . s:on . 'Navajo :call Cream_colors("navajo")' else execute 'anoremenu 60.639 &Settings.P&references.&Color\ Themes.' . s:off . 'Navajo :call Cream_colors("navajo")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "navajo-night" execute 'anoremenu 60.640 &Settings.P&references.&Color\ Themes.' . s:on . 'Navajo-Night :call Cream_colors("navajo-night")' else execute 'anoremenu 60.640 &Settings.P&references.&Color\ Themes.' . s:off . 'Navajo-Night :call Cream_colors("navajo-night")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "night" execute 'anoremenu 60.641 &Settings.P&references.&Color\ Themes.' . s:on . 'Night :call Cream_colors("night")' else execute 'anoremenu 60.641 &Settings.P&references.&Color\ Themes.' . s:off . 'Night :call Cream_colors("night")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "oceandeep" execute 'anoremenu 60.642 &Settings.P&references.&Color\ Themes.' . s:on . 'Ocean\ Deep :call Cream_colors("oceandeep")' else execute 'anoremenu 60.642 &Settings.P&references.&Color\ Themes.' . s:off . 'Ocean\ Deep :call Cream_colors("oceandeep")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "terminal" execute 'anoremenu 60.643 &Settings.P&references.&Color\ Themes.' . s:on . 'Terminal\ (reverse) :call Cream_colors("terminal")' else execute 'anoremenu 60.643 &Settings.P&references.&Color\ Themes.' . s:off . 'Terminal\ (reverse) :call Cream_colors("terminal")' endif if exists("g:CREAM_COLORS") && g:CREAM_COLORS == "zenburn" execute 'anoremenu 60.644 &Settings.P&references.&Color\ Themes.' . s:on . 'Zenburn :call Cream_colors("zenburn")' else execute 'anoremenu 60.644 &Settings.P&references.&Color\ Themes.' . s:off . 'Zenburn :call Cream_colors("zenburn")' endif function! Cream_menu_colors() " color schemes (Vim's only! Ours are specifically "menu-ized" ;) " * This function is called via VimEnter autocmd so multvals is available. " this should be dev-only! if !exists("g:cream_dev") return else anoremenu 60.650 &Settings.P&references.&Color\ Themes.-Sep650- "anoremenu 60.651 &Settings.P&references.&Color\ Themes.gVim\ themes\ (non-Cream): endif let mycolors = globpath(&runtimepath, "colors/*.vim") if strlen(mycolors) > 0 let mycolors = mycolors . "\n" endif " menu each item let idx = 652 let i = 0 while i < MvNumberOfElements(mycolors, "\n") let mycolor = MvElementAt(mycolors, "\n", i) " name doesn't have path let mycolor = substitute(mycolor, '.*[/\\:]\([^/\\:]*\)\.vim', '\1', '') execute "anoremenu 60." . idx . ' &Settings.P&references.&Color\ Themes.gVim\ themes\ (non-Cream).' . mycolor . " :colors " . mycolor . "\" let i = i + 1 endwhile endfunction "" load on re-sets, not startup (multvals isn't avialable) "call Cream_menu_colors() endif " 2}}} anoremenu 60.700 &Settings.P&references.-Sep700- " last file restore if !exists("g:CREAM_LAST_BUFFER_FORGET") "silent! execute 'aunmenu &Settings.P&references.' . s:off . 'Last\ File\ Restore' execute 'anoremenu 60.701 &Settings.P&references.' . s:on . 'Last\ File\ Restore :call Cream_last_buffer_toggle()' else "silent! execute 'aunmenu &Settings.P&references.' . s:on . 'Last\ File\ Restore' execute 'anoremenu 60.701 &Settings.P&references.' . s:off . 'Last\ File\ Restore :call Cream_last_buffer_toggle()' endif "if exists("g:CREAM_SINGLESERVER") && g:CREAM_SINGLESERVER == 1 " execute 'anoremenu 60.702 &Settings.P&references.' . s:on . '&Single-Session\ Mode :call Cream_singleserver_toggle()' "else " execute 'anoremenu 60.702 &Settings.P&references.' . s:off . '&Single-Session\ Mode :call Cream_singleserver_toggle()' "endif if exists("g:CREAM_WINPOS") && g:CREAM_WINPOS == 1 execute 'anoremenu 60.703 &Settings.P&references.' . s:on . 'Remember\ Window\ Position :call Cream_winpos_toggle()' else execute 'anoremenu 60.703 &Settings.P&references.' . s:off . 'Remember\ Window\ Position :call Cream_winpos_toggle()' endif if exists("g:CREAM_MOUSE_XSTYLE") && g:CREAM_MOUSE_XSTYLE == 1 execute 'anoremenu 60.704 &Settings.P&references.' . s:on . '&Middle-Mouse\ Pastes :call Cream_mouse_middle_toggle()' else execute 'anoremenu 60.704 &Settings.P&references.' . s:off . '&Middle-Mouse\ Pastes :call Cream_mouse_middle_toggle()' endif if exists("g:CREAM_BRACKETMATCH") && g:CREAM_BRACKETMATCH == 1 execute 'anoremenu 60.705 &Settings.P&references.' . s:on . 'Bracket\ Flashing :call Cream_bracketmatch_toggle()' else execute 'anoremenu 60.705 &Settings.P&references.' . s:off . 'Bracket\ Flashing :call Cream_bracketmatch_toggle()' endif anoremenu 60.706 &Settings.P&references.-Sep706- anoremenu 60.707 &Settings.P&references.Info\ Pop\ Options\.\.\. :call Cream_pop_options() " language anoremenu 60.708 &Settings.P&references.-Sep708- anoremenu 60.709 &Settings.P&references.Language\.\.\.\ (Future) " Keymap {{{2 if has("keymap") " get vim's list let maps = Cream_getfilelist($VIMRUNTIME . "/keymap/*.vim") if maps != "" " none if exists("g:CREAM_KEYMAP") && g:CREAM_KEYMAP == "" execute 'anoremenu 60.799 &Settings.P&references.&Keymap.' . s:on . 'None :call Cream_keymap("")' else execute 'anoremenu 60.799 &Settings.P&references.&Keymap.' . s:off . 'None :call Cream_keymap("")' endif " other let cnt = MvNumberOfElements(maps, "\n") let i = 0 while i < cnt let mapp = MvElementAt(maps, "\n", i) let mapp = matchstr(mapp, 'keymap/\zs.*\ze\.vim') " cat string let idx = i while strlen(idx) < 2 let idx = "0" . idx endwhile if exists("g:CREAM_KEYMAP") && g:CREAM_KEYMAP == mapp " if this map is active execute 'anoremenu 60.8' . idx . ' &Settings.P&references.&Keymap.' . s:on . mapp . ' :call Cream_keymap("' . mapp . '")' else " if this map isn't execute 'anoremenu 60.8' . idx . ' &Settings.P&references.&Keymap.' . s:off . mapp . ' :call Cream_keymap("' . mapp . '")' endif let i = i + 1 endwhile endif endif " 2}}} anoremenu 60.900 &Settings.P&references.-Sep900- " Expert mode if exists("g:CREAM_EXPERTMODE") && g:CREAM_EXPERTMODE == 1 execute 'anoremenu 60.901 &Settings.P&references.' . s:on . '&Expert\ Mode\.\.\. :call Cream_expertmode_toggle()' else execute 'anoremenu 60.901 &Settings.P&references.' . s:off . '&Expert\ Mode\.\.\. :call Cream_expertmode_toggle()' endif " Behavior anoremenu 60.902 &Settings.P&references.&Behavior.&Cream\ (default) :call Cream_behave_cream() anoremenu 60.903 &Settings.P&references.&Behavior.&Cream\ Lite\.\.\. :call Cream_behave_creamlite() anoremenu 60.904 &Settings.P&references.&Behavior.&Vim\.\.\. :call Cream_behave_vim() anoremenu 60.905 &Settings.P&references.&Behavior.&Vi\.\.\. :call Cream_behave_vi() endfunction endfunction call Cream_menu_settings() " 1}}} " vim:foldmethod=marker cream-0.43/filetypes/0000755000076400007660000000000011517421112015107 5ustar digitectlocalusercream-0.43/filetypes/txt.vim0000644000076400007660000001135011517301016016443 0ustar digitectlocaluser" " cream-filetype-txt.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 2 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " "--------------------------------------------------------------------- " comments " start fresh setlocal comments= " bulleted within email replies prefaced ">" setlocal comments+=sr:\>\ \ \ \ \ \ \ +\ ,mb:\>\ \ \ \ \ \ \ \ ,eb:\>\ \ \ \ \ \ \ \ setlocal comments+=sr:\>\ \ \ \ \ -\ ,mb:\>\ \ \ \ \ \ ,eb:\>\ \ \ \ \ \ setlocal comments+=sr:\>\ \ \ *\ ,mb:\>\ \ \ \ ,eb:\>\ \ \ \ setlocal comments+=sr:\>\ o\ ,mb:\>\ \ ,eb:\>\ \ setlocal comments+=sr:\>\ @\ ,mb:\>\ \ ,eb:\>\ \ " bulleted within email replies prefaced "|" setlocal comments+=sr:\|\ \ \ \ \ \ \ +\ ,mb:\|\ \ \ \ \ \ \ \ ,eb:\|\ \ \ \ \ \ \ \ setlocal comments+=sr:\|\ \ \ \ \ -\ ,mb:\|\ \ \ \ \ \ ,eb:\|\ \ \ \ \ \ setlocal comments+=sr:\|\ \ \ *\ ,mb:\|\ \ \ \ ,eb:\|\ \ \ \ setlocal comments+=sr:\|\ o\ ,mb:\|\ \ ,eb:\|\ \ setlocal comments+=sr:\|\ @\ ,mb:\|\ \ ,eb:\|\ \ " bullet parts setlocal comments+=fb:@,fb:o,fb:*,fb:-,fb:+ " email, communications setlocal comments+=n:>,n:\|,n:),:XCOMM "--------------------------------------------------------------------- " highlighting " don't do this if syntax highlighting is off if exists("g:CREAM_SYNTAX") \&& g:CREAM_SYNTAX == 1 " bullets highlight! link Cream_txt_bullets Special silent! syntax match Cream_txt_bullets '\(^[ \t]*\)\@<=[@o\*\-+]\{1} ' " character lines, < full width, > 5 (must precede full width def) "execute "silent! syntax match PreProc \"\\(^\\s*\\)\\@<=\\([-_=#\\\"~]\\)\\{5,}$\"" highlight! link Cream_txt_charlines_half PreProc execute 'silent! syntax match Cream_txt_charlines_half "\(^\s*\)\@<=\([-_=#\"~]\)\{5,}$"' " character lines, full width if exists("g:CREAM_AUTOWRAP_WIDTH") highlight! link Cream_txt_charlines_full Statement execute 'silent! syntax match Cream_txt_charlines_full "\(^\s*\)\@<=\([-_=#\"~]\{1}\)\+\%' . g:CREAM_AUTOWRAP_WIDTH . 'v"' endif " email quotes and sigs (def order is critical!) silent! syntax match EQuote1 "^>[ ]\{0,1}>\@!.*$" silent! syntax match EQuote2 "^>[ ]\{0,1}>[ ]\{0,1}>\@!.*$" silent! syntax match EQuote3 "^>[ ]\{0,1}>[ ]\{0,1}>.*$" silent! syntax match Sig "^-- [\r\n]\{1,2}\_.*" if exists("g:CREAM_TIMESTAMP_TEXT") " timestamp text highlight! link Cream_txt_stamp WarningMsg execute "silent! syntax match Cream_txt_stamp \"\\<" . g:CREAM_TIMESTAMP_TEXT . "\"" " timestamp value highlight! link Cream_txt_stamp_value Underlined execute "silent! syntax match Cream_txt_stamp_value \"\\(\\<" . g:CREAM_TIMESTAMP_TEXT . "\\)\\@<=.\\{-}[\"\'\\n\\r]\"" endif if exists("g:CREAM_STAMP_FILENAME_TEXT") " text highlight! link Cream_txt_stamp WarningMsg execute "silent! syntax match Cream_txt_stamp \"\\<" . g:CREAM_STAMP_FILENAME_TEXT . "\"" " value highlight! link Cream_txt_stamp_value Underlined execute "silent! syntax match Cream_txt_stamp_value \"\\(\\<" . g:CREAM_STAMP_FILENAME_TEXT . "\\)\\@<=.\\{-}[\"\'\\n\\r]\"" endif " foldmark titles highlight! link Cream_txt_foldtitles ModeMsg "execute "silent! syntax match Cream_txt_foldtitles \"^.\\+{{{\\(\\d\\+\\)\\{-}$\"" silent! syntax match Cream_txt_foldtitles "^.\+\s\+\({{{\d\+\s*$\)\@=" " arrow bullets "highlight! link Cream_txt_important WarningMsg highlight! link Cream_txt_important User1 silent! syntax match Cream_txt_important '\(\s*[o\*\-+@\(\d\.\)] \)\@<==>' "" bold headers (numbers + caps + punct + whitespace) "highlight! link Cream_txt_header VisualNOS "silent! syntax match Cream_txt_header '^\([0-9A-Z [:punct:]]\+\)\C$' " URLs highlight! link Cream_URL Underlined " web address [-._?,'/\\+&%$#=~] silent! syntax match Cream_URL "https\=://[[:alnum:]\.-]\+\.[[:alpha:]]\{2,4}[[:alnum:]-\._?,'/\\+&%$#=~^?@\*]*" silent! syntax match Cream_URL "www\.[[:alnum:]\.-]\+\.[[:alpha:]]\{2,4}[[:alnum:]-\._?,'/\\+&%$#=~^?@\*]*" " email silent! syntax match Cream_URL "https\=://[[:alnum:]\._%+-]\+@[[:alnum:]\.-]\+\.[[:alpha:]]\{2,4}[[:alnum:]-\._?,'/\\+&%$#=~^?@\*]*" endif cream-0.43/filetypes/lisp.vim0000644000076400007660000000171111517301120016567 0ustar digitectlocaluser" " cream-filetype-lisp.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. setlocal comments=:;,sr:;\|,el:\|; cream-0.43/filetypes/c.vim0000644000076400007660000000172111517301134016050 0ustar digitectlocaluser" " cream-filetype-c.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. setlocal comments=b:#,:%,sr:/*,mb:*,el:*/,:// cream-0.43/filetypes/html.vim0000644000076400007660000001041211517301126016570 0ustar digitectlocaluser" " cream-filetype-html.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Notes: " * We've reserved Alt+[letter] combinations for language specific functions. " * This stuff belongs in other (individual?) files, perhaps loadable from the menu. setlocal commentstring= setlocal comments+=s1:\ " we do not like Vim's autoindent in HTML! setlocal indentexpr="" setlocal noautoindent "" Insert HTML
  • item "imap
  • " Insert HTML
      structure "*** BROKEN: is the mapping for single command mode!! *** "imap
      "" Insert HTML
        structure "" * Note: "" doesn't work. "imap
        "" Insert HTML pair "imap :call Cream_html_bold() "function! Cream_html_bold() " normal i " normal hhh "endfunction " Insert HTML pair, pasting selection within vmap :call Cream_html_bold_select("v") function! Cream_html_bold_select(mode) if a:mode == "v" normal gv else return endif " cut normal "xx let @x = "\" . @x . "\" normal "xP " re-select normal gv " adjust for added chars inserted normal o execute "normal lll" normal o execute "normal lll" normal o endfunction "" Insert HTML pair ""*** Broken *** (interfering with [Tab]) ""imap :call Cream_html_italicize() "function! Cream_html_italicize() " normal i " normal hhh "endfunction " Insert HTML pair, pasting selection within "*** Broken *** (interfering with [Tab]) "vmap "xxh:call Cream_html_italicize_select() function! Cream_html_italicize_select() let mystr = @x let mystr = "\" . mystr . "\" let @x = mystr normal "xp " now re-select, and adjust for added chars inserted normal gv normal o execute "normal lll" normal O execute "normal lll" normal o endfunction "*** BROKEN: Conflicts with other :call... stuff """ Insert HTML pair ""imap :call Cream_html_underline() ""function! Cream_html_underline() "" normal i "" normal hhh ""endfunction "" Insert HTML pair, pasting selection within "vmap "xxh:call Cream_html_underline_select() "function! Cream_html_underline_select() " let mystr = @x " let mystr = "\" . mystr . "\" " let @x = mystr " normal "xp " " now re-select, and adjust for added chars inserted " normal gv " normal o " execute "normal lll" " normal O " execute "normal lll" " normal o "endfunction "*** "" Insert " " ""nmap i  "imap   "" Insert header () "imap

        "imap

        "imap

        "imap

        "imap
        "imap
        "" Insert HTML

        ""nmap i

        "imap

        ""vmap i

        " HTML Character Equivalences "" ">" to ">" (remember, this is [Alt]+[Shift]+[.] ;) "imap < "" "<" to "<" (remember, this is [Alt]+[Shift]+[,] ;) "imap > > "" "&" to "&" "imap & "" """ to """ "imap " cream-0.43/filetypes/vim.vim0000644000076400007660000000333511517301016016423 0ustar digitectlocaluser" " cream-filetype-vim.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. "autocmd BufRead,BufNewFile *.vim setfiletype vim " vim "set comments+=:\" " clear comments setlocal comments= " bullets within comments " + setlocal comments+=sr:\"\ \ \ \ \ \ \ +\ ,mb:\"\ \ \ \ \ \ \ \ ,eb:\"\ \ \ \ \ \ \ \ " - setlocal comments+=sr:\"\ \ \ \ \ -\ ,mb:\"\ \ \ \ \ \ ,eb:\"\ \ \ \ \ \ " * setlocal comments+=sr:\"\ \ \ *\ ,mb:\"\ \ \ \ ,eb:\"\ \ \ \ " o setlocal comments+=sr:\"\ o\ ,mb:\"\ \ ,eb:\"\ \ " @ setlocal comments+=sr:\"\ @\ ,mb:\"\ \ ,eb:\"\ \ " bullet parts setlocal comments+=fb:*,fb:-,fb:+,fb:o " commets setlocal comments+=:\" "---------------------------------------------------------------------- " leaving... "autocmd BufWinLeave * call Cream_filetype_vim_un() "function! Cream_filetype_vim_un() " if &filetype == "vim" " set comments-=:\" " endif "endfunction cream-0.43/cream-replace.vim0000644000076400007660000003214311517300720016324 0ustar digitectlocaluser"= " cream-replace.vim -- A re-work of the replace command " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " * allows non-regexp " * case sensitivity " * up/down option " " ********************************************************************** " Note: " This script is cream-replacemulti.vim with parts removed. DON'T edit " here without incorporating changes into that master!!!!!!! " ********************************************************************** " "== "---------------------------------------------------------------------- function! Cream_replace() " Main function " save guioptions environment let myguioptions = &guioptions " do not use a vertical layout for dialog buttons set guioptions-=v " initialize variables if don't exist (however, remember if they do!) if !exists("g:CREAM_RFIND") let g:CREAM_RFIND = 'Find Me!' endif if !exists("g:CREAM_RREPL") let g:CREAM_RREPL = 'Replace Me!' endif " option: case sensitive? (1=yes, 0=no) if !exists("g:CREAM_RCASE") " initialize off let g:CREAM_RCASE = 0 endif " option: replace one at a time? (1=yes, 0=no) if !exists("g:CREAM_RONEBYONE") " initialize off let g:CREAM_RONEBYONE = 0 endif " option: regular expressions? (1=yes, 0=no) if !exists("g:CREAM_RREGEXP") " initialize off let g:CREAM_RREGEXP = 0 endif " get find, replace info (verifying that Find isn't empty, too) let valid = 0 while valid == 0 " get find, replace and path/filename info let myreturn = Cream_replace_request(g:CREAM_RFIND, g:CREAM_RREPL) " if quit code returned if myreturn == 2 break " verify criticals aren't empty (user pressed 'ok') elseif myreturn == 1 let valid = Cream_replace_verify() endif endwhile " if not quit code, continue if myreturn != 2 " DO FIND/REPLACE! (Critical file states are verified within.) if valid == 1 call Cream_replace_doit() else return endif endif " restore guioptions execute "set guioptions=" . myguioptions endfunction "---------------------------------------------------------------------- function! Cream_replace_request(myfind, myrepl) " Dialog to obtain user information (find, replace, path/filename) " * returns 0 for not finished (so can be recalled) " * returns 1 for finished " * returns 2 for quit " escape ampersand with second ampersand in dialog box " * JUST for display " * Just for Windows if has("win32") \|| has("win16") \|| has("win95") \|| has("dos16") \|| has("dos32") let myfind_fixed = substitute(a:myfind, "&", "&&", "g") let myrepl_fixed = substitute(a:myrepl, "&", "&&", "g") else let myfind_fixed = a:myfind let myrepl_fixed = a:myrepl endif let mychoice = 0 let msg = "INSTRUCTIONS:\n" let msg = msg . "* Enter the literal find and replace text below (case-sensitive).\n" let msg = msg . "* Use \"\\n\" to represent new lines and \"\\t\" for tabs.\n" let msg = msg . "* Please read the Vim help to understand regular expressions (:help regexp)\n" let msg = msg . "\n" let msg = msg . "\n" let msg = msg . "FIND: " . myfind_fixed . " \n" let msg = msg . "\n" let msg = msg . "REPLACE: " . myrepl_fixed . " \n" let msg = msg . "\n" let msg = msg . "\n" let msg = msg . "OPTIONS:\n" if g:CREAM_RCASE == 1 let msg = msg . " [X] Yes [_] No Case Sensitive\n" else let msg = msg . " [_] Yes [X] No Case Sensitive\n" endif if g:CREAM_RONEBYONE == 1 let msg = msg . " [X] Yes [_] No Replace One At A Time\n" else let msg = msg . " [_] Yes [X] No Replace One At A Time\n" endif if g:CREAM_RREGEXP == 1 let msg = msg . " [X] Yes [_] No Regular Expressions\n" else let msg = msg . " [_] Yes [X] No Regular Expressions\n" endif let msg = msg . "\n" let mychoice = confirm(msg, "&Find\n&Replace\nOp&tions\n&Ok\n&Cancel", 1, "Info") if mychoice == 0 " quit via Esc, window close, etc. (OS specific) return 2 elseif mychoice == 1 " call dialog to get find string call Cream_replace_find(g:CREAM_RFIND) return elseif mychoice == 2 " call dialog to get replace string call Cream_replace_repl(g:CREAM_RREPL) return elseif mychoice == 3 " call dialog to set options. Continue to show until Ok(1) or Cancel(2) let valid = 0 while valid == 0 " let user set options let myreturn = Cream_replace_options() " if Ok or Cancel, go back to main dialog if myreturn == 1 || myreturn == 2 let valid = 1 endif endwhile return elseif mychoice == 4 " user thinks ok, return positive for actual verification return 1 elseif mychoice == 5 " quit return 2 endif call confirm("Error in Cream_replace_request(). Unexpected result.", "&Ok", "Error") return 2 endfunction " Get input through dialog " * Would be nice to detect Ok or Cancel here. (Cancel returns an empty string.) " * These stupid spaces are to work around a Windows GUI problem: Input is only " allowed to be as long as the actual input box. Therefore, we're widening the " dialog box so the input box is wider. ;) "---------------------------------------------------------------------- function! Cream_replace_find(myfind) let myfind = inputdialog("Please enter a string to find... " . \" ", a:myfind) " let's not go overboard with the data entry width " \" " . " \" " . " \" " . " if user cancels, returns empty. Don't allow. if myfind != "" let g:CREAM_RFIND = myfind endif return endfunction "---------------------------------------------------------------------- function! Cream_replace_repl(myrepl) let myrepl = inputdialog("Please enter a string to replace..." . \" ", a:myrepl) " let's not go overboard with the data entry width " \" " . " \" " . " \" " . " allow empty return, but verify not a cancel if myrepl == "" let mychoice = confirm( \ "Replace was found empty.\n" . \ "\n" . \ "(This is legal, but was it your intention?)\n", \ "&Leave\ empty\n&No,\ put\ back\ what\ I\ had", 2, "Question") if mychoice == 2 " leave global as is else let g:CREAM_RREPL = "" endif else let g:CREAM_RREPL = myrepl endif return endfunction "---------------------------------------------------------------------- function! Cream_replace_options() let mychoice = 0 let msg = "Options:\n" let msg = msg . "\n" let msg = msg . "\n" if g:CREAM_RCASE == 1 let strcase = "X" else let strcase = "_" endif if g:CREAM_RONEBYONE == 1 let stronebyone = "X" else let stronebyone = "_" endif if g:CREAM_RREGEXP == 1 let strregexp = "X" else let strregexp = "_" endif let msg = msg . " [" . strcase . "] Case Sensitive\n" let msg = msg . " [" . stronebyone . "] Replace one at a time\n" let msg = msg . " [" . strregexp . "] Regular Expressions\n" let msg = msg . "\n" let mychoice = confirm(msg, "Case\ Sensitive\nReplace\ One\ At\ A\ Time\nRegular\ Expressions\n&Ok", 1, "Info") if mychoice == 0 " quit via Esc, window close, etc. (OS specific) return 2 elseif mychoice == 1 " case sensitive if g:CREAM_RCASE == 1 let g:CREAM_RCASE = 0 else let g:CREAM_RCASE = 1 endif return elseif mychoice == 2 " regular expressions if g:CREAM_RONEBYONE == 1 let g:CREAM_RONEBYONE = 0 else let g:CREAM_RONEBYONE = 1 endif return elseif mychoice == 3 " regular expressions if g:CREAM_RREGEXP == 1 let g:CREAM_RREGEXP = 0 else let g:CREAM_RREGEXP = 1 endif return elseif mychoice == 4 " ok return 1 endif return endfunction "---------------------------------------------------------------------- function! Cream_replace_verify() " Verify that Find and Path not empty (although Replace can be) " * Returns '1' when valid if g:CREAM_RFIND == '' call confirm("Find may not be empty.", "&Ok", "Warning") return else return 1 endif endfunction "---------------------------------------------------------------------- function! Cream_replace_doit() " Main find/replace function. Also validates files and state "...................................................................... " find/replace in file " capture current magic state let mymagic = &magic " turn off if mymagic == "1" set nomagic endif " strings " * use local variable to maintain global strings " * work around ridiculous differences between {pattern} and {string} let myfind = g:CREAM_RFIND let myrepl = g:CREAM_RREPL " condition: case-sensitive if g:CREAM_RCASE == 1 let mycase = "I" set noignorecase else let mycase = "i" set ignorecase endif " condition: regular expressions if g:CREAM_RREGEXP == 1 let myregexp = "" set magic else let myregexp = "\\V" set nomagic " escape strings " escape all backslashes " * This effectively eliminates ALL magical special pattern " meanings! Only those patterns "unescaped" at the next step " become effective. (Diehards are gonna kill us for this.) let myfind = substitute(myfind, '\\', '\\\\', 'g') let myrepl = substitute(myrepl, '\\', '\\\\', 'g') " un-escape desired escapes " * Anything not recovered here is escaped forever ;) let myfind = substitute(myfind, '\\\\n', '\\n', 'g') let myfind = substitute(myfind, '\\\\t', '\\t', 'g') let myrepl = substitute(myrepl, '\\\\n', '\\n', 'g') let myrepl = substitute(myrepl, '\\\\t', '\\t', 'g') " escape slashes so as not to thwart the :s command below! let myfind = substitute(myfind, '/', '\\/', 'g') let myrepl = substitute(myrepl, '/', '\\/', 'g') " replace string requires returns instead of newlines let myrepl = substitute(myrepl, '\\n', '\\r', 'g') endif "...................................................................... " find/replace ( :s/{pattern}/{string}/{options} ) " * {command} " % -- globally across the file " " * {pattern} " \V -- eliminates magic (ALL specials must be escaped, most " of which we thwarted above, MWUHAHAHA!!) " " * {string} " " * {options} " g -- global " e -- skip over minor errors (like "not found") " I -- don't ignore case " i -- ignore case " condition: replace one at a time if g:CREAM_RONEBYONE == 1 " test if expression exists in file first if search(myregexp . myfind) != 0 " initial find command execute ":silent! /" . myregexp . myfind " Hack: back up to previous find, the replace command goes forward from current pos normal N " turn on search highlighting set hlsearch " loop next/previous let mycontinue = "" while mycontinue != "no" " start visual mode if mode() != "v" normal v endif " select word found let i = 0 while i < strlen(myfind) " adjust normal l let i = i + 1 endwhile redraw! " continue? if !exists("mypick") let mypick = 1 endif let mypick = confirm("Continue find?", "&Replace\n&Next\n&Previous\n&Cancel", mypick, "Question") if mypick == 1 " stop and restart visual mode to set mark normal v normal gv " do substitution in current visual selection let mycmd = ":\'\<,\'>s/" . myfind . '/' . myrepl . '/' execute mycmd " stop mode again normal v redraw! " quit if no more found if search(myregexp . myfind) == 0 call confirm("No more matches found.", "&Ok", 1, "Info") break endif elseif mypick == 2 " terminate visual mode normal v " next normal n elseif mypick == 3 " terminate visual mode normal v " back up our adjustment normal b " previous normal N else " terminate visual mode normal v " quit break endif endwhile " turn off search highlighting set nohlsearch else call confirm("No match found", "&Ok", 1, "Info") endif else " do replace command execute ":%substitute/" . myregexp . myfind . "/" . myrepl . "/ge" . mycase endif " return magic state if mymagic == "1" set magic else set nomagic endif unlet mymagic endfunction cream-0.43/calendar.vim0000644000076400007660000007665311156572440015424 0ustar digitectlocaluser"======== " File: calendar.vim " Author: Yasuhiro Matsumoto " Last Change: Fri, 10 Jan 2003 " Version: 1.3r " Thanks: " Vikas Agnihotri : bug report " Steve Hall : gave a hint for 1.3q " James Devenish : bug fix " Carl Mueller : gave a hint for 1.3o " Klaus Fabritius : bug fix " Stucki : gave a hint for 1.3m " Rosta : bug report " Richard Bair : bug report " Yin Hao Liew : bug report " Bill McCarthy : bug fix and gave a hint " Srinath Avadhanula : bug fix " Ronald Hoellwarth : few advices " Juan Orlandini : added higlighting of days with data " Ray : bug fix " Ralf.Schandl : gave a hint for 1.3 " Bhaskar Karambelkar : bug fix " Suresh Govindachar : gave a hint for 1.2 " Michael Geddes : bug fix " Leif Wickland : bug fix " Usage: " :Calendar " show calendar at this year and this month " :Calendar 8 " show calendar at this year and given month " :Calendar 2001 8 " show calendar at given year and given month " :CalendarH ... " show horizontal calendar ... " " ca " show calendar in normal mode " ch " show horizontal calendar ... " ChangeLog: " 1.3r : bug fix " if clicked navigator, cursor go to strange position. " 1.3q : bug fix " coundn't set calendar_navi " in its horizontal direction " 1.3p : bug fix " coundn't edit diary when the calendar is " in its horizontal direction " 1.3o : add option calendar_mark, and delete calendar_rmark " see Additional: " add option calendar_navi " see Additional: " 1.3n : bug fix " s:CalendarSign() should use filereadable(expand(sfile)). " 1.3m : tuning " using topleft or botright for opening Calendar. " use filereadable for s:CalendarSign(). " 1.3l : bug fix " if set calendar_monday, it can see that Sep 1st is Sat " as well as Aug 31st. " 1.3k : bug fix " it didn't escape the file name on calendar. " 1.3j : support for fixed Gregorian " added the part of Sep 1752. " 1.3i : bug fix " Calculation mistake for week number. " 1.3h : add option for position of displaying '*' or '+'. " see Additional: " 1.3g : centering header " add option for show name of era. " see Additional: " bug fix " ca didn't show current month. " 1.3f : bug fix " there was yet another bug of today's sign. " 1.3e : added usage for " support handler for sign. " see Additional: " 1.3d : added higlighting of days that have calendar data associated " with it. " bug fix for calculates date. " 1.3c : bug fix for MakeDir() " if CalendarMakeDir(sfile) != 0 " v " if s:CalendarMakeDir(sfile) != 0 " 1.3b : bug fix for calendar_monday. " it didn't work g:calendar_monday correctly. " add g:calendar_version. " add argument on action handler. " see Additional: " 1.3a : bug fix for MakeDir(). " it was not able to make directory. " 1.3 : support handler for action. " see Additional: " 1.2g : bug fix for today's sign. " it could not display today's sign correctly. " 1.2f : bug fix for current Date. " vtoday variable calculates date as 'YYYYMMDD' " while the loop calculates date as 'YYYYMMD' i.e just 1 digit " for date if < 10 so if current date is < 10 , the if condiction " to check for current date fails and current date is not " highlighted. " simple solution changed vtoday calculation line divide the " current-date by 1 so as to get 1 digit date. " 1.2e : change the way for setting title. " auto configuration for g:calendar_wruler with g:calendar_monday " 1.2d : add option for show week number. " let g:calendar_weeknm = 1 " add separator if horizontal. " change all option's name " g:calendar_mnth -> g:calendar_mruler " g:calendar_week -> g:calendar_wruler " g:calendar_smnd -> g:calendar_monday " 1.2c : add option for that the week starts with monday. " let g:calendar_smnd = 1 " 1.2b : bug fix for modifiable. " setlocal nomodifiable (was set) " 1.2a : add default options. " nonumber,foldcolumn=0,nowrap... as making gap " 1.2 : support wide display. " add a command CalendarH " add map " 1.1c : extra. " add a titlestring for today. " 1.1b : bug fix by Michael Geddes. " it happend when do ':Calender' twice " 1.1a : fix misspell. " Calender -> Calendar " 1.1 : bug fix. " it"s about strftime("%m") " 1.0a : bug fix by Leif Wickland. " it"s about strftime("%w") " 1.0 : first release. " Additional: " *if you want to place the mark('*' or '+') after the day, " add the following to your .vimrc: " " let g:calendar_mark = 'right' " " NOTE:you can set 'left', 'left-fit', 'right' for this option. " " *if you want to use navigator, " add the following to your .vimrc: " " let g:calendar_navi = '' " " NOTE:you can set 'top', 'bottom', 'both' for this option. " " *if you want to replace calendar header, " add the following in your favorite language to your .vimrc: " " let g:calendar_erafmt = 'Heisei,-1988' " for Japanese " (name of era and diff with A.D.) " " *if you want to replace calendar ruler, " add the following in your favorite language to your .vimrc: " " let g:calendar_mruler = 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec' " let g:calendar_wruler = 'Su Mo Tu We Th Fr Sa' " " *if you want the week to start with monday, add below to your .vimrc: " " let g:calendar_monday = 1 " (You don't have to to change g:calendar_wruler!) " " *if you want to show week number, add this to your .vimrc: " " set g:calendar_weeknm as below " (Can't be used together with g:calendar_monday.) " " let g:calendar_weeknm = 1 " WK01 " let g:calendar_weeknm = 2 " WK 1 " let g:calendar_weeknm = 3 " KW01 " let g:calendar_weeknm = 4 " KW 1 " " *if you want to hook calender when pressing enter, " add this to your .vimrc: " " function MyCalAction(day,month,year,week,dir) " " day : day you actioned " " month : month you actioned " " year : year you actioned " " week : day of week (Mo=1 ... Su=7) " " dir : direction of calendar " endfunction " let calendar_action = 'MyCalAction' " " *if you want to show sign in calender, " add this to your .vimrc: " " function MyCalSign(day,month,year) " " day : day you actioned " " month : month you actioned " " year : year you actioned " if a:day == 1 && a:month == 1 " return 1 " happy new year " else " return 0 " or not " endif " endfunction " let calendar_sign = 'MyCalSign' " " *if you want to get the version of this. " type below. " " :echo calendar_version "+++ Cream additions function! Cream_calendar() " close if exists("g:CREAM_CALENDAR") " leave buffer if in calendar if bufname("%") == "__Calendar" call Cream_TryAnotherWindow() endif " remember what buffer we're in (not window! it will change) let mybufnr = bufnr("%") " close if bufexists(bufname("__Calendar")) > 0 execute "bwipeout! __Calendar" endif unlet g:CREAM_CALENDAR " reset window configuration call Cream_window_setup() " restore cursor to original current buffer's new window call MoveCursorToWindow(bufwinnr(mybufnr)) " open else " remember what buffer we're in (not window! it will change) let mybufnr = bufnr("%") " start with Monday let g:calendar_monday = 1 " show week number (only if monday off) "let g:cream_calendar_weeknm = 1 " current day indication let g:calendar_mark = 'left' " navigator let g:calendar_navi = 'top' "" holiday file "let g:calendar_diary = $CREAM " call command, not function! execute ":Calendar" let g:CREAM_CALENDAR = "1" " reset window configuration call Cream_window_setup() " restore cursor to original current buffer's new window call MoveCursorToWindow(bufwinnr(mybufnr)) endif endfunction function! Cream_calendar_init() " initialize calendar if it was open at last exit if exists("g:CREAM_CALENDAR") " reverse state unlet g:CREAM_CALENDAR call Cream_calendar() " go to another buffer if current if bufname("%") == "__Calendar" call Cream_nextwindow() endif " for some reason (autocmd?) we end up in normal mode startinsert endif endfunction function! Cream_calendar_exit() " used by Cream_exit() to close calendar and remember state before exiting " go to another buffer if current if bufname("%") == "__Calendar" call Cream_nextwindow() endif " close if bufexists(bufname("__Calendar")) != 0 execute "bwipeout! __Calendar" endif endfunction ""*** Too slow! "" holidays "" Source: http://vim.sourceforge.net/tip_view.php?tip_id=408 "let calendar_sign = 'MyGetSpecialDay' "function! MyGetSpecialDay(day, month, year) " let m100d = 10000 + (a:month * 100 ) + a:day " let holidays = $CREAM . "calendar-holidays_US" " execute "silent! split " . holidays " let found = search(m100d) " if found " let found = 'h' " endif " silent! quit " return l:found "endfunction ""*** "+++ let g:calendar_version = "1.3r" if !exists("g:calendar_action") let g:calendar_action = "CalendarDiary" endif if !exists("g:calendar_diary") let g:calendar_diary = "~/diary" endif if !exists("g:calendar_sign") let g:calendar_sign = "CalendarSign" endif if !exists("g:calendar_mark") \|| (g:calendar_mark != 'left' \&& g:calendar_mark != 'left-fit' \&& g:calendar_mark != 'right') let g:calendar_mark = 'left' endif if !exists("g:calendar_navi") \|| (g:calendar_navi != 'top' \&& g:calendar_navi != 'bottom' \&& g:calendar_navi != 'both') let g:calendar_navi = 'top' endif "***************************************************************** "* Calendar commands "***************************************************************** :command! -nargs=* Calendar call Calendar(0,) :command! -nargs=* CalendarH call Calendar(1,) if !hasmapto("Calendar") nmap ca Calendar endif if !hasmapto("CalendarH") nmap ch CalendarH endif nmap Calendar :cal Calendar(0) nmap CalendarH :cal Calendar(1) "***************************************************************** "* GetToken : get token from source with count "*---------------------------------------------------------------- "* src : source "* dlm : delimiter "* cnt : skip count "***************************************************************** function! s:GetToken(src,dlm,cnt) let tokn_hit=0 " flag of found let tokn_fnd='' " found path let tokn_spl='' " token let tokn_all=a:src " all source " safe for end let tokn_all = tokn_all.a:dlm while 1 let tokn_spl = strpart(tokn_all,0,match(tokn_all,a:dlm)) let tokn_hit = tokn_hit + 1 if tokn_hit == a:cnt return tokn_spl endif let tokn_all = strpart(tokn_all,strlen(tokn_spl.a:dlm)) if tokn_all == '' break endif endwhile return '' endfunction "***************************************************************** "* CalendarDoAction : call the action handler function "*---------------------------------------------------------------- "***************************************************************** function! s:CalendarDoAction() " if no action defined return if !exists("g:calendar_action") return endif " for navi if exists('g:calendar_navi') let navi = expand("") let curl = line(".") if navi == 'Prev' exec substitute(maparg('', 'n'), '', '', '') elseif navi == 'Next' exec substitute(maparg('', 'n'), '', '', '') elseif navi == 'Today' call Calendar(b:CalendarDir) else let navi = '' endif if navi != '' if curl < line('$')/2 silent execute "normal! gg/".navi."\" else silent execute "normal! gg?".navi."\" endif return endif endif if b:CalendarDir let dir = 'H' if !exists('g:calendar_monday') && exists('g:calendar_weeknm') let cnr = col('.') - (col('.')%(24+5)) + 1 else let cnr = col('.') - (col('.')%(24)) + 1 endif let week = ((col(".") - cnr - 1 + cnr/49) / 3) else let dir = 'V' let cnr = 1 let week = ((col(".")+1) / 3) - 1 endif let lnr = 1 let hdr = 1 while 1 if lnr > line('.') break endif let sline = getline(lnr) if sline =~ '^\s*$' let hdr = lnr + 1 endif let lnr = lnr + 1 endwhile let lnr = line('.') if(exists('g:calendar_monday')) let week = week + 1 elseif(week == 0) let week = 7 endif if lnr-hdr < 2 return endif let sline = substitute(strpart(getline(hdr),cnr,21),'\s*\(.*\)\s*','\1','') if (col(".")-cnr) > 20 return endif " extracr day let day = matchstr(expand(""), '[^0].*') if day == 0 return endif " extracr year and month if exists('g:calendar_erafmt') && g:calendar_erafmt !~ "^\s*$" let year = matchstr(substitute(sline, '/.*', '', ''), '\d\+') let month = matchstr(substitute(sline, '.*/\(\d\d\=\).*', '\1', ""), '[^0].*') if g:calendar_erafmt =~ '.*,[+-]*\d\+' let veranum=substitute(g:calendar_erafmt,'.*,\([+-]*\d\+\)','\1','') if year-veranum > 0 let year=year-veranum endif endif else let year = matchstr(substitute(sline, '/.*', '', ''), '[^0].*') let month = matchstr(substitute(sline, '\d*/\(\d\d\=\).*', '\1', ""), '[^0].*') endif " call the action function exe "call " . g:calendar_action . "(day, month, year, week, dir)" endfunc "***************************************************************** "* Calendar : build calendar "*---------------------------------------------------------------- "* a1 : direction "* a2 : month(if given a3, it's year) "* a3 : if given, it's month "***************************************************************** function! Calendar(...) "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "+++ ready for build "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " remember today " divide strftime('%d') by 1 so as to get "1, 2,3 .. 9" instead of "01, 02, 03 .. 09" let vtoday = strftime('%Y'). \matchstr(strftime('%m'), '[^0].*').matchstr(strftime('%d'), '[^0].*') " get arguments if a:0 == 0 let dir = 0 let vyear = strftime('%Y') let vmnth = matchstr(strftime('%m'), '[^0].*') elseif a:0 == 1 let dir = a:1 let vyear = strftime('%Y') let vmnth = matchstr(strftime('%m'), '[^0].*') elseif a:0 == 2 let dir = a:1 let vyear = strftime('%Y') let vmnth = matchstr(a:2, '^[^0].*') else let dir = a:1 let vyear = a:2 let vmnth = matchstr(a:3, '^[^0].*') endif " remember constant let vmnth_org = vmnth let vyear_org = vyear " start with last month let vmnth = vmnth - 1 if vmnth < 1 let vmnth = 12 let vyear = vyear - 1 endif " reset display variables let vdisplay1 = '' let vheight = 1 let vmcnt = 0 "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "+++ build display "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ while vmcnt < 3 let vcolumn = 22 let vnweek = -1 "-------------------------------------------------------------- "--- calculating "-------------------------------------------------------------- " set boundary of the month if vmnth == 1 let vmdays = 31 let vparam = 0 let vsmnth = 'Jan' elseif vmnth == 2 let vmdays = 28 let vparam = 31 let vsmnth = 'Feb' elseif vmnth == 3 let vmdays = 31 let vparam = 59 let vsmnth = 'Mar' elseif vmnth == 4 let vmdays = 30 let vparam = 90 let vsmnth = 'Apr' elseif vmnth == 5 let vmdays = 31 let vparam = 120 let vsmnth = 'May' elseif vmnth == 6 let vmdays = 30 let vparam = 151 let vsmnth = 'Jun' elseif vmnth == 7 let vmdays = 31 let vparam = 181 let vsmnth = 'Jul' elseif vmnth == 8 let vmdays = 31 let vparam = 212 let vsmnth = 'Aug' elseif vmnth == 9 let vmdays = 30 let vparam = 243 let vsmnth = 'Sep' elseif vmnth == 10 let vmdays = 31 let vparam = 273 let vsmnth = 'Oct' elseif vmnth == 11 let vmdays = 30 let vparam = 304 let vsmnth = 'Nov' elseif vmnth == 12 let vmdays = 31 let vparam = 334 let vsmnth = 'Dec' else echo 'Invalid Year or Month' return endif " calc vnweek of the day if vnweek == -1 let vnweek = ( vyear * 365 ) + vparam + 1 let vnweek = vnweek + ( vyear/4 ) - ( vyear/100 ) + ( vyear/400 ) if vmnth < 3 && vyear % 4 == 0 if vyear % 100 != 0 || vyear % 400 == 0 let vnweek = vnweek - 1 endif endif let vnweek = vnweek - 1 endif if vmnth == 2 if vyear % 400 == 0 let vmdays = 29 elseif vyear % 100 == 0 let vmdays = 28 elseif vyear % 4 == 0 let vmdays = 29 endif endif " fix Gregorian if vyear <= 1752 let vnweek = vnweek - 3 endif let vnweek = vnweek % 7 if exists('g:calendar_monday') " if given g:calendar_monday, the week start with monday if vnweek == 0 let vnweek = 7 endif let vnweek = vnweek - 1 elseif exists('g:calendar_weeknm') " if given g:calendar_weeknm, show week number(ref:ISO8601) let viweek = (vparam + 1) / 7 let vfweek = (vparam + 1) % 7 if vnweek == 0 let vfweek = vfweek - 7 let viweek = viweek + 1 else let vfweek = vfweek - vnweek endif if vfweek <= 0 && viweek > 0 let viweek = viweek - 1 let vfweek = vfweek + 7 endif if vfweek > -4 let viweek = viweek + 1 endif if vfweek > 3 let viweek = viweek + 1 endif if viweek == 0 let viweek = '??' elseif viweek > 52 if vnweek != 0 && vnweek < 4 let viweek = 1 endif endif let vcolumn = vcolumn + 5 endif "-------------------------------------------------------------- "--- displaying "-------------------------------------------------------------- " build header if exists('g:calendar_erafmt') && g:calendar_erafmt !~ "^\s*$" if g:calendar_erafmt =~ '.*,[+-]*\d\+' let veranum=substitute(g:calendar_erafmt,'.*,\([+-]*\d\+\)','\1','') if vyear+veranum > 0 let vdisplay2=substitute(g:calendar_erafmt,'\(.*\),.*','\1','') let vdisplay2=vdisplay2.(vyear+veranum).'/'.vmnth.'(' else let vdisplay2=vyear.'/'.vmnth.'(' endif else let vdisplay2=vyear.'/'.vmnth.'(' endif let vdisplay2=strpart(" ", \ 1,(vcolumn-strlen(vdisplay2))/2-2).vdisplay2 else let vdisplay2=vyear.'/'.vmnth.'(' let vdisplay2=strpart(" ", \ 1,(vcolumn-strlen(vdisplay2))/2-2).vdisplay2 endif if exists('g:calendar_mruler') && g:calendar_mruler !~ "^\s*$" let vdisplay2=vdisplay2.s:GetToken(g:calendar_mruler,',',vmnth).')'."\n" else let vdisplay2=vdisplay2.vsmnth.')'."\n" endif let vwruler = "Su Mo Tu We Th Fr Sa" if exists('g:calendar_wruler') && g:calendar_wruler !~ "^\s*$" let vwruler = g:calendar_wruler endif if exists('g:calendar_monday') let vwruler = strpart(vwruler,3).' '.strpart(vwruler,0,2) endif let vdisplay2 = vdisplay2.' '.vwruler."\n" if g:calendar_mark == 'right' let vdisplay2 = vdisplay2.' ' endif " build calendar let vinpcur = 0 while (vinpcur < vnweek) let vdisplay2=vdisplay2.' ' let vinpcur = vinpcur + 1 endwhile let vdaycur = 1 while (vdaycur <= vmdays) let vtarget = vyear.vmnth.vdaycur if exists("g:calendar_sign") exe "let vsign = " . g:calendar_sign . "(vdaycur, vmnth, vyear)" if vsign != "" let vsign = vsign[0] if vsign !~ "[+!#$%&@?]" let vsign = "+" endif endif else let vsign = '' endif " show mark if g:calendar_mark == 'right' if vdaycur < 10 let vdisplay2=vdisplay2.' ' endif let vdisplay2=vdisplay2.vdaycur endif if g:calendar_mark == 'left-fit' if vdaycur < 10 let vdisplay2=vdisplay2.' ' endif endif if vtarget == vtoday let vdisplay2=vdisplay2.'*' elseif vsign != '' let vdisplay2=vdisplay2.vsign else let vdisplay2=vdisplay2.' ' endif if g:calendar_mark == 'left' if vdaycur < 10 let vdisplay2=vdisplay2.' ' endif let vdisplay2=vdisplay2.vdaycur endif if g:calendar_mark == 'left-fit' let vdisplay2=vdisplay2.vdaycur endif let vdaycur = vdaycur + 1 " fix Gregorian if vyear == 1752 && vmnth == 9 && vdaycur == 3 let vdaycur = 14 endif let vinpcur = vinpcur + 1 if vinpcur % 7 == 0 if !exists('g:calendar_monday') && exists('g:calendar_weeknm') if g:calendar_mark != 'right' let vdisplay2=vdisplay2.' ' endif " if given g:calendar_weeknm, show week number if viweek < 10 if g:calendar_weeknm == 1 let vdisplay2=vdisplay2.'WK0'.viweek elseif g:calendar_weeknm == 2 let vdisplay2=vdisplay2.'WK '.viweek elseif g:calendar_weeknm == 3 let vdisplay2=vdisplay2.'KW0'.viweek elseif g:calendar_weeknm == 4 let vdisplay2=vdisplay2.'KW '.viweek endif else if g:calendar_weeknm <= 2 let vdisplay2=vdisplay2.'WK'.viweek else let vdisplay2=vdisplay2.'KW'.viweek endif endif let viweek = viweek + 1 endif let vdisplay2=vdisplay2."\n" if g:calendar_mark == 'right' let vdisplay2 = vdisplay2.' ' endif endif endwhile " if it is needed, fill with space if vinpcur % 7 while (vinpcur % 7 != 0) let vdisplay2=vdisplay2.' ' let vinpcur = vinpcur + 1 endwhile if !exists('g:calendar_monday') && exists('g:calendar_weeknm') if g:calendar_mark != 'right' let vdisplay2=vdisplay2.' ' endif if viweek < 10 if g:calendar_weeknm == 1 let vdisplay2=vdisplay2.'WK0'.viweek elseif g:calendar_weeknm == 2 let vdisplay2=vdisplay2.'WK '.viweek elseif g:calendar_weeknm == 3 let vdisplay2=vdisplay2.'KW0'.viweek elseif g:calendar_weeknm == 4 let vdisplay2=vdisplay2.'KW '.viweek endif else if g:calendar_weeknm <= 2 let vdisplay2=vdisplay2.'WK'.viweek else let vdisplay2=vdisplay2.'KW'.viweek endif endif endif endif " build display let vstrline = '' if dir " for horizontal "-------------------------------------------------------------- " +---+ +---+ +------+ " | | | | | | " | 1 | + | 2 | = | 1' | " | | | | | | " +---+ +---+ +------+ "-------------------------------------------------------------- let vtokline = 1 while 1 let vtoken1 = s:GetToken(vdisplay1,"\n",vtokline) let vtoken2 = s:GetToken(vdisplay2,"\n",vtokline) if vtoken1 == '' && vtoken2 == '' break endif while strlen(vtoken1) < (vcolumn+1)*vmcnt if strlen(vtoken1) % (vcolumn+1) == 0 let vtoken1 = vtoken1.'|' else let vtoken1 = vtoken1.' ' endif endwhile let vstrline = vstrline.vtoken1.'|'.vtoken2.' '."\n" let vtokline = vtokline + 1 endwhile let vdisplay1 = vstrline let vheight = vtokline-1 else " for virtical "-------------------------------------------------------------- " +---+ +---+ +---+ " | 1 | + | 2 | = | | " +---+ +---+ | 1'| " | | " +---+ "-------------------------------------------------------------- let vtokline = 1 while 1 let vtoken1 = s:GetToken(vdisplay1,"\n",vtokline) if vtoken1 == '' break endif let vstrline = vstrline.vtoken1."\n" let vtokline = vtokline + 1 let vheight = vheight + 1 endwhile if vstrline != '' let vstrline = vstrline.' '."\n" let vheight = vheight + 1 endif let vtokline = 1 while 1 let vtoken2 = s:GetToken(vdisplay2,"\n",vtokline) if vtoken2 == '' break endif while strlen(vtoken2) < vcolumn let vtoken2 = vtoken2.' ' endwhile let vstrline = vstrline.vtoken2."\n" let vtokline = vtokline + 1 let vheight = vtokline + 1 endwhile let vdisplay1 = vstrline endif let vmnth = vmnth + 1 let vmcnt = vmcnt + 1 if vmnth > 12 let vmnth = 1 let vyear = vyear + 1 endif endwhile if a:0 == 0 return vdisplay1 endif "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "+++ build window "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " make window let vwinnum=bufnr('__Calendar') if getbufvar(vwinnum, 'Calendar')=='Calendar' let vwinnum=bufwinnr(vwinnum) else let vwinnum=-1 endif if vwinnum >= 0 " if already exist if vwinnum != bufwinnr('%') exe "normal \".vwinnum."w" endif setlocal modifiable silent %d _ else " make title "+++ Cream: we title elsewhere "auto BufEnter *Calendar let &titlestring = strftime('%c') "auto BufLeave *Calendar let &titlestring = '' "+++ if exists('g:calendar_navi') && dir if g:calendar_navi == 'both' let vheight = vheight + 4 else let vheight = vheight + 2 endif endif " or not if dir execute 'bo '.vheight.'split __Calendar' else execute 'to '.vcolumn.'vsplit __Calendar' endif setlocal noswapfile setlocal buftype=nowrite "+++ Cream: our window manager might like to recover it! "setlocal bufhidden=delete "+++ setlocal nonumber setlocal nowrap setlocal norightleft setlocal foldcolumn=0 setlocal modifiable let b:Calendar='Calendar' " is this a vertical (0) or a horizontal (1) split? endif let b:CalendarDir=dir " navi if exists('g:calendar_navi') if dir let navcol = ((vcolumn/2)*3-8) else let navcol = ((vcolumn/2)-8) endif if g:calendar_navi == 'top' execute "normal gg".navcol."i " silent exec "normal! i\\" silent put! =vdisplay1 endif if g:calendar_navi == 'bottom' silent put! =vdisplay1 silent exec "normal! Gi\" execute "normal ".navcol."i " silent exec "normal! i" endif if g:calendar_navi == 'both' execute "normal gg".navcol."i " silent exec "normal! i\\" silent put! =vdisplay1 silent exec "normal! Gi\" execute "normal ".navcol."i " silent exec "normal! i" endif else silent put! =vdisplay1 endif setlocal nomodifiable let vyear = vyear_org let vmnth = vmnth_org "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "+++ build keymap "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " make keymap if vmnth > 1 execute 'nnoremap ' \.':call Calendar('.dir.','.vyear.','.(vmnth-1).')' else execute 'nnoremap ' \.':call Calendar('.dir.','.(vyear-1).',12)' endif if vmnth < 12 execute 'nnoremap ' \.':call Calendar('.dir.','.vyear.','.(vmnth+1).')' else execute 'nnoremap ' \.':call Calendar('.dir.','.(vyear+1).',1)' endif execute 'nnoremap q :close' execute 'nnoremap :call CalendarDoAction()' execute 'nnoremap <2-LeftMouse> :call CalendarDoAction()' "+++ Cream: need insert mode mapping execute 'imap :call CalendarDoAction()' execute 'imap <2-LeftMouse> :call CalendarDoAction()' "+++ "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "+++ build highlight "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ " today syn clear if g:calendar_mark =~ 'left' syn match Directory display "\*\s*\d*" syn match Identifier display "[+!#$%&@?]\s*\d*" endif if g:calendar_mark =~ 'left-fit' syn match Directory display "\s*\*\d*" syn match Identifier display "\s*[+!#$%&@?]\d*" endif if g:calendar_mark =~ 'right' syn match Directory display "\d*\*\s*" syn match Identifier display "\d*[+!#$%&@?]\s*" endif " header syn match Special display "[^ ]*\d\+\/\d\+([^)]*)" " navi if exists('g:calendar_navi') syn match Search display "\(\)" syn match Search display "\sToday\s"hs=s+1,he=e-1 endif " saturday, sunday let dayorspace = '\(\*\|\s\)\(\s\|\d\)\(\s\|\d\)' if !exists('g:calendar_weeknm') || g:calendar_weeknm <= 2 let wknmstring = '\(\sWK[0-9\ ]\d\)*' else let wknmstring = '\(\sKW[0-9\ ]\d\)*' endif let eolnstring = '\s\(|\|$\)' if exists('g:calendar_monday') execute "syn match Statement display \'" \.dayorspace.dayorspace.wknmstring.eolnstring."\'ms=s+1,me=s+3" execute "syn match Type display \'" \.dayorspace.wknmstring.eolnstring."\'ms=s+1,me=s+3" else if dir execute "syn match Statement display \'" \.dayorspace.wknmstring.eolnstring."\'ms=s+1,me=s+3" execute "syn match Type display \'\|" \.dayorspace."\'ms=s+2,me=s+4" else execute "syn match Statement display \'" \.dayorspace.wknmstring.eolnstring."\'ms=s+1,me=s+3" execute "syn match Type display \'^" \.dayorspace."\'ms=s+1,me=s+3" endif endif " week number if !exists('g:calendar_weeknm') || g:calendar_weeknm <= 2 syn match Comment display "WK[0-9\ ]\d" else syn match Comment display "KW[0-9\ ]\d" endif " ruler execute 'syn match StatusLine "'.vwruler.'"' if search("\*","w") > 0 silent execute "normal! gg/*\" endif return '' endfunction "***************************************************************** "* CalendarMakeDir : make directory "*---------------------------------------------------------------- "* dir : directory "***************************************************************** function! s:CalendarMakeDir(dir) if(has("unix")) call system("mkdir " . a:dir) let rc = v:shell_error elseif(has("win16") || has("win32") || has("win95") || \has("dos16") || has("dos32") || has("os2")) call system("mkdir \"" . a:dir . "\"") let rc = v:shell_error else let rc = 1 endif if rc != 0 call confirm("can't create directory : " . a:dir, "&OK") endif return rc endfunc "***************************************************************** "* CalendarDiary : calendar hook function "*---------------------------------------------------------------- "* day : day you actioned "* month : month you actioned "* year : year you actioned "***************************************************************** function! s:CalendarDiary(day, month, year, week, dir) " build the file name and create directories as needed if expand(g:calendar_diary) == '' call confirm("please create diary directory : ".g:calendar_diary, 'OK') return endif let sfile = expand(g:calendar_diary) . "/" . a:year if isdirectory(sfile) == 0 if s:CalendarMakeDir(sfile) != 0 return endif endif let sfile = sfile . "/" . a:month if isdirectory(sfile) == 0 if s:CalendarMakeDir(sfile) != 0 return endif endif let sfile = expand(sfile) . "/" . a:day . ".cal" let sfile = substitute(sfile, ' ', '\\ ', 'g') let vwinnum = bufwinnr('__Calendar') " load the file exe "sp " . sfile exe "auto BufLeave ".escape(sfile, ' \\')." normal! ".vwinnum."w" endfunc "***************************************************************** "* CalendarSign : calendar sign function "*---------------------------------------------------------------- "* day : day of sign "* month : month of sign "* year : year of sign "***************************************************************** function! s:CalendarSign(day, month, year) let sfile = g:calendar_diary."/".a:year."/".a:month."/".a:day.".cal" return filereadable(expand(sfile)) endfunction cream-0.43/cream0000644000076400007660000000012311156572440014123 0ustar digitectlocaluser#!/bin/sh gvim --servername "CREAM" -U NONE -u "\$VIMRUNTIME/cream/creamrc" "$@" cream-0.43/cream-columns.vim0000644000076400007660000003023711517300720016373 0ustar digitectlocaluser" " cream-columns.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Updated: 2006-05-13 14:32:50EDT " Source: (excerpted from the Cream project) " Author: Steve Hall [ digitect@mindspring.com ] " " Description: " Intuitively type, delete and backspace in a vertical column. " " One of the many custom utilities and functions for gVim from the " Cream project ( http://cream.sourceforge.net ), a configuration of " Vim for those of us familiar with Apple or Windows software. " " Installation: " " Known Issues: " * Undo doesn't always track position correctly " " Notes: " * redraw! is required for any key that changes the background " (color). Unfortunately this includes shifted-motion keys, the very " keys we'd like to avoid having to clear and redraw the screen " after due to speed concerns. function! Cream_columns() " setup stuff before calling main motion/insert stuff " Hack: We can select the first column only when list is on. So we " provide ourselves two sets of &listchars: " On: Cream_listchars_init() " Off: Cream_listchars_col_init() " make invisible (use execute to maintain trailing char!) if &list == 0 call Cream_listchars_col_init() " MUST proceed initial Visual-block mode start set list " save "column &list" setting (we won't touch global) let g:cream_list_col = 0 else let g:cream_list_col = 1 endif " position (stupid work around for stuff at first column over tab) let mycol = virtcol('.') " start visual block mode execute "normal \" " show initial position redraw! " set virtual column behavior " save existing state let myvirtualedit = &virtualedit " all motions/bs/del are always one character set virtualedit=all " motion/bs/del space according to characters selected "*** TODO: Broken: " * flakey on Backspace " * flakey when selecting multiple lines preceded with mixed tabs " and spaces "set virtualedit= "*** "*** TODO: broken--makes window pos jump "" save screen pos "" HACK: set guifont=* moves screen on WinXP "call Cream_screen_get() " "" change to column-specific font "call Cream_fontset_columns() " "" restore screen "" HACK: set guifont=* moves screen on WinXP "call Cream_screen_init() "*** " avoid the flash " save existing state let myerrorbells = &errorbells set noerrorbells " clear popup menu silent! unmenu PopUp silent! unmenu! PopUp " main call call Cream_column_mode() " reset mouse menu call Cream_menu_popup() "*** TODO: broken "" restore font "call Cream_font_init() "" restore screen "" HACK: set guifont=* moves screen on WinXP "call Cream_screen_init() "*** " restore listchars call Cream_listchars_init() " restore list state " Note: The user may have toggled on/off during col mode. We'll " restore global settings based on last col state. if g:cream_list_col == 1 set list let g:LIST = 1 elseif g:cream_list_col == 0 set nolist let g:LIST = 0 endif unlet g:cream_list_col " restore virtualedit let &virtualedit = myvirtualedit " restore errorbells let &errorbells = myerrorbells endfunction function! Cream_listchars_col_init() execute 'set listchars=eol:\ ,tab:\ \ ,trail:\ ,extends:\ ,precedes:\ ' endfunction function! Cream_column_mode() " Motion, insert and delete stuff (visual block mode has already been " entered) " total loops let i = 0 let j = 0 let s:lastevent = "nothing" while i >= 0 let i = i + 1 " get character let mychar = getchar() ""*** DEBUG: "let n = confirm( " \ "DEBUG:\n" . " \ " mychar = \"" . mychar . "\"\n" . " \ " char2nr(mychar) = \"" . char2nr(mychar) . "\"\n" . " \ " nr2char(mychar) = \"" . nr2char(mychar) . "\"\n" . " \ " strlen(mychar) = \"" . strlen(mychar) . "\"\n" . " \ "\n", "&Ok\n&Cancel", 1, "Info") "if n != 1 " return "endif ""*** if exists("eattest") " if mychar == 21 " eat the rest call s:Cream_column_eatchar() normal gv " we can't yet recover from this error call s:Cream_column_backspace() " unselect (from select mode) normal vv redraw! break endif endif " ":" (loop if precursor to ) if mychar == 58 let eattest = ":" call s:Cream_column_insert(mychar) endif " test character for motion/selection " quit if mychar == 27 execute "normal " . mychar redraw! break " (Ctrl+Z) elseif mychar == 26 \|| mychar == "\" execute "normal \" normal u normal gv " backup a column to maintain insertion positions if s:lastevent == "insert" normal h normal o normal h elseif s:lastevent == "backspace" normal l normal o normal l endif redraw! " (Copy) elseif mychar == 3 \ || mychar == "\" \ || nr2char(mychar) == "" execute "normal \"+y" normal gv redraw! call confirm( \ "To paste this selection in columns, re-enter Column Mode first (Edit > Column Select).\n" . \ "\n", "&Ok", 1, "Info") " (alpha-numeric) or , but not colon ":" elseif mychar > 31 \&& mychar < 127 \&& mychar != 58 \|| mychar == 9 call s:Cream_column_insert(mychar) " (same as delete) elseif mychar == 13 normal x break " and (menu calls) elseif mychar == 15 \ || nr2char(mychar) == "" " eat chars until call s:Cream_column_eatchar() " elseif char2nr(mychar[0]) == 128 \&& char2nr(mychar[1]) == 107 \&& char2nr(mychar[2]) == 68 " Note: " " elseif mychar == "\" " \ || mychar == 127 " " The above fails, apparently due to case-sensitivity with " ("€kd") conflicting with ("€kD"). " delete normal x normal gv " retract selection width to a single column let mycol = virtcol(".") normal o if virtcol(".") < mycol " negate left-to-right v. right-to-left selection " discrepancies let mycol = virtcol(".") normal o endif while virtcol(".") > mycol normal h endwhile let s:lastevent = "delete" redraw! " toggle &list elseif mychar == "\" " Note: List must stay on during column mode to " work around some Vim bugs. We'll just toggle " whether the characters show or not based on the " two sets of listchars we set at the top. if g:cream_list_col == 0 call Cream_listchars_init() let g:cream_list_col = 1 let g:LIST = 1 else call Cream_listchars_col_init() let g:cream_list_col = 0 let g:LIST = 0 endif redraw! elseif mychar == "\" \|| mychar == "\" \|| mychar == "\" \|| mychar == "\" " bail execute "normal " . mychar break elseif mychar == "\" \|| mychar == "\" \|| mychar == "\" \|| mychar == "\" " bail execute "normal " . mychar break elseif mychar == "\" call s:Cream_column_backspace() let s:lastevent = "backspace" elseif mychar == "\" \|| mychar == "\" \|| mychar == "\" \|| mychar == "\" execute "normal " . mychar let s:lastevent = "motion" redraw! elseif mychar == "\" \|| char2nr(mychar[0]) == 128 \&& char2nr(mychar[1]) == 253 \&& char2nr(mychar[2]) == 44 \&& char2nr(mychar[3]) == 0 execute "normal " . mychar redraw! break """elseif mychar == "\" """ \|| char2nr(mychar[0]) == 128 """ \&& char2nr(mychar[1]) == 253 """ \&& char2nr(mychar[2]) == 50 """ \&& char2nr(mychar[3]) == 0 """ \|| mychar == "\" """ \|| char2nr(mychar[0]) == 128 """ \&& char2nr(mychar[1]) == 253 """ \&& char2nr(mychar[2]) == 47 """ \&& char2nr(mychar[3]) == 0 """ """ call confirm( """ \ "Right and Middle mouse buttons are not functional in column mode.\n" . """ \ "\n", "&Ok", 1, "Info") """ redraw! """ """elseif mychar == "\" """ \|| mychar == "\" """ """ call confirm( """ \ "Sorry, S-RightMouse not handled in column mode yet!\n" . \ "\n", "&Ok", 1, "Info") " (Cut) elseif char2nr(mychar[0]) == 50 \&& char2nr(mychar[1]) == 52 execute "normal \"+x" redraw! call confirm( \ "To paste this selection in columns, re-enter Column Mode first (Edit > Column Select).\n" . \ "\n", "&Ok", 1, "Info") break " (Paste) elseif char2nr(mychar[0]) == 50 \&& char2nr(mychar[1]) == 50 execute "normal \"+p" redraw! break " other key (untrapped) else " just execute that key execute "normal " . mychar " forget backspace condition if exists("s:stop") unlet s:stop endif redraw! endif endwhile redraw! endfunction function! s:Cream_column_eatchar() " eat input until a is reached " loop if menu called (on discovered below) while !exists("finished") let mychar = getchar() " until if mychar == 13 let finished = 1 call confirm( \ "Sorry, menu items are not yet available during column mode.\n" . \ "\n", "&Ok", 1, "Info") endif endwhile endfunction function! s:Cream_column_insert(char) " retract selection width to a single column let mycol = virtcol(".") normal o if virtcol(".") < mycol " negate left-to-right v. right-to-left selection " discrepancies let mycol = virtcol(".") normal o endif while virtcol(".") > mycol normal h endwhile " forget backspace condition if exists("s:stop") unlet s:stop endif " insert character execute "normal I" . nr2char(a:char) " reselect and recover position normal gv normal l normal o normal l "normal o let s:lastevent = "insert" redraw! endfunction function! s:Cream_column_backspace() " at non-first columns, move left a column if virtcol(".") != 1 normal h normal o normal h normal o endif " delete selection normal x " reselect normal gv " retract selection width to a single column let mycol = virtcol(".") normal o if virtcol(".") < mycol " negate left-to-right v. right-to-left selection " discrepancies let mycol = virtcol(".") normal o endif while virtcol(".") > mycol normal h endwhile redraw! endfunction " column mode font set/change function! Cream_fontset_columns() let myos = Cream_getoscode() if exists("g:CREAM_FONT_COLUMNS_{myos}") " had a problem with guifont being set to * in an error. if g:CREAM_FONT_COLUMNS_{myos} != "*" let &guifont = g:CREAM_FONT_COLUMNS_{myos} endif else " Don't prompt to initialize font... use default. "call Cream_font_init() endif endfunction function! Cream_fontinit_columns() let mymsg = "" . \ "This font setting is specifically for column mode. We highly\n" . \ "recommend that you choose the same font as your regular font\n" . \ "with only a style variation such as \"italic.\"" if has("gui_running") && has("dialog_gui") call confirm(mymsg, "&Ok", 1, "Info") else echo mymsg endif let myos = Cream_getoscode() " call dialog... set guifont=* " if still empty or a "*", user may have cancelled; do nothing if &guifont == "" && g:CREAM_FONT_COLUMNS_{myos} != "" || \ &guifont == "*" && g:CREAM_FONT_COLUMNS_{myos} != "" " do nothing else let g:CREAM_FONT_COLUMNS_{myos} = &guifont endif " revert to main font if we're not in column mode let mymode = mode() if mymode != "" if exists("g:CREAM_FONT_{myos}") let &guifont = g:CREAM_FONT_{myos} endif endif endfunction cream-0.43/securemodelines.vim0000644000076400007660000001025311156572442017023 0ustar digitectlocaluser" vim: set sw=4 sts=4 et ft=vim : " Script: securemodelines.vim " Version: 20070518 " Author: Ciaran McCreesh " Homepage: http://ciaranm.org/tag/securemodelines " Requires: Vim 7 " License: Redistribute under the same terms as Vim itself " Purpose: A secure alternative to modelines if &compatible || v:version < 700 finish endif if (! exists("g:secure_modelines_allowed_items")) let g:secure_modelines_allowed_items = [ \ "textwidth", "tw", \ "softtabstop", "sts", \ "tabstop", "ts", \ "shiftwidth", "sw", \ "expandtab", "et", "noexpandtab", "noet", \ "filetype", "ft", \ "foldmethod", "fdm", \ "readonly", "ro", "noreadonly", "noro", \ "rightleft", "rl", "norightleft", "norl" \ ] endif if (! exists("g:secure_modelines_verbose")) let g:secure_modelines_verbose = 0 endif if (! exists("g:secure_modelines_modelines")) let g:secure_modelines_modelines=5 endif if (! exists("g:secure_modelines_leave_modeline")) if &modeline set nomodeline if g:secure_modelines_verbose echohl WarningMsg echo "Forcibly disabling internal modelines for securemodelines.vim" echohl None endif endif endif fun! IsInList(list, i) abort for l:item in a:list if a:i == l:item return 1 endif endfor return 0 endfun fun! DoOne(item) abort let l:matches = matchlist(a:item, '^\([a-z]\+\)\%(=[a-zA-Z0-9_\-.]\+\)\?$') if len(l:matches) > 0 if IsInList(g:secure_modelines_allowed_items, l:matches[1]) exec "setlocal " . a:item elseif g:secure_modelines_verbose echohl WarningMsg echo "Ignoring '" . a:item . "' in modeline" echohl None endif endif endfun fun! DoNoSetModeline(line) abort for l:item in split(a:line, '[ \t:]') call DoOne(l:item) endfor endfun fun! DoSetModeline(line) abort for l:item in split(a:line) call DoOne(l:item) endfor endfun fun! CheckVersion(op, ver) abort if a:op == "=" return v:version != a:ver elseif a:op == "<" return v:version < a:ver elseif a:op == ">" return v:version >= a:ver else return 0 endif endfun fun! DoModeline(line) abort let l:matches = matchlist(a:line, '\%(\S\@=]\?\)\([0-9]\+\)\?\)\|\sex\):\s\+set\?\s\+\([^:]\+\):\S\@!') if len(l:matches) > 0 let l:operator = ">" if len(l:matches[1]) > 0 let l:operator = l:matches[1] endif if len(l:matches[2]) > 0 if CheckVersion(l:operator, l:matches[2]) ? 0 : 1 return endif endif return DoSetModeline(l:matches[3]) endif let l:matches = matchlist(a:line, '\%(\S\@=]\?\)\([0-9]\+\)\?\)\|\sex\):\(.\+\)') if len(l:matches) > 0 let l:operator = ">" if len(l:matches[1]) > 0 let l:operator = l:matches[1] endif if len(l:matches[2]) > 0 if CheckVersion(l:operator, l:matches[2]) ? 0 : 1 return endif endif return DoNoSetModeline(l:matches[3]) endif endfun fun! DoModelines() abort if line("$") > g:secure_modelines_modelines let l:lines={ } call map(filter(getline(1, g:secure_modelines_modelines) + \ getline(line("$") - g:secure_modelines_modelines, "$"), \ 'v:val =~ ":"'), 'extend(l:lines, { v:val : 0 } )') for l:line in keys(l:lines) "for l:line in getline(1, 5) + getline(line("$")-4, "$") call DoModeline(l:line) endfor else for l:line in getline(1, "$") call DoModeline(l:line) endfor endif endfun aug SecureModeLines au! au BufRead * :call DoModelines() aug END fun! SecureModelines_DoModelines() abort call DoModelines() endfun cream-0.43/cream-menu-insert.vim0000644000076400007660000000507411517300720017162 0ustar digitectlocaluser" " cream-menu-insert.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. imenu 40.102 I&nsert.Character\ Line\.\.\.Shift+F4 :call Cream_charline_prompt() imenu 40.103 I&nsert.Character\ Line\ (length\ of\ line\ above)\.\.\.Shift+F4\ (x2) :call Cream_charline_lineabove_prompt() anoremenu 40.110 I&nsert.-Sep40110- anoremenu 40.111 I&nsert.Date/Time\.\.\.F11 :call Cream_insert_datetime(1) anoremenu 40.112 I&nsert.Date/Time\ (Last\ Used)F11\ (x2) :call Cream_insert_datetime() anoremenu 40.120 I&nsert.-Sep40120- imenu 40.121 I&nsert.Character\ by\ ValueAlt+, :call Cream_insert_char() vmenu 40.122 I&nsert.Character\ by\ ValueAlt+, :call Cream_insert_char() anoremenu 40.123 I&nsert.List\ Characters\ Available\.\.\.Alt+,\ (x2) :call Cream_allchars_list() imenu 40.124 I&nsert.List\ Character\ Values\ Under\ CursorAlt+\. :call Cream_char_codes("i") vmenu 40.125 I&nsert.List\ Character\ Values\ Under\ CursorAlt+\. :call Cream_char_codes("v") anoremenu 40.130 I&nsert.-Sep40130- imenu 40.131 I&nsert.Character\ by\ DigraphCtrl+K anoremenu 40.132 I&nsert.List\ Digraphs\ Available\.\.\.Ctrl+K\ (x2) :call Cream_digraph_list() anoremenu 40.150 I&nsert.-Sep40150- imenu 40.151 I&nsert.Text\ Filler\.\.\. :call Cream_loremipsum() anoremenu 40.160 I&nsert.-Sep40160- vmenu 40.161 I&nsert.Line\ Numbers\.\.\.\ (selection) :call Cream_number_lines("v") cream-0.43/cream-colors-navajo-night.vim0000644000076400007660000001361511517300716020605 0ustar digitectlocaluser"= " cream-colors-navajo-night.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " "---------------------------------------------------------------------- " Vim colour file " Maintainer: Matthew Hawkins " Last Change: Mon, 22 Apr 2002 15:28:04 +1000 " URI: http://mh.dropbear.id.au/vim/navajo-night.png " " This colour scheme uses a "navajo-black" background " I have added colours for the statusbar and for spell checking " as taken from Cream (http://cream.sf.net/) set background=dark highlight clear if exists("syntax_on") syntax reset endif "let g:colors_name = "cream-navajo-night" " This is the list of colour changes from Navajo that " weren't a simple mathematical subtraction from 0xffffff " DarkBlue -> #ffff74 " DarkRed -> #74ffff " DarkGreen -> #ff9bff " DarkCyan -> #ff7474 " DarkMagenta -> #74ff74 " DarkYellow -> #7474ff " DarkGray -> #565656 " Blue -> Yellow " Red -> Cyan " Yellow -> Blue " Gray -> #414141 " Brown -> #5ad5d5 " #ff8060 -> #007f9f " #f6e8d0 -> #09172f " #edb5cd -> #124a32 " #c0c0c0 -> #3f3f3f " #907050 -> #6f8faf " #808080 -> #7f7f7f " #707070 -> #8f8f8f " SeaGreen -> #d174a8 " LightRed (assuming #ee9090) -> #116f6f " LightBlue -> #522719 highlight Normal ctermfg=White guifg=White guibg=#35536f "+++ Cream: "highlight SpecialKey term=bold ctermfg=darkblue guifg=Yellow highlight SpecialKey term=bold ctermfg=darkblue guifg=#bfbfef "highlight NonText term=bold ctermfg=darkblue cterm=bold gui=bold guifg=#7f7f7f highlight NonText term=bold ctermfg=darkblue cterm=bold gui=bold guifg=#bfbfef "+++ highlight Directory term=bold ctermfg=darkblue guifg=Yellow highlight ErrorMsg term=standout ctermfg=grey ctermbg=darkred cterm=bold gui=bold guifg=Black guibg=Cyan highlight IncSearch term=reverse cterm=reverse gui=reverse "+++ Cream: "highlight Search term=reverse ctermbg=White ctermfg=Black cterm=reverse guibg=Black guifg=Yellow highlight Search term=reverse ctermbg=White ctermfg=Black cterm=reverse guibg=#003333 guifg=Yellow "+++ highlight MoreMsg term=bold ctermfg=green gui=bold guifg=#d174a8 highlight ModeMsg term=bold cterm=bold gui=bold highlight LineNr term=underline ctermfg=darkcyan ctermbg=grey guibg=#7f7f7f gui=bold guifg=White highlight Question term=standout ctermfg=darkgreen gui=bold guifg=#d174a8 highlight StatusLine term=bold,reverse cterm=bold,reverse gui=bold guifg=Black guibg=White highlight StatusLineNC term=reverse cterm=reverse gui=bold guifg=#116f6f guibg=#8f8f8f highlight VertSplit term=reverse cterm=reverse gui=bold guifg=Black guibg=#8f8f8f highlight Title term=bold ctermfg=green gui=bold guifg=#74ff74 "+++ Cream: "highlight Visual term=reverse cterm=reverse gui=reverse guifg=#3f3f3f guibg=White "+++ highlight VisualNOS term=bold,underline cterm=bold,underline gui=reverse guifg=#414141 guibg=Black highlight WarningMsg term=standout ctermfg=darkred gui=bold guifg=Cyan highlight WildMenu term=standout ctermfg=White ctermbg=darkyellow guifg=White guibg=Blue highlight Folded term=standout ctermfg=darkblue ctermbg=grey guifg=White guibg=NONE guifg=#afcfef highlight FoldColumn term=standout ctermfg=darkblue ctermbg=grey guifg=#ffff74 guibg=#3f3f3f highlight DiffAdd term=bold ctermbg=darkblue guibg=Black highlight DiffChange term=bold ctermbg=darkmagenta guibg=#124a32 highlight DiffDelete term=bold ctermfg=darkblue ctermbg=blue cterm=bold gui=bold guifg=#522719 guibg=#09172f highlight DiffText term=reverse ctermbg=darkblue cterm=bold gui=bold guibg=#007f9f highlight Cursor gui=reverse guifg=#bfbfef guibg=Black highlight lCursor guifg=fg guibg=bg highlight Match term=bold,reverse ctermbg=Blue ctermfg=Yellow cterm=bold,reverse gui=bold,reverse guifg=Blue guibg=Yellow " Colours for syntax highlighting highlight Comment term=bold ctermfg=darkblue guifg=#e7e77f highlight Constant term=underline ctermfg=darkred guifg=#3fffa7 highlight Special term=bold ctermfg=darkgreen guifg=#bfbfef highlight Identifier term=underline ctermfg=darkcyan cterm=NONE guifg=#ef9f9f highlight Statement term=bold ctermfg=darkred cterm=bold gui=bold guifg=#5ad5d5 highlight PreProc term=underline ctermfg=darkmagenta guifg=#74ff74 highlight Type term=underline ctermfg=green gui=bold guifg=#d174a8 highlight Ignore ctermfg=grey cterm=bold guifg=bg highlight Error term=reverse ctermfg=grey ctermbg=darkred cterm=bold gui=bold guifg=Black guibg=Cyan highlight Todo term=standout ctermfg=darkblue ctermbg=Blue guifg=Yellow guibg=Blue " Test fold area " end fold area "+++ Cream: " statusline highlight User1 gui=bold guifg=#999933 guibg=#45637f highlight User2 gui=bold guifg=#e7e77f guibg=#45637f highlight User3 gui=bold guifg=#000000 guibg=#45637f highlight User4 gui=bold guifg=#33cc99 guibg=#45637f " bookmarks highlight Cream_ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold gui=bold guifg=#000000 guibg=#aacc77 " spell check highlight BadWord ctermfg=black ctermbg=lightblue gui=NONE guifg=#ff9999 guibg=#003333 " current line highlight CurrentLine term=reverse ctermbg=0 ctermfg=14 gui=none guibg=#15334f " email highlight EQuote1 guifg=#ffff33 highlight EQuote2 guifg=#cccc33 highlight EQuote3 guifg=#999933 highlight Sig guifg=#aaaaaa "+++ cream-0.43/cream-menu.vim0000644000076400007660000001015011517300720015647 0ustar digitectlocaluser" " Filename: cream-menu.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " function! Cream_menu_translation() " copied from vim's own menu.vim, with a little modification if exists("v:lang") || &langmenu != "" " Try to find a menu translation file for the current language. if &langmenu != "" if &langmenu =~ "none" let s:lang = "" else let s:lang = &langmenu endif else let s:lang = v:lang endif " A language name must be at least two characters, don't accept "C" if strlen(s:lang) > 1 " When the language does not include the charset add 'encoding' if s:lang =~ '^\a\a$\|^\a\a_\a\a$' let s:lang = s:lang . '.' . &encoding endif " We always use a lowercase name. " Change "iso-8859" to "iso_8859" and "iso8859" to "iso_8859", some " systems appear to use this. " Change spaces to underscores. let s:lang = substitute(tolower(s:lang), '\.iso-', ".iso_", "") let s:lang = substitute(s:lang, '\.iso8859', ".iso_8859", "") let s:lang = substitute(s:lang, " ", "_", "g") " Remove "@euro", otherwise "LC_ALL=de_DE@euro gvim" will show English menus let s:lang = substitute(s:lang, "@euro", "", "") " Change "iso_8859-1" and "iso_8859-15" to "latin1", we always use the " same menu file for them. let s:lang = substitute(s:lang, 'iso_8859-15\=$', "latin1", "") menutrans clear execute "runtime! cream/lang/menu_" . s:lang . ".vim" if !exists("did_menu_trans") " There is no exact match, try matching with a wildcard added " (e.g. find menu_de_de.iso_8859-1.vim if s:lang == de_DE). let s:lang = substitute(s:lang, '\.[^.]*', "", "") execute "runtime! cream/lang/menu_" . s:lang . "*.vim" if !exists("did_menu_trans") && strlen($LANG) > 1 " On windows locale names are complicated, try using $LANG, it might " have been set by set_init_1(). execute "runtime! cream/lang/menu_" . tolower($LANG) . "*.vim" endif endif endif endif endfunction function! Cream_menus() " Creates each menu loader and calls it " remove existing menus source $VIMRUNTIME/delmenu.vim call Cream_menu_translation() " TODO: We really shouldn't be tampering with this here... " Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise " would not be recognized. See ":help 'cpoptions'". let cpo_save = &cpoptions set cpoptions&vim "+++ Cream: necessary for GTK (set also from vimrc, but not effective there) set guioptions+=M "+++ "+++ Cream: GTK loads menus, even if you ask it not to! unmenu! * unmenu * "+++ " load Cream menus call Cream_source($CREAM . "cream-menu-file.vim") call Cream_source($CREAM . "cream-menu-edit.vim") call Cream_source($CREAM . "cream-menu-insert.vim") call Cream_source($CREAM . "cream-menu-format.vim") call Cream_source($CREAM . "cream-menu-settings.vim") call Cream_source($CREAM . "cream-menu-tools.vim") call Cream_source($CREAM . "cream-menu-window.vim") call Cream_source($CREAM . "cream-menu-window-buffer.vim") call Cream_source($CREAM . "cream-menu-help.vim") call Cream_source($CREAM . "cream-menu-window.vim") call Cream_source($CREAM . "cream-menu-developer.vim") call Cream_source($CREAM . "cream-menu-toolbar.vim") call Cream_source($CREAM . "cream-menu-popup.vim") " restore let &cpo = cpo_save endfunction call Cream_menus() cream-0.43/cream-expertmode.vim0000644000076400007660000000455011517300720017066 0ustar digitectlocaluser" " cream-expertmode.vim " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " Description: " Expert mode: and keys toggle between normal and insert " mode function! Cream_expertmode(state) " control expert mode--a:state must be 0 or 1 if a:state == 1 let g:CREAM_EXPERTMODE = 1 inoremap noremap a inoremap noremap a set selectmode= else let g:CREAM_EXPERTMODE = 0 silent! unmap! silent! unmap! set selectmode=key,mouse endif endfunction function! Cream_expertmode_toggle() " toggle expert mode from existing state (assumes already initialized) if g:CREAM_EXPERTMODE == 1 call Cream_expertmode(0) call Cream_menu_settings_preferences() else let n = confirm( \ "Expert mode uses the Esc and Ctrl+[ keys to toggle out of normal\n" . \ "Cream behavior to Vim style:\n" . \ " * Normal mode (insertmode turned off)\n" . \ " * Visual mode (selectmode turned off)\n" . \ "\n" . \ "Unless you are an experienced Vim user, you are advised not to proceed.\n" . \ "\n" . \ "Continue?\n" . \ "\n", "&Yes\n&Cancel", 2, "Warning") if n == 1 call Cream_expertmode(1) call Cream_menu_settings_preferences() endif endif endfunction function! Cream_expertmode_init() " initialize Cream environment for expert mode if !exists("g:CREAM_EXPERTMODE") call Cream_expertmode(0) else if g:CREAM_EXPERTMODE == 1 call Cream_expertmode(1) else call Cream_expertmode(0) endif endif endfunction cream-0.43/INSTALL.bat0000644000076400007660000002552711162545704014726 0ustar digitectlocaluser@echo off rem A batchfile to install Cream on Windows. (We assume this runs at rem the root of the Cream file structure.) rem rem make sure command extensions are on rem cmd /x rem expand this file's path set FNAME=%0 if not "%OS%"=="Windows_NT" goto NoWinNT rem set FNAME to ??? for %%A in (%FNAME%) do set NEW=%%~$PATH:A if not "%NEW%"=="" set FNAME=%NEW% set NEW= :NoWinNT rem find VIMRUNTIME path (using dir /x format) :FINDVRT set PROGRAMS=C:\PROGRA~1 set VRT=%PROGRAMS%\vim\vim73 if exist %VRT%\CON goto FINDVRTYES set VRT=%PROGRAMS%\vim\vim72 if exist %VRT%\CON goto FINDVRTYES set VRT=%PROGRAMS%\vim\vim71 if exist %VRT%\CON goto FINDVRTYES set VRT=%PROGRAMS%\vim\vim70 if exist %VRT%\CON goto FINDVRTYES rem WinXP-64 uses "Program Files (x86) set PROGRAMS=C:\PROGRA~2 set VRT=%PROGRAMS%\vim\vim73 if exist %VRT%\CON goto FINDVRTYES set VRT=%PROGRAMS%\vim\vim72 if exist %VRT%\CON goto FINDVRTYES set VRT=%PROGRAMS%\vim\vim71 if exist %VRT%\CON goto FINDVRTYES set VRT=%PROGRAMS%\vim\vim70 if exist %VRT%\CON goto FINDVRTYES echo %FNAME% could not find a Vim installation, unable to continue. goto QUIT :FINDVRTYES :VERIFY echo Cream will be installed in "%VRT%". echo (Press Ctrl+C to stop now, or any other key to continue.) echo. pause >nul :DIRS rem directories echo Verifying and creating directories... echo %VRT%\cream if not exist %VRT%\cream\CON mkdir %VRT%\cream echo %VRT%\cream\addons if not exist %VRT%\cream\addons\CON mkdir %VRT%\cream\addons echo %VRT%\cream\bitmaps if not exist %VRT%\cream\bitmaps\CON mkdir %VRT%\cream\bitmaps echo %VRT%\cream\docs if not exist %VRT%\cream\docs\CON mkdir %VRT%\cream\docs echo %VRT%\cream\docs-html if not exist %VRT%\cream\docs-html\CON mkdir %VRT%\cream\docs-html echo %VRT%\cream\filetypes if not exist %VRT%\cream\filetypes\CON mkdir %VRT%\cream\filetypes echo %VRT%\cream\help if not exist %VRT%\cream\help\CON mkdir %VRT%\cream\help echo %VRT%\cream\lang if not exist %VRT%\cream\lang\CON mkdir %VRT%\cream\lang rem echo %VRT%\cream\spelldicts rem if not exist %VRT%\cream\spelldicts\CON mkdir %VRT%\cream\spelldicts :INSTALL rem runtime files echo. echo Installing/upgrading runtime files... echo %VRT%\cream\creamrc xcopy /D /Y creamrc %VRT%\cream\ echo %VRT%\cream\*.vim xcopy /D /Y *.vim %VRT%\cream\ rem echo %VRT%\cream\cream.png rem xcopy /D /Y cream.png %VRT%\cream\ rem echo %VRT%\cream\cream.svg rem xcopy /D /Y cream.svg %VRT%\cream\ echo %VRT%\cream\cream.ico xcopy /D /Y cream.ico %VRT%\cream\ echo %VRT%\cream\addons\*.vim xcopy /D /Y .\addons\*.vim %VRT%\cream\addons\ rem echo %VRT%\cream\bitmaps\*.xpm rem xcopy /D /Y .\bitmaps\*.xpm %VRT%\cream\bitmaps\ echo %VRT%\cream\bitmaps\*.bmp xcopy /D /Y .\bitmaps\*.bmp %VRT%\cream\bitmaps\ echo %VRT%\cream\docs\*.txt xcopy /D /Y .\docs\*.txt %VRT%\cream\docs\ echo %VRT%\cream\docs-html\*.html xcopy /D /Y .\docs-html\*.html %VRT%\cream\docs-html\ echo %VRT%\cream\docs-html\css.php xcopy /D /Y .\docs-html\css.php %VRT%\cream\docs-html\ echo %VRT%\cream\docs-html\favicon.ico xcopy /D /Y .\docs-html\favicon.ico %VRT%\cream\docs-html\ echo %VRT%\cream\docs-html\*.png xcopy /D /Y .\docs-html\*.png %VRT%\cream\docs-html\ echo %VRT%\cream\docs-html\*.gif xcopy /D /Y .\docs-html\*.gif %VRT%\cream\docs-html\ echo %VRT%\cream\filetypes\*.vim xcopy /D /Y .\filetypes\*.vim %VRT%\cream\filetypes\ echo %VRT%\cream\help\*.txt xcopy /D /Y .\help\*.txt %VRT%\cream\help\ echo %VRT%\cream\lang\*.vim xcopy /D /Y .\lang\*.vim %VRT%\cream\lang\ rem echo %VRT%\cream\spelldicts\cream-spell-dict.vim rem xcopy /D /Y .\spelldicts\cream-spell-dict.vim %VRT%\cream\spelldicts\ rem echo %VRT%\cream\spelldicts\cream-spell-dict-eng-s*.vim rem xcopy /D /Y .\spelldicts\cream-spell-dict-eng-s*.vim %VRT%\cream\spelldicts\ :INSTALLCOMMAND rem command echo Cream command installation... rem discover path (most favored should be LAST) for %%A in (C:\Windows C:\Windows\Command C:\Windows\System32 C:\Windows\System) do if exist %%A\CON set ONPATH=%%A if "%ONPATH%"=="" echo Unable to find location on PATH for cream.bat, you can copy it if "%ONPATH%"=="" echo manually if you wish to call Cream from the Command Prompt. if "%ONPATH%"=="" goto CmdInstDone rem OPTION 1 rem if "%OS%"=="Windows_NT" goto CmdAskNT rem :CmdAsk95 rem rem WinNT doesn't have "choice" rem choice /C:ny /N Copy cream.bat on PATH to %ONPATH% [y/n] ? rem if errorlevel 2 goto CmdInst rem goto CmdInstDone rem :CmdAskNT rem set /P CH=Copy cream.bat on PATH to %ONPATH% [y/n] ? rem if /I "%CH%"=="Y" goto CmdInst rem goto CmdInstDone rem OPTION 2 rem WinNT doesn't have "choice" if not "%OS%"=="Windows_NT" choice /C:ny /N Copy cream.bat on PATH to %ONPATH% [y/n] ? if not "%OS%"=="Windows_NT" if errorlevel 2 goto CmdInst if "%OS%"=="Windows_NT" set /P CH=Copy cream.bat on PATH to %ONPATH% [y/n] ? if "%OS%"=="Windows_NT" if "%CH%"=="y" goto CmdInst if "%OS%"=="Windows_NT" if "%CH%"=="Y" goto CmdInst goto CmdInstDone :CmdInst echo Copying %ONPATH%\cream.bat... xcopy /Y cream.bat %ONPATH% :CmdInstDone rem rem menu entry rem echo Menu entry... rem echo \usr\share\applications\cream.desktop rem xcopy /D /Y cream.desktop \usr\share\applications\ rem rem icons rem echo Icons... rem echo \usr\share\icons... rem xcopy /D /Y cream.svg \usr\share\icons\ rem xcopy /D /Y cream.png \usr\share\icons\ :UPGRADES echo Previous version cleanup... rem 0.40 if exist %VRT%\cream\EasyHtml.vim del %VRT%\cream\EasyHtml.vim rem 0.38 if exist %VRT%\cream\spelldicts\CON del /Q /S %VRT%\cream\spelldicts\*.* if exist %VRT%\cream\spelldicts\CON rmdir %VRT%\cream\spelldicts if exist %VRT%\cream\help\opsplorer.txt del %VRT%\cream\help\opsplorer.txt rem 0.37 if exist %VRT%\cream\cream-explorer.vim del %VRT%\cream\cream-explorer.vim if exist %VRT%\cream\opsplorer.vim del %VRT%\cream\opsplorer.vim rem 0.36 if exist %VRT%\cream\cream-window-buffer.vim del %VRT%\cream\cream-window-buffer.vim if exist %VRT%\cream\docs-html\contribute.html del %VRT%\cream\docs-html\contribute.html if exist %VRT%\cream\docs-html\favicon.png del %VRT%\cream\docs-html\favicon.png if exist %VRT%\cream\docs-html\license.html del %VRT%\cream\docs-html\license.html if exist %VRT%\cream\docs-html\links.html del %VRT%\cream\docs-html\links.html if exist %VRT%\cream\docs-html\maillists.html del %VRT%\cream\docs-html\maillists.html if exist %VRT%\cream\docs-html\main.css del %VRT%\cream\docs-html\main.css if exist %VRT%\cream\docs-html\screenshot4.png del %VRT%\cream\docs-html\screenshot4.png if exist %VRT%\cream\docs-html\screenshot4-thumb.png del %VRT%\cream\docs-html\screenshot4-thumb.png if exist %VRT%\cream\docs-html\screenshot-popup.png del %VRT%\cream\docs-html\screenshot-popup.png if exist %VRT%\cream\docs-html\screenshots1-closeup.html del %VRT%\cream\docs-html\screenshots1-closeup.html if exist %VRT%\cream\docs-html\screenshots2-closeup.html del %VRT%\cream\docs-html\screenshots2-closeup.html if exist %VRT%\cream\docs-html\screenshots3-closeup.html del %VRT%\cream\docs-html\screenshots3-closeup.html if exist %VRT%\cream\docs-html\screenshots4-closeup.html del %VRT%\cream\docs-html\screenshots4-closeup.html if exist %VRT%\cream\docs-html\screenshots.html del %VRT%\cream\docs-html\screenshots.html if exist %VRT%\cream\docs-html\spellcheck.html del %VRT%\cream\docs-html\spellcheck.html if exist %VRT%\cream\docs-html\statusline-closeup.html del %VRT%\cream\docs-html\statusline-closeup.html rem 0.34 if exist %VRT%\cream\docs-html\screenshots5-closeup.html del %VRT%\cream\docs-html\screenshots5-closeup.html if exist %VRT%\cream\docs-html\screenshots6-closeup.html del %VRT%\cream\docs-html\screenshots6-closeup.html if exist %VRT%\cream\docs-html\screenshots7-closeup.html del %VRT%\cream\docs-html\screenshots7-closeup.html if exist %VRT%\cream\docs-html\screenshots8-closeup.html del %VRT%\cream\docs-html\screenshots8-closeup.html if exist %VRT%\cream\docs-html\screenshot5.png del %VRT%\cream\docs-html\screenshot5.png if exist %VRT%\cream\docs-html\screenshot6.png del %VRT%\cream\docs-html\screenshot6.png if exist %VRT%\cream\docs-html\screenshot7.png del %VRT%\cream\docs-html\screenshot7.png if exist %VRT%\cream\docs-html\screenshot8.png del %VRT%\cream\docs-html\screenshot8.png if exist %VRT%\cream\docs-html\screenshot5-thumb.png del %VRT%\cream\docs-html\screenshot5-thumb.png if exist %VRT%\cream\docs-html\screenshot6-thumb.png del %VRT%\cream\docs-html\screenshot6-thumb.png if exist %VRT%\cream\docs-html\screenshot7-thumb.png del %VRT%\cream\docs-html\screenshot7-thumb.png if exist %VRT%\cream\docs-html\screenshot8-thumb.png del %VRT%\cream\docs-html\screenshot8-thumb.png if exist %VRT%\cream\docs-html\maillist.html del %VRT%\cream\docs-html\maillist.html if exist %VRT%\cream\docs-html\otherfiles.html del %VRT%\cream\docs-html\otherfiles.html rem 0.33 rem Not applicable rem 0.31 if exist %VRT%\cream\docs-html\love.html del %VRT%\cream\docs-html\love.html if exist %VRT%\cream\docs-html\hate.html del %VRT%\cream\docs-html\hate.html if exist %VRT%\cream\docs-html\background.html del %VRT%\cream\docs-html\background.html if exist %VRT%\cream\docs-html\goals.html del %VRT%\cream\docs-html\goals.html if exist %VRT%\cream\docs-html\screenshot-arabic1.png del %VRT%\cream\docs-html\screenshot-arabic1.png if exist %VRT%\cream\docs-html\devel.html del %VRT%\cream\docs-html\devel.html if exist %VRT%\cream\docs-html\creamlogo.png del %VRT%\cream\docs-html\creamlogo.png rem 0.30 if exist %VRT%\cream\cream-filetype-c.vim del %VRT%\cream\cream-filetype-c.vim if exist %VRT%\cream\cream-filetype-html.vim del %VRT%\cream\cream-filetype-html.vim if exist %VRT%\cream\cream-filetype-txt.vim del %VRT%\cream\cream-filetype-txt.vim if exist %VRT%\cream\cream-filetype-vim.vim del %VRT%\cream\cream-filetype-vim.vim rem earlier if exist %VRT%\cream\docs-html\todo.html del %VRT%\cream\docs-html\todo.html if exist %VRT%\cream\docs-html\changelog.html del %VRT%\cream\docs-html\changelog.html if exist %VRT%\cream\docs-html\bugs.html del %VRT%\cream\docs-html\bugs.html if exist %VRT%\cream\docs\SPELLDICTS.txt del %VRT%\cream\docs\SPELLDICTS.txt if exist %VRT%\cream\docs\SPELLTEST-ENG.txt del %VRT%\cream\docs\SPELLTEST-ENG.txt if exist %VRT%\cream\docs\FILELIST.txt del %VRT%\cream\docs\FILELIST.txt if exist %VRT%\cream\docs\BUGS.txt del %VRT%\cream\docs\BUGS.txt rem Note: This is one char different from 0.36 file! if exist %VRT%\cream\docs-html\downloads.html del %VRT%\cream\docs-html\downloads.html if exist %VRT%\cream\cream-filetype-c.vim del %VRT%\cream\cream-filetype-*.vim >nul :QUIT echo Finished. echo. set VRT= set PROGRAMS= set FNAME= set ONPATH= set CH= :END cream-0.43/cream-bookmarks.vim0000644000076400007660000003237311517300716016713 0ustar digitectlocaluser" " cream-bookmarks.vim -- Practical, visible, anonymous bookmarks. " " Cream -- An easy-to-use configuration of the famous Vim text editor " [ http://cream.sourceforge.net ] Copyright (C) 2001-2011 Steve Hall " " License: " This program is free software; you can redistribute it and/or modify " it under the terms of the GNU General Public License as published by " the Free Software Foundation; either version 3 of the License, or " (at your option) any later version. " [ http://www.gnu.org/licenses/gpl.html ] " " This program is distributed in the hope that it will be useful, but " WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " General Public License for more details. " " You should have received a copy of the GNU General Public License " along with this program; if not, write to the Free Software " Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA " 02111-1307, USA. " " These functions are adapted from original material, used with " permission, by: " Anthony Kruize " Source: http://vim.sourceforge.net/scripts/script.php?script_id=152 " Wolfram 'Der WOK' Esser " Source: http://vim.sourceforge.net/scripts/script.php?script_id=66 " "---------------------------------------------------------------------- " Bookmark display " " Cream Notes: " * Functions and calls have had "Cream_" prepended to them for parallel " installation with the original. " * All functions defined with the script scope ("s:") have been re-scoped to " global. " * Indication of actual character names for the marks have been eliminated. " (The names were changing whenever any mark was added/removed anyway. The names " served no purpose.) " * Bookmarks are turned on by default for every buffer. (If no marks exist in " the document, the two character margin is simply not expanded.) "...................................................................... " Source: http://vim.sourceforge.net/scripts/script.php?script_id=152 " " Name: ShowMarks " Description: Visually displays the location of marks local to a buffer. " Authors: Anthony Kruize " Michael Geddes " Version: 1.1 " Modified: 6 February 2002 " License: Released into the public domain. " ChangeLog: 1.1 - Added support for the A-Z marks. " Fixed sign staying placed if the line it was on is deleted. " Clear autocommands before making new ones. " 1.0 - First release. " Usage: Copy this file into the plugins directory so it will be " automatically sourced. " " Default key mappings are: " mt - Toggles ShowMarks on and off. " mh - Hides a mark. " " Hiding a mark doesn't actually remove it, it simply moves it to " line 1 and hides it visually. "...................................................................... " Don't load if signs feature not available if !has("signs") if !exists("g:CREAM_SIGNSCHECK") let g:CREAM_SIGNSCHECK = 1 endif if g:CREAM_SIGNSCHECK < 3 let g:CREAM_SIGNSCHECK = g:CREAM_SIGNSCHECK + 1 call confirm( \"Unable to use Cream bookmarking features,\n" . \"no compiled support for signs. (Please use the \n" . \"\"configure --with-features=big\" if you compiled \n" . \"Vim from source yourself.) (" . g:CREAM_SIGNSCHECK . " of 2 warnings)\n" . \"\n", "&Ok", 1, "Info") endif finish endif " Check if we should continue loading if exists("Cream_loaded_showmarks") finish endif let Cream_loaded_showmarks = 1 "" Book marking "" Jump forward/backward and toggle 'anonymous' marks for lines (by using marks a-z) "imap :call Cream_WOK_mark_next() "imap :call Cream_WOK_mark_prev() "imap :call Cream_WOK_mark_toggle() "imap :call Cream_WOK_mark_killall() "imap :call Cream_ShowMarksToggle() "+++ Cream: moved to autocmd file "" AutoCommands: "" CursorHold checks the marks and set the signs "" GuiEnter loads the default theme for graphical icons "augroup Cream_ShowMarks " autocmd! " "autocmd CursorHold * call Cream_ShowMarks() " " always turn on bookmarks and show when opening a new file " autocmd BufRead * let b:Cream_ShowMarks_Enabled=1 " autocmd VimEnter,BufRead * call Cream_ShowMarks() "augroup END "+++ "+++ Cream: Moved to colors modules "" highlight settings for bookmark "highlight default ShowMarksHL ctermfg=blue ctermbg=lightblue cterm=bold guifg=blue guibg=lightblue gui=bold "+++ " Setup the sign definitions for each mark function! Cream_ShowMarksSetup() let n = 0 while n < 26 let c = nr2char(char2nr('a') + n) let C = nr2char(char2nr('A') + n) "if &encoding == "latin1" " execute 'sign define Cream_ShowMark' . c . ' text= texthl=Cream_ShowMarksHL' " execute 'sign define Cream_ShowMark' . C . ' text= texthl=Cream_ShowMarksHL' "else execute 'sign define Cream_ShowMark' . c . ' text==> texthl=Cream_ShowMarksHL' execute 'sign define Cream_ShowMark' . C . ' text==> texthl=Cream_ShowMarksHL' "endif let n = n + 1 endwhile endfunction call Cream_ShowMarksSetup() " Toggle display of bookmarks function! Cream_ShowMarksToggle() " if un-initialized if !exists("b:Cream_ShowMarks_Enabled") let b:Cream_ShowMarks_Enabled = 1 endif " if off if b:Cream_ShowMarks_Enabled == 0 let b:Cream_ShowMarks_Enabled = 1 "+++ Cream: tampering "augroup Cream_ShowMarks " "autocmd CursorHold * call Cream_ShowMarks() " autocmd BufRead * let b:Cream_ShowMarks_Enabled=1 " autocmd BufRead * call Cream_ShowMarks() "augroup END call Cream_ShowMarks() "+++ " if on else let b:Cream_ShowMarks_Enabled = 0 let n = 0 " find next available tag while n < 26 let c = nr2char(char2nr('a') + n) let C = nr2char(char2nr('A') + n) let id = n + 52 * winbufnr(0) let ID = id + 26 if exists('b:Cream_placed_' . c) let b:Cream_placed_{c} = 1 execute 'sign unplace ' . id . ' buffer=' . winbufnr(0) endif if exists('b:Cream_placed_' . C) let b:Cream_placed_{C} = 1 execute 'sign unplace ' . ID . ' buffer=' . winbufnr(0) endif let n = n + 1 endwhile "+++ Cream: tampering "augroup Cream_ShowMarks " autocmd! "augroup END "+++ endif endfunction function! Cream_ShowMarks_Exist() " returns 1 if a sign has been placed, 0 if not let n = 0 " find next available tag while n < 26 let c = 'b:Cream_placed_' . nr2char(char2nr('a') + n) let C = 'b:Cream_placed_' . nr2char(char2nr('A') + n) if exists(c) execute "let test = b:Cream_placed_" . nr2char(char2nr('a') + n) if test > 0 return 1 endif endif if exists(C) execute "let test = b:Cream_placed_" . nr2char(char2nr('A') + n) if test > 0 return 1 endif endif let n = n + 1 endwhile return 0 endfunction " This function is called on the CursorHold autocommand. " It runs through all the marks and displays or removes signs as appropriate. function! Cream_ShowMarks() if exists("b:Cream_ShowMarks_Enabled") if b:Cream_ShowMarks_Enabled == 0 return endif endif let n = 0 while n < 26 let c = nr2char(char2nr('a') + n) let id = n + 52 * winbufnr(0) let ln = line("'" . c) let C = nr2char(char2nr('A') + n) let ID = id + 26 let LN = line("'" . C) if ln == 0 && (exists('b:Cream_placed_' . c) && b:Cream_placed_{c} != ln ) execute 'sign unplace ' . id . ' buffer=' . winbufnr(0) elseif ln != 0 && (!exists('b:Cream_placed_' . c) || b:Cream_placed_{c} != ln ) execute 'sign unplace ' . id . ' buffer=' . winbufnr(0) execute 'sign place '. id . ' name=Cream_ShowMark' . c . ' line=' . ln . ' buffer=' . winbufnr(0) endif if LN == 0 && (exists('b:Cream_placed_' . C) && b:Cream_placed_{C} != LN ) execute 'sign unplace ' . ID . ' buffer=' . winbufnr(0) elseif LN != 0 && (!exists('b:Cream_placed_' . C) || b:Cream_placed_{C} != LN ) execute 'sign unplace ' . ID . ' buffer=' . winbufnr(0) execute 'sign place ' . ID . ' name=Cream_ShowMark' . C . ' line=' . LN . ' buffer=' . winbufnr(0) endif let b:Cream_placed_{c} = ln let b:Cream_placed_{C} = LN let n = n + 1 endwhile endfunction " Hide the mark at the current line. " This simply moves the mark to line 1 and hides the sign. "+++ Cream: Unused function! Cream_HideMark() let ln = line(".") let n = 0 while n < 26 let c = nr2char(char2nr('a') + n) let C = nr2char(char2nr('A') + n) let markln = line("'" . c) let markLN = line("'" . C) if ln == markln let id = n + 52 * winbufnr(0) execute 'sign unplace ' . id . ' buffer=' . winbufnr(0) execute '1 mark ' . c let b:Cream_placed_{c} = 1 endif if ln == markLN let ID = (n + 52 * winbufnr(0)) + 26 execute 'sign unplace ' . ID . ' buffer=' . winbufnr(0) execute '1 mark ' . C let b:Cream_placed_{C} = 1 endif let n = n + 1 endwhile endfunction "+++ "---------------------------------------------------------------------- " Bookmark management " "...................................................................... " Source: http://vim.sourceforge.net/scripts/script.php?script_id=66 " Name: _vim_wok_visualcpp01.zip " " Wolfram 'Der WOK' Esser, 2001-08-21 " mailto:wolfram@derwok.de " http://www.derwok.de " Version 0.1, 2001-08-21 - initial release "...................................................................... " WOK: 2001-06-08 " simulates anonymous marks with named marks "a-z" " Jumps to next following mark after current cursor " Wraps at bottom of file function! Cream_WOK_mark_next() let curline = line(".") let nextmark = 99999999 let firstmark = 99999999 " ASCII A-Z, a-z == 65-90, 97-122 let i = 97 "let i = 65 while i < 123 "if i == 91 " let i = 97 "endif let m = nr2char(i) let ml = line("'" . m) if(ml != 0) if (ml > curline && ml < nextmark) let nextmark = ml endif if (ml < firstmark) let firstmark = ml endif endif let i = i + 1 endwhile if (nextmark != 99999999) execute "normal " . nextmark . "G" normal 0 elseif (firstmark != 99999999) execute "normal " . firstmark . "G" normal 0 "echo "WRAP TO FIRST MARK" else "echo "SORRY, NO MARKS (set with CTRL-F2)" endif endfunction " WOK: 2001-06-08 " simulates anonymous marks with named marks "a-z" " Jumps to first Preceding Mark before current cursor " Wraps at top of file function! Cream_WOK_mark_prev() let curline = line(".") let prevmark = -1 let lastmark = -1 " ASCII A-Z, a-z == 65-90, 97-122 let i = 97 "let i = 65 while i < 123 "if i == 91 " let i = 97 "endif let m = nr2char(i) let ml = line("'" . m) if(ml != 0) if (ml < curline && ml > prevmark) let prevmark = ml endif if (ml > lastmark) let lastmark = ml endif endif let i = i + 1 endwhile if (prevmark != -1) execute "normal " . prevmark . "G" normal 0 elseif (lastmark != -1) execute "normal " . lastmark . "G" normal 0 "echo "WRAP TO LAST MARK" else "echo "SORRY, NO MARKS (set with CTRL-F2)" endif endfunction " WOK: 2001-06-08 " simulates anonymous marks with named marks "a-z" " Adds/Deletes 'anonymous' Mark on current line function! Cream_WOK_mark_toggle() let curline = line(".") let freemark = "" let foundfree = 0 let mymodified = &modified " suchen, ob Zeile ein Mark hat, wenn ja, alle sammeln in killmarks! let killmarks = "" let killflag = 0 " ASCII A-Z, a-z == 65-90, 97-122 let i = 97 "let i = 65 while i < 123 "if i == 91 " let i = 97 "endif let m = nr2char(i) let ml = line("'" . m) if (ml == curline) let killmarks = killmarks . "m" . m let killflag = 1 endif let i = i + 1 endwhile if (killflag) " alte Mark(s) lschen?? "echo "KILLMARKS: '" . killmarks . "'" normal o execute "normal " . killmarks . "" normal dd normal 0 normal k "+++ Cream: "normal h "+++ else " oder neues Mark einfgen? " ASCII A-Z, a-z == 65-90, 97-122 let i = 97 "let i = 65 while i < 123 "if i == 91 " let i = 97 "endif " erstes freies suchen... let m = nr2char(i) let ml = line("'" . m) if(ml == 0) let freemark = m let foundfree = 1 let i = 130 endif let i = i + 1 endwhile if (foundfree) "echo "NEWMARK: '" . freemark . "'" execute "normal m" . freemark . "" endif endif "+++ Cream: " turn on bookmark indications if using this feature let b:Cream_ShowMarks_Enabled = 1 " required to refresh call Cream_ShowMarks() "+++ let &modified = mymodified endfunction " WOK: 2001-06-08 " simulates anonymous marks with named marks "a-z" " removes all marks "a" - "z" function! Cream_WOK_mark_killall() let killmarks = "" let killflag = 0 " ASCII A-Z, a-z == 65-90, 97-122 let i = 97 "let i = 65 while i < 123 "if i == 91 " let i = 97 "endif let m = nr2char(i) let ml = line("'" . m) " ex. dieses Mark? if (ml != 0) let killmarks = killmarks . "m" . m let killflag = 1 endif let i = i + 1 endwhile if (killflag) " alte Mark(s) lschen "echo "KILL ALL MARKS IN FILE: '" . killmarks . "'" normal o execute "normal " . killmarks . "" normal dd normal 0 normal k endif "+++ Cream: " turn on bookmark indications if using this feature let b:Cream_ShowMarks_Enabled = 1 " required to refresh call Cream_ShowMarks() "+++ endfunction