Firstly, install macvim and get the keyboard working
Note: easiest way here is to use macvim from brew
brew install macvim --with-override-system-vim
In .vimrc
#import <objc/runtime.h> | |
#import <objc/message.h> | |
#import <QuartzCore/QuartzCore.h> | |
#define PROPERTY(propName) NSStringFromSelector(@selector(propName)) | |
// A better assert. NSAssert is too runtime dependant, and assert() doesn't log. | |
// http://www.mikeash.com/pyblog/friday-qa-2013-05-03-proper-use-of-asserts.html | |
// Accepts both: | |
// - PSPDFAssert(x > 0); |
//Also fine to use MR_coordinatorWithInMemoryStore | |
NSPersistentStoreCoordinator *coordinator = [NSPersistentStoreCoordinator MR_newPersistentStoreCoordinator]; | |
[NSPersistentStoreCoordinator MR_setDefaultStoreCoordinator:coordinator]; | |
NSManagedObjectContext *defaultContext = [NSManagedObjectContext MR_newMainQueueContext]; | |
defaultContext.persistentStoreCoordinator = coordinator; | |
[NSManagedObjectContext performSelector:@selector(MR_setDefaultContext:) withObject:defaultContext]; |
// Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
// Copyright (c) 2013 Peter Steinberger. All rights reserved. | |
// Licensed under MIT (http://opensource.org/licenses/MIT) | |
// | |
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
#import <objc/runtime.h> | |
#import <objc/message.h> | |
// Compile-time selector checks. |
function roughSizeOfObject( object ) { | |
var objectList = []; | |
var stack = [ object ]; | |
var bytes = 0; | |
while ( stack.length ) { | |
var value = stack.pop(); | |
if ( typeof value === 'boolean' ) { |
%%% @author Sergey Prokhorov <[email protected]> | |
%%% @copyright (C) 2013, Sergey Prokhorov | |
%%% @doc | |
%%% Walker alias method - efficient random selection with defined probabilities. | |
%%% <http://en.wikipedia.org/wiki/Alias_method> | |
%%% | |
%%% > ProbabilityValueList = [{10, a}, {20, b}, {30, c}, {40, d}], | |
%%% > WalkerVectors = walker_alias:build(ProbabilityValueList), | |
%%% > RandomValue = walker_alias:choice(WalkerVectors). | |
%%% |
#!/bin/sh | |
# Create a RAM disk with same perms as mountpoint | |
# Script based on http://itux.idev.pro/2012/04/iservice-speed-up-your-xcode-%D0%BD%D0%B5%D0%BA%D0%BE%D1%82%D0%BE%D1%80%D1%8B%D0%B5-%D1%81%D0%BF%D0%BE%D1%81%D0%BE%D0%B1%D1%8B/ with some additions | |
# Usage: sudo ./xcode_ramdisk.sh start | |
USERNAME=$(logname) | |
TMP_DIR="/private/tmp" | |
RUN_DIR="/var/run" | |
SYS_CACHES_DIR="/Library/Caches" |
# YouCompleteMe configuration for OSX development | |
import os | |
import ycm_core | |
flags = [ | |
'-resource-dir', | |
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.0', | |
'-isysroot', | |
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk', | |
'-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include', |
function! Generate_placeholder_pattern() | |
return '<#\%(T##\)\?\%([^#]\+##\)\?\([^#]\+\)#>' | |
endfunction | |
function! Jump_to_placeholder() | |
if &filetype !=# 'swift' | |
return '' | |
end | |
if !Check_placeholder_existence() |
#!/bin/bash | |
# run_ios_sim builds and runs an iOS app on the simulator | |
# | |
# It is designed to replicate the behavior of "Run" in Xcode and assumes basic | |
# xcodebuild usage. | |
# | |
# USAGE: | |
# export IOS_SIM_UDID=342F9A20-DF48-41A9-BE60-C6B35F47E97F; \ | |
# export BUNDLE_IDENTIFIER=a.Some; \ | |
# export APP_PATH=$PWD/Build/Debug-iphonesimulator/$APP_NAME.app \ |