├── version.h ├── Support ├── version ├── bin │ ├── CommitWindow.app │ │ └── Contents │ │ │ ├── PkgInfo │ │ │ ├── MacOS │ │ │ └── CommitWindow │ │ │ ├── Resources │ │ │ ├── Action.tiff │ │ │ ├── ActionPressed.tiff │ │ │ └── English.lproj │ │ │ │ └── InfoPlist.strings │ │ │ └── Info.plist │ ├── html_man.sh │ └── Markdown-license.txt ├── images │ ├── arrow-up.gif │ ├── arrow-down.gif │ └── arrow-none.gif ├── lib │ ├── osx │ │ └── plist.bundle │ ├── json.rb │ ├── json │ │ ├── version.rb │ │ └── pure.rb │ ├── README.txt │ ├── webpreview.py │ ├── exit_codes.rb │ ├── tm │ │ ├── markdown.rb │ │ ├── require_cmd.rb │ │ ├── detach.rb │ │ └── tempfile.rb │ ├── erb_streaming.rb │ ├── escape.rb │ ├── webpreview.sh │ ├── ruby1.9 │ │ └── add_1.8_features.rb │ └── nu │ │ └── alert.nu ├── themes │ ├── dark │ │ ├── images │ │ │ ├── header.png │ │ │ └── teaser.png │ │ └── style.css │ ├── bright │ │ ├── images │ │ │ ├── header.png │ │ │ └── teaser.png │ │ └── style.css │ ├── night │ │ ├── images │ │ │ ├── header.png │ │ │ └── teaser.png │ │ └── style.css │ ├── shiny │ │ ├── images │ │ │ ├── header.png │ │ │ └── teaser.png │ │ └── style.css │ ├── default │ │ ├── images │ │ │ ├── header.png │ │ │ └── teaser.png │ │ └── print.css │ └── halloween │ │ ├── images │ │ ├── header.png │ │ └── teaser.png │ │ └── style.css ├── nibs │ ├── RequestItem.nib │ │ └── keyedobjects.nib │ ├── RequestString.nib │ │ ├── keyedobjects.nib │ │ ├── classes.nib │ │ └── info.nib │ ├── ProgressDialog.nib │ │ ├── keyedobjects.nib │ │ └── info.nib │ ├── RequestSecureString.nib │ │ ├── keyedobjects.nib │ │ ├── classes.nib │ │ └── info.nib │ └── SimpleNotificationWindow.nib │ │ ├── info.nib │ │ └── classes.nib └── script │ ├── default.js │ └── webpreview.js ├── app ├── saved_symbols ├── Vico-Prefix.pch ├── en.lproj │ ├── InfoPlist.strings │ └── Credits.rtf ├── GenerateFormData.h ├── symbol-icons.plist ├── PSMProgressIndicator.h ├── PSMOverflowPopUpButton.h ├── PSMProgressIndicator.m ├── SFBCrashReporter.h ├── PSMRolloverButton.h ├── PSMMetalTabStyle.h ├── SFBSystemInformation.h ├── NSObject+SPInvocationGrabbing.h ├── SFBCrashReporterWindowController.h ├── ViWindow.h ├── ViPathCell.h ├── ViPathControl.h ├── ViCompletionWindow.h ├── ViSeparatorCell.h ├── ViPathComponentCell.h ├── ViToolbarPopUpButtonCell.h ├── ViSFTPURLHandler.h ├── NSMenu-additions.h ├── NSWindow-additions.h ├── ViFileCompletion.h ├── ViSyntaxCompletion.h ├── ExCommandCompletion.h ├── TMFileURLProtocol.h ├── ViBgView.h ├── ViFileURLHandler.h ├── ViCompletionWindow.m ├── ViWordCompletion.h ├── ViBufferCompletion.h ├── NSOutlineView-vimotions.h ├── NSEvent-keyAdditions.h ├── ViCharsetDetector.h ├── TxmtURLProtocol.h ├── ViCompletionView.h ├── NSString-scopeSelector.h ├── ViWebView.h ├── ViPreferencePaneGeneral.h ├── NSURL-additions.h ├── ViPreferencePaneTheme.h ├── ViSymbolTransform.h ├── NSArray-patterns.h ├── NSTask-streaming.h ├── ViBundleSnippet.h ├── ExTextField.h ├── ViProject.h ├── ViCommandOutputController.h ├── ViOutlineView.h ├── ViThemeStore.h ├── ViTransformer.h ├── ViPreferencePaneAdvanced.h ├── PSMTabStyle.h ├── ViRulerView.h ├── MHTextIconCell.h ├── ViLayoutManager.h ├── ViBgView.m ├── NSWindow-additions.m ├── ViMacro.h ├── ViMarkInspector.h ├── SFTPConnectionPool.h ├── PSMRolloverButton.m └── ViCompletionView.m ├── oniguruma ├── AUTHORS ├── COPYING └── st.h ├── vico.icns ├── Images ├── add.png ├── pi.png ├── tag.png ├── class.png ├── define.png ├── header.png ├── module.png ├── bookmark.png ├── function.png ├── TabNewMetal.png ├── actionbarbg.png ├── actionmenu.png ├── resizehandle.png ├── AliasBadgeIcon.icns ├── TabClose_Front.tif ├── overflowImage.tiff ├── TabNewMetalPressed.png ├── TabNewMetalRollover.png ├── overflowImagePressed.tif ├── TabCloseModified_Front.png ├── TabClose_Front_Pressed.tif ├── TabClose_Front_Rollover.tif ├── TabCloseModified_Front_Pressed.png └── TabCloseModified_Front_Rollover.png ├── tests ├── Tests-Prefix.pch ├── en.lproj │ └── InfoPlist.strings ├── Tests-Info.plist ├── TestKeyCodes.h ├── TestViMap.h ├── TestExCommand.h ├── TestViTextView.h ├── TestViParser.h ├── TestScopeSelectors.h ├── TestViSnippet.h └── TestViTextStorage.h ├── util └── vico-Prefix.pch ├── help ├── help-InfoPlist.strings ├── shared │ ├── icon_hand.png │ ├── icon_hand_32.png │ ├── icon_hand_64.png │ └── help.css ├── dot.md ├── open_line.md ├── ex.md ├── scrolling.md ├── move_chars.md ├── change_indent.md ├── move_lines.md ├── jumplist.md ├── move_words.md ├── delete.md ├── indent_settings.md ├── searching.md ├── md2html ├── move_symbols.md ├── ex_ranges.md ├── insert.md ├── md2html.www ├── movement.md ├── visual.md ├── line_search.md ├── basics.md ├── change.md ├── index.html ├── operators.md ├── remote.md ├── splits.md ├── help-Info.plist └── symbols.md ├── CommitWindow ├── Icons │ ├── Action.tiff │ └── ActionPressed.tiff ├── English.lproj │ ├── InfoPlist.strings │ └── MainMenu.nib │ │ ├── info.nib │ │ └── classes.nib ├── CommitWindow_Prefix.pch ├── main.m ├── CXMenuButton.h ├── NSString+StatusString.h ├── CommitWindowCommandLine.h ├── Info.plist ├── CXMenuButton.m ├── CXTextWithButtonStripCell.h ├── CWTextView.h ├── NSTask+CXAdditions.h ├── CXShading.h └── CommitWindowController.h ├── .gitignore ├── vico.xcodeproj └── project.xcworkspace │ └── contents.xcworkspacedata ├── appcast.xml.in ├── par ├── Makefile ├── errmsg.c ├── reformat.h └── errmsg.h ├── sparkle_pub.pem ├── Bundles └── LICENSE ├── Themes └── LICENSE └── nu ├── fscript.nu └── bridgesupport.nu /version.h: -------------------------------------------------------------------------------- 1 | 1.3.2 2 | -------------------------------------------------------------------------------- /Support/version: -------------------------------------------------------------------------------- 1 | 11850 2 | -------------------------------------------------------------------------------- /app/saved_symbols: -------------------------------------------------------------------------------- 1 | _nu_log 2 | -------------------------------------------------------------------------------- /Support/bin/CommitWindow.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /oniguruma/AUTHORS: -------------------------------------------------------------------------------- 1 | sndgk393 AT ybb DOT ne DOT jp (K.Kosako) 2 | -------------------------------------------------------------------------------- /vico.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/vico.icns -------------------------------------------------------------------------------- /Images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/add.png -------------------------------------------------------------------------------- /Images/pi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/pi.png -------------------------------------------------------------------------------- /Images/tag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/tag.png -------------------------------------------------------------------------------- /Images/class.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/class.png -------------------------------------------------------------------------------- /Images/define.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/define.png -------------------------------------------------------------------------------- /Images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/header.png -------------------------------------------------------------------------------- /Images/module.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/module.png -------------------------------------------------------------------------------- /app/Vico-Prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | -------------------------------------------------------------------------------- /tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | -------------------------------------------------------------------------------- /Images/bookmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/bookmark.png -------------------------------------------------------------------------------- /Images/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/function.png -------------------------------------------------------------------------------- /tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Images/TabNewMetal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabNewMetal.png -------------------------------------------------------------------------------- /Images/actionbarbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/actionbarbg.png -------------------------------------------------------------------------------- /Images/actionmenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/actionmenu.png -------------------------------------------------------------------------------- /util/vico-Prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | -------------------------------------------------------------------------------- /Images/resizehandle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/resizehandle.png -------------------------------------------------------------------------------- /Images/AliasBadgeIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/AliasBadgeIcon.icns -------------------------------------------------------------------------------- /Images/TabClose_Front.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabClose_Front.tif -------------------------------------------------------------------------------- /Images/overflowImage.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/overflowImage.tiff -------------------------------------------------------------------------------- /Support/images/arrow-up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/images/arrow-up.gif -------------------------------------------------------------------------------- /help/help-InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | HPDBookTitle = "Vico Help"; -------------------------------------------------------------------------------- /help/shared/icon_hand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/help/shared/icon_hand.png -------------------------------------------------------------------------------- /Images/TabNewMetalPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabNewMetalPressed.png -------------------------------------------------------------------------------- /Support/images/arrow-down.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/images/arrow-down.gif -------------------------------------------------------------------------------- /Support/images/arrow-none.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/images/arrow-none.gif -------------------------------------------------------------------------------- /Support/lib/osx/plist.bundle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/lib/osx/plist.bundle -------------------------------------------------------------------------------- /help/shared/icon_hand_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/help/shared/icon_hand_32.png -------------------------------------------------------------------------------- /help/shared/icon_hand_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/help/shared/icon_hand_64.png -------------------------------------------------------------------------------- /CommitWindow/Icons/Action.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/CommitWindow/Icons/Action.tiff -------------------------------------------------------------------------------- /Images/TabNewMetalRollover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabNewMetalRollover.png -------------------------------------------------------------------------------- /Images/overflowImagePressed.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/overflowImagePressed.tif -------------------------------------------------------------------------------- /app/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/app/en.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Images/TabCloseModified_Front.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabCloseModified_Front.png -------------------------------------------------------------------------------- /Images/TabClose_Front_Pressed.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabClose_Front_Pressed.tif -------------------------------------------------------------------------------- /Images/TabClose_Front_Rollover.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabClose_Front_Rollover.tif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | app/scope_selector.[ch] 3 | app/scope_selector.out 4 | build 5 | Nu.framework 6 | vico.xcodeproj/* 7 | -------------------------------------------------------------------------------- /CommitWindow/Icons/ActionPressed.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/CommitWindow/Icons/ActionPressed.tiff -------------------------------------------------------------------------------- /Support/themes/dark/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/dark/images/header.png -------------------------------------------------------------------------------- /Support/themes/dark/images/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/dark/images/teaser.png -------------------------------------------------------------------------------- /Support/lib/json.rb: -------------------------------------------------------------------------------- 1 | require 'json/common' 2 | module JSON 3 | require 'json/version' 4 | require 'json/pure' 5 | end 6 | -------------------------------------------------------------------------------- /Support/themes/bright/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/bright/images/header.png -------------------------------------------------------------------------------- /Support/themes/bright/images/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/bright/images/teaser.png -------------------------------------------------------------------------------- /Support/themes/night/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/night/images/header.png -------------------------------------------------------------------------------- /Support/themes/night/images/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/night/images/teaser.png -------------------------------------------------------------------------------- /Support/themes/shiny/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/shiny/images/header.png -------------------------------------------------------------------------------- /Support/themes/shiny/images/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/shiny/images/teaser.png -------------------------------------------------------------------------------- /Images/TabCloseModified_Front_Pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabCloseModified_Front_Pressed.png -------------------------------------------------------------------------------- /Images/TabCloseModified_Front_Rollover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Images/TabCloseModified_Front_Rollover.png -------------------------------------------------------------------------------- /Support/themes/default/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/default/images/header.png -------------------------------------------------------------------------------- /Support/themes/default/images/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/default/images/teaser.png -------------------------------------------------------------------------------- /Support/themes/halloween/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/halloween/images/header.png -------------------------------------------------------------------------------- /Support/themes/halloween/images/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/themes/halloween/images/teaser.png -------------------------------------------------------------------------------- /CommitWindow/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/CommitWindow/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /Support/nibs/RequestItem.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/nibs/RequestItem.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Support/nibs/RequestString.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/nibs/RequestString.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Support/nibs/ProgressDialog.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/nibs/ProgressDialog.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Support/nibs/RequestSecureString.nib/keyedobjects.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/nibs/RequestSecureString.nib/keyedobjects.nib -------------------------------------------------------------------------------- /Support/bin/CommitWindow.app/Contents/MacOS/CommitWindow: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/bin/CommitWindow.app/Contents/MacOS/CommitWindow -------------------------------------------------------------------------------- /CommitWindow/CommitWindow_Prefix.pch: -------------------------------------------------------------------------------- 1 | 2 | #ifdef __OBJC__ 3 | #import 4 | #endif 5 | 6 | #import 7 | -------------------------------------------------------------------------------- /CommitWindow/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char *argv[]) 4 | { 5 | return NSApplicationMain(argc, (const char **) argv); 6 | } 7 | -------------------------------------------------------------------------------- /Support/bin/CommitWindow.app/Contents/Resources/Action.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/bin/CommitWindow.app/Contents/Resources/Action.tiff -------------------------------------------------------------------------------- /Support/bin/CommitWindow.app/Contents/Resources/ActionPressed.tiff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/bin/CommitWindow.app/Contents/Resources/ActionPressed.tiff -------------------------------------------------------------------------------- /Support/bin/CommitWindow.app/Contents/Resources/English.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/basuke/vico/master/Support/bin/CommitWindow.app/Contents/Resources/English.lproj/InfoPlist.strings -------------------------------------------------------------------------------- /vico.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /help/dot.md: -------------------------------------------------------------------------------- 1 | # Repeating the last change 2 | 3 | One of the most powerful vi commands is the dot command. The dot command 4 | (.) simply repeats the last change. 5 | 6 | You can move around without overwriting the dot command. 7 | 8 | -------------------------------------------------------------------------------- /Support/bin/html_man.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SECTION=$1 4 | WORD=$2 5 | 6 | DST=$(mktemp "${TMPDIR:-/tmp}/tm_man_XXXXXX").html 7 | "$TM_SUPPORT_PATH/bin/man2html" &>"$DST" "$SECTION" "$WORD" 8 | echo -n "$DST" 9 | 10 | { sleep 300; rm "$DST"; rm "${DST%.html}"; } &>/dev/null & 11 | -------------------------------------------------------------------------------- /Support/nibs/RequestString.nib/classes.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBVersion 6 | 1 7 | 8 | 9 | -------------------------------------------------------------------------------- /Support/nibs/RequestSecureString.nib/classes.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBVersion 6 | 1 7 | 8 | 9 | -------------------------------------------------------------------------------- /Support/lib/json/version.rb: -------------------------------------------------------------------------------- 1 | module JSON 2 | # JSON version 3 | VERSION = '1.5.1' 4 | VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc: 5 | VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc: 6 | VERSION_MINOR = VERSION_ARRAY[1] # :nodoc: 7 | VERSION_BUILD = VERSION_ARRAY[2] # :nodoc: 8 | end 9 | -------------------------------------------------------------------------------- /help/open_line.md: -------------------------------------------------------------------------------- 1 | # Opening lines 2 | 3 | To open a new line below the current line, use the o (lowercase 4 | letter o) command. The new line is automatically indented (if autoindent 5 | is enabled) and insert mode is entered. 6 | 7 | Use the O (capital letter O) command to insert a new line 8 | *above* the current line. -------------------------------------------------------------------------------- /CommitWindow/CXMenuButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // CXMenuButton.h 3 | // 4 | // Created by Chris Thomas on 2006-10-09. 5 | // Copyright 2006 Chris Thomas. All rights reserved. 6 | // MIT license. 7 | // 8 | 9 | @interface CXMenuButton : NSButton 10 | { 11 | IBOutlet NSMenu * menu; 12 | } 13 | 14 | - (NSMenu *)menu; 15 | - (void)setMenu:(NSMenu *)aValue; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /CommitWindow/NSString+StatusString.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+StatusString.h 3 | // CommitWindow 4 | // 5 | // Created by Chris Thomas on 6/24/06. 6 | // Copyright 2006 Chris Thomas. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface NSString(VersionControlStatusString) 13 | - (NSAttributedString *) attributedStatusString; 14 | @end 15 | -------------------------------------------------------------------------------- /app/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 2 | {\fonttbl\f0\fswiss\fcharset0 Helvetica;} 3 | {\colortbl;\red255\green255\blue255;} 4 | \vieww9000\viewh8400\viewkind0 5 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural 6 | 7 | \f0\fs24 \cf0 See {\field{\*\fldinst{HYPERLINK "vico://credits"}}{\fldrslt Credits.txt}} for acknowledgements.} -------------------------------------------------------------------------------- /CommitWindow/CommitWindowCommandLine.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommitWindowCommandLine.h 3 | // CommitWindow 4 | // 5 | // Created by Chris Thomas on 6/24/06. 6 | // Copyright 2006 Chris Thomas. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "CommitWindowController.h" 11 | 12 | @interface CommitWindowController(CommandLine) 13 | - (IBAction) commit:(id) sender; 14 | - (IBAction) cancel:(id) sender; 15 | @end 16 | -------------------------------------------------------------------------------- /app/GenerateFormData.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Stephen F. Booth 3 | * All Rights Reserved 4 | */ 5 | 6 | #pragma once 7 | 8 | #import 9 | 10 | // ======================================== 11 | // Generates multipart/form-data from the given dictionary using the specified boundary 12 | // ======================================== 13 | NSData * GenerateFormData(NSDictionary *formValues, NSString *boundary); 14 | -------------------------------------------------------------------------------- /appcast.xml.in: -------------------------------------------------------------------------------- 1 | 2 | Version @SHORT_VERSION@ 3 | @RELNOTES_LINK@.html 4 | @DATE@ 5 | 11 | 12 | -------------------------------------------------------------------------------- /Support/lib/README.txt: -------------------------------------------------------------------------------- 1 | # Updated: 2005-05-20, Sune Foldager. 2 | 3 | This directory should contain object files that aren't supposed to be executed directly, 4 | such as shared libraries and bash source-files. Data files should not be here. 5 | 6 | 7 | # updated 2011-03-02, Martin Hedenfalk. 8 | Removed unused and unsupported scripts. 9 | I've tried to remove textmate-specific stuff, but there's still some left. 10 | I'd like to replace all of this with nu code. 11 | -------------------------------------------------------------------------------- /Support/lib/json/pure.rb: -------------------------------------------------------------------------------- 1 | require 'json/common' 2 | require 'json/pure/parser' 3 | require 'json/pure/generator' 4 | 5 | module JSON 6 | # This module holds all the modules/classes that implement JSON's 7 | # functionality in pure ruby. 8 | module Pure 9 | $DEBUG and warn "Using Pure library for JSON." 10 | JSON.parser = Parser 11 | JSON.generator = Generator 12 | end 13 | 14 | JSON_LOADED = true unless defined?(::JSON::JSON_LOADED) 15 | end 16 | -------------------------------------------------------------------------------- /app/symbol-icons.plist: -------------------------------------------------------------------------------- 1 | { 2 | "meta.function" = function; 3 | "meta.interface-or-protocol meta.function" = header; 4 | "meta.method" = function; 5 | "meta.class" = class; 6 | "meta.interface-or-protocol" = class; 7 | "meta.module" = module; 8 | "meta.directive.module" = module; 9 | "source meta.implementation entity.name.type" = module; 10 | "meta.directive.define" = define; 11 | "meta.preprocessor" = define; 12 | "meta.tag" = tag; 13 | "" = unknown; 14 | } -------------------------------------------------------------------------------- /app/PSMProgressIndicator.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSMProgressIndicator.h 3 | // PSMTabBarControl 4 | // 5 | // Created by John Pannell on 2/23/06. 6 | // Copyright 2006 Positive Spin Media. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PSMTabBarControl.h" 11 | 12 | 13 | @interface PSMProgressIndicator : NSProgressIndicator { 14 | 15 | } 16 | 17 | @end 18 | 19 | @interface PSMTabBarControl (LayoutPlease) 20 | 21 | - (void)update; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /app/PSMOverflowPopUpButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSMOverflowPopUpButton.h 3 | // PSMTabBarControl 4 | // 5 | // Created by John Pannell on 11/4/05. 6 | // Copyright 2005 Positive Spin Media. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface PSMOverflowPopUpButton : NSPopUpButton { 13 | NSImage *_PSMTabBarOverflowPopUpImage; 14 | NSImage *_PSMTabBarOverflowDownPopUpImage; 15 | BOOL _down; 16 | } 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /par/Makefile: -------------------------------------------------------------------------------- 1 | #! /usr/bin/make 2 | 3 | BIN=$(DESTDIR)/usr/bin 4 | DOC=$(DESTDIR)/usr/share/doc/par 5 | MAN=$(DESTDIR)/usr/share/man/man1 6 | 7 | include protoMakefile 8 | 9 | CC = cc $(CFLAGS) -c 10 | 11 | install: par par.doc 12 | install -o root -g root -m 0755 par $(BIN)/par 13 | install -d $(DOC) -o root -g root -m 0755 14 | install -o root -g root -m 0644 par.doc $(DOC) 15 | install -d $(MAN) -o root -g root -m 0755 16 | install -o root -g root -m 0644 par.1 $(MAN) 17 | 18 | -------------------------------------------------------------------------------- /help/ex.md: -------------------------------------------------------------------------------- 1 | # The ex command line 2 | 3 | The ex command line is normally hidden under the status bar at the 4 | bottom of the window. The command line is used to enter ex commands 5 | (:), filter commands (!) and search patterns 6 | (/ and ?). 7 | 8 | Lines entered on the command line are remembered in a history. Use up and 9 | down arrows to recall history. 10 | 11 | * [Ex ranges](ex_ranges.html) 12 | * [Ex commands](ex_cmds.html) 13 | 14 | -------------------------------------------------------------------------------- /Support/lib/webpreview.py: -------------------------------------------------------------------------------- 1 | 2 | # python bindings for soryu's web-preview 3 | from cgi import escape 4 | from os import path, environ 5 | from tm_helpers import sh, sh_escape 6 | 7 | webpreview = sh_escape(path.join(environ["TM_SUPPORT_PATH"], "lib/webpreview.sh")) 8 | 9 | def html_header(title, subtitle): 10 | return sh('source %s; html_header "%s" "%s"' % (webpreview, sh_escape(title), sh_escape(subtitle))) 11 | 12 | def html_footer(): 13 | return sh('source %s; html_footer' % webpreview) 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/PSMProgressIndicator.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSMProgressIndicator.m 3 | // PSMTabBarControl 4 | // 5 | // Created by John Pannell on 2/23/06. 6 | // Copyright 2006 Positive Spin Media. All rights reserved. 7 | // 8 | 9 | #import "PSMProgressIndicator.h" 10 | 11 | @implementation PSMProgressIndicator 12 | 13 | // overrides to make tab bar control re-layout things if status changes 14 | - (void)setHidden:(BOOL)flag 15 | { 16 | [super setHidden:flag]; 17 | [(PSMTabBarControl *)[self superview] update]; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Support/nibs/RequestString.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 629 7 | IBOldestOS 8 | 5 9 | IBOpenObjects 10 | 11 | IBSystem Version 12 | 9C7010 13 | targetFramework 14 | IBCocoaFramework 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/SFBCrashReporter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Stephen F. Booth 3 | * All Rights Reserved 4 | */ 5 | 6 | #import 7 | 8 | // ======================================== 9 | // The main interface 10 | // ======================================== 11 | @interface SFBCrashReporter : NSObject 12 | { 13 | } 14 | 15 | // Ensure that SFBCrashReporterCrashSubmissionURL is set to a string in either your application's Info.plist 16 | // or NSUserDefaults and call this 17 | + (void) checkForNewCrashes; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /help/scrolling.md: -------------------------------------------------------------------------------- 1 | # Scrolling the screen 2 | 3 | Ctrl-f and Ctrl-b (in normal mode) scroll the 4 | screen one page **f**orward and **b**ackward. 5 | 6 | The Ctrl-d and Ctrl-u commands scroll the screen 7 | one half screen page **d**own and **u**p, respectively. 8 | 9 | To reposition the screen relative the current caret location, the 10 | zz command centers the caret on the screen, zt 11 | puts the caret at the top of the screen, and zb at the bottom. 12 | 13 | * [Movement](movement.html) 14 | 15 | -------------------------------------------------------------------------------- /Support/nibs/ProgressDialog.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 599 7 | IBOldestOS 8 | 3 9 | IBOpenObjects 10 | 11 | 79 12 | 13 | IBSystem Version 14 | 9A410 15 | targetFramework 16 | IBCocoaFramework 17 | 18 | 19 | -------------------------------------------------------------------------------- /Support/nibs/RequestSecureString.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBFramework Version 6 | 629 7 | IBOldestOS 8 | 5 9 | IBOpenObjects 10 | 11 | 3 12 | 13 | IBSystem Version 14 | 9C31 15 | targetFramework 16 | IBCocoaFramework 17 | 18 | 19 | -------------------------------------------------------------------------------- /Support/nibs/SimpleNotificationWindow.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 79 75 356 240 0 0 1280 1002 7 | IBFramework Version 8 | 452.0 9 | IBOpenObjects 10 | 11 | 60 12 | 13 | IBSystem Version 14 | 9A283 15 | IBUsesTextArchiving 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /help/shared/help.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "Lucida Grande", sans-serif; 3 | font-size: small; 4 | padding: 1em 1em 0em 1em; 5 | } 6 | 7 | kbd, pre { /* stolen from github */ 8 | background-color: ghostWhite; 9 | border: 1px solid #DEDEDE; 10 | color: #444; 11 | padding: 0 0.2em; 12 | } 13 | 14 | kbd { 15 | white-space: pre; 16 | } 17 | 18 | pre { 19 | padding: 0.4em; 20 | } 21 | 22 | h1 { 23 | font-size: medium; 24 | margin: 0 0 0.5em 0; 25 | padding-left: 42px; 26 | min-height: 32px; 27 | background: url(../shared/icon_hand_32.png) no-repeat bottom left; 28 | -webkit-background-size: 32px 32px; 29 | line-height: 32px; 30 | } 31 | -------------------------------------------------------------------------------- /par/errmsg.c: -------------------------------------------------------------------------------- 1 | /***********************/ 2 | /* errmsg.c */ 3 | /* for Par 1.52-i18n.3 */ 4 | /* Copyright 2001 by */ 5 | /* Adam M. Costello */ 6 | /* Modified by */ 7 | /* Jérôme Pouiller */ 8 | /***********************/ 9 | 10 | /* This is ANSI C code (C89). */ 11 | 12 | 13 | #include "errmsg.h" /* Makes sure we're consistent with the declarations. */ 14 | 15 | 16 | const wchar_t * const outofmem = 17 | L"Out of memory.\n"; 18 | 19 | const wchar_t * const mbserror = 20 | L"Error in input multibyte string.\n"; 21 | 22 | const wchar_t * const impossibility = 23 | L"Impossibility #%d has occurred. Please report it.\n"; 24 | -------------------------------------------------------------------------------- /help/move_chars.md: -------------------------------------------------------------------------------- 1 | # Moving by characters 2 | 3 | To move one character to the left, you either use the arrow key, or the 4 | h command. The l command move to the right. 5 | 6 | The j and k commands move one line down and up, 7 | respectively. 8 | 9 | To help you remember which key move in what direction, think of h 10 | being the leftmost key among these, and l the rightmost. 11 | The j key can be thought of a downward pointing arrow, and, with a 12 | little imagination, the lowercase k is pointing upwards. 13 | 14 | * [Movement](movement.html) 15 | * [Line searching](line_search.html) 16 | -------------------------------------------------------------------------------- /app/PSMRolloverButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSMOverflowPopUpButton.h 3 | // NetScrape 4 | // 5 | // Created by John Pannell on 8/4/04. 6 | // Copyright 2004 Positive Spin Media. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PSMRolloverButton : NSButton 12 | { 13 | NSImage *_rolloverImage; 14 | NSImage *_usualImage; 15 | NSTrackingRectTag _myTrackingRectTag; 16 | } 17 | 18 | @property (nonatomic,readwrite,retain) NSImage *rolloverImage; 19 | @property (nonatomic,readwrite,retain) NSImage *usualImage; 20 | 21 | // tracking rect for mouse events 22 | - (void)addTrackingRect; 23 | - (void)removeTrackingRect; 24 | @end 25 | -------------------------------------------------------------------------------- /sparkle_pub.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MIIBtzCCASwGByqGSM44BAEwggEfAoGBANefCJ2iHhsF8/Bba6uJIj7aAAjrU57v 3 | BL71BIu1Hde5I0HXU0B46FwHDhp+IlfJQCYSdc01kly1BwntD7zh+mV1IkO0wYke 4 | YKA2n7O0QDAAQi1n9rXMQh1R4ujmf/z2vRgYcxjM+oP1m91+bF4JOEuhCGmx+RSL 5 | ckj5rY4oVFQVAhUAsu6PV3OwoYi/xFFDPzBBNGUJkMECgYEAu1Jf015VAD4rwX60 6 | Pvr83XooeDWIQP5rNyIhE3uya0n4SM9WCLZbCoZA3MKr6Bx16R3osY6wN0CXkdI+ 7 | rmm+R4bcQGWEGGM5ffWsc2Fkk+zJheMc6xy5bdA4QN89FenkAoRurktqq/quUwhF 8 | r5Hd6lKpHRK2Fm6ZoKZACP8BixYDgYQAAoGASg5JcPbWlaqVrwSVo/medFb+tE7Z 9 | glUVHl82hWO4P78ZMZhQXalbzoAJyzgEVht5gPdbbXEY1G/min1dqvKcPkVl/w7Z 10 | 5VotsDnyS4DB26ANHrpHV/meLAAunrD4fBhRf1CIXxl1r4Lh6BMuFRNr+XdRICVg 11 | 2QnSoThwewkJP1c= 12 | -----END PUBLIC KEY----- 13 | -------------------------------------------------------------------------------- /Bundles/LICENSE: -------------------------------------------------------------------------------- 1 | If not otherwise specified (see below), files in this repository (located at http://macromates.com/svn/Bundles/) fall under the following license: 2 | 3 | Permission to copy, use, modify, sell and distribute this 4 | software is granted. This software is provided "as is" without 5 | express or implied warranty, and with no claim as to its 6 | suitability for any purpose. 7 | 8 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. 9 | -------------------------------------------------------------------------------- /Themes/LICENSE: -------------------------------------------------------------------------------- 1 | If not otherwise specified (see below), files in this repository (located at http://macromates.com/svn/Bundles/) fall under the following license: 2 | 3 | Permission to copy, use, modify, sell and distribute this 4 | software is granted. This software is provided "as is" without 5 | express or implied warranty, and with no claim as to its 6 | suitability for any purpose. 7 | 8 | An exception is made for files in readable text which contain their own license information, or files where an accompanying file exists (in the same directory) with a “-license” suffix added to the base-name name of the original file, and an extension of txt, html, or similar. For example “tidy” is accompanied by “tidy-license.txt”. 9 | -------------------------------------------------------------------------------- /help/change_indent.md: -------------------------------------------------------------------------------- 1 | # Changing indentation 2 | 3 | While in insert mode, use the ctrl-t and ctrl-d commands 4 | to increase and decrease the indentation level of the current line. 5 | 6 | To manually shift a block of text left or right, use the < and 7 | > [operators](operators.html). It's easy to use them in 8 | [visual mode](visual.html) by first selecting the text that should be indented. 9 | 10 | The = command can be used to automatically indent text based on 11 | the current language syntax. 12 | 13 | The above commands uses the indentation settings for the current scope to 14 | determine how to indent. 15 | 16 | * [Indentation settings](indent_settings.html) 17 | -------------------------------------------------------------------------------- /help/move_lines.md: -------------------------------------------------------------------------------- 1 | # Moving by lines 2 | 3 | You can jump to the top, middle and bottom line of the screen with the 4 | H, M and L commands. To remember them, 5 | you can think of H as the **H**igh line, and L as 6 | the **L**ow line. 7 | 8 | The } and { commands move by paragraphs. A 9 | paragraph is considered delimited by an empty line. 10 | 11 | The G command jumps to the last line. With a count, it jumps 12 | to that line number. For example, 10G jumps to line number 13 | 10. The gg command is similar to G, but defaults 14 | to the first line if no count is given. 15 | 16 | * [Movement](movement.html) 17 | -------------------------------------------------------------------------------- /tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | se.bzero.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /help/jumplist.md: -------------------------------------------------------------------------------- 1 | # The jumplist 2 | 3 | Vico maintains a list of locations while you move around in files. Some movement 4 | commands are considered "jumps", and those jumps are remembered in a list. 5 | 6 | Generally, movement commands that generate jumps are those that 7 | move more than a few lines. So the [word](move_words.html), 8 | [character](move_chars.html) and [line search](line_search.html) 9 | motion commands do not generate a jump, but the [line](move_lines.html) 10 | and [search](searching.html) motions do. 11 | 12 | You navigate the jumplist either by pressing the jumplist arrows in the toolbar, 13 | or pressing ctrl-o to go back and ctrl-i 14 | (or tab) to go forward. 15 | 16 | Only the last 100 jumps are remembered, and duplicates are removed. 17 | 18 | -------------------------------------------------------------------------------- /help/move_words.md: -------------------------------------------------------------------------------- 1 | # Moving by words 2 | 3 | To move to the next word, use the w command. 4 | 5 | The w command considers separator characters when deciding where the 6 | next word starts. To only consider whitespace as word separators, you can use 7 | the (uppercase) W command. 8 | 9 | To move in the opposite direction, use the b command to move over a 10 | normal word, and the capital B command to move over "big words". 11 | 12 | There is also the e and E commands that move to the *end* 13 | of the next word or bigword. 14 | 15 | If you prefix the above commands with a number, the command will move that many 16 | words. For example, the command 3w will move three words to the right. 17 | 18 | * [Movement](movement.html) -------------------------------------------------------------------------------- /help/delete.md: -------------------------------------------------------------------------------- 1 | # Deleting text 2 | 3 | The simplest deletion command is x. It deletes the character under 4 | the caret. A count before deletes that many characters, e.g. 10x 5 | deletes 10 characters. Similarly, the X command deletes one character 6 | to the left of the caret. 7 | 8 | The D command deletes from the current location to the end of the 9 | line. 10 | 11 | The d command is an [operator](operators.html) and thus must be 12 | combined with a motion command. For example, dw deletes a word, 13 | d3W deletes 3 big words, and dd deletes the current line. 14 | 15 | The c (change) command is similar to the d command, but 16 | also enters insert mode. 17 | 18 | * [Changing text](change.html) 19 | 20 | -------------------------------------------------------------------------------- /Support/lib/exit_codes.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | module_function 3 | 4 | def exit_discard 5 | exit 200 6 | end 7 | 8 | def exit_replace_text(out = nil) 9 | print out if out 10 | exit 201 11 | end 12 | 13 | def exit_replace_document(out = nil) 14 | print out if out 15 | exit 202 16 | end 17 | 18 | def exit_insert_text(out = nil) 19 | print out if out 20 | exit 203 21 | end 22 | 23 | def exit_insert_snippet(out = nil) 24 | print out if out 25 | exit 204 26 | end 27 | 28 | def exit_show_html(out = nil) 29 | print out if out 30 | exit 205 31 | end 32 | 33 | def exit_show_tool_tip(out = nil) 34 | print out if out 35 | exit 206 36 | end 37 | 38 | def exit_create_new_document(out = nil) 39 | print out if out 40 | exit 207 41 | end 42 | end -------------------------------------------------------------------------------- /app/PSMMetalTabStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSMMetalTabStyle.h 3 | // PSMTabBarControl 4 | // 5 | // Created by John Pannell on 2/17/06. 6 | // Copyright 2006 Positive Spin Media. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "PSMTabStyle.h" 11 | 12 | @interface PSMMetalTabStyle : NSObject { 13 | NSImage *_metalCloseButton; 14 | NSImage *_metalCloseButtonDown; 15 | NSImage *_metalCloseButtonOver; 16 | NSImage *_metalCloseModifiedButton; 17 | NSImage *_metalCloseModifiedButtonDown; 18 | NSImage *_metalCloseModifiedButtonOver; 19 | NSImage *_addTabButtonImage; 20 | NSImage *_addTabButtonPressedImage; 21 | NSImage *_addTabButtonRolloverImage; 22 | } 23 | 24 | - (void)drawInteriorWithTabCell:(PSMTabBarCell *)cell inView:(NSView*)controlView; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /help/indent_settings.md: -------------------------------------------------------------------------------- 1 | # Settings for indentation 2 | 3 | The shiftwidth setting controls how large an indentation is in terms 4 | of spaces. This is different from the tabstop setting that specifies 5 | how large an actual tab character is. 6 | 7 | If shiftwidth is set to 4 and tabstop is left at the 8 | default 8, one indentation will use 4 spaces, but two indentations will use one 9 | tab. 10 | 11 | Use the expandtab setting to always use spaces when indenting. 12 | 13 | When the autoindent setting is enabled, a new line will use the same 14 | amount of indentation as the previous line. The smartindent setting 15 | adds syntax-aware rules for increasing and decreasing the automatic indentation. 16 | 17 | * [Changing indentation](change_indent.html) 18 | 19 | -------------------------------------------------------------------------------- /help/searching.md: -------------------------------------------------------------------------------- 1 | # Searching 2 | 3 | To search, use the / command and enter a regular expression 4 | in the command line at the bottom of the window. This command is also 5 | available by the standard ⌘F key. 6 | 7 | If the ignorecase option is set, case is ignored. If the 8 | smartcase option is also set, case is ignored only if the 9 | search pattern does not include any uppercase characters. 10 | 11 | To search backwards, use ?. 12 | 13 | To quickly search for the word under the caret, use *. The 14 | # command searches backwards instead. 15 | 16 | You can repeat the last seach command in the same direction with the 17 | n command. The upper case N command reverses the 18 | direction. 19 | 20 | * [Movement](movement.html) 21 | 22 | -------------------------------------------------------------------------------- /Support/script/default.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Default JavaScript for HTML output. _UNDER CONSTRUCTION - PLEASE DON'T TINKER YET_ 4 | By Sune Foldager. 5 | 6 | */ 7 | 8 | function showElement(id) 9 | { 10 | var b = document.getElementById(id + "_b"); 11 | var s = document.getElementById(id + "_s"); 12 | var h = document.getElementById(id + "_h"); 13 | b.style.display = "block"; 14 | s.style.display = "none"; 15 | h.style.display = "inline"; 16 | } 17 | 18 | function hideElement(id) 19 | { 20 | var b = document.getElementById(id + "_b"); 21 | var s = document.getElementById(id + "_s"); 22 | var h = document.getElementById(id + "_h"); 23 | b.style.display = "none"; 24 | s.style.display = "inline"; 25 | h.style.display = "none"; 26 | } 27 | 28 | function clearElement(id) 29 | { 30 | document.getElementById(id).innerHTML = "" 31 | } 32 | -------------------------------------------------------------------------------- /app/SFBSystemInformation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Stephen F. Booth 3 | * All Rights Reserved 4 | */ 5 | 6 | #import 7 | 8 | // ======================================== 9 | // Utility class for accessing useful system information 10 | // ======================================== 11 | @interface SFBSystemInformation : NSObject 12 | { 13 | } 14 | 15 | // Hardware information 16 | - (NSString *) machine; 17 | - (NSString *) model; 18 | - (NSNumber *) numberOfCPUs; 19 | - (NSNumber *) physicalMemory; 20 | - (NSNumber *) busFrequency; 21 | - (NSNumber *) CPUFrequency; 22 | - (NSNumber *) CPUFamily; 23 | 24 | // User-friendly versions 25 | - (NSString *) modelName; 26 | - (NSString *) CPUFamilyName; 27 | 28 | // Mac OS version information 29 | - (NSString *) systemVersion; 30 | - (NSString *) systemBuildVersion; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /help/md2html: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MARKDOWN_PL=${MARKDOWN:-$HOME/bin/Markdown.pl} 4 | MARKDOWN="perl $MARKDOWN_PL --html4tags" 5 | 6 | head() 7 | { 8 | file=$1 9 | title=$2 10 | 11 | cat < 14 | 15 | 16 | 17 | $title 18 | 19 | 20 | EOF 21 | } 22 | 23 | tail() 24 | { 25 | cat < 27 | 28 | EOF 29 | } 30 | 31 | while test -n "$1"; do 32 | file=$1 33 | title=$(sed -n '/^# /{s///;p;q;}' "$1") 34 | echo "converting $file with title '$title'" >&2 35 | (head "$file" "$title" 36 | $MARKDOWN "$file" 37 | tail) 38 | shift 39 | done 40 | 41 | -------------------------------------------------------------------------------- /help/move_symbols.md: -------------------------------------------------------------------------------- 1 | # Moving by symbols 2 | 3 | The ctrl-] key (in normal mode), jumps to the symbol under the caret. 4 | 5 | If you have a [tags](http://ctags.sourceforge.net/) file, Vico will try to 6 | lookup the current word as a tag. The `tags` file should be placed in 7 | the windows current directory, ie the top-most directory displayed by 8 | the [explorer](explorer.html). 9 | 10 | If no tag was found, Vico tries to match the current word with a 11 | [symbol](symbols.html). If more than one match is found, you are presented with 12 | a menu. 13 | 14 | If a tag or symbol is found, the current location is pushed on the 15 | [tag stack](tagstack.html), and the caret is jumped to the new location. 16 | Press ctrl-t to go back. 17 | 18 | You can also use the ⇧⌘T key to search the 19 | [symbol list](symbols.html). 20 | -------------------------------------------------------------------------------- /help/ex_ranges.md: -------------------------------------------------------------------------------- 1 | # Ex command ranges 2 | 3 | Many [ex commands](ex_cmds.html) accept a range of lines to operate 4 | upon. The range precede the command name and consists of zero, one or 5 | two line addresses separated with comma. 6 | 7 | A line address can be written as: 8 | 9 | * an absolute line number, ie 3 10 | * $ denotes the last line 11 | * . (a dot) referes to the current line 12 | * a mark (eg 'x) 13 | * % denotes all lines, same as 1,$ 14 | * a forward search pattern, delimited by slashes, eg /foo/ 15 | * a backward search pattern, delimited by question marks, eg ?foo? 16 | 17 | Additionally, a line offset may be appended to a line address with 18 | + or -. For example, .+2 means two 19 | lines after the current line. 20 | 21 | -------------------------------------------------------------------------------- /Support/lib/tm/markdown.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | module Markdown 3 | module_function 4 | def to_html(str, options = { }) 5 | filters = [ ] 6 | filters << '"${TM_MARKDOWN:-$TM_SUPPORT_PATH/bin/Markdown.pl}"' unless options[:no_markdown] 7 | filters << '"${TM_SMARTYPANTS:-$TM_SUPPORT_PATH/bin/SmartyPants.pl}"' unless options[:no_smartypants] 8 | 9 | return str if filters.empty? 10 | 11 | IO.popen(filters.join('|'), 'r+') do |io| 12 | Thread.new { io << str; io.close_write } 13 | io.read 14 | end 15 | end 16 | end 17 | end 18 | 19 | if $0 == __FILE__ 20 | include TextMate 21 | puts Markdown.to_html("who's there?") 22 | puts Markdown.to_html("who's there?", :no_markdown => true) 23 | puts Markdown.to_html("who's there?", :no_smartypants => true) 24 | puts Markdown.to_html("who's there?", :no_markdown => true, :no_smartypants => true) 25 | end 26 | -------------------------------------------------------------------------------- /help/insert.md: -------------------------------------------------------------------------------- 1 | # Inserting text 2 | 3 | To insert text you must first enter insert mode. The most basic way to 4 | enter insert mode is with the i (insert) command. You will 5 | notice you are in insert mode when the caret changes from a block caret 6 | to a thin caret. 7 | 8 | When you are done inserting text, press the 9 | (escape) key to go back to normal mode. 10 | 11 | The i command enters insert mode at the current location. 12 | To enter insert mode after the current location, you use the a 13 | (append) command. 14 | 15 | If you want to append text to the end of the current line, no matter where 16 | on the line you are, use the A command. 17 | 18 | Similarly, the I command moves to the first non-blank character 19 | on the current line and enters insert mode there. 20 | 21 | * [Opening new lines](open_line.html) 22 | -------------------------------------------------------------------------------- /help/md2html.www: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MARKDOWN_PL=${MARKDOWN:-$HOME/bin/Markdown.pl} 4 | MARKDOWN="perl $MARKDOWN_PL --html4tags" 5 | 6 | head() 7 | { 8 | file=$1 9 | title=$2 10 | 11 | cat < 13 | 14 | EOF 15 | } 16 | 17 | tail() 18 | { 19 | cat < 21 | EOF 22 | } 23 | 24 | echo "# Help Index" > index.md 25 | echo "" >> index.md 26 | 27 | while test -n "$1"; do 28 | file=$1 29 | title=$(sed -n '/^# /{s///;p;q;}' "$1") 30 | echo "converting $file with title '$title'" >&2 31 | html="$(basename "${file%.*}.shtml")" 32 | (head "$file" "$title" 33 | sed 's/(\([^:.]*\)\.html)/(\1.shtml)/g' "$file" | $MARKDOWN 34 | tail) > $html 35 | echo " * [$title]($html)" >> index.md 36 | shift 37 | done 38 | 39 | (head index.md Index 40 | $MARKDOWN index.md 41 | tail) > index.shtml 42 | -------------------------------------------------------------------------------- /help/movement.md: -------------------------------------------------------------------------------- 1 | # Movement commands 2 | 3 | You can use the normal arrow, page up and page down keys in Vico to move around. 4 | But there are more movement commands available in vi than there are cursor keys. 5 | And with the vi way of navigating, you don't have to reach all the way across 6 | the keyboard. 7 | 8 | Most vi tutorials begin with describing the hjkl keys for moving 9 | left, down, up and right. If you're new to vi, you may want to wait with them. 10 | They do feel a bit awkward at first, but once you've learned to use them, you 11 | realize they aren't so bad at all. 12 | 13 | * [Moving by words](move_words.html) 14 | * [Moving by characters](move_chars.html) 15 | * [Moving by lines](move_lines.html) 16 | * [Moving by symbols](move_symbols.html) 17 | * [Moving back to previous locations](jumplist.html) 18 | * [Searching](searching.html) 19 | * [Scrolling the screen](scrolling.html) 20 | 21 | -------------------------------------------------------------------------------- /help/visual.md: -------------------------------------------------------------------------------- 1 | # Visual mode 2 | 3 | When you select text in Vico, you enter visual mode. This is similar to normal 4 | mode in that keys act as commands. They do not replace the selected text (you 5 | must use the [change](change.html) command for that). 6 | 7 | Commands that require a motion ([operators](operators.html)) instead use the 8 | selected text directly. 9 | 10 | You can select text by dragging with the mouse, or with the v and 11 | V commands. The latter enters visual **line mode**, where only 12 | whole lines are selected. The selection is extended by moving around with the 13 | regular [movement](movement.html) commands. 14 | 15 | You can toggle between visual line mode and character mode by pressing 16 | v while in line mode, or V while in visual character mode. 17 | 18 | Press (escape) to cancel the selection and go back to normal 19 | mode. 20 | 21 | -------------------------------------------------------------------------------- /CommitWindow/English.lproj/MainMenu.nib/info.nib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IBDocumentLocation 6 | 468 587 356 240 0 0 1280 1002 7 | IBEditorPositions 8 | 9 | 263 10 | 66 389 125 44 0 0 1280 1002 11 | 399 12 | 623 889 208 99 0 0 1280 1002 13 | 14 | IBFramework Version 15 | 451.0 16 | IBOldestOS 17 | 3 18 | IBOpenObjects 19 | 20 | 21 21 | 399 22 | 263 23 | 24 | IBSystem Version 25 | 9A241e 26 | IBUsesTextArchiving 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Support/lib/erb_streaming.rb: -------------------------------------------------------------------------------- 1 | require 'erb' 2 | 3 | # 4 | # Set up ERB for streaming incremental output rather than atomic, sit-and-wait for completion. 5 | # chris@cjack.com 6 | # 7 | class ERB 8 | # stream must be the name of a stream variable available during run 9 | def ERB.run_to_stream(data, stream) 10 | 11 | # puts "
" + data.inspect + "
" 12 | erb = ERB.new(data) 13 | 14 | # Setup the compiler to print to stdout so we can do incremental output streaming 15 | # rather than downloading everthing first and rendering afterwards 16 | compiler = ERB::Compiler.new(nil) 17 | erb.set_eoutvar(compiler) 18 | 19 | # initialize compiler vars *after* call to setoutvar. Very important! 20 | compiler.pre_cmd = [] 21 | compiler.post_cmd = [] 22 | compiler.put_cmd = '#{stream}.print' 23 | compiler.insert_cmd = compiler.put_cmd if defined?(compiler.insert_cmd) # insert_cmd appears to be new in Ruby 1.9 24 | erb.run 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /CommitWindow/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | CommitWindow 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.cjack.tmbundles.commit-window 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSMainNibFile 22 | MainMenu 23 | NSPrincipalClass 24 | NSApplication 25 | LSUIElement 26 | 1 27 | 28 | 29 | -------------------------------------------------------------------------------- /help/line_search.md: -------------------------------------------------------------------------------- 1 | # Searching within a line 2 | 3 | To quickly search for the next or previous occurrance of a character on the 4 | current line, you can use the f or F commands. The lowercase 5 | f command moves forward, while the uppercase F command 6 | moves backwards. 7 | 8 | After you've pressed the f key, Vico waits for you to enter another 9 | character. This is the character to search for. For example, the command 10 | f: searches for the next occurrance of a colon on the current line. 11 | 12 | The t and T commands works similarly, but instead of 13 | moving exactly to the specified character, it stops just before. 14 | 15 | The last character searched for with those commands is remembered, and the 16 | search can be repeated with the ; (semicolon) and , 17 | (comma) commands. They repeat the search in the same and opposite direction, 18 | respectively. 19 | 20 | * [Searching](searching.html) 21 | -------------------------------------------------------------------------------- /help/basics.md: -------------------------------------------------------------------------------- 1 | # Editing Basics 2 | 3 | Vico is a modal editor. This means there are different modes 4 | in which you interact with the editor. The most fundamental modes 5 | are the insert mode and normal mode. Regular keys pressed while 6 | in insert mode causes text to be inserted. In contrast, while in 7 | normal mode, regular keys are attached to editing commands such as 8 | delete, change or copy text. 9 | 10 | If you have used the vi or vim text editors, 11 | you should feel comfortable with Vico. If this is your first encounter 12 | with a modal editor, you might feel a bit overwhelmed at first. But 13 | if you give it some time and learn the basics, you'll be rewarded with 14 | a highly efficient text editing tool. 15 | 16 | * [Inserting text](insert.html) 17 | * [Movement Commands](movement.html) 18 | * [Deleting text](delete.html) 19 | * [Changing text](change.html) 20 | * [Operator Commands](operators.html) 21 | * [Repeating changes](dot.html) 22 | * [Searching](searching.html) 23 | 24 | -------------------------------------------------------------------------------- /CommitWindow/CXMenuButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // CXMenuButton.m 3 | // 4 | // Created by Chris Thomas on 2006-10-09. 5 | // Copyright 2006 Chris Thomas. All rights reserved. 6 | // MIT license. 7 | // 8 | 9 | #import "CXMenuButton.h" 10 | 11 | @implementation CXMenuButton 12 | 13 | // Initialization 14 | 15 | - (void) commonInit 16 | { 17 | // Use alternateImage for pressed state 18 | [[self cell] setHighlightsBy:NSCellLightsByContents]; 19 | } 20 | 21 | - (void) awakeFromNib 22 | { 23 | [self commonInit]; 24 | } 25 | 26 | // Events 27 | 28 | - (void) mouseDown:(NSEvent *)event 29 | { 30 | [self highlight:YES]; 31 | [NSMenu popUpContextMenu:menu withEvent:event forView:self withFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]]]; 32 | [self highlight:NO]; 33 | } 34 | 35 | // Accessors 36 | 37 | - (NSMenu *)menu 38 | { 39 | return menu; 40 | } 41 | 42 | - (void)setMenu:(NSMenu *)aValue 43 | { 44 | NSMenu *oldMenu = menu; 45 | menu = [aValue retain]; 46 | [oldMenu release]; 47 | } 48 | 49 | @end 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /help/change.md: -------------------------------------------------------------------------------- 1 | # Changing text 2 | 3 | The c (change) [operator](operators.html) deletes the affected text 4 | and enters insert mode. The cw is one of the most used commands: it 5 | changes one word. The change command is not considered complete until you exit 6 | insert mode with (escape). Back in normal mode, you can 7 | repeat the change with the [dot command](dot.html). 8 | 9 | The (uppercase) C command deletes from the current location 10 | to the end of the line, and then enters insert mode. It is the same as 11 | c$. 12 | 13 | Use the r (replace) command to change a single character. Vico waits 14 | for you to type the new character. In [visual mode](visual.html), the 15 | r command changes the whole selection to the same character. 16 | 17 | The s (substitute) command replaces one, or, given a count, 18 | that many characters and then enters insert mode. The uppercase variant 19 | S is line-oriented and replaces one or more lines. 20 | -------------------------------------------------------------------------------- /help/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Vico Help 7 | 8 | 9 | 10 | 11 | 12 |

Vico Help

13 | 24 | 25 | -------------------------------------------------------------------------------- /app/NSObject+SPInvocationGrabbing.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface SPInvocationGrabber : NSObject { 4 | id _object; 5 | NSInvocation *_invocation; 6 | int frameCount; 7 | char **frameStrings; 8 | BOOL backgroundAfterForward; 9 | BOOL onMainAfterForward; 10 | BOOL waitUntilDone; 11 | } 12 | - (id)initWithObject:(id)obj; 13 | - (id)initWithObject:(id)obj stacktraceSaving:(BOOL)saveStack; 14 | @property(nonatomic, readonly, retain, nonatomic) id object; 15 | @property(nonatomic, readonly, retain, nonatomic) NSInvocation *invocation; 16 | @property(nonatomic) BOOL backgroundAfterForward; 17 | @property(nonatomic) BOOL onMainAfterForward; 18 | @property(nonatomic) BOOL waitUntilDone; 19 | - (void)invoke; // will release object and invocation 20 | - (void)printBacktrace; 21 | - (void)saveBacktrace; 22 | @end 23 | 24 | @interface NSObject (SPInvocationGrabbing) 25 | - (id)grab; 26 | - (id)invokeAfter:(NSTimeInterval)delta; 27 | - (id)nextRunloop; 28 | - (id)inBackground; 29 | - (id)onMainAsync:(BOOL)async; 30 | @end 31 | -------------------------------------------------------------------------------- /help/operators.md: -------------------------------------------------------------------------------- 1 | # Operator commands 2 | 3 | Some commands must be combined with a motion command to be complete. These 4 | commands are called operators, as they operate on the text affected by the 5 | motion command. 6 | 7 | The standard operator commands are: 8 | 9 | * d -- delete 10 | * c -- change 11 | * y -- yank, or copy 12 | * = -- indent 13 | * < -- shift left 14 | * > -- shift right 15 | * ! -- filter through external command 16 | * gu -- lowercase 17 | * gU -- uppercase 18 | * gq -- format text 19 | 20 | You combine the operator with a motion just by entering the motion command 21 | after the operator. For example, cw **c**hanges a **w**ord. 22 | 23 | All operator commands can be doubled to imply the current line. This way, 24 | dd deletes the current line, >> shift the current 25 | line one [shiftwidth](indent_settings.html) to the right and yy 26 | copies (yanks) the line. 27 | 28 | -------------------------------------------------------------------------------- /CommitWindow/CXTextWithButtonStripCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // CXTextWithButtonStripCell.m 3 | // NSCell supporting row action buttons aligned to one side of a text table column. 4 | // 5 | // Created by Chris Thomas on 2006-10-11. 6 | // Copyright 2006 Chris Thomas. All rights reserved. 7 | // 8 | 9 | @interface CXTextWithButtonStripCell : NSTextFieldCell 10 | { 11 | // buttons contains a set of button definitions to draw at the right (or left) side of the cell. 12 | // 13 | // Each item is a dictionary with the following entries: 14 | // • either @"title" NSString -- localized name of button 15 | // OR @"icon" -- NSImage -- icon 16 | // • @"menu" -- NSMenu -- if present, indicates that this button is a menu button 17 | // • @"invocation" -- NSInvocation -- required if this is a push button, useless for menu buttons 18 | // 19 | NSMutableArray * fButtons; 20 | NSUInteger fButtonPressedIndex; 21 | float fButtonStripWidth; 22 | BOOL fRightToLeft; 23 | 24 | } 25 | 26 | - (NSArray *)buttonDefinitions; 27 | - (void)setButtonDefinitions:(NSArray *)newButtonDefinitions; 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /CommitWindow/CWTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // CWTextView.m 3 | // CommitWindow 4 | // 5 | // Created by Chris Thomas on 3/7/05. 6 | // Copyright 2005-2006 Chris Thomas. All rights reserved. 7 | // MIT license. 8 | // 9 | 10 | #import 11 | 12 | 13 | @interface CWTextView : NSTextView 14 | { 15 | float fMinHeight; 16 | float fMaxHeight; 17 | float fMinWidth; 18 | float fMaxWidth; 19 | 20 | NSRect fInitialViewFrame; 21 | NSPoint fInitialMousePoint; 22 | BOOL fTrackingGrowBox; 23 | 24 | BOOL fAllowGrowHorizontally; 25 | BOOL fAllowGrowVertically; 26 | } 27 | 28 | - (BOOL)allowHorizontalResize; 29 | - (void)setAllowHorizontalResize:(BOOL)newAllowGrowHorizontally; 30 | 31 | - (BOOL)allowVerticalResize; 32 | - (void)setAllowVerticalResize:(BOOL)newAllowGrowVertically; 33 | 34 | - (float)maxWidth; 35 | - (void)setMaxWidth:(float)newMaxWidth; 36 | 37 | - (float)minWidth; 38 | - (void)setMinWidth:(float)newMinWidth; 39 | 40 | - (float)minHeight; 41 | - (void)setMinHeight:(float)newMinHeight; 42 | 43 | - (float)maxHeight; 44 | - (void)setMaxHeight:(float)newMaxHeight; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /help/remote.md: -------------------------------------------------------------------------------- 1 | # Working with remote files 2 | 3 | Vico has built-in support for editing files over SFTP. To open a remote directory, 4 | use the :cd command to change to a sftp:// URL. For 5 | example, :cd sftp://www.example.com changes to the home directory on 6 | the www.example.com server. Use the [explorer](explorer.html) 7 | sidebar to open files, or directly with the :edit command. 8 | 9 | A file relative to the home directory on the remote server can be referenced 10 | by the following URL: sftp://www.example.com/~/directory/file.txt 11 | 12 | For SFTP to work, you must use public key authentication. It is recommended 13 | that you protect your private key with a passphrase. 14 | 15 | Vico's SFTP support uses the ssh support built-in to Mac OS X, so any 16 | configuration files you already have for ssh will be used. 17 | 18 | * [Creating a key for SFTP](ssh_keygen.html) 19 | * [ex command line](ex.html) 20 | * [ssh_config(5) manual page](http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man5/ssh_config.5.html) 21 | 22 | -------------------------------------------------------------------------------- /nu/fscript.nu: -------------------------------------------------------------------------------- 1 | ;; @file fscript.nu 2 | ;; @discussion Nu helpers for working with F-Script. 3 | ;; 4 | ;; @copyright Copyright (c) 2007 Tim Burks, Radtastical Inc. 5 | ;; 6 | ;; Licensed under the Apache License, Version 2.0 (the "License"); 7 | ;; you may not use this file except in compliance with the License. 8 | ;; You may obtain a copy of the License at 9 | ;; 10 | ;; http://www.apache.org/licenses/LICENSE-2.0 11 | ;; 12 | ;; Unless required by applicable law or agreed to in writing, software 13 | ;; distributed under the License is distributed on an "AS IS" BASIS, 14 | ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | ;; See the License for the specific language governing permissions and 16 | ;; limitations under the License. 17 | 18 | (load "FScript") 19 | 20 | (function fs-browse (object) 21 | (set browser (BigBrowser 22 | bigBrowserWithRootObject:object 23 | interpreter:(FSInterpreter interpreter))) 24 | (browser makeKeyAndOrderFront:0) 25 | (unless $fs-browsers (set $fs-browsers (array))) 26 | ($fs-browsers << browser) 27 | browser) 28 | 29 | -------------------------------------------------------------------------------- /help/splits.md: -------------------------------------------------------------------------------- 1 | # Working with split views 2 | 3 | Vico can show the same or different documents side by side in split views. 4 | Views can be split either horizontally or vertically. There is no limit on the 5 | number of splits you can create, but more than a couple in the same tab tends to 6 | be hard to manage. 7 | 8 | Most keys that manages split views begin with <ctrl-w>. 9 | To split the current view, use the <ctrl-w>s command, ie first 10 | press <ctrl-w> and then press the s key. If you use 11 | v instead, you get a vertical split. 12 | 13 | If you want to move a split view to a new tab, use <ctrl-w>T. 14 | 15 | To navigate between split views, use <ctrl-w> followed 16 | by a vi motion key (hjkl) or one of the arrow keys. The 17 | <ctrl-w>w command moves to the next split view. The 18 | <ctrl-w>W moves to the previous split view. Use 19 | <ctrl-w>p to toggle between the last focused split view. 20 | 21 | The [explorer](explorer.html) and [symbol list](symbols.html) can also be used 22 | to open files or symbols in split views. 23 | -------------------------------------------------------------------------------- /Support/lib/tm/require_cmd.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | require ENV["TM_SUPPORT_PATH"] + "/lib/escape" 4 | require ENV["TM_SUPPORT_PATH"] + "/lib/exit_codes" 5 | 6 | module TextMate 7 | class << self 8 | def require_cmd(cmd) 9 | unless File.executable?(cmd) or ENV['PATH'].split(':').any? { |dir| File.executable? File.join(dir, cmd) } 10 | TextMate::HTMLOutput.show(:title => "Can't find “#{cmd}” on PATH.", :sub_title => "") do |io| 11 | io << "

The current PATH is:

" 12 | io << "
" 13 | ENV["PATH"].split(":").each do |p| 14 | io << htmlize(p + "\n") 15 | end 16 | io << "
" 17 | io << "

Please add the directory containing “#{cmd}” to PATH in TextMate's Shell Variables preferences.

" 18 | io << "" 20 | end 21 | TextMate.exit_show_html 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /Support/script/webpreview.js: -------------------------------------------------------------------------------- 1 | /* 2 | Some scripts for the HTML Output. To be used in conjunction with `../lib/webpreview.sh`. 3 | 4 | In Flux: http://macromates.com/wiki/Suggestions/StylingHTMLOutput 5 | */ 6 | function selectTheme(event) { 7 | var theme = event.target.value; 8 | var title = event.target.options[event.target.options.selectedIndex].title; 9 | 10 | TextMate.system("defaults write com.macromates.textmate.webpreview SelectedTheme '" + theme + "'", null); 11 | 12 | document.getElementById('tm_webpreview_body').className = theme; 13 | document.getElementById('tm_webpreview_content').className = theme; 14 | 15 | var replacements = {teaser: "teaser", gradient: "header"}; 16 | for(var r in replacements) { 17 | var element = document.getElementById(r); 18 | element.src = 'file://' + title + theme + '/images/' + replacements[r] + ".png"; 19 | } 20 | } 21 | 22 | function hide_header() { 23 | document.getElementById('tm_webpreview_header').style.display = 'none'; 24 | document.getElementById('tm_webpreview_content').setAttribute('style', 'margin-top: 1em'); 25 | // var header = document.getElementById('tm_webpreview_header'); 26 | // var parent = header.parentNode; 27 | // parent.removeChild(header); 28 | } 29 | -------------------------------------------------------------------------------- /par/reformat.h: -------------------------------------------------------------------------------- 1 | /***********************/ 2 | /* reformat.h */ 3 | /* for Par 1.52-i18n.3 */ 4 | /* Copyright 2001 by */ 5 | /* Adam M. Costello */ 6 | /* Modified by */ 7 | /* Jérôme Pouiller */ 8 | /***********************/ 9 | 10 | /* This is ANSI C code (C89). */ 11 | 12 | 13 | #include "errmsg.h" 14 | #include 15 | 16 | wchar_t **reformat( 17 | const wchar_t * const *inlines, const wchar_t * const *endline, int afp, int fs, 18 | int hang, int prefix, int suffix, int width, int cap, int fit, int guess, 19 | int just, int last, int Report, int touch, errmsg_t errmsg 20 | ); 21 | /* inlines is an array of pointers to input lines, up to but not */ 22 | /* including endline. inlines and endline must not be equal. */ 23 | /* The other parameters are the variables of the same name as */ 24 | /* described in "par.doc". reformat(inlines, endline, afp, fs, */ 25 | /* hang, prefix, suffix, width, cap, fit, guess, just, last, */ 26 | /* Report, touch, errmsg) returns a NULL-terminated array of */ 27 | /* pointers to output lines containing the reformatted paragraph, */ 28 | /* according to the specification in "par.doc". None of the */ 29 | /* integer parameters may be negative. Returns NULL on failure. */ 30 | -------------------------------------------------------------------------------- /par/errmsg.h: -------------------------------------------------------------------------------- 1 | /***********************/ 2 | /* errmsg.h */ 3 | /* for Par 1.52-i18n.3 */ 4 | /* Copyright 2001 by */ 5 | /* Adam M. Costello */ 6 | /* Modified by */ 7 | /* Jérôme Pouiller */ 8 | /***********************/ 9 | 10 | /* This is ANSI C code (C89). */ 11 | 12 | 13 | #ifndef ERRMSG_H 14 | #define ERRMSG_H 15 | 16 | #include 17 | #define errmsg_size 163 18 | 19 | /* This is the maximum number of characters that will */ 20 | /* fit in an errmsg_t, including the terminating '\0'. */ 21 | /* It will never decrease, but may increase in future */ 22 | /* versions of this header file. */ 23 | 24 | 25 | typedef wchar_t errmsg_t[errmsg_size]; 26 | 27 | /* Any function which takes the argument errmsg_t errmsg must, before */ 28 | /* returning, either set errmsg[0] to '\0' (indicating success), or */ 29 | /* write an error message string into errmsg, (indicating failure), */ 30 | /* being careful not to overrun the space. */ 31 | 32 | 33 | extern const wchar_t * const outofmem; 34 | /* "Out of memory.\n" */ 35 | 36 | extern const wchar_t * const mbserror; 37 | /* "Error in input multibyte string.\n" */ 38 | 39 | extern const wchar_t * const impossibility; 40 | /* "Impossibility #%d has occurred. Please report it.\n" */ 41 | 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /help/help-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleIdentifier 8 | se.bzero.Vico.help 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundleName 12 | VicoHelp 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1 17 | CFBundleSignature 18 | hbwr 19 | CFBundleVersion 20 | 1 21 | HPDBookAccessPath 22 | VicoHelp.html 23 | HPDBookIconPath 24 | shared/icon_hand.png 25 | HPDBookIndexPath 26 | Vico.helpindex 27 | HPDBookKBProduct 28 | vico 29 | HPDBookKBURL 30 | http://help.vicoapp.com/kbsearch?q='query' 31 | HPDBookTopicListCSSPath 32 | ../shared/help.css 33 | HPDBookTitle 34 | Vico Help 35 | HPDBookType 36 | 3 37 | 38 | 39 | -------------------------------------------------------------------------------- /Support/lib/escape.rb: -------------------------------------------------------------------------------- 1 | # escape text to make it useable in a shell script as one “word” (string) 2 | def e_sh(str) 3 | str.to_s.gsub(/(?=[^a-zA-Z0-9_.\/\-\x7F-\xFF\n])/n, '\\').gsub(/\n/, "'\n'").sub(/^$/, "''") 4 | end 5 | 6 | # escape text for use in a TextMate snippet 7 | def e_sn(str) 8 | str.to_s.gsub(/(?=[$`\\])/, '\\') 9 | end 10 | 11 | # escape text for use in a TextMate snippet placeholder 12 | def e_snp(str) 13 | str.to_s.gsub(/(?=[$`\\}])/, '\\') 14 | end 15 | 16 | # escape text for use in an AppleScript string 17 | def e_as(str) 18 | str.to_s.gsub(/(?=["\\])/, '\\') 19 | end 20 | 21 | # URL escape a string but preserve slashes (idea being we have a file system path that we want to use with file://) 22 | def e_url(str) 23 | str.gsub(/([^a-zA-Z0-9\/_.-]+)/n) do 24 | '%' + $1.unpack('H2' * $1.size).join('%').upcase 25 | end 26 | end 27 | 28 | # Make string suitable for display as HTML, preserve spaces. Set :no_newline_after_br => true 29 | # to cause “\n” to be substituted by “
” instead of “
\n” 30 | def htmlize(str, opts = {}) 31 | str = str.to_s.gsub("&", "&").gsub("<", "<") 32 | str = str.gsub(/\t+/, '\0') 33 | str = str.reverse.gsub(/ (?= |$)/, ';psbn&').reverse 34 | if opts[:no_newline_after_br].nil? 35 | str.gsub("\n", "
\n") 36 | else 37 | str.gsub("\n", "
") 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /Support/bin/CommitWindow.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 11B26 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | CommitWindow 11 | CFBundleIdentifier 12 | com.cjack.tmbundles.commit-window 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | APPL 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | DTCompiler 22 | 23 | DTPlatformBuild 24 | 4B110 25 | DTPlatformVersion 26 | GM 27 | DTSDKBuild 28 | 11A511a 29 | DTSDKName 30 | macosx10.7 31 | DTXcode 32 | 0410 33 | DTXcodeBuild 34 | 4B110 35 | LSUIElement 36 | 1 37 | NSMainNibFile 38 | MainMenu 39 | NSPrincipalClass 40 | NSApplication 41 | 42 | 43 | -------------------------------------------------------------------------------- /Support/themes/dark/style.css: -------------------------------------------------------------------------------- 1 | /* =================== */ 2 | /* = General Styling = */ 3 | /* =================== */ 4 | .dark { 5 | background: #000; 6 | color: #E6E2E8; 7 | } 8 | .dark a { 9 | color: #BBE; 10 | } 11 | 12 | .dark h1 { 13 | color: #FFF; 14 | text-shadow: #808080 3px 3px 5px; 15 | } 16 | 17 | .dark h2 { 18 | text-shadow: #808080 3px 3px 5px; 19 | } 20 | 21 | .dark h3 { 22 | text-shadow: #808080 3px 3px 5px; 23 | } 24 | 25 | .dark blockquote { 26 | border-left: 4px solid #808080; 27 | color: #FFF; 28 | } 29 | 30 | .dark code { 31 | color: #C1DE77; 32 | } 33 | 34 | .dark pre { 35 | color: #FFF; 36 | background-color: #111; 37 | border: 1px solid #555; 38 | } 39 | 40 | 41 | .dark .pro_table { 42 | border-top: 1px solid #616465; 43 | border-left: 1px solid #616465; 44 | } 45 | .dark .pro_table th { 46 | background: #1C1C1C; 47 | border-bottom: 1px solid #616465; 48 | border-right: 1px solid #616465; 49 | } 50 | .dark .pro_table td { 51 | border-bottom: 1px solid #616465; 52 | border-right: 1px solid #616465; 53 | } 54 | .dark .footnote:before { 55 | color: #888; 56 | } 57 | .dark .footnote:after { 58 | color: #888; 59 | } 60 | 61 | .dark div.footnotes { 62 | background: #111; 63 | } 64 | 65 | 66 | .dark td, .dark th { 67 | color: #EEE; 68 | } 69 | 70 | .dark caption, .dark label { 71 | color: #CCC; 72 | } 73 | 74 | .dark .alternate { 75 | background-color: #111; 76 | } -------------------------------------------------------------------------------- /CommitWindow/NSTask+CXAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSTask+CXAdditions.h 3 | // 4 | // Created by Chris Thomas on 2006-10-20. 5 | // Copyright 2006 Chris Thomas. All rights reserved. 6 | // 7 | 8 | 9 | @interface NSTask (CXAdditions) 10 | 11 | // For the three methods below: 12 | // Argument index 0 is an absolute path to the executable. 13 | // Each file/data/string output is allocated and returned to the caller unless the caller passes NULL. 14 | // input may be NULL, an NSString object, or an NSData object. 15 | 16 | // Return a task (not yet launched) and optionally allocate stdout/stdin/stderr streams for communication with it 17 | + (NSTask *) taskWithArguments:(NSArray *)arguments 18 | input:(NSFileHandle **)outWriteHandle 19 | output:(NSFileHandle **)outReadHandle 20 | error:(NSFileHandle **)outErrorHandle; 21 | 22 | // Atomically execute the task and return output as data 23 | + (int) executeTaskWithArguments:(NSArray *)args 24 | input:(id)inputDataOrString 25 | outputData:(NSData **)outputData 26 | errorString:(NSString **)errorString; 27 | 28 | // Atomically execute the task and return output as string 29 | + (int) executeTaskWithArguments:(NSArray *)args 30 | input:(id)inputDataOrString 31 | outputString:(NSString **)outputString 32 | errorString:(NSString **)errorString; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /Support/themes/shiny/style.css: -------------------------------------------------------------------------------- 1 | /* =================== */ 2 | /* = General Styling = */ 3 | /* =================== */ 4 | .shiny { 5 | background: #000; 6 | color: #E6E2E8; 7 | } 8 | .shiny a { 9 | color: #BBE; 10 | } 11 | 12 | .shiny h1 { 13 | color: #FFF; 14 | text-shadow: #808080 3px 3px 5px; 15 | } 16 | 17 | .shiny h2 { 18 | text-shadow: #808080 3px 3px 5px; 19 | } 20 | 21 | .shiny h3 { 22 | text-shadow: #808080 3px 3px 5px; 23 | } 24 | 25 | .shiny blockquote { 26 | border-left: 4px solid #808080; 27 | color: #FFF; 28 | } 29 | 30 | .shiny code { 31 | color: #C1DE77; 32 | } 33 | 34 | .shiny pre { 35 | color: #FFF; 36 | background-color: #111; 37 | border: 1px solid #555; 38 | } 39 | 40 | 41 | .shiny .pro_table { 42 | border-top: 1px solid #616465; 43 | border-left: 1px solid #616465; 44 | } 45 | .shiny .pro_table th { 46 | background: #1C1C1C; 47 | border-bottom: 1px solid #616465; 48 | border-right: 1px solid #616465; 49 | } 50 | .shiny .pro_table td { 51 | border-bottom: 1px solid #616465; 52 | border-right: 1px solid #616465; 53 | } 54 | .shiny .footnote:before { 55 | color: #888; 56 | } 57 | .shiny .footnote:after { 58 | color: #888; 59 | } 60 | 61 | .shiny div.footnotes { 62 | background: #111; 63 | } 64 | 65 | 66 | .shiny td, .dark th { 67 | color: #EEE; 68 | } 69 | 70 | .shiny caption, .dark label { 71 | color: #CCC; 72 | } 73 | 74 | .shiny .alternate { 75 | background-color: #111; 76 | } -------------------------------------------------------------------------------- /app/SFBCrashReporterWindowController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Stephen F. Booth 3 | * All Rights Reserved 4 | */ 5 | 6 | #import 7 | 8 | // ======================================== 9 | // The main class for SFBCrashReporter 10 | // ======================================== 11 | @interface SFBCrashReporterWindowController : NSWindowController 12 | { 13 | IBOutlet NSTextView *_commentsTextView; 14 | IBOutlet NSButton *_reportButton; 15 | IBOutlet NSButton *_ignoreButton; 16 | IBOutlet NSButton *_discardButton; 17 | IBOutlet NSProgressIndicator *_progressIndicator; 18 | 19 | @private 20 | NSString *_emailAddress; 21 | NSString *_crashLogPath; 22 | NSURL *_submissionURL; 23 | 24 | NSURLConnection *_urlConnection; 25 | NSMutableData *_responseData; 26 | } 27 | 28 | // ======================================== 29 | // Properties 30 | @property (copy) NSString * emailAddress; 31 | @property (copy) NSString * crashLogPath; 32 | @property (copy) NSURL * submissionURL; 33 | 34 | // ======================================== 35 | // Always use this to show the window- do not alloc/init directly 36 | + (void) showWindowForCrashLogPath:(NSString *)path submissionURL:(NSURL *)submissionURL; 37 | 38 | // ======================================== 39 | // Action methods 40 | - (IBAction) sendReport:(id)sender; 41 | - (IBAction) ignoreReport:(id)sender; 42 | - (IBAction) discardReport:(id)sender; 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /Support/themes/bright/style.css: -------------------------------------------------------------------------------- 1 | /* ================================= */ 2 | /* = Common Stuff for all Commands = */ 3 | /* ================================= */ 4 | 5 | .bright { 6 | background: #FFF; 7 | color: #000; 8 | } 9 | .bright a { 10 | color: #0D2681; 11 | } 12 | 13 | .bright h1 { 14 | text-shadow: #DDDDDD 3px 3px 5px; 15 | color: #333; 16 | } 17 | .bright h2 { 18 | color: #222; 19 | text-shadow: #DDDDDD 3px 3px 5px; 20 | } 21 | .bright h3 { 22 | color: #333; 23 | text-shadow: #DDDDDD 3px 3px 5px; 24 | } 25 | .bright h4 { 26 | color: #666; 27 | } 28 | 29 | .bright blockquote { 30 | border-left: 4px solid #E6E5DD; 31 | } 32 | .bright code { 33 | color: #1C360C; 34 | } 35 | 36 | .bright pre { 37 | background-color: #f0f0f0; 38 | border: 1px solid #cccbba; 39 | } 40 | 41 | .bright .pro_table { 42 | border-top: 1px solid #919699; 43 | border-left: 1px solid #919699; 44 | } 45 | .bright .pro_table th { 46 | background: #E2E2E2; 47 | border-bottom: 1px solid #919699; 48 | border-right: 1px solid #919699; 49 | } 50 | .bright .pro_table td { 51 | border-bottom: 1px solid #919699; 52 | border-right: 1px solid #919699; 53 | } 54 | .bright .footnote { 55 | color: #525151; 56 | } 57 | .bright .footnote:before { 58 | color: #525151; 59 | } 60 | .bright .footnote:after { 61 | color: #525151; 62 | } 63 | .bright div.footnotes { 64 | background: #F0F0F0; 65 | } 66 | 67 | .bright .alternate { 68 | background-color: #F0F0F0; 69 | } -------------------------------------------------------------------------------- /Support/lib/tm/detach.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb' 4 | 5 | module TextMate 6 | class << self 7 | def detach(&block) 8 | pid = fork do 9 | STDOUT.reopen(open('/dev/null', 'w')) 10 | STDERR.reopen(open('/dev/null', 'w')) 11 | 12 | begin 13 | block.call 14 | rescue SystemExit => e 15 | # not sure why this is an exception!?! 16 | rescue Exception => e 17 | TextMate::UI.alert(:warning, "Error Running Command", "The script failed with the following exception:\n\n#{pretty_print_exception e}", "OK") 18 | end 19 | end 20 | Process.detach(pid) 21 | end 22 | 23 | def pretty_print_exception(e) 24 | str = "#{e.class.name}: #{e.message.sub(/`(\w+)'/, '‘\1’').sub(/ -- /, ' — ')}\n\n" 25 | 26 | e.backtrace.each do |b| 27 | if b =~ /(.*?):(\d+)(?::in\s*`(.*?)')?/ then 28 | file, line, method = $1, $2, $3 29 | display_name = File.basename(file) 30 | str << "At line #{line} in ‘#{display_name}’ " 31 | str << (method ? "(inside method ‘#{method}’)" : "(top level)") 32 | str << "\n" 33 | end 34 | end 35 | 36 | str 37 | end 38 | end 39 | end 40 | 41 | if __FILE__ == $0 42 | TextMate::detach { 43 | sleep 1 44 | gafung 45 | } 46 | 47 | TextMate::detach { 48 | sleep 5 49 | File.open('/tmp/this/is/not/here') 50 | } 51 | end 52 | -------------------------------------------------------------------------------- /app/ViWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViWindow : NSWindow 27 | { 28 | } 29 | @end 30 | 31 | -------------------------------------------------------------------------------- /Support/themes/night/style.css: -------------------------------------------------------------------------------- 1 | /* ================================= */ 2 | /* = Common Stuff for all Commands = */ 3 | /* ================================= */ 4 | 5 | .night { 6 | background-color:black; 7 | color:#ccc; 8 | } 9 | .night a { 10 | color: rgb(192,135,30); 11 | text-decoration: none; 12 | } 13 | 14 | .night a:hover { 15 | text-decoration: underline; 16 | } 17 | 18 | .night h1 { 19 | color: #fff; 20 | text-shadow: #0c122c 3px 3px 5px; 21 | } 22 | 23 | .night h2 { 24 | text-shadow: #0c122c 3px 3px 5px; 25 | } 26 | 27 | .night h3 { 28 | text-shadow: #0c122c 3px 3px 5px; 29 | } 30 | 31 | .night blockquote { 32 | border-left: 4px solid #E6E5DD; 33 | } 34 | .night code { 35 | color: #C1DE77; 36 | } 37 | 38 | .night pre { 39 | background-color: #111; 40 | } 41 | 42 | .night .pro_table { 43 | border-top: 1px solid #616465; 44 | border-left: 1px solid #616465; 45 | } 46 | .night .pro_table th { 47 | background: #1C1C1C; 48 | border-bottom: 1px solid #616465; 49 | border-right: 1px solid #616465; 50 | } 51 | .night .pro_table td { 52 | border-bottom: 1px solid #616465; 53 | border-right: 1px solid #616465; 54 | } 55 | .night .footnote:before { 56 | color: #888; 57 | } 58 | .night .footnote:after { 59 | color: #888; 60 | } 61 | 62 | .night div.footnotes { 63 | background: #111; 64 | } 65 | 66 | 67 | .night td, .dark th { 68 | color: #EEE; 69 | } 70 | 71 | .night caption, .dark label { 72 | color: #CCC; 73 | } 74 | 75 | .night .alternate { 76 | background-color: #111; 77 | }% -------------------------------------------------------------------------------- /app/ViPathCell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViPathCell : NSPathCell 27 | { 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /app/ViPathControl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViPathControl : NSPathControl 27 | { 28 | } 29 | @end 30 | -------------------------------------------------------------------------------- /app/ViCompletionWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViCompletionWindow : NSWindow 27 | { 28 | } 29 | @end 30 | -------------------------------------------------------------------------------- /Support/lib/webpreview.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Version 3 (2006-08-14) - by Soryu 4 | # 5 | # This file contains support functions for generating HTML, to be used with TextMate's HTML output window. Please don't put functions in here without coordinating the core Bundle developers on IRC. 6 | # 7 | # Further Notes: 8 | # This is in flux right (see http://macromates.com/wiki/Suggestions/StylingHTMLOutput) now as I'm updating the Web Preview (HTML output). `html.sh` is the old version. To make for a smooth transition I threw out all the old (now partly incompatible and as I see it hardly used) functions and kind of started from scratch. 9 | 10 | # Generate HTML header up to and including the body tag. Also includes the default stylesheet and javascript. 11 | # USAGE: html_header [page title] [page info, like Bundle Name, shown at the top right] 12 | html_header() { 13 | case ${#@} in 14 | 1) export WINDOW_TITLE="$1"; export PAGE_TITLE="$1"; ;; 15 | 2) export WINDOW_TITLE="$1"; export PAGE_TITLE="$1"; export SUB_TITLE="$2";; 16 | 3) export WINDOW_TITLE="$1"; export PAGE_TITLE="$2"; export SUB_TITLE="$3";; 17 | esac 18 | 19 | "${TM_RUBY:-ruby}" -r"$TM_SUPPORT_PATH/lib/web_preview.rb" <<-'RUBY' 20 | puts html_head( 21 | :window_title => ENV['WINDOW_TITLE'], 22 | :page_title => ENV['PAGE_TITLE'], 23 | :sub_title => ENV['SUB_TITLE'] 24 | ) 25 | RUBY 26 | } 27 | 28 | # Generate HTML footer. 29 | # USAGE: html_footer 30 | html_footer() { 31 | echo $' \n\n' 32 | } 33 | 34 | -------------------------------------------------------------------------------- /app/ViSeparatorCell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViSeparatorCell : NSCell 27 | { 28 | } 29 | 30 | @end 31 | 32 | -------------------------------------------------------------------------------- /app/ViPathComponentCell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViPathComponentCell : NSPathComponentCell 27 | { 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /oniguruma/COPYING: -------------------------------------------------------------------------------- 1 | Oniguruma LICENSE 2 | ----------------- 3 | 4 | /*- 5 | * Copyright (c) 2002-2007 K.Kosako 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 | * SUCH DAMAGE. 28 | */ 29 | -------------------------------------------------------------------------------- /tests/TestKeyCodes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | 28 | @interface TestKeyCodes : SenTestCase 29 | { 30 | } 31 | @end 32 | -------------------------------------------------------------------------------- /tests/TestViMap.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | 28 | @interface TestViMap : SenTestCase 29 | { 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /app/ViToolbarPopUpButtonCell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViToolbarPopUpButtonCell : NSPopUpButtonCell 27 | { 28 | NSImage *_image; 29 | } 30 | @end 31 | 32 | -------------------------------------------------------------------------------- /app/ViSFTPURLHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViURLManager.h" 27 | 28 | @interface ViSFTPURLHandler : NSObject 29 | { 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Support/themes/default/print.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "Palatino", "Book Antiqua", "Baskerville", serif; 3 | font-size: 10pt; 4 | margin: 2em 2em 2em 4.5em; 5 | } 6 | #tm_webpreview_header { 7 | display: none; 8 | } 9 | 10 | #tm_webpreview_footer { 11 | display: none; 12 | } 13 | 14 | 15 | a:link, a:visited { 16 | color: #520; 17 | background: transparent; 18 | font-weight: bold; 19 | text-decoration: none; 20 | } 21 | h1 { 22 | color: #333; 23 | } 24 | h2 { 25 | color: #222; 26 | } 27 | 28 | h3 { 29 | color: #333; 30 | } 31 | 32 | h4 { 33 | font-style: italic; 34 | color: #666; 35 | } 36 | 37 | blockquote { 38 | margin: 1em 25px; 39 | padding-left: 1em; 40 | } 41 | 42 | code, pre { 43 | color: #1C360C; 44 | } 45 | 46 | 47 | pre { 48 | padding: 10px 10px 10px 20px; 49 | background-color: #f0f0f0; 50 | border: 1px solid #cccbba; 51 | } 52 | 53 | .pro_table { 54 | border-top: 1px solid #919699; 55 | border-left: 1px solid #919699; 56 | } 57 | .pro_table th { 58 | background: #E2E2E2; 59 | border-bottom: 1px solid #919699; 60 | border-right: 1px solid #919699; 61 | font-weight: bold; 62 | padding: 4px 8px 4px 8px; 63 | text-align: left; 64 | } 65 | .pro_table td { 66 | border-bottom: 1px solid #919699; 67 | border-right: 1px solid #919699; 68 | padding: 8px; 69 | vertical-align: top; 70 | } 71 | 72 | .footnote { 73 | color: #525151; 74 | } 75 | .footnote:before { 76 | color: #525151; 77 | } 78 | .footnote:after { 79 | color: #525151; 80 | } 81 | div.footnotes { 82 | padding: 1em; 83 | font-size: 90%; 84 | background: #F0F0F0; 85 | } 86 | -------------------------------------------------------------------------------- /app/NSMenu-additions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface NSMenu (additions) 27 | 28 | - (void)updateNormalModeMenuItemsWithSelection:(BOOL)hasSelection; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /app/NSWindow-additions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface NSWindow (additions) 27 | 28 | - (BOOL)isFullScreen; 29 | - (id)firstResponderOrDelegate; 30 | 31 | @end 32 | 33 | -------------------------------------------------------------------------------- /app/ViFileCompletion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCompletionController.h" 27 | 28 | @interface ViFileCompletion : NSObject 29 | { 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /app/ViSyntaxCompletion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCompletionController.h" 27 | 28 | @interface ViSyntaxCompletion : NSObject 29 | { 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /app/ExCommandCompletion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCompletionController.h" 27 | 28 | @interface ExCommandCompletion : NSObject 29 | { 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /app/TMFileURLProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface TMFileURLProtocol : NSURLProtocol 27 | { 28 | id _client; 29 | } 30 | + (void)registerProtocol; 31 | @end 32 | 33 | -------------------------------------------------------------------------------- /app/ViBgView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViBgView : NSView 27 | { 28 | NSColor *_backgroundColor; 29 | } 30 | @property (nonatomic,readwrite,retain) NSColor *backgroundColor; 31 | @end 32 | -------------------------------------------------------------------------------- /app/ViFileURLHandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViURLManager.h" 27 | 28 | @interface ViFileURLHandler : NSObject 29 | { 30 | NSFileManager *_fm; 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Support/lib/ruby1.9/add_1.8_features.rb: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | 3 | # This file adds features that were present in Ruby 1.8 but that have been 4 | # removed in 1.9. It should only be used on externally run programs. 5 | 6 | # vendor/rcodetools/lib/rcodetools/xmpfilter.rb assumes String 7 | # is enumerable, and that it has grep and friends 8 | 9 | if RUBY_VERSION >= "1.9" 10 | class String 11 | def grep(*args) 12 | each_line.grep(*args) 13 | end 14 | 15 | def reject(&block) 16 | each_line.reject(&block) 17 | end 18 | 19 | def map(&block) 20 | each_line.map(&block) 21 | end 22 | 23 | def inject(*args, &block) 24 | each_line.inject(*args, &block) 25 | end 26 | end 27 | end 28 | 29 | if $0 == __FILE__ 30 | require 'test/unit' 31 | 32 | class TestStringExtensions < Test::Unit::TestCase 33 | 34 | def test_basic_grep 35 | str = "a\nb\nc\nd" 36 | assert_equal(["c\n"], str.grep(/c/)) 37 | assert_equal([], str.grep(/x/)) 38 | end 39 | def test_multi_grep 40 | assert_equal(["cat\n", "car"], "dog\ncat\nfred\ncar".grep(/a/)) 41 | end 42 | 43 | def test_basic_reject 44 | str = "a\nb\nc\nd" 45 | assert_equal(["a\n", "b\n", "d"], str.reject {|l| l =~ /c/}) 46 | assert_equal(["a\n", "b\n", "c\n", "d"], str.reject {|l| l =~ /x/}) 47 | end 48 | def test_multi_reject 49 | str = "a\nb\nc\nd" 50 | assert_equal(["a\n", "d"], str.reject {|l| l =~ /[bc]/}) 51 | end 52 | 53 | def test_map 54 | str = "a\nb\nc" 55 | assert_equal(["A\n", "B\n", "C"], str.map {|l| l.upcase }) 56 | end 57 | end 58 | end -------------------------------------------------------------------------------- /app/ViCompletionWindow.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCompletionWindow.h" 27 | 28 | @implementation ViCompletionWindow 29 | 30 | - (BOOL)canBecomeKeyWindow 31 | { 32 | return YES; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /tests/TestExCommand.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ExParser.h" 27 | #import 28 | 29 | @interface TestExCommand : SenTestCase 30 | { 31 | ExCommand *ex; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /app/ViWordCompletion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCompletionController.h" 27 | #import "ViTextStorage.h" 28 | 29 | @interface ViWordCompletion : NSObject 30 | { 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /app/ViBufferCompletion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCompletionController.h" 27 | #import "ViWindowController.h" 28 | 29 | @interface ViBufferCompletion : NSObject 30 | { 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Support/bin/Markdown-license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004, John Gruber 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are 7 | met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, 10 | this list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | * Neither the name "Markdown" nor the names of its contributors may 17 | be used to endorse or promote products derived from this software 18 | without specific prior written permission. 19 | 20 | This software is provided by the copyright holders and contributors "as 21 | is" and any express or implied warranties, including, but not limited 22 | to, the implied warranties of merchantability and fitness for a 23 | particular purpose are disclaimed. In no event shall the copyright owner 24 | or contributors be liable for any direct, indirect, incidental, special, 25 | exemplary, or consequential damages (including, but not limited to, 26 | procurement of substitute goods or services; loss of use, data, or 27 | profits; or business interruption) however caused and on any theory of 28 | liability, whether in contract, strict liability, or tort (including 29 | negligence or otherwise) arising in any way out of the use of this 30 | software, even if advised of the possibility of such damage. 31 | -------------------------------------------------------------------------------- /app/NSOutlineView-vimotions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCommand.h" 27 | 28 | @interface NSOutlineView (vimotions) 29 | 30 | - (BOOL)move_right:(ViCommand *)command; 31 | - (BOOL)move_left:(ViCommand *)command; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /tests/TestViTextView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | #import "ViTextView.h" 28 | 29 | @interface TestViTextView : SenTestCase 30 | { 31 | ViTextView *vi; 32 | ViParser *parser; 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /app/NSEvent-keyAdditions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | /** Convenience NSEvent functions. */ 27 | @interface NSEvent (keyAdditions) 28 | 29 | /** 30 | * @return The normalized key code from a key event. 31 | */ 32 | - (NSInteger)normalizedKeyCode; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /app/ViCharsetDetector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | 28 | @interface ViCharsetDetector : NSObject 29 | { 30 | } 31 | + (ViCharsetDetector *)defaultDetector; 32 | - (NSStringEncoding)encodingForData:(NSData *)data; 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /tests/TestViParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | #import "ViParser.h" 28 | 29 | @interface TestViParser : SenTestCase 30 | { 31 | ViParser *parser; 32 | ViCommand *command; 33 | NSError *error; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /app/TxmtURLProtocol.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface TxmtURLProtocol : NSURLProtocol 27 | { 28 | id _client; 29 | } 30 | + (void)registerProtocol; 31 | + (NSURL *)parseURL:(NSURL *)url intoLineNumber:(NSNumber **)outLineNumber; 32 | @end 33 | 34 | -------------------------------------------------------------------------------- /app/ViCompletionView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViKeyManager.h" 27 | 28 | @interface ViCompletionView : NSTableView 29 | { 30 | ViKeyManager *_keyManager; 31 | } 32 | 33 | @property (nonatomic, readwrite, retain) ViKeyManager *keyManager; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /CommitWindow/CXShading.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright 2003,2005-2006 Chris Thomas. All rights reserved. 3 | // 4 | // Permission to use, copy, modify, and distribute this software for any 5 | // purpose with or without fee is hereby granted, provided that the above 6 | // copyright notice and this permission notice appear in all copies. 7 | // 8 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 | // 16 | 17 | // Chris's eXperimental Objective-C interface to CGShading. 18 | 19 | #include 20 | 21 | // delegate for shading function - (void) shade:(float)alpha toColor:(float *)outColor 22 | typedef struct 23 | { 24 | id target; 25 | SEL selector; 26 | } _CXShadingDelegateMethod; 27 | 28 | @interface CXShading : NSObject 29 | { 30 | CGShadingRef fShading; 31 | CGColorSpaceRef fColorSpace; 32 | CGFunctionRef fFunction; 33 | _CXShadingDelegateMethod fMethod; 34 | 35 | struct 36 | { 37 | CGFloat from[4]; 38 | CGFloat to[4]; 39 | } fColors; 40 | } 41 | 42 | - (id)initWithStartingColor:(NSColor *)startColor endingColor:(NSColor *)endColor; 43 | 44 | - (void)drawFromPoint:(NSPoint)fromPoint toPoint:(NSPoint)toPoint; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /app/NSString-scopeSelector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViScope.h" 27 | 28 | #define DEPTH_RANK 1000000000000000000ULL /* 10^18 */ 29 | 30 | @interface NSString (scopeSelector) 31 | - (u_int64_t)matchesScopes:(NSArray *)scopes; 32 | - (u_int64_t)match:(ViScope *)scope; 33 | @end 34 | -------------------------------------------------------------------------------- /tests/TestScopeSelectors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | 28 | @interface TestScopeSelectors : SenTestCase 29 | { 30 | NSArray *scopeCString; 31 | NSArray *scopeObjC; 32 | NSArray *scopeObjCString; 33 | NSArray *scopeObjCpp; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /tests/TestViSnippet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | #import "ViSnippet.h" 28 | 29 | @interface TestViSnippet : SenTestCase 30 | { 31 | NSDictionary *env; 32 | NSError *err; 33 | id delegate; 34 | ViSnippet *snippet; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /app/ViWebView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | 28 | #import "ViKeyManager.h" 29 | 30 | @interface ViWebView : WebView 31 | { 32 | ViKeyManager *_keyManager; 33 | } 34 | 35 | @property (nonatomic,readwrite,retain) ViKeyManager *keyManager; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /app/ViPreferencePaneGeneral.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViPreferencePane.h" 27 | 28 | @interface undoStyleTagTransformer : NSValueTransformer 29 | { 30 | } 31 | @end 32 | 33 | @interface ViPreferencePaneGeneral : ViPreferencePane 34 | { 35 | IBOutlet NSPopUpButton *defaultSyntaxButton; 36 | } 37 | 38 | @end 39 | 40 | -------------------------------------------------------------------------------- /app/NSURL-additions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface NSURL (equality) 27 | - (BOOL)isEqualToURL:(NSURL *)otherURL; 28 | - (BOOL)hasPrefix:(NSURL *)prefixURL; 29 | - (NSURL *)URLWithRelativeString:(NSString *)string; 30 | - (NSString *)displayString; 31 | - (NSURL *)URLByResolvingSymlinksAndAliases:(BOOL *)isAliasPtr; 32 | @end 33 | -------------------------------------------------------------------------------- /app/ViPreferencePaneTheme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViPreferencePane.h" 27 | 28 | @interface ViPreferencePaneTheme : ViPreferencePane 29 | { 30 | IBOutlet NSPopUpButton *themeButton; 31 | IBOutlet NSTextField *currentFont; 32 | } 33 | 34 | - (IBAction)selectFont:(id)sender; 35 | - (void)setSelectedFont; 36 | 37 | @end 38 | 39 | -------------------------------------------------------------------------------- /app/ViSymbolTransform.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViTransformer.h" 27 | 28 | @interface ViSymbolTransform : ViTransformer 29 | { 30 | NSMutableArray *_transformations; 31 | } 32 | 33 | - (ViSymbolTransform *)initWithTransformationString:(NSString *)aString; 34 | - (NSString *)transformSymbol:(NSString *)aSymbol; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /app/NSArray-patterns.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViScope.h" 27 | 28 | @interface NSArray (patterns) 29 | 30 | - (BOOL)isEqualToPatternArray:(NSArray *)otherArray; 31 | - (BOOL)isEqualToStringArray:(NSArray *)otherArray; 32 | - (BOOL)hasPrefix:(NSArray *)otherArray; 33 | - (BOOL)hasSuffix:(NSArray *)otherArray; 34 | 35 | @end 36 | 37 | -------------------------------------------------------------------------------- /app/NSTask-streaming.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViBufferedStream.h" 27 | 28 | @interface NSTask (streaming) 29 | 30 | - (ViBufferedStream *)scheduledStreamWithStandardInput:(NSData *)stdinData captureStandardError:(BOOL)captureStderr; 31 | - (ViBufferedStream *)scheduledStreamWithStandardInput:(NSData *)stdinData; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /app/ViBundleSnippet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViBundleItem.h" 27 | 28 | @interface ViBundleSnippet : ViBundleItem 29 | { 30 | NSString *_content; 31 | } 32 | 33 | @property(nonatomic,readonly) NSString *content; 34 | 35 | - (ViBundleSnippet *)initFromDictionary:(NSDictionary *)dict inBundle:(ViBundle *)aBundle; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /app/ExTextField.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCommand.h" 27 | 28 | @interface ExTextField : NSTextField 29 | { 30 | NSMutableArray *_history; 31 | int _historyIndex; 32 | NSString *_current; 33 | BOOL _running; 34 | } 35 | 36 | - (BOOL)ex_cancel:(ViCommand *)command; 37 | - (BOOL)ex_execute:(ViCommand *)command; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /app/ViProject.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViWindowController.h" 27 | 28 | @interface ViProject : NSDocument 29 | { 30 | ViWindowController *_windowController; 31 | NSURL *_initialURL; 32 | } 33 | 34 | @property(nonatomic,readonly) NSURL *initialURL; 35 | @property(nonatomic,readonly) ViWindowController *windowController; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Support/lib/nu/alert.nu: -------------------------------------------------------------------------------- 1 | ; Alert dialog callable from the shell. 2 | ; 3 | ; Copyright (c) 2011 Martin Hedenfalk 4 | ; 5 | ; Permission to use, copy, modify, and distribute this software for any 6 | ; purpose with or without fee is hereby granted, provided that the above 7 | ; copyright notice and this permission notice appear in all copies. 8 | ; 9 | ; THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | ; WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | ; MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ; ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | ; WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ; ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | ; OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | 17 | (NSApp activateIgnoringOtherApps:YES) 18 | 19 | (unless (defined buttonTitles) 20 | (set buttonTitles (NSArray arrayWithList:'("OK" "Cancel")))) 21 | (unless (defined messageTitle) 22 | (set messageTitle "Something happened")) 23 | (unless (defined informativeText) 24 | (set informativeText "It was unexpected")) 25 | (unless (defined alertStyle) 26 | (set alertStyle "informational")) 27 | 28 | (set alert ((NSAlert alloc) init)) 29 | (buttonTitles each: (do (title) 30 | (alert addButtonWithTitle:title))) 31 | (alert setMessageText:messageTitle) 32 | (alert setInformativeText:informativeText) 33 | (case alertStyle 34 | ("warning" (alert setAlertStyle:NSWarningAlertStyle)) 35 | ("critical" (alert setAlertStyle:NSCriticalAlertStyle)) 36 | (else (alert setAlertStyle:NSInformationalAlertStyle))) 37 | 38 | (shellCommand exitWithObject:(- (alert runModal) 1000)) 39 | 40 | -------------------------------------------------------------------------------- /app/ViCommandOutputController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViViewController.h" 27 | #import "ViTextView.h" 28 | #import "ViWebView.h" 29 | 30 | @interface ViCommandOutputController : ViViewController 31 | { 32 | } 33 | 34 | - (ViCommandOutputController *)initWithHTMLString:(NSString *)content; 35 | - (void)setContent:(NSString *)content; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /tests/TestViTextStorage.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | #import "ViTextStorage.h" 28 | 29 | @interface TestViTextStorage : SenTestCase 30 | { 31 | ViTextStorage *textStorage; 32 | 33 | NSUInteger linesChanged; 34 | NSUInteger linesRemoved; 35 | NSUInteger linesAdded; 36 | NSUInteger lineChangeIndex; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /help/symbols.md: -------------------------------------------------------------------------------- 1 | # The symbol list 2 | 3 | The symbol list shows language-specific symbols extracted from the document. 4 | You can navigate the symbol list by pressing the ⌘Y key. 5 | 6 | To jump to a symbol, select the symbol and press enter, s, 7 | v or o to open it in a tab, a split view, a vertical 8 | split, or replace the current document, respectively. 9 | 10 | Here is a list of all key mappings in the symbol list: 11 | 12 | * h — move up the tree hierarchy, closing documents 13 | * l — move down the tree hierarchy, opening documents 14 | * j — move down 15 | * k — move up 16 | * <ctrl-b> — scroll up one screen 17 | * <ctrl-f> — scroll down one screen 18 | * <ctrl-e> — scroll down one line 19 | * <ctrl-y> — scroll up one line 20 | * G — move to the last line (or a specific line with a count) 21 | * gg — move to the first line (or a specific line with a count) 22 | * H — move to top line ("**H**igh") 23 | * M — move to middle line 24 | * L — move to bottom line ("**L**ow") 25 | * / — search 26 | * <esc> — cancel and go back 27 | * <ctrl-c> — cancel and go back, or reset the search filter 28 | * o — open the selected symbol in the current view 29 | * s — open the selected symbol in a split view 30 | * v — open the selected symbol in a vertical split view 31 | * t — open the selected symbol in a tab 32 | 33 | -------------------------------------------------------------------------------- /app/ViOutlineView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViKeyManager.h" 27 | 28 | @interface ViOutlineView : NSOutlineView 29 | { 30 | ViKeyManager *_keyManager; 31 | BOOL _strictIndentation; 32 | } 33 | 34 | @property (nonatomic, readwrite, retain) ViKeyManager *keyManager; 35 | @property (nonatomic, readwrite) BOOL strictIndentation; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /app/ViThemeStore.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViTheme.h" 27 | 28 | @interface ViThemeStore : NSObject 29 | { 30 | NSMutableDictionary *_themes; 31 | } 32 | 33 | + (ViTheme *)defaultTheme; 34 | + (NSFont *)font; 35 | + (ViThemeStore *)defaultStore; 36 | - (NSArray *)availableThemes; 37 | - (ViTheme *)themeWithName:(NSString *)aName; 38 | - (ViTheme *)defaultTheme; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /CommitWindow/English.lproj/MainMenu.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | {CLASS = CWTextView; LANGUAGE = ObjC; SUPERCLASS = NSTextView; }, 4 | { 5 | CLASS = CXMenuButton; 6 | LANGUAGE = ObjC; 7 | OUTLETS = {menu = NSMenu; }; 8 | SUPERCLASS = NSButton; 9 | }, 10 | { 11 | CLASS = CXTextWithButtonStripCell; 12 | LANGUAGE = ObjC; 13 | SUPERCLASS = NSTextFieldCell; 14 | }, 15 | { 16 | ACTIONS = { 17 | cancel = id; 18 | chooseAllFiles = id; 19 | chooseNoFiles = id; 20 | commit = id; 21 | revertToStandardChosenState = id; 22 | }; 23 | CLASS = CommitWindowController; 24 | LANGUAGE = ObjC; 25 | OUTLETS = { 26 | fCancelButton = NSButton; 27 | fCheckBoxColumn = NSTableColumn; 28 | fCommitMessage = NSTextView; 29 | fFileListActionPopUp = CXMenuButton; 30 | fFilesController = NSArrayController; 31 | fLowerControlsView = NSView; 32 | fOKButton = NSButton; 33 | fPathColumn = NSTableColumn; 34 | fPreviousSummaryPopUp = NSPopUpButton; 35 | fRequestText = NSTextField; 36 | fStatusColumn = NSTableColumn; 37 | fSummaryScrollView = NSScrollView; 38 | fTableView = NSTableView; 39 | fWindow = NSWindow; 40 | }; 41 | SUPERCLASS = NSWindowController; 42 | }, 43 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; } 44 | ); 45 | IBVersion = 1; 46 | } -------------------------------------------------------------------------------- /app/ViTransformer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViRegexp.h" 27 | 28 | @interface ViTransformer : NSObject 29 | { 30 | } 31 | 32 | - (NSString *)transformValue:(NSString *)value 33 | withPattern:(ViRegexp *)rx 34 | format:(NSString *)format 35 | global:(BOOL)global 36 | error:(NSError **)outError; 37 | 38 | @end 39 | 40 | -------------------------------------------------------------------------------- /Support/themes/halloween/style.css: -------------------------------------------------------------------------------- 1 | /* =================== */ 2 | /* = General Styling = */ 3 | /* =================== */ 4 | 5 | .halloween #tm_webpreview_header .headline { 6 | color: #F9BB46; 7 | text-shadow: #E27A14 0px -5px 5px; 8 | } 9 | .halloween #tm_webpreview_header .type { 10 | color: #F78446; 11 | } 12 | 13 | .halloween { 14 | background: #000; 15 | color: #E27A14; 16 | } 17 | 18 | .halloween ::selection { 19 | background-color: rgba(50, 00, 0, 1); 20 | } 21 | 22 | .halloween a { 23 | color: #F9BB46; 24 | } 25 | 26 | .halloween h1 { 27 | color: #F9BB46; 28 | text-shadow: #E27A14 0px -3px 5px; 29 | } 30 | 31 | .halloween h2 { 32 | text-shadow: #E27A14 0px -3px 5px; 33 | } 34 | 35 | .halloween h3 { 36 | text-shadow: #E27A14 0px -2px 5px; 37 | } 38 | 39 | .halloween blockquote { 40 | border-left: 4px solid #F9BB46; 41 | color: #F9BB46; 42 | } 43 | 44 | .halloween code { 45 | color: #F9BB46; 46 | } 47 | 48 | .halloween pre { 49 | color: #FFF; 50 | background-color: #200000; 51 | border: 1px solid #555; 52 | } 53 | 54 | 55 | .halloween .pro_table { 56 | border-top: 1px solid #616465; 57 | border-left: 1px solid #616465; 58 | } 59 | .halloween .pro_table th { 60 | background: #1C1C1C; 61 | border-bottom: 1px solid #616465; 62 | border-right: 1px solid #616465; 63 | } 64 | .halloween .pro_table td { 65 | border-bottom: 1px solid #616465; 66 | border-right: 1px solid #616465; 67 | } 68 | .halloween .footnote:before { 69 | color: #888; 70 | } 71 | .halloween .footnote:after { 72 | color: #888; 73 | } 74 | 75 | .halloween div.footnotes { 76 | background: #111; 77 | } 78 | 79 | 80 | .halloween td, .halloween th { 81 | color: #EEE; 82 | } 83 | 84 | .halloween caption, .halloween label { 85 | color: #CCC; 86 | } 87 | 88 | .halloween .alternate { 89 | background-color: #200000; 90 | } -------------------------------------------------------------------------------- /app/ViPreferencePaneAdvanced.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViPreferencePane.h" 27 | 28 | @interface environmentVariableTransformer : NSValueTransformer 29 | { 30 | } 31 | @end 32 | 33 | @interface ViPreferencePaneAdvanced : ViPreferencePane 34 | { 35 | IBOutlet NSArrayController *arrayController; 36 | IBOutlet NSTableView *tableView; 37 | } 38 | 39 | - (IBAction)addVariable:(id)sender; 40 | 41 | @end 42 | 43 | -------------------------------------------------------------------------------- /CommitWindow/CommitWindowController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommitWindowController.h 3 | // 4 | // Created by Chris Thomas on 2/6/05. 5 | // Copyright 2005 Chris Thomas. All rights reserved. 6 | // MIT license. 7 | // 8 | 9 | #import 10 | 11 | @class CWTextView; 12 | @class CXMenuButton; 13 | 14 | @interface CommitWindowController : NSWindowController 15 | { 16 | // NSMutableArray * fFiles; // {@"commit", @"path"} 17 | IBOutlet NSArrayController * fFilesController; 18 | 19 | IBOutlet NSWindow * fWindow; 20 | 21 | IBOutlet NSTextField * fRequestText; 22 | IBOutlet CWTextView * fCommitMessage; 23 | IBOutlet NSPopUpButton * fPreviousSummaryPopUp; 24 | IBOutlet CXMenuButton * fFileListActionPopUp; 25 | 26 | IBOutlet NSButton * fCancelButton; 27 | IBOutlet NSButton * fOKButton; 28 | 29 | IBOutlet NSTableView * fTableView; 30 | IBOutlet NSTableColumn * fCheckBoxColumn; 31 | IBOutlet NSTableColumn * fStatusColumn; 32 | IBOutlet NSTableColumn * fPathColumn; 33 | 34 | IBOutlet NSScrollView * fSummaryScrollView; 35 | NSRect fPreviousSummaryFrame; 36 | IBOutlet NSView * fLowerControlsView; 37 | 38 | NSString * fDiffCommand; 39 | NSMutableDictionary * fActionCommands; 40 | 41 | NSArray * fFileStatusStrings; 42 | } 43 | 44 | - (void) addAction:(NSString *)name command:(NSArray *)arguments forStatus:(NSString *)statusString; 45 | - (void) setupUserInterface; 46 | - (void) resetStatusColumnSize; 47 | 48 | - (void) saveSummary; 49 | 50 | - (IBAction) chooseAllFiles:(id)sender; 51 | - (IBAction) chooseNoFiles:(id)sender; 52 | - (IBAction) revertToStandardChosenState:(id)sender; 53 | 54 | - (NSString *) absolutePathForPath:(NSString *)path; 55 | - (void) checkExitStatus:(int)exitStatus forCommand:(NSArray *)arguments errorText:(NSString *)errorText; 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /app/PSMTabStyle.h: -------------------------------------------------------------------------------- 1 | // 2 | // PSMTabStyle.h 3 | // PSMTabBarControl 4 | // 5 | // Created by John Pannell on 2/17/06. 6 | // Copyright 2006 Positive Spin Media. All rights reserved. 7 | // 8 | 9 | /* 10 | Protocol to be observed by all style delegate objects. These objects handle the drawing responsibilities for PSMTabBarCell; once the control has been assigned a style, the background and cells draw consistent with that style. Design pattern and implementation by David Smith, Seth Willits, and Chris Forsythe, all touch up and errors by John P. :-) 11 | */ 12 | 13 | #import "PSMTabBarCell.h" 14 | #import "PSMTabBarControl.h" 15 | 16 | @protocol PSMTabStyle 17 | 18 | // identity 19 | - (NSString *)name; 20 | 21 | // control specific parameters 22 | - (float)leftMarginForTabBarControl; 23 | - (float)rightMarginForTabBarControl; 24 | 25 | // add tab button 26 | - (NSImage *)addTabButtonImage; 27 | - (NSImage *)addTabButtonPressedImage; 28 | - (NSImage *)addTabButtonRolloverImage; 29 | 30 | // cell specific parameters 31 | - (NSRect)closeButtonRectForTabCell:(PSMTabBarCell *)cell; 32 | - (NSRect)iconRectForTabCell:(PSMTabBarCell *)cell; 33 | - (NSRect)indicatorRectForTabCell:(PSMTabBarCell *)cell; 34 | - (NSRect)objectCounterRectForTabCell:(PSMTabBarCell *)cell; 35 | - (float)minimumWidthOfTabCell:(PSMTabBarCell *)cell; 36 | - (float)desiredWidthOfTabCell:(PSMTabBarCell *)cell; 37 | 38 | // cell values 39 | - (NSAttributedString *)attributedObjectCountValueForTabCell:(PSMTabBarCell *)cell; 40 | - (NSAttributedString *)attributedStringValueForTabCell:(PSMTabBarCell *)cell; 41 | 42 | // drawing 43 | - (void)drawTabCell:(PSMTabBarCell *)cell; 44 | - (void)drawTabBar:(PSMTabBarControl *)bar inRect:(NSRect)rect; 45 | 46 | @end 47 | 48 | @interface PSMTabBarControl (StyleAccessors) 49 | 50 | - (NSMutableArray *)cells; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /app/ViRulerView.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViRulerView : NSRulerView 27 | { 28 | NSDictionary *_textAttributes; 29 | NSColor *_backgroundColor; 30 | NSPoint _fromPoint; 31 | NSImage *_digits[10]; 32 | NSSize _digitSize; 33 | 34 | BOOL _relative; 35 | } 36 | 37 | - (void)setRelative:(BOOL)flag; 38 | 39 | - (id)initWithScrollView:(NSScrollView *)aScrollView; 40 | - (void)resetTextAttributes; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /app/MHTextIconCell.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface MHTextIconCell : NSTextFieldCell 27 | { 28 | NSImage *_image; 29 | NSImage *_modImage; 30 | NSImage *_statusImage; 31 | BOOL _modified; 32 | } 33 | 34 | @property(nonatomic,readwrite,retain) NSImage *image; 35 | @property(nonatomic,readwrite,retain) NSImage *statusImage; 36 | @property(nonatomic,readwrite,retain) NSImage *modImage; 37 | @property(nonatomic,readwrite) BOOL modified; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /app/ViLayoutManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @interface ViLayoutManager : NSLayoutManager 27 | { 28 | BOOL _showInvisibles; 29 | NSMutableDictionary *_invisiblesAttributes; 30 | NSImage *_newlineImage; 31 | NSImage *_tabImage; 32 | NSImage *_spaceImage; 33 | } 34 | 35 | @property(nonatomic,readwrite,copy) NSDictionary *invisiblesAttributes; 36 | 37 | - (void)setShowsInvisibleCharacters:(BOOL)flag; 38 | - (BOOL)showsInvisibleCharacters; 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /app/ViBgView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViBgView.h" 27 | #include "logging.h" 28 | 29 | @implementation ViBgView 30 | 31 | @synthesize backgroundColor = _backgroundColor; 32 | 33 | - (void)drawRect:(NSRect)rect 34 | { 35 | if (_backgroundColor) { 36 | [_backgroundColor set]; 37 | NSRectFill([self bounds]); 38 | } 39 | } 40 | 41 | - (void)dealloc 42 | { 43 | DEBUG_DEALLOC(); 44 | [_backgroundColor release]; 45 | [super dealloc]; 46 | } 47 | 48 | @end 49 | 50 | -------------------------------------------------------------------------------- /app/NSWindow-additions.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | @implementation NSWindow (additions) 27 | 28 | - (BOOL)isFullScreen 29 | { 30 | return ([self styleMask] & NSFullScreenWindowMask) == NSFullScreenWindowMask; 31 | } 32 | 33 | - (id)firstResponderOrDelegate 34 | { 35 | id resp = [self firstResponder]; 36 | if ([resp isKindOfClass:[NSTextView class]] && resp == [self fieldEditor:NO forObject:nil]) 37 | resp = [(NSTextView *)resp delegate]; 38 | return resp; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /app/ViMacro.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViMap.h" 27 | 28 | @interface ViMacro : NSObject 29 | { 30 | NSMutableArray *_keys; 31 | NSUInteger _ip; 32 | ViMapping *_mapping; 33 | } 34 | 35 | @property(nonatomic,readonly) ViMapping *mapping; 36 | 37 | + (id)macroWithMapping:(ViMapping *)aMapping prefix:(NSArray *)prefixKeys; 38 | - (id)initWithMapping:(ViMapping *)aMapping prefix:(NSArray *)prefixKeys; 39 | 40 | - (void)push:(NSNumber *)keyCode; 41 | - (NSInteger)pop; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /nu/bridgesupport.nu: -------------------------------------------------------------------------------- 1 | ;; @file bridgesupport.nu 2 | ;; @discussion Optionally read constants, enums, and functions from Apple's BridgeSupport files. 3 | ;; 4 | ;; @copyright Copyright (c) 2007 Tim Burks, Radtastical Inc. 5 | ;; 6 | ;; Licensed under the Apache License, Version 2.0 (the "License"); 7 | ;; you may not use this file except in compliance with the License. 8 | ;; You may obtain a copy of the License at 9 | ;; 10 | ;; http://www.apache.org/licenses/LICENSE-2.0 11 | ;; 12 | ;; Unless required by applicable law or agreed to in writing, software 13 | ;; distributed under the License is distributed on an "AS IS" BASIS, 14 | ;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | ;; See the License for the specific language governing permissions and 16 | ;; limitations under the License. 17 | 18 | (global BridgeSupport (dict frameworks:(dict) ;; remember the frameworks we've read 19 | constants:(dict) ;; for each constant, remember its type signature 20 | enums:(dict) ;; for each enum, remember its value 21 | functions:(dict))) ;; for each function, remember its signature 22 | 23 | (global import 24 | (macro _ (framework *path) 25 | `(progn 26 | (NuBridgeSupport importFramework:(',framework stringValue) 27 | fromPath:(if ,*path (then (car ,*path)) (else nil)) 28 | intoDictionary:BridgeSupport)))) 29 | 30 | (global import-system 31 | (macro _ () 32 | `(progn 33 | (((NSString stringWithShellCommand:"ls /System/Library/Frameworks") lines) each: 34 | (do (line) 35 | (set name ((line componentsSeparatedByString:".") 0)) 36 | (eval (cons 'import (list name)))))))) 37 | 38 | -------------------------------------------------------------------------------- /Support/lib/tm/tempfile.rb: -------------------------------------------------------------------------------- 1 | module TextMate 2 | module IO 3 | class << self 4 | # Allows use with a block or without. 5 | # 6 | # Block usage: 7 | # 8 | # Requires a file ext and takes an optional leading name string. 9 | # 10 | # TextMate::IO.tempfile('diff', 'foo') { |file| 11 | # file.write(diff) 12 | # `mate -w #{e_sh(file.path)}` 13 | # } 14 | # 15 | # Note: If you want to use mate to open the result you will need 16 | # to use the -w option. 17 | # 18 | # Standalone usage: 19 | # 20 | # Returns the open file as a file handle, the file will be 21 | # unlinked when the script exits. 22 | # 23 | # file = TextMate::IO.tempfile('diff', 'foo') 24 | # 25 | def tempfile(ext, name=nil) 26 | require 'tmpdir' 27 | 28 | if ENV.has_key?('TM_PID') 29 | unique_id = ENV["TM_PID"].to_i 30 | else 31 | unique_id = ENV['LOGNAME'].sum(10) 32 | end 33 | 34 | begin 35 | file = File.new( 36 | '%s/%s_%s.%s' % [Dir::tmpdir, name || 'untitled', unique_id.to_s(36), ext], 37 | File::RDWR|File::CREAT|File::EXCL, 0600 38 | ) 39 | 40 | file.sync = true 41 | 42 | if block_given? 43 | res = yield(file) 44 | 45 | file.close 46 | File.unlink(file.path) if File.exists?(file.path) 47 | 48 | return res 49 | else 50 | at_exit { 51 | file.close 52 | File.unlink(file.path) if File.exists?(file.path) 53 | } 54 | return file 55 | end 56 | rescue Errno::EEXIST 57 | unique_id += 1 58 | retry 59 | end 60 | end 61 | end 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /app/ViMarkInspector.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViOutlineView.h" 27 | 28 | @interface ViMarkInspector : NSWindowController 29 | { 30 | IBOutlet NSTreeController *markListController; // Top-level nib object 31 | IBOutlet NSArrayController *markStackController; // Top-level nibobj 32 | IBOutlet ViOutlineView *outlineView; 33 | } 34 | 35 | + (ViMarkInspector *)sharedInspector; 36 | - (void)show; 37 | 38 | - (IBAction)changeList:(id)sender; 39 | - (IBAction)gotoMark:(id)sender; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /Support/nibs/SimpleNotificationWindow.nib/classes.nib: -------------------------------------------------------------------------------- 1 | { 2 | IBClasses = ( 3 | {CLASS = CXBrowserTableView; LANGUAGE = ObjC; SUPERCLASS = NSOutlineView; }, 4 | { 5 | CLASS = CXMenuButton; 6 | LANGUAGE = ObjC; 7 | OUTLETS = {menu = NSMenu; }; 8 | SUPERCLASS = NSButton; 9 | }, 10 | { 11 | ACTIONS = { 12 | contextExportFiles = id; 13 | contextMakeDir = id; 14 | contextRefresh = id; 15 | contextRemoveFile = id; 16 | getRootURLFromField = id; 17 | sheetCancel = id; 18 | sheetOK = id; 19 | takeRootURLFrom = id; 20 | }; 21 | CLASS = CXSVNRepoBrowser; 22 | LANGUAGE = ObjC; 23 | OUTLETS = { 24 | fCommitAnswerField = NSTextField; 25 | fCommitPromptField = NSTextField; 26 | fCommitPromptWindow = NSPanel; 27 | fCommitURLDestination = NSTextField; 28 | fCommitURLSource = NSTextField; 29 | fCommitVerbField = NSTextField; 30 | fDelegate = id; 31 | fGoButton = NSButton; 32 | fHistoryMenuButton = CXMenuButton; 33 | fOutlineView = NSOutlineView; 34 | fSpinner = NSProgressIndicator; 35 | fURLField = NSTextField; 36 | fURLHeaderView = NSView; 37 | fUserDefaultsController = NSUserDefaultsController; 38 | }; 39 | SUPERCLASS = NSObject; 40 | }, 41 | {CLASS = CXToolbarItemView; LANGUAGE = ObjC; SUPERCLASS = NSView; }, 42 | {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 43 | {CLASS = NSObject; LANGUAGE = ObjC; } 44 | ); 45 | IBVersion = 1; 46 | } -------------------------------------------------------------------------------- /oniguruma/st.h: -------------------------------------------------------------------------------- 1 | /* This is a public domain general purpose hash table package written by Peter Moore @ UCB. */ 2 | 3 | /* @(#) st.h 5.1 89/12/14 */ 4 | 5 | #ifndef ST_INCLUDED 6 | 7 | #define ST_INCLUDED 8 | 9 | typedef unsigned long st_data_t; 10 | #define ST_DATA_T_DEFINED 11 | 12 | typedef struct st_table st_table; 13 | 14 | struct st_hash_type { 15 | int (*compare)(); 16 | int (*hash)(); 17 | }; 18 | 19 | struct st_table { 20 | struct st_hash_type *type; 21 | int num_bins; 22 | int num_entries; 23 | struct st_table_entry **bins; 24 | }; 25 | 26 | #define st_is_member(table,key) st_lookup(table,key,(st_data_t *)0) 27 | 28 | enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK}; 29 | 30 | #ifndef _ 31 | # define _(args) args 32 | #endif 33 | #ifndef ANYARGS 34 | # ifdef __cplusplus 35 | # define ANYARGS ... 36 | # else 37 | # define ANYARGS 38 | # endif 39 | #endif 40 | 41 | st_table *st_init_table _((struct st_hash_type *)); 42 | st_table *st_init_table_with_size _((struct st_hash_type *, int)); 43 | st_table *st_init_numtable _((void)); 44 | st_table *st_init_numtable_with_size _((int)); 45 | st_table *st_init_strtable _((void)); 46 | st_table *st_init_strtable_with_size _((int)); 47 | int st_delete _((st_table *, st_data_t *, st_data_t *)); 48 | int st_delete_safe _((st_table *, st_data_t *, st_data_t *, st_data_t)); 49 | int st_insert _((st_table *, st_data_t, st_data_t)); 50 | int st_lookup _((st_table *, st_data_t, st_data_t *)); 51 | int st_foreach _((st_table *, int (*)(ANYARGS), st_data_t)); 52 | void st_add_direct _((st_table *, st_data_t, st_data_t)); 53 | void st_free_table _((st_table *)); 54 | void st_cleanup_safe _((st_table *, st_data_t)); 55 | st_table *st_copy _((st_table *)); 56 | 57 | #define ST_NUMCMP ((int (*)()) 0) 58 | #define ST_NUMHASH ((int (*)()) -2) 59 | 60 | #define st_numcmp ST_NUMCMP 61 | #define st_numhash ST_NUMHASH 62 | 63 | #endif /* ST_INCLUDED */ 64 | -------------------------------------------------------------------------------- /app/SFTPConnectionPool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import 27 | #import "SFTPConnection.h" 28 | 29 | @interface SFTPConnectionPool : NSObject 30 | { 31 | NSMutableDictionary *_connections; 32 | } 33 | 34 | + (SFTPConnectionPool *)sharedPool; 35 | 36 | - (NSURL *)normalizeURL:(NSURL *)aURL; 37 | - (NSString *)stringByAbbreviatingWithTildeInPath:(NSURL *)aURL; 38 | 39 | - (id)connectionWithURL:(NSURL *)url 40 | onConnect:(SFTPRequest *(^)(SFTPConnection *, NSError *))connectCallback; 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /app/PSMRolloverButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // PSMOverflowPopUpButton.m 3 | // NetScrape 4 | // 5 | // Created by John Pannell on 8/4/04. 6 | // Copyright 2004 Positive Spin Media. All rights reserved. 7 | // 8 | 9 | #import "PSMRolloverButton.h" 10 | 11 | @implementation PSMRolloverButton 12 | 13 | @synthesize rolloverImage = _rolloverImage; 14 | @synthesize usualImage = _usualImage; 15 | 16 | - (void)dealloc 17 | { 18 | [_rolloverImage release]; 19 | [_usualImage release]; 20 | [super dealloc]; 21 | } 22 | 23 | - (void)addTrackingRect 24 | { 25 | // assign a tracking rect to watch for mouse enter/exit 26 | _myTrackingRectTag = [self addTrackingRect:[self bounds] owner:self userData:nil assumeInside:NO]; 27 | } 28 | 29 | - (void)removeTrackingRect 30 | { 31 | [self removeTrackingRect:_myTrackingRectTag]; 32 | } 33 | 34 | // override for rollover effect 35 | - (void)mouseEntered:(NSEvent *)theEvent; 36 | { 37 | // set rollover image 38 | [self setImage:_rolloverImage]; 39 | [self setNeedsDisplay]; 40 | [[self superview] setNeedsDisplay:YES]; // eliminates a drawing artifact 41 | } 42 | 43 | - (void)mouseExited:(NSEvent *)theEvent; 44 | { 45 | // restore usual image 46 | [self setImage:_usualImage]; 47 | [self setNeedsDisplay]; 48 | [[self superview] setNeedsDisplay:YES]; // eliminates a drawing artifact 49 | } 50 | 51 | - (void)mouseDown:(NSEvent *)theEvent 52 | { 53 | // eliminates drawing artifact 54 | [[NSRunLoop currentRunLoop] performSelector:@selector(display) target:[self superview] argument:nil order:1 modes:[NSArray arrayWithObjects:@"NSEventTrackingRunLoopMode", @"NSDefaultRunLoopMode", nil]]; 55 | [super mouseDown:theEvent]; 56 | } 57 | 58 | - (void)resetCursorRects 59 | { 60 | // called when the button rect has been changed 61 | [self removeTrackingRect]; 62 | [self addTrackingRect]; 63 | [[self superview] setNeedsDisplay:YES]; // eliminates a drawing artifact 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /app/ViCompletionView.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008-2012 Martin Hedenfalk 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | */ 25 | 26 | #import "ViCompletionView.h" 27 | #import "NSEvent-keyAdditions.h" 28 | #import "ViError.h" 29 | #include "logging.h" 30 | 31 | @implementation ViCompletionView 32 | 33 | @synthesize keyManager = _keyManager; 34 | 35 | - (BOOL)performKeyEquivalent:(NSEvent *)theEvent 36 | { 37 | if ([[self window] firstResponder] != self) 38 | return NO; 39 | return [_keyManager performKeyEquivalent:theEvent]; 40 | } 41 | 42 | - (void)keyDown:(NSEvent *)theEvent 43 | { 44 | [_keyManager keyDown:theEvent]; 45 | } 46 | 47 | @end 48 | --------------------------------------------------------------------------------