Code Monkey home page Code Monkey logo

xi-editor's Introduction

Xi editor

Maintenance status: *The xi-editor project is currently discontinued. Although we will happily accept bug fixes, no new features are currently planned. You may be interested in the Lapce editor, which can be considered a spiritual successor to the xi-editor. — The Editors

Note: This repo contains only the editor core, which is not usable on its own. For editors based on it, check out the list in Frontends.

The xi-editor project is an attempt to build a high quality text editor, using modern software engineering techniques. It is initially built for macOS, using Cocoa for the user interface. There are also frontends for other operating systems available from third-party developers.

Goals include:

  • Incredibly high performance. All editing operations should commit and paint in under 16ms. The editor should never make you wait for anything.

  • Beauty. The editor should fit well on a modern desktop, and not look like a throwback from the ’80s or ’90s. Text drawing should be done with the best technology available (Core Text on Mac, DirectWrite on Windows, etc.), and support Unicode fully.

  • Reliability. Crashing, hanging, or losing work should never happen.

  • Developer friendliness. It should be easy to customize xi editor, whether by adding plug-ins or hacking on the core.

Learn more with the creator of Xi, Raph Levien, in this Recurse Center Localhost talk.

Screenshot:

xi-mac screenshot

Getting started

This repository is the core only. You'll also need a front-end, from the list below.

Building the core

Xi-editor targets 'recent stable Rust'. We recommend installing via rustup. The current minimum supported version is 1.40.

To build the xi-editor core from the root directory of this repo:

> cd rust
> cargo build

Frontends

Here are some front-ends in various stages of development:

  • xi-mac, the official macOS front-end.

  • xi-gtk, a GTK+ front-end.

  • xi-term, a text UI.

  • xi-electron, a cross-platform front-end based on web-technologies.

  • Tau, a GTK+ front-end written in Rust. Forked from https://github.com/bvinc/gxi, which was abandoned.

  • xi-win, an experimental Windows front-end written in Rust.

  • kod, a terminal frontend written in Golang.

  • xi-qt, a Qt front-end.

  • vixi, a Vim like front-end in Rust.

The following are currently inactive, based on earlier versions of the front-end protocol, but perhaps could be revitalized:

There are notes (I wouldn’t call it documentation at this point) on the protocol at frontend.md. If you're working on a front-end, feel free to send a PR to add it to the above list.

Design decisions

Here are some of the design decisions, and motivation why they should contribute to the above goals:

  • Separation into front-end and back-end modules. The front-end is responsible for presenting the user interface and drawing a screen full of text. The back-end (also known as “core”) holds the file buffers and is responsible for all potentially expensive editing operations.

  • Native UI. Cross-platform UI toolkits never look and feel quite right. The best technology for building a UI is the native framework of the platform. On Mac, that’s Cocoa.

  • Rust. The back-end needs to be extremely performant. In particular, it should use little more memory than the buffers being edited. That level of performance is possible in C++, but Rust offers a much more reliable, and in many ways, higher level programming platform.

  • A persistent rope data structure. Persistent ropes are efficient even for very large files. In addition, they present a simple interface to their clients - conceptually, they're a sequence of characters just like a string, and the client need not be aware of any internal structure.

  • Asynchronous operations. The editor should never, ever block and prevent the user from getting their work done. For example, autosave will spawn a thread with a snapshot of the current editor buffer (the persistent rope data structure is copy-on-write so this operation is nearly free), which can then proceed to write out to disk at its leisure, while the buffer is still fully editable.

  • Plug-ins over scripting. Most text editors have an associated scripting language for extending functionality. However, these languages are usually both more arcane and less powerful than “real” languages. The xi editor will communicate with plugins through pipes, letting them be written in any language, and making it easier to integrate with other systems such as version control, deeper static analyzers of code, etc.

  • JSON. The protocol for front-end / back-end communication, as well as between the back-end and plug-ins, is based on simple JSON messages. I considered binary formats, but the actual improvement in performance would be completely in the noise. Using JSON considerably lowers friction for developing plug-ins, as it’s available out of the box for most modern languages, and there are plenty of the libraries available for the other ones.

Current status

This is still a project in its early stages. The Mac build has basic editing functionality (it was used to write this README), but looks very spare and is still missing essentials such as auto-indent. At the moment, it’s expected that its main community will be developers interested in hacking on a text editor.

Authors

The xi-editor project was started by Raph Levien but has since received contributions from a number of other people. See the AUTHORS file for details.

License

This project is licensed under the Apache 2 license.

Contributions

We gladly accept contributions via GitHub pull requests. Please see CONTRIBUTING.md for more details.

If you are interested in contributing but not sure where to start, there is an active Zulip channel at #xi-editor on https://xi.zulipchat.com. There is also a #xi channel on irc.mozilla.org. Finally, there is a subreddit at /r/xi_editor.

xi-editor's People

Contributors

06kellyjac avatar ahouts avatar akxcv avatar arazabishov avatar betterclever avatar c4eater avatar cmyr avatar cogitri avatar dependabot[bot] avatar dsp avatar dtolnay avatar eyelash avatar ineol avatar jmuk avatar kanishkarj avatar lihram avatar llogiq avatar mbstavola avatar mqzry avatar nangtrongvuon avatar raphlinus avatar rkusa avatar ryanbloom avatar scholtzan avatar tdecking avatar terhechte avatar timpbrenner avatar trishume avatar virattara avatar yangkeao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xi-editor's Issues

GTK+ front-end efforts

I found some motivation the last few days so I started a GTK+ front-end for Xi. It does not handle input yet but it can open and display files. If you want to test it you need to have the xi-core executable in the same directory where you execute xi-gtk.
I will probably add some input handling so you can do some basic editing but I guess I won't have the time to maintain a full GTK+ front-end for years. However, I wanted to post this here so an official GTK+ front-end might be based on (or at least inspired by) my code. What do you think?
(@JesseFarebro I saw you opened a xi-gtk repo but there is no actual code in there)

Update: I have now added support for basic editing. So you can now type and select text with the mouse.

Can't backspace over text

Occasionally, I end up in a state where pressing backspace doesn't seem to work.

I'm able to reproduce it pretty consistently by doing this:

  1. Open a reasonably large file (> 30 K)
  2. Scroll to the very bottom
  3. Quickly scroll to the middle of the file
  4. Position the cursor at the end of a line
  5. Try to backspace twice

The first backspace works, but then it stops working. I'm still able to insert text, and I can even delete the text if I make a visual selection and then press backspace. But after deleting it, I still can't backspace over the point where the text was.

No mouse support?

Is there mouse support? Building the latest commit (eebe877) doesn't allow me to click anywhere to move the caret. Not sure if this hasn't been implemented yet or if it's a bug.

Syntax errors in build

Hi. Any ideas, what's going wrong?

~/xi-editor
> xcodebuild
=== BUILD LEGACY TARGET xicore OF PROJECT XiEditor WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies

ExternalBuildToolExecution xicore
    cd /Users/lokson/xi-editor/rust
    export ACTION=
    export ALTERNATE_GROUP=staff
    export ALTERNATE_MODE=u+w,go-w,a+rX
    export ALTERNATE_OWNER=lokson
    export ALWAYS_SEARCH_USER_PATHS=NO
    export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
    export APPLE_INTERNAL_DIR=/AppleInternal
    export APPLE_INTERNAL_DOCUMENTATION_DIR=/AppleInternal/Documentation
    export APPLE_INTERNAL_LIBRARY_DIR=/AppleInternal/Library
    export APPLE_INTERNAL_TOOLS=/AppleInternal/Developer/Tools
    export APPLICATION_EXTENSION_API_ONLY=NO
    export APPLY_RULES_IN_COPY_FILES=NO
    export ARCHS=x86_64
    export AVAILABLE_PLATFORMS="watchos iphonesimulator macosx appletvsimulator watchsimulator appletvos iphoneos"
    export BITCODE_GENERATION_MODE=marker
    export BUILD_ACTIVE_RESOURCES_ONLY=NO
    export BUILD_COMPONENTS="headers build"
    export BUILD_DIR=/Users/lokson/xi-editor/build
    export BUILD_ROOT=/Users/lokson/xi-editor/build
    export BUILD_STYLE=
    export BUILD_VARIANTS=normal
    export BUILT_PRODUCTS_DIR=/Users/lokson/xi-editor/build/Release
    export CACHE_ROOT=/var/folders/s0/dxqnwkhj3nj5stqrsxxq0w_h0000gn/C/com.apple.DeveloperTools/7.2-7C68/Xcode
    export CLANG_CXX_LANGUAGE_STANDARD=gnu++0x
    export CLANG_CXX_LIBRARY=libc++
    export CLANG_ENABLE_MODULES=YES
    export CLANG_ENABLE_OBJC_ARC=YES
    export CLANG_MODULES_BUILD_SESSION_FILE=/var/folders/s0/dxqnwkhj3nj5stqrsxxq0w_h0000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation
    export CLANG_WARN_BOOL_CONVERSION=YES
    export CLANG_WARN_CONSTANT_CONVERSION=YES
    export CLANG_WARN_DIRECT_OBJC_ISA_USAGE=YES_ERROR
    export CLANG_WARN_EMPTY_BODY=YES
    export CLANG_WARN_ENUM_CONVERSION=YES
    export CLANG_WARN_INT_CONVERSION=YES
    export CLANG_WARN_OBJC_ROOT_CLASS=YES_ERROR
    export CLANG_WARN_UNREACHABLE_CODE=YES
    export CLANG_WARN__DUPLICATE_METHOD_MATCH=YES
    export CLASS_FILE_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build/JavaClasses
    export CLONE_HEADERS=NO
    export CODE_SIGNING_ALLOWED=NO
    export CODE_SIGN_IDENTITY=-
    export COLOR_DIAGNOSTICS=YES
    export CONFIGURATION=
    export CONFIGURATION_BUILD_DIR=/Users/lokson/xi-editor/build/Release
    export CONFIGURATION_TEMP_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release
    export COPYING_PRESERVES_HFS_DATA=NO
    export COPY_HEADERS_RUN_UNIFDEF=NO
    export COPY_PHASE_STRIP=NO
    export CREATE_INFOPLIST_SECTION_IN_BINARY=NO
    export DEAD_CODE_STRIPPING=NO
    export DEBUGGING_SYMBOLS=YES
    export DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
    export DEFAULT_COMPILER=com.apple.compilers.llvm.clang.1_0
    export DEFAULT_KEXT_INSTALL_PATH=/Library/Extensions
    export DEFINES_MODULE=NO
    export DEPLOYMENT_LOCATION=NO
    export DEPLOYMENT_POSTPROCESSING=NO
    export DERIVED_FILES_DIR=
    export DERIVED_FILE_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build/DerivedSources
    export DERIVED_SOURCES_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build/DerivedSources
    export DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
    export DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export DEVELOPER_FRAMEWORKS_DIR=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_FRAMEWORKS_DIR_QUOTED=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
    export DEVELOPER_LIBRARY_DIR=/Applications/Xcode.app/Contents/Developer/Library
    export DEVELOPER_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
    export DEVELOPER_TOOLS_DIR=/Applications/Xcode.app/Contents/Developer/Tools
    export DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
    export DEVELOPMENT_LANGUAGE=English
    export DO_HEADER_SCANNING_IN_JAM=NO
    export DSTROOT=/tmp/XiEditor.dst
    export DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    export DWARF_DSYM_FILE_NAME=.dSYM
    export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO
    export DWARF_DSYM_FOLDER_PATH=/Users/lokson/xi-editor/build/Release
    export EMBEDDED_PROFILE_NAME=embedded.provisionprofile
    export EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE=NO
    export ENABLE_BITCODE=NO
    export ENABLE_HEADER_DEPENDENCIES=YES
    export ENABLE_NS_ASSERTIONS=NO
    export ENABLE_ON_DEMAND_RESOURCES=NO
    export ENABLE_STRICT_OBJC_MSGSEND=YES
    export ENABLE_TESTABILITY=NO
    export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS=".DS_Store .svn .git .hg CVS"
    export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES="*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
    export FILE_LIST=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build/Objects/LinkFileList
    export FRAMEWORK_VERSION=A
    export GCC3_VERSION=3.3
    export GCC_C_LANGUAGE_STANDARD=gnu99
    export GCC_NO_COMMON_BLOCKS=YES
    export GCC_VERSION=com.apple.compilers.llvm.clang.1_0
    export GCC_WARN_64_TO_32_BIT_CONVERSION=YES
    export GCC_WARN_ABOUT_RETURN_TYPE=YES_ERROR
    export GCC_WARN_UNDECLARED_SELECTOR=YES
    export GCC_WARN_UNINITIALIZED_AUTOS=YES_AGGRESSIVE
    export GCC_WARN_UNUSED_FUNCTION=YES
    export GCC_WARN_UNUSED_VARIABLE=YES
    export GENERATE_MASTER_OBJECT_FILE=NO
    export GENERATE_PKGINFO_FILE=NO
    export GENERATE_PROFILING_CODE=NO
    export GID=20
    export GROUP=staff
    export HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT=YES
    export HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES=YES
    export HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS=YES
    export HEADERMAP_INCLUDES_PROJECT_HEADERS=YES
    export HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES=YES
    export HEADERMAP_USES_VFS=NO
    export HIDE_BITCODE_SYMBOLS=YES
    export HOME=/Users/lokson
    export INFOPLIST_EXPAND_BUILD_SETTINGS=YES
    export INFOPLIST_OUTPUT_FORMAT=same-as-input
    export INFOPLIST_PREPROCESS=NO
    export INSTALL_DIR=/tmp/XiEditor.dst
    export INSTALL_GROUP=staff
    export INSTALL_MODE_FLAG=u+w,go-w,a+rX
    export INSTALL_OWNER=lokson
    export INSTALL_ROOT=/tmp/XiEditor.dst
    export JAVA_APP_STUB=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
    export JAVA_ARCHIVE_CLASSES=YES
    export JAVA_ARCHIVE_TYPE=JAR
    export JAVA_COMPILER=/usr/bin/javac
    export JAVA_FRAMEWORK_RESOURCES_DIRS=Resources
    export JAVA_JAR_FLAGS=cv
    export JAVA_SOURCE_SUBDIR=.
    export JAVA_USE_DEPENDENCIES=YES
    export JAVA_ZIP_FLAGS=-urg
    export KEEP_PRIVATE_EXTERNS=NO
    export LD_DEPENDENCY_INFO_FILE=//xicore_dependency_info.dat
    export LD_GENERATE_MAP_FILE=NO
    export LD_MAP_FILE_PATH=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build/xicore-LinkMap--.txt
    export LD_NO_PIE=NO
    export LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER=YES
    export LEGACY_DEVELOPER_DIR=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
    export LIBRARY_FLAG_NOSPACE=YES
    export LIBRARY_KEXT_INSTALL_PATH=/Library/Extensions
    export LINKER_DISPLAYS_MANGLED_NAMES=NO
    export LINK_WITH_STANDARD_LIBRARIES=YES
    export LOCAL_ADMIN_APPS_DIR=/Applications/Utilities
    export LOCAL_APPS_DIR=/Applications
    export LOCAL_DEVELOPER_DIR=/Library/Developer
    export LOCAL_LIBRARY_DIR=/Library
    export MACOSX_DEPLOYMENT_TARGET=10.11
    export MAC_OS_X_PRODUCT_BUILD_VERSION=15B42
    export MAC_OS_X_VERSION_ACTUAL=101101
    export MAC_OS_X_VERSION_MAJOR=101100
    export MAC_OS_X_VERSION_MINOR=1101
    export MTL_ENABLE_DEBUG_INFO=NO
    export OBJECT_FILE_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build/Objects
    export OBJROOT=/Users/lokson/xi-editor/build
    export ONLY_ACTIVE_ARCH=NO
    export OPTIMIZATION_LEVEL=0
    export OS=MACOS
    export PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES="/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms"
    export PLIST_FILE_OUTPUT_FORMAT=same-as-input
    export PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR=YES
    export PRECOMP_DESTINATION_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build/PrefixHeaders
    export PRESERVE_DEAD_CODE_INITS_AND_TERMS=NO
    export PRODUCT_MODULE_NAME=xicore
    export PRODUCT_NAME=xicore
    export PROFILING_CODE=NO
    export PROJECT=XiEditor
    export PROJECT_DERIVED_FILE_DIR=/Users/lokson/xi-editor/build/XiEditor.build/DerivedSources
    export PROJECT_DIR=/Users/lokson/xi-editor
    export PROJECT_FILE_PATH=/Users/lokson/xi-editor/XiEditor.xcodeproj
    export PROJECT_NAME=XiEditor
    export PROJECT_TEMP_DIR=/Users/lokson/xi-editor/build/XiEditor.build
    export PROJECT_TEMP_ROOT=/Users/lokson/xi-editor/build
    export REMOVE_CVS_FROM_RESOURCES=YES
    export REMOVE_GIT_FROM_RESOURCES=YES
    export REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES=YES
    export REMOVE_HG_FROM_RESOURCES=YES
    export REMOVE_SVN_FROM_RESOURCES=YES
    export SCAN_ALL_SOURCE_FILES_FOR_INCLUDES=NO
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
    export SEPARATE_STRIP=NO
    export SEPARATE_SYMBOL_EDIT=NO
    export SHARED_DERIVED_FILE_DIR=/Users/lokson/xi-editor/build/Release/DerivedSources
    export SHARED_PRECOMPS_DIR=/var/folders/s0/dxqnwkhj3nj5stqrsxxq0w_h0000gn/C/com.apple.DeveloperTools/7.2-7C68/Xcode/SharedPrecompiledHeaders
    export SKIP_INSTALL=YES
    export SOURCE_ROOT=/Users/lokson/xi-editor
    export SRCROOT=/Users/lokson/xi-editor
    export STRINGS_FILE_OUTPUT_ENCODING=UTF-16
    export STRIP_BITCODE_FROM_COPIED_FILES=NO
    export STRIP_INSTALLED_PRODUCT=YES
    export STRIP_STYLE=all
    export SUPPORTED_PLATFORMS=macosx
    export SUPPORTS_TEXT_BASED_API=NO
    export SYMROOT=/Users/lokson/xi-editor/build
    export SYSTEM_ADMIN_APPS_DIR=/Applications/Utilities
    export SYSTEM_APPS_DIR=/Applications
    export SYSTEM_CORE_SERVICES_DIR=/System/Library/CoreServices
    export SYSTEM_DEMOS_DIR=/Applications/Extras
    export SYSTEM_DEVELOPER_APPS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
    export SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
    export SYSTEM_DEVELOPER_DEMOS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples"
    export SYSTEM_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SYSTEM_DEVELOPER_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library"
    export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools"
    export SYSTEM_DEVELOPER_JAVA_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Java Tools"
    export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Performance Tools"
    export SYSTEM_DEVELOPER_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes"
    export SYSTEM_DEVELOPER_TOOLS=/Applications/Xcode.app/Contents/Developer/Tools
    export SYSTEM_DEVELOPER_TOOLS_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools"
    export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools"
    export SYSTEM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
    export SYSTEM_DEVELOPER_UTILITIES_DIR=/Applications/Xcode.app/Contents/Developer/Applications/Utilities
    export SYSTEM_DOCUMENTATION_DIR=/Library/Documentation
    export SYSTEM_KEXT_INSTALL_PATH=/System/Library/Extensions
    export SYSTEM_LIBRARY_DIR=/System/Library
    export TARGETNAME=xicore
    export TARGET_BUILD_DIR=/Users/lokson/xi-editor/build/Release
    export TARGET_NAME=xicore
    export TARGET_TEMP_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build
    export TEMP_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build
    export TEMP_FILES_DIR=
    export TEMP_FILE_DIR=/Users/lokson/xi-editor/build/XiEditor.build/Release/xicore.build
    export TEMP_ROOT=/Users/lokson/xi-editor/build
    export TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
    export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO
    export UID=501
    export USER=lokson
    export USER_APPS_DIR=/Users/lokson/Applications
    export USER_LIBRARY_DIR=/Users/lokson/Library
    export USE_HEADERMAP=YES
    export WATCH_BUILT_PRODUCTS_DIR=/Users/lokson/xi-editor/build/Release-watchos
    export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
    export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
    export XCODE_PRODUCT_BUILD_VERSION=7C68
    export XCODE_VERSION_ACTUAL=0720
    export XCODE_VERSION_MAJOR=0700
    export XCODE_VERSION_MINOR=0720
    export arch=x86_64
    export diagnostic_message_length=158
    export variant=normal
    /bin/bash /Users/lokson/xi-editor/xi-core.sh


=== BUILD TARGET XiEditor OF PROJECT XiEditor WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies

CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    cd /Users/lokson/xi-editor
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -incremental -module-name XiEditor -O -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -target x86_64-apple-macosx10.11 -g -Xfrontend -serialize-debugging-options -I /Users/lokson/xi-editor/build/Release -F /Users/lokson/xi-editor/build/Release -c -j4 /Users/lokson/xi-editor/XiEditor/CoreConnection.swift /Users/lokson/xi-editor/XiEditor/AppWindowController.swift /Users/lokson/xi-editor/XiEditor/EditView.swift /Users/lokson/xi-editor/XiEditor/AppDelegate.swift /Users/lokson/xi-editor/XiEditor/ShadowView.swift -output-file-map /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/XiEditor-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/XiEditor.swiftmodule -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/Release/include -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources -emit-objc-header -emit-objc-header-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/XiEditor-Swift.h -Xcc -working-directory/Users/lokson/xi-editor

CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/CoreConnection.swift
    cd /Users/lokson/xi-editor
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/lokson/xi-editor/XiEditor/CoreConnection.swift /Users/lokson/xi-editor/XiEditor/AppWindowController.swift /Users/lokson/xi-editor/XiEditor/EditView.swift /Users/lokson/xi-editor/XiEditor/AppDelegate.swift /Users/lokson/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /Users/lokson/xi-editor/build/Release -F /Users/lokson/xi-editor/build/Release -g -serialize-debugging-options -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/Release/include -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources -Xcc -working-directory/Users/lokson/xi-editor -emit-module-doc-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/CoreConnection~partial.swiftdoc -O -module-name XiEditor -emit-module-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/CoreConnection~partial.swiftmodule -serialize-diagnostics-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/CoreConnection.dia -emit-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/CoreConnection.d -emit-reference-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/CoreConnection.swiftdeps -o /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/CoreConnection.o
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,

CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/AppWindowController.swift
    cd /Users/lokson/xi-editor
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/lokson/xi-editor/XiEditor/CoreConnection.swift -primary-file /Users/lokson/xi-editor/XiEditor/AppWindowController.swift /Users/lokson/xi-editor/XiEditor/EditView.swift /Users/lokson/xi-editor/XiEditor/AppDelegate.swift /Users/lokson/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /Users/lokson/xi-editor/build/Release -F /Users/lokson/xi-editor/build/Release -g -serialize-debugging-options -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/Release/include -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources -Xcc -working-directory/Users/lokson/xi-editor -emit-module-doc-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppWindowController~partial.swiftdoc -O -module-name XiEditor -emit-module-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppWindowController~partial.swiftmodule -serialize-diagnostics-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppWindowController.dia -emit-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppWindowController.d -emit-reference-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppWindowController.swiftdeps -o /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppWindowController.o
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:57: error: missing argument for parameter 'selector' in call
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                        ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:57: error: missing argument for parameter 'selector' in call
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                        ^

CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/EditView.swift
    cd /Users/lokson/xi-editor
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/lokson/xi-editor/XiEditor/CoreConnection.swift /Users/lokson/xi-editor/XiEditor/AppWindowController.swift -primary-file /Users/lokson/xi-editor/XiEditor/EditView.swift /Users/lokson/xi-editor/XiEditor/AppDelegate.swift /Users/lokson/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /Users/lokson/xi-editor/build/Release -F /Users/lokson/xi-editor/build/Release -g -serialize-debugging-options -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/Release/include -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources -Xcc -working-directory/Users/lokson/xi-editor -emit-module-doc-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/EditView~partial.swiftdoc -O -module-name XiEditor -emit-module-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/EditView~partial.swiftmodule -serialize-diagnostics-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/EditView.dia -emit-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/EditView.d -emit-reference-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/EditView.swiftdeps -o /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/EditView.o
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:55: error: missing argument for parameter 'selector' in call
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                      ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:452:50: error: binary operator '!=' cannot be applied to two '(Int, Int)' operands
        if let last = lastDragLineCol where last != (line, col) {
                                            ~~~~ ^  ~~~~~~~~~~~

CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/AppDelegate.swift
    cd /Users/lokson/xi-editor
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/lokson/xi-editor/XiEditor/CoreConnection.swift /Users/lokson/xi-editor/XiEditor/AppWindowController.swift /Users/lokson/xi-editor/XiEditor/EditView.swift -primary-file /Users/lokson/xi-editor/XiEditor/AppDelegate.swift /Users/lokson/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -I /Users/lokson/xi-editor/build/Release -F /Users/lokson/xi-editor/build/Release -g -serialize-debugging-options -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/lokson/xi-editor/build/Release/include -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/DerivedSources -Xcc -working-directory/Users/lokson/xi-editor -emit-module-doc-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppDelegate~partial.swiftdoc -O -module-name XiEditor -emit-module-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule -serialize-diagnostics-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppDelegate.dia -emit-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppDelegate.d -emit-reference-dependencies-path /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppDelegate.swiftdeps -o /Users/lokson/xi-editor/build/XiEditor.build/Release/XiEditor.build/Objects-normal/x86_64/AppDelegate.o
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:43:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.boundsDidChangeNotification(_:)), name: NSViewBoundsDidChangeNotification, object: scrollView.contentView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected expression in list of expressions
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
/Users/lokson/xi-editor/XiEditor/AppWindowController.swift:44:74: error: expected ',' separator
        NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppWindowController.frameDidChangeNotification(_:)), name: NSViewFrameDidChangeNotification, object: scrollView)
                                                                         ^
                                                                        ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected expression in list of expressions
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
/Users/lokson/xi-editor/XiEditor/EditView.swift:445:104: error: expected ',' separator
        timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(1.0/60), target: self, selector: #selector(autoscrollTimer), userInfo: nil, repeats: true)
                                                                                                       ^
                                                                                                      ,

** BUILD FAILED **


The following build commands failed:
    CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/CoreConnection.swift
    CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/AppWindowController.swift
    CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/EditView.swift
    CompileSwift normal x86_64 /Users/lokson/xi-editor/XiEditor/AppDelegate.swift
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(5 failures)
~/xi-editor
>

Editing the beginning of a large line file is VERY slow

I tried editing a large css source map, one that Atom was choking on in xi-editor. Opening it was instantaneous, but I was unable to interact with the file at all without significant delay. Left-right arrows brought delay and typing anything brought delay.

This seems like a bug since the stated purpose of this editor is jank-free editing. I can provide the file, if needed, in a gist.

File lists and selecting files to open (similar to Cmd+P in Sublime/Atom)

@raphlinus, how do you envision the feature for selecting files to open?

Sublim/Atom has a project file tree and Cmd+P fuzzy filename lookup panel. there is a really smooth vim thingy with the fuzzy filepath search. Which design are you leaning to?

Should such a file search be implemented as a plugin or is it the core functionality? Should it be a part of a more general 'goto symbol' functionality (something that treats filename lookup, jumping to search results and "go to the definition" features) or should it be a standalone thing?

What command API do you envision for such a functionality?

I am considering working on a PR implementing this (if that is ok with you) and wanted to confirm what design you are leaning to for that.

Rpc over Stdin/stdout for plugins

I saw you mention plugins that communicate over pipes... Not sure exactly what you mean by pipes, but I wanted to float another suggestion - using json RPC over stdin/stdout for a plugin process. It obviates the need for any system resources, and anyone can write code that talks to stdin/stdout.

I made a go package specifically for this here: HTTPS://github.com/natefinch/pie. Obviously that's go, not rust, but it may help explain the idea.. And if you do go in that direction, people who wanted to make a plugin in go could easily use that package.

ExternalBuildToolExecution xicore

export XCODE_PRODUCT_BUILD_VERSION=7A1001
export XCODE_VERSION_ACTUAL=0701
export XCODE_VERSION_MAJOR=0700
export XCODE_VERSION_MINOR=0700
export arch=x86_64
export diagnostic_message_length=80
export variant=normal
/bin/bash /Users/ksana/Workspace/xi-editor/xicore.sh

/Users/ksana/Workspace/xi-editor/xicore.sh: line 38: cargo: command not found
Command /bin/bash failed with exit code 127

** BUILD FAILED **

The following build commands failed:
ExternalBuildToolExecution xicore

Compilation errors when building with xcode

I'm trying to build xi-editor and getting this:
rope/src/lib.rs:454:33: 454:41 error: use of unstable library feature 'convert': waiting on RFC revision (see issue #27729)

rope/src/lib.rs:454:46: 454:54 error: use of unstable library feature 'convert': waiting on RFC revision (see issue #27729)

rope/src/lib.rs:1060:75: 1060:83 error: use of unstable library feature 'convert': waiting on RFC revision (see issue #27729)

I just cloned the project and run open XiEditor.xcodeproj and hit Run.
What am I doing wrong?

Editing files remotely

One big advantage of terminal-based editors (like vim and emacs) over UI-based ones is that it is really easy to edit files remotely via ssh connections.

With xi-editor's server/client architecture, do you think there can be a pattern for xi-editor that allows for easy remote file editing? Maybe via SSH connection with x-editor core running on the remote machine and the client running locally? What is your stance on this?

Side View is needed for xi-editor

Side View (Inner View) is needed for xi-editor for developing other features.

example / Find, Folder View, Console, ...

It should be designed for reuse.

NSOutlineView is good option.

But How about make simple SideView which can shown at left, right, down, top,

And extends SideView to develop complex work?

It should be more comfortable for developing plugin.

Request: Core Text-friendly keyboard shortcuts

Core Text has built-in support for the standard Emacs navigation actions and the simplest of its text manipulation actions:

  • ^f: cursor forward
  • ^b: cursor backward
  • ^p: cursor up one line
  • ^n: cursor down one line
  • ^a: cursor or to start of line
  • ^e: cursor to end of line

Text manipulation:

  • ^k: "kill" – cut to end of line and add to OS X "kill ring" (a secondary clipboard, essentially)
  • ^y: "yank" – paste the last item in the kill ring
  • ^t: "transpose" – swap characters on either side of cursor and advance cursor by one

Support for these would immediately make the editor feel much more native on OS X to me (and presumably a lot of others).

(If I get some time I'll see what would be needed to implement, but I'm in a very busy season and we have some family health t now, so I wouldn't hold your breath for a PR for me.)

consider libui for ui

One of design decisions for xi-editor is:

Native UI. Cross-platform UI toolkits never look and feel quite right. The best technology for building a UI is the native framework of the platform. On Mac, that’s Cocoa.

According to libui description, it is:

Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

It also has rust bindings, so why not using libui?

Most edit methods print rpc with id=X not responded

Reproducing

~/rustWorkspace/xi-editor/rust(master ✔) cargo run
     Running `target/debug/xicore`
{"id":1,"method":"new_tab","params":[]}
to core: {"id":1,"method":"new_tab","params":[]}
{"id":1,"result":"0"}
{"id":2,"method":"edit","params":{"method":"scroll","params":[0,43],"tab":"0"}}
to core: {"id":2,"method":"edit","params":{"method":"scroll","params":[0,43],"tab":"0"}}
rpc with id=2 not responded

Why

When the edit method is called:

  1. handle_rpc in tabs.rs is called
  2. do_edit in tabs.rs is called
    In do_edit if we provided some params respose is built:
let response = {
                if let Some(editor) = self.tabs.get_mut(tab) {
                    let method = params.get("method").unwrap().as_string().unwrap();
                    let params = params.get("params").unwrap();
                    editor.do_rpc(method, params)
                } else {
                    print_err!("tab not found: {}", tab);
                    None
                }
            };

response is either None or editor.do_rpc(method, params)

but editor.do_rpc is None for all async edit methods

fn async(_: ()) -> Option<Value> {
    None
}
if let Some(response) = response {
                self.respond(response, id);
            } else if let Some(id) = id {
                print_err!("rpc with id={:?} not responded", id);
            }

Solution

Remove the print_err!("rpc with id={:?} not responded", id); call.
I'll send a pull request.

Use more structured RPC commands for motion, deletion, scrolling, etc a la Vim operators

Right now, the RPC commands include things like

move_up
move_down
move_left
move_right
move_to_end_of_line
move_to_left_end_of_line
...
delete_forward
delete_backward
delete_to_end_of_paragraph
delete_to_beginning_of_line
...

I'm proposing to factor commands like these into simple "move" and "delete" commands, which also take an argument indicating where to move/delete/scroll to. These would be objects like

up_line
down_line
left_char
right_char
left_word
right_word
end_of_paragraph
beginning_of_paragraph
...

This should reduce the explosion of edit commands significantly, and also simplify the implementation of Vim-like keys, among other things.

Syntax highlighting via LPeg

One possible suggestion for the method of syntax highlighting is via LPeg. This is used by the Vis editor, which borrowed it from the Scintillua project as described in this README.

You can see all the languages supported in the Vis lexers directory.

If you wanted to embed this in xicore there seem to be multiple Rust Lua bindings, such as these two:

https://github.com/kballard/rust-lua
https://github.com/jcmoyer/rust-lua53

Or maybe LPeg could be use from a Lua-based external tool using whatever future RPC mechanism you intend for "plugins". But this may make sense to be done inside the core.

Mouse

Clicking or dragging without any text will throw
thread '<main>' panicked at 'arithmetic operation overflowed', src/view.rs:239

Binary releases

I’d prefer to just try a ready-made binary release instead of pulling the source and a development environment on my computer. Is there any chance you can add binary releases? Thanks!

Word wrapping

I'm wondering what the thinking is on word wrapping?

Forgive me if I'm wrong but the current implementation has the client sending the key code of a navigation key to the backend which figures out where the cursor sits. If you implement word wrapping this would necessitate the backend knowing the size of the viewport and also the size of each glyph for non monospaced fonts.

Remove do_key from backend

I think it would be better that do_key is removed, and the backend is complete agnostic of key bindings. That way, porting to other platforms or keyboard layout or implementing modes (e.g. vim) will be easier. Further more, do_rpc currently cover pretty much all of the things that do_key does anyway.

Emoji input does not work

Try to enter any emoji character either by copying and pasting or by typing it directly. It does not work

settext messages sometimes don't contain the last line

If the cursor is not on the last line and the last line is empty, it is not sent in the settext message. An extra query to the back-end is needed.

-- empty document
from core: ["settext",{"first_line":0,"height":1,"lines":[["",["cursor",0]]]}]
-- pressed enter
to core:   ["key",{"chars":"\r","flags":0}]
from core: ["settext",{"first_line":0,"height":2,"lines":[["\n"],["",["cursor",0]]],"scrollto":[1,0]}]
                                        --  The last line is here ^
-- pressed up arrow
to core:   ["key",{"chars":"","flags":0}]  
from core: ["settext",{"first_line":0,"height":2,"lines":[["\n",["cursor",0]]],"scrollto":[0,0]}]
                                                  --  Missing the last line ^ 

Community

I'm incredibly excited to see this editor grow, do you have any thoughts about a place where people can discuss? Maybe an IRC channel or mailing list?

I've thrown together an unofficial subreddit: https://www.reddit.com/r/xi_editor/

I also idle a bit on #xi on freenode (irc://irc.freenode.net/xi)

Core's applicability to non editor use-cases

Hi, listened to the interview on New Rustaceans podcast, project sounds awesome. The persistent rope data structures and plugins sound super intriguing.

I'm coming from the log management world where we often process text through project such as logstash. Could a) the concepts behind xi be used effectively in a log management scenario (mutating events, marking them up, running pattern matching, etc); b) BIG leap :-) could xi-core even be forked/used for this?

Just a fun thought experiment for now...

Breaking changes coming up

I want to make some big changes, especially in the FE/BE protocol, after which hopefully it will stabilize for a while. A main motivation is to support multi-window / multi-tab. While I'm making those changes, I'd like to roll in some other stuff to make it cleaner. So:

  • Get rid of the 8 byte framing (issue #29) and move to something closer to JSON-RPC (see issue #2). When I look closely at JSON-RPC, I see some fragmentation, and there's nothing that's exactly what I need, so I'm inclined to mix and match. I do want to unify the syntax of sync and async calls (and a bunch of calls that are now async should become sync so they can return errors, like open/save). The details don't matter so much for FE/BE, but they do matter a lot for plugins (see #43), and it would be ugly for the two to use different low-level mechanism. So what I'm looking at is basically JSON-RPC 2 syntax, minus the "jsonrpc": "2.0" (there's no need to version-negotiate, and signalling strict compatibility with the spec is misleading), with requests allowed in both directions. I don't want to rule out binary stuff in the future, but it's better to start with something clean.
  • All requests in both directions grow a "tab" field, which identifies a tab with a unique identifier. I'm thinking this should be a string derived from the file name (but guaranteed unique) to make debugging more friendly. I've also considered having a two-level structure, with the outer layer identifying the tab and having only a small number of commands, and dispatching the inner message, but I don't think that's better. Obviously main.rs will no longer plumb directly to the editor, but will need to go through a lookup based on tab before dispatching to the editor.
  • do_key should probably go away, and I should just add menu items (maybe in a Developer tab which would be optional for end users).

I know people are working on stuff this might break, which is one reason I'm discussing it before diving in.

Implement move word keyboard shortcuts

Support of these shortcuts would be nice to have:

Option-right arrow : Go to end of current or next word.
Option-left arrow : Go to beginning of current or previous word.
Opt-shift-right arrow : Go to end of current or next word and select the range.
Opt-shift-left arrow : Go to beginning of current or previous word and select the range.

They are already interpreted into actions but the actions are not implemented yet. It should be easy to implement.

Request: Compatibility with Plasma 4

Hi,

I hope it's alright to post a feature request here. It seems a good time to post this since there is yet to be a Linux front-end.

My default distro, Debian stable (Jessie) with KDE desktop, currently runs the Plasma 4 desktop environment. Other Debian-family distros, notably Ubuntu, have already upgraded to Plasma 5.

In Sublime Text 3, the designers evidently made the decision to make it dependent on Plasma 5. As a result I find that some of the menus don't work, and there is the occasional bug of unknown cause that makes me wonder if it is due to the dependency on Plasma 5.

The testing version of Debian has Plasma 5 but it has too many annoyances for me to get on with my work. I'd rather wait until the next stable version comes out next year.

I note that one of your design goals is beauty, and so you might decide to standardize on Plasma 5. I request that whatever Linux front-end is produced be compatible with Plasma 4.

EDIT: I see that there is a project, xi-glium, started since yesterday, and I'm playing with that right now. It is fast and clean and has vast scope for being added to.

VIM for XI ?

This issue is merely a question. If it's a bad place to put it here, please let me know where to direct it otherwise. That said: Do you think it's feasible to implement VIM-like command support in a way that allows it to be re-used by all frontends ?

To me, without nearly no knowledge about the XI architecture, it seems like it should be a command-handler running in the backend. Front-ends would need some sort of connector to send all key-presses to it, and it would decide on what to do. Effects of its operation could either manifest themselves in changes to the document itself, or the GUI. The latter would happen during mode-changes for example.

The second question coming to my mind: Would it be feasible to start with the backend VIM plugin already ?

(My motivation to become more active with this is the promise of having a next-gen editor, which from the very beginning is build around high-performance data structures and programming languages. Right now, both Atom and IntelliJ seem to lag even with small files, and during ordinary interactions.)

Using Bazel as a build tool

I know the project is in its infancy, but considering the possibility it scales up to having multiple front-ends (GTK3, Cocoa, Win32, ncurses) building the project could get out of hand.

Bazel could solve these issues. Right now there are Skylark rules for building rust libraries/binaries.

I'm not overly familiar with the Objective-C rules in Bazel but it could be something to look at for building the OS X front-end.

As far as building the non-cocoa front-ends, other GUI toolkits seem to be a little more forgiving and will have bindings available for popular languages which Bazel is capable of compiling.

I'd love to get the discussion going right now and I could whip up a quick WIP of a Bazel build if this is something you'd like to consider.

Undo / redo

Implement Undo (⌘Z) and Redo (Shift-⌘Z) commands.

The undo buffer can be limited to, say, 20 deep, to keep the buffer sizes small and operations efficient.

It seems practical to implement it in terms of the mini-CRDT. The implementation should garbage collect undos that can no longer be toggled, either because they're older than the 20 or because a new edit happens on top of undone ones. The garbage collection can ideally happen after the update is sent back to the front-end or perhaps even done in an "idle task".

A sequence of inserts or backspaces should be merged into a single undo group.

For maximum UI polish, the menu items should be grayed out when undo or redo is not possible, and the string should be changed to indicate the nature of the edit. However, this is fairly advanced polish (and the strings will need to be localized in the general case), so not planning to do it any time soon.

I'm fairly close to a basic implementation, creating this issue to track remaining work.

xcodebuild no- cargo

/Users/d/xi-editor/xicore.sh: line 43: cargo: command not found

whether use xcode or run xcodebuild in terminal ,there always have the problem above here。

which means cargo is not exist in default, to solve it ,you should install cargo with Macport by running “ sudo port install cargo ” if you have installed macport 。 after a few minute cargo installation will be。

then everything will goes well 。wish this will help

Modal?

Sorry for the noise, but I was wondering if the xi-editor is going to be a modal text editor (a la vim) or a non-modal editor (a la emacs)? Or will the back-end (core) be (somehow?) mode-agnostic.

Thanks!

Thank you for making this! (Not an issue)

I always thought, if GitHub can make an amazing editor like Atom, what would it be like if Google would.

And now...
It's Happening!

I hope this project will keep going!
Have a nice day everyone :)

Editor sometimes crashes when pressing down key

I'm having trouble tracking down exactly what triggers this, but if I type a few lines into the editor, then hit up and down keys, I sometimes after hitting the down key get a crash with this error:

thread '<main>' panicked at 'to_base_units called with arg too large', rope/src/rope.rs:162

This is on OS X 10.11 with latest Rust nightly.

8 bytes

Why do we send the 8 bytes back and forth when dealing with stdio? We certainly don't do that when dealing with with stderr.

I understand the 8 bytes are to tell the client/server how much data we're sending over, but if we're using json and prepending a custom binary sequence to the beginning of the transmission, why not go full binary for the interface? Or the opposite question, why not go full json? We already push an extra '\n' at the end.

** BUILD FAILED **

xcodebuild -scheme XiEditor�[?1l�>

�]2;xcodebuild -scheme XiEditor��]1;xcodebuild��[1m�[36m=== BUILD LEGACY TARGET xicore OF PROJECT XiEditor WITH CONFIGURATION Debug ===�[0m

Check dependencies

�[1mExternalBuildToolExecution�[0m xicore
cd /Users/tangsir/Downloads/tools/xi-editor/rust
export ACTION=
export ALTERNATE_GROUP=staff
export ALTERNATE_MODE=u+w,go-w,a+rX
export ALTERNATE_OWNER=tangsir
export ALWAYS_SEARCH_USER_PATHS=NO
export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
export APPLE_INTERNAL_DIR=/AppleInternal
export APPLE_INTERNAL_DOCUMENTATION_DIR=/AppleInternal/Documentation
export APPLE_INTERNAL_LIBRARY_DIR=/AppleInternal/Library
export APPLE_INTERNAL_TOOLS=/AppleInternal/Developer/Tools
export APPLICATION_EXTENSION_API_ONLY=NO
export APPLY_RULES_IN_COPY_FILES=NO
export ARCHS=x86_64
export AVAILABLE_PLATFORMS="iphonesimulator macosx iphoneos"
export BUILD_COMPONENTS="headers build"
export BUILD_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products
export BUILD_ROOT=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products
export BUILD_STYLE=
export BUILD_VARIANTS=normal
export BUILT_PRODUCTS_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug
export CACHE_ROOT=/var/folders/2x/__tt5_pn213g_9bklrrx29d80000gn/C/com.apple.DeveloperTools/6.1.1-6A2008a/Xcode
export CLANG_CXX_LANGUAGE_STANDARD=gnu++0x
export CLANG_CXX_LIBRARY=libc++
export CLANG_ENABLE_MODULES=YES
export CLANG_ENABLE_OBJC_ARC=YES
export CLANG_WARN_BOOL_CONVERSION=YES
export CLANG_WARN_CONSTANT_CONVERSION=YES
export CLANG_WARN_DIRECT_OBJC_ISA_USAGE=YES_ERROR
export CLANG_WARN_EMPTY_BODY=YES
export CLANG_WARN_ENUM_CONVERSION=YES
export CLANG_WARN_INT_CONVERSION=YES
export CLANG_WARN_OBJC_ROOT_CLASS=YES_ERROR
export CLANG_WARN_UNREACHABLE_CODE=YES
export CLANG_WARN__DUPLICATE_METHOD_MATCH=YES
export CLASS_FILE_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build/JavaClasses
export CLONE_HEADERS=NO
export CODE_SIGNING_ALLOWED=NO
export CODE_SIGN_IDENTITY=-
export COLOR_DIAGNOSTICS=YES
export CONFIGURATION=Debug
export CONFIGURATION_BUILD_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug
export CONFIGURATION_TEMP_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug
export COPYING_PRESERVES_HFS_DATA=NO
export COPY_PHASE_STRIP=NO
export CREATE_INFOPLIST_SECTION_IN_BINARY=NO
export DEAD_CODE_STRIPPING=NO
export DEBUGGING_SYMBOLS=YES
export DEBUG_INFORMATION_FORMAT=dwarf
export DEFAULT_COMPILER=com.apple.compilers.llvm.clang.1_0
export DEFAULT_KEXT_INSTALL_PATH=/Library/Extensions
export DEFINES_MODULE=NO
export DEPLOYMENT_LOCATION=NO
export DEPLOYMENT_POSTPROCESSING=NO
export DERIVED_FILES_DIR=
export DERIVED_FILE_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build/DerivedSources
export DERIVED_SOURCES_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build/DerivedSources
export DEVELOPER_APPLICATIONS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
export DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export DEVELOPER_FRAMEWORKS_DIR=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
export DEVELOPER_FRAMEWORKS_DIR_QUOTED=/Applications/Xcode.app/Contents/Developer/Library/Frameworks
export DEVELOPER_LIBRARY_DIR=/Applications/Xcode.app/Contents/Developer/Library
export DEVELOPER_SDK_DIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
export DEVELOPER_TOOLS_DIR=/Applications/Xcode.app/Contents/Developer/Tools
export DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
export DEVELOPMENT_LANGUAGE=English
export DO_HEADER_SCANNING_IN_JAM=NO
export DSTROOT=/tmp/XiEditor.dst
export DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
export DWARF_DSYM_FILE_NAME=.dSYM
export DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT=NO
export DWARF_DSYM_FOLDER_PATH=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug
export EMBEDDED_PROFILE_NAME=embedded.provisionprofile
export ENABLE_HEADER_DEPENDENCIES=YES
export ENABLE_STRICT_OBJC_MSGSEND=YES
export ENABLE_TESTABILITY=YES
export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS=".DS_Store .svn .git .hg CVS"
export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES=".nib *.lproj *.framework *.gch *.xcode (*) .DS_Store CVS .svn .git .hg"
export FILE_LIST=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build/Objects/LinkFileList
export FRAMEWORK_VERSION=A
export GCC3_VERSION=3.3
export GCC_C_LANGUAGE_STANDARD=gnu99
export GCC_DYNAMIC_NO_PIC=NO
export GCC_NO_COMMON_BLOCKS=YES
export GCC_OPTIMIZATION_LEVEL=0
export GCC_PREPROCESSOR_DEFINITIONS="DEBUG=1 "
export GCC_VERSION=com.apple.compilers.llvm.clang.1_0
export GCC_WARN_64_TO_32_BIT_CONVERSION=YES
export GCC_WARN_ABOUT_RETURN_TYPE=YES_ERROR
export GCC_WARN_UNDECLARED_SELECTOR=YES
export GCC_WARN_UNINITIALIZED_AUTOS=YES_AGGRESSIVE
export GCC_WARN_UNUSED_FUNCTION=YES
export GCC_WARN_UNUSED_VARIABLE=YES
export GENERATE_MASTER_OBJECT_FILE=NO
export GENERATE_PKGINFO_FILE=NO
export GID=20
export GROUP=staff
export HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT=YES
export HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES=YES
export HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS=YES
export HEADERMAP_INCLUDES_PROJECT_HEADERS=YES
export HEADERMAP_USES_FRAMEWORK_PREFIX_ENTRIES=YES
export HEADERMAP_USES_VFS=NO
export HEADER_SEARCH_PATHS=" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include"
export INFOPLIST_EXPAND_BUILD_SETTINGS=YES
export INFOPLIST_OUTPUT_FORMAT=same-as-input
export INFOPLIST_PREPROCESS=NO
export INSTALL_DIR=/tmp/XiEditor.dst
export INSTALL_GROUP=staff
export INSTALL_MODE_FLAG=u+w,go-w,a+rX
export INSTALL_OWNER=tangsir
export INSTALL_ROOT=/tmp/XiEditor.dst
export JAVA_APP_STUB=/System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
export JAVA_ARCHIVE_CLASSES=YES
export JAVA_ARCHIVE_TYPE=JAR
export JAVA_COMPILER=/usr/bin/javac
export JAVA_FRAMEWORK_RESOURCES_DIRS=Resources
export JAVA_JAR_FLAGS=cv
export JAVA_SOURCE_SUBDIR=.
export JAVA_USE_DEPENDENCIES=YES
export JAVA_ZIP_FLAGS=-urg
export KEEP_PRIVATE_EXTERNS=NO
export LD_DEPENDENCY_INFO_FILE=//xicore_dependency_info.dat
export LD_GENERATE_MAP_FILE=NO
export LD_MAP_FILE_PATH=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build/xicore-LinkMap--.txt
export LD_NO_PIE=NO
export LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER=YES
export LEGACY_DEVELOPER_DIR=/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
export LIBRARY_FLAG_NOSPACE=YES
export LIBRARY_KEXT_INSTALL_PATH=/Library/Extensions
export LINKER_DISPLAYS_MANGLED_NAMES=NO
export LINK_WITH_STANDARD_LIBRARIES=YES
export LOCAL_ADMIN_APPS_DIR=/Applications/Utilities
export LOCAL_APPS_DIR=/Applications
export LOCAL_DEVELOPER_DIR=/Library/Developer
export LOCAL_LIBRARY_DIR=/Library
export MACOSX_DEPLOYMENT_TARGET=10.11
export MAC_OS_X_PRODUCT_BUILD_VERSION=15E65
export MAC_OS_X_VERSION_ACTUAL=101104
export MAC_OS_X_VERSION_MAJOR=101100
export MAC_OS_X_VERSION_MINOR=1104
export MODULE_CACHE_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/ModuleCache
export MTL_ENABLE_DEBUG_INFO=YES
export OBJECT_FILE_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build/Objects
export OBJROOT=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates
export ONLY_ACTIVE_ARCH=YES
export OPTIMIZATION_LEVEL=0
export OS=MACOS
export PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES="/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Applications/Xcode.app/Contents/Developer/Headers /Applications/Xcode.app/Contents/Developer/SDKs /Applications/Xcode.app/Contents/Developer/Platforms"
export PLATFORM_NAME=macosx
export PLIST_FILE_OUTPUT_FORMAT=same-as-input
export PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR=YES
export PRECOMP_DESTINATION_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build/PrefixHeaders
export PRESERVE_DEAD_CODE_INITS_AND_TERMS=NO
export PRODUCT_MODULE_NAME=xicore
export PRODUCT_NAME=xicore
export PROFILING_CODE=NO
export PROJECT=XiEditor
export PROJECT_DERIVED_FILE_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/DerivedSources
export PROJECT_DIR=/Users/tangsir/Downloads/tools/xi-editor
export PROJECT_FILE_PATH=/Users/tangsir/Downloads/tools/xi-editor/XiEditor.xcodeproj
export PROJECT_NAME=XiEditor
export PROJECT_TEMP_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build
export PROJECT_TEMP_ROOT=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates
export REMOVE_CVS_FROM_RESOURCES=YES
export REMOVE_GIT_FROM_RESOURCES=YES
export REMOVE_HEADERS_FROM_EMBEDDED_BUNDLES=YES
export REMOVE_HG_FROM_RESOURCES=YES
export REMOVE_SVN_FROM_RESOURCES=YES
export SCAN_ALL_SOURCE_FILES_FOR_INCLUDES=NO
export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
export SEPARATE_STRIP=NO
export SEPARATE_SYMBOL_EDIT=NO
export SHARED_DERIVED_FILE_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug/DerivedSources
export SHARED_PRECOMPS_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/PrecompiledHeaders
export SKIP_INSTALL=YES
export SOURCE_ROOT=/Users/tangsir/Downloads/tools/xi-editor
export SRCROOT=/Users/tangsir/Downloads/tools/xi-editor
export STRINGS_FILE_OUTPUT_ENCODING=UTF-16
export STRIP_INSTALLED_PRODUCT=YES
export STRIP_STYLE=all
export SUPPORTED_PLATFORMS=macosx
export SWIFT_OPTIMIZATION_LEVEL=-Onone
export SYMROOT=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products
export SYSTEM_ADMIN_APPS_DIR=/Applications/Utilities
export SYSTEM_APPS_DIR=/Applications
export SYSTEM_CORE_SERVICES_DIR=/System/Library/CoreServices
export SYSTEM_DEMOS_DIR=/Applications/Extras
export SYSTEM_DEVELOPER_APPS_DIR=/Applications/Xcode.app/Contents/Developer/Applications
export SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin
export SYSTEM_DEVELOPER_DEMOS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Utilities/Built Examples"
export SYSTEM_DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
export SYSTEM_DEVELOPER_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library"
export SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Graphics Tools"
export SYSTEM_DEVELOPER_JAVA_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Java Tools"
export SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR="/Applications/Xcode.app/Contents/Developer/Applications/Performance Tools"
export SYSTEM_DEVELOPER_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes"
export SYSTEM_DEVELOPER_TOOLS=/Applications/Xcode.app/Contents/Developer/Tools
export SYSTEM_DEVELOPER_TOOLS_DOC_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/documentation/DeveloperTools"
export SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR="/Applications/Xcode.app/Contents/Developer/ADC Reference Library/releasenotes/DeveloperTools"
export SYSTEM_DEVELOPER_USR_DIR=/Applications/Xcode.app/Contents/Developer/usr
export SYSTEM_DEVELOPER_UTILITIES_DIR=/Applications/Xcode.app/Contents/Developer/Applications/Utilities
export SYSTEM_DOCUMENTATION_DIR=/Library/Documentation
export SYSTEM_KEXT_INSTALL_PATH=/System/Library/Extensions
export SYSTEM_LIBRARY_DIR=/System/Library
export TARGETNAME=xicore
export TARGET_BUILD_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug
export TARGET_NAME=xicore
export TARGET_TEMP_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build
export TEMP_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build
export TEMP_FILES_DIR=
export TEMP_FILE_DIR=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/xicore.build
export TEMP_ROOT=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates
export TREAT_MISSING_BASELINES_AS_TEST_FAILURES=NO
export UID=501
export USER=tangsir
export USER_APPS_DIR=/Users/tangsir/Applications
export USER_LIBRARY_DIR=/Users/tangsir/Library
export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=6A2008a
export XCODE_VERSION_ACTUAL=0611
export XCODE_VERSION_MAJOR=0600
export XCODE_VERSION_MINOR=0610
export arch=x86_64
export diagnostic_message_length=80
export variant=normal
/bin/bash /Users/tangsir/Downloads/tools/xi-editor/xicore.sh

�[1m�[36m=== BUILD TARGET XiEditor OF PROJECT XiEditor WITH CONFIGURATION Debug ===�[0m

Check dependencies

�[1mCompileSwiftSources�[0m normal x86_64 com.apple.xcode.tools.swift.compiler
cd /Users/tangsir/Downloads/tools/xi-editor
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -target x86_64-apple-macosx10.11 -module-name XiEditor -Onone -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -g -module-cache-path /Users/tangsir/Library/Developer/Xcode/DerivedData/ModuleCache -I /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -F /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -c -j4 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppWindowController.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/ShadowView.swift -output-file-map /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/XiEditor-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/XiEditor.swiftmodule -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources -Xcc -DDEBUG=1 -emit-objc-header -emit-objc-header-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/XiEditor-Swift.h

�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift
cd /Users/tangsir/Downloads/tools/xi-editor
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppWindowController.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -target-cpu core2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -I /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -F /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -g -module-cache-path /Users/tangsir/Library/Developer/Xcode/DerivedData/ModuleCache -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources -Xcc -DDEBUG=1 -emit-module-doc-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnectionpartial.swiftdoc -Onone -module-name XiEditor -emit-module-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnectionpartial.swiftmodule -serialize-diagnostics-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnection.dia -emit-dependencies-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnection.d -o /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnection.o
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:90:27: error: consecutive statements on a line must be separated by ';'
let data = try NSJSONSerialization.dataWithJSONObject(json, options: [])
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:99:27: error: consecutive statements on a line must be separated by ';'
let json = try NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments)
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:52: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:114: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:55: error: expected '{' after 'if' condition
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: computed property must have an explicit type
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:91: error: 'let' declarations cannot be computed properties
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: variable with getter/setter cannot have an initial value
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^ ~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:142:32: error: expected type after 'as'
let s = line![0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:150:35: error: expected type after 'as'
let attr = attr as! [AnyObject]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:151:38: error: expected type after 'as'
let type = attr[0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:155:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:157:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:161:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:163:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected type after 'as'
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected expression in list of expressions
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:220:39: error: expected type after 'as'
self.lines = text["lines"]! as! [[AnyObject]]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:48: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected type after 'as'
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected expression in list of expressions
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:110: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:73:21: error: 'UInt8' is not identical to 'Void'
memmove(recvBufBytes, recvBufBytes + i, recvBufLen - i)
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:19: error: expression resolves to an unused function
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:19: error: expression resolves to an unused function
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: type annotation missing in pattern
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:138:26: error: use of unresolved identifier 'resp'
let result = resp["result"]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:140:59: error: '(UnsafePointer, Int32) -> UnsafeMutablePointer' is not convertible to 'Int'
callback = self.pending.removeValueForKey(index)
^

�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppWindowController.swift
cd /Users/tangsir/Downloads/tools/xi-editor
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift -primary-file /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppWindowController.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -target-cpu core2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -I /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -F /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -g -module-cache-path /Users/tangsir/Library/Developer/Xcode/DerivedData/ModuleCache -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources -Xcc -DDEBUG=1 -emit-module-doc-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowControllerpartial.swiftdoc -Onone -module-name XiEditor -emit-module-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowControllerpartial.swiftmodule -serialize-diagnostics-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowController.dia -emit-dependencies-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowController.d -o /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowController.o
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:90:27: error: consecutive statements on a line must be separated by ';'
let data = try NSJSONSerialization.dataWithJSONObject(json, options: [])
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:99:27: error: consecutive statements on a line must be separated by ';'
let json = try NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments)
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:52: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:114: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:55: error: expected '{' after 'if' condition
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: computed property must have an explicit type
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:91: error: 'let' declarations cannot be computed properties
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: variable with getter/setter cannot have an initial value
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^ ~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:142:32: error: expected type after 'as'
let s = line![0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:150:35: error: expected type after 'as'
let attr = attr as! [AnyObject]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:151:38: error: expected type after 'as'
let type = attr[0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:155:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:157:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:161:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:163:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected type after 'as'
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected expression in list of expressions
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:220:39: error: expected type after 'as'
self.lines = text["lines"]! as! [[AnyObject]]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:48: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected type after 'as'
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected expression in list of expressions
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:110: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~

�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift
cd /Users/tangsir/Downloads/tools/xi-editor
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppWindowController.swift -primary-file /Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -target-cpu core2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -I /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -F /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -g -module-cache-path /Users/tangsir/Library/Developer/Xcode/DerivedData/ModuleCache -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources -Xcc -DDEBUG=1 -emit-module-doc-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditViewpartial.swiftdoc -Onone -module-name XiEditor -emit-module-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditViewpartial.swiftmodule -serialize-diagnostics-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditView.dia -emit-dependencies-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditView.d -o /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditView.o
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:90:27: error: consecutive statements on a line must be separated by ';'
let data = try NSJSONSerialization.dataWithJSONObject(json, options: [])
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:99:27: error: consecutive statements on a line must be separated by ';'
let json = try NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments)
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:52: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:114: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:55: error: expected '{' after 'if' condition
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: computed property must have an explicit type
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:91: error: 'let' declarations cannot be computed properties
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: variable with getter/setter cannot have an initial value
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^ ~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:142:32: error: expected type after 'as'
let s = line![0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:150:35: error: expected type after 'as'
let attr = attr as! [AnyObject]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:151:38: error: expected type after 'as'
let type = attr[0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:155:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:157:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:161:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:163:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected type after 'as'
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected expression in list of expressions
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:220:39: error: expected type after 'as'
self.lines = text["lines"]! as! [[AnyObject]]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:48: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected type after 'as'
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected expression in list of expressions
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:110: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:30:61: error: 'CTFontOrientation.Type' does not have a member named 'Horizontal'
let advance = CTFontGetAdvancesForGlyphs(font, .Horizontal, glyphs, nil, 1)
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:81:27: error: extra argument 'colorLiteralRed' in call
selcolor = NSColor(colorLiteralRed: 0.7, green: 0.85, blue: 0.99, alpha: 1.0)
^ ~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:96:23: error: 'String.UTF8View.Index' does not have a member named 'advancedBy'
return s.utf8.startIndex.advancedBy(ix).samePositionIn(s.utf16)!._offset
^ ~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:143:64: error: use of unresolved identifier 's'
let attrString = NSMutableAttributedString(string: s, attributes: self.attributes)
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:149:29: error: '[(AnyObject)]' does not have a member named 'dropFirst'
for attr in line!.dropFirst() {
^ ~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:185:57: error: use of unresolved identifier 's'
let utf16_ix = utf8_offset_to_utf16(s, cursor)
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:229:55: error: 'Bool' is not a subtype of 'Void'
dispatch_async(dispatch_get_main_queue()) {
^

�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift
cd /Users/tangsir/Downloads/tools/xi-editor
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppWindowController.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift -primary-file /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift /Users/tangsir/Downloads/tools/xi-editor/XiEditor/ShadowView.swift -target x86_64-apple-macosx10.11 -target-cpu core2 -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -I /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -F /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug -g -module-cache-path /Users/tangsir/Library/Developer/Xcode/DerivedData/ModuleCache -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-generated-files.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-own-target-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-all-target-headers.hmap -Xcc -iquote -Xcc /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/XiEditor-project-headers.hmap -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Products/Debug/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources/x86_64 -Xcc -I/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/DerivedSources -Xcc -DDEBUG=1 -emit-module-doc-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegatepartial.swiftdoc -Onone -module-name XiEditor -emit-module-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegatepartial.swiftmodule -serialize-diagnostics-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegate.dia -emit-dependencies-path /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegate.d -o /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegate.o
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:90:27: error: consecutive statements on a line must be separated by ';'
let data = try NSJSONSerialization.dataWithJSONObject(json, options: [])
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:92:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:99:27: error: consecutive statements on a line must be separated by ';'
let json = try NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments)
^
;
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:52: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:114: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:101:83: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:11: error: expected 'while' in 'do-while' loop
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:108:19: error: braced block of statements is an unused closure
} catch _ {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:55: error: expected '{' after 'if' condition
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: computed property must have an explicit type
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:91: error: 'let' declarations cannot be computed properties
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift:136:61: error: variable with getter/setter cannot have an initial value
if let resp = response as? [String: AnyObject], let index = resp["index"] as? Int {
^ ~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:142:32: error: expected type after 'as'
let s = line![0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:150:35: error: expected type after 'as'
let attr = attr as! [AnyObject]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:151:38: error: expected type after 'as'
let type = attr[0] as! String
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:155:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:157:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:161:43: error: expected type after 'as'
let start = attr[1] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:163:41: error: expected type after 'as'
let end = attr[2] as! Int
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected type after 'as'
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected expression in list of expressions
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:165:66: error: expected ',' separator
let fgcolor = colorFromArgb(UInt32(attr[3] as! Int))
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift:220:39: error: expected type after 'as'
self.lines = text["lines"]! as! [[AnyObject]]
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:48: error: expected '{' after 'if' condition
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: computed property must have an explicit type
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected type after 'as'
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected expression in list of expressions
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:41:77: error: expected ',' separator
self.appWindowController?.editView.updateSafe(response[1] as! [String: AnyObject])
^
,
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:110: error: 'let' declarations cannot be computed properties
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: variable with getter/setter cannot have an initial value
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:30:23: error: cannot convert the expression's type '()' to type 'AnyObject'
self?.handleCoreCmd(data)
~~~~~~^~~~~~~~~~~~~~~~~~~
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:39:79: error: type annotation missing in pattern
if let response = json as? [AnyObject] where response.count == 2, let cmd = response[0] as? NSString {
^
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:50:29: error: type 'AnyObject!' cannot be implicitly downcast to 'NSApplication'; did you mean to use 'as' to force downcast?
application(NSApp, openFile: path)
^
as NSApplication
/Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift:40:16: error: use of unresolved identifier 'cmd'
if cmd == "settext" {
^

2016-04-29 09:50:08.863 xcodebuild[65436:836589] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-6269/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:77
Details: Failed to load dependencies output contents from /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnection.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “CoreConnection.d” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnection.d, NSUnderlyingError=0x7fce394bff20 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}. User info: { NSFilePath = "/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/CoreConnection.d"; NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"No such file or directory\""; }. Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong)) Thread: <NSThread: 0x7fce394b5640>{number = 6, name = (null)} Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide. 2016-04-29 09:50:08.864 xcodebuild[65436:836589] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-6269/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:77 Details: Failed to load dependencies output contents from/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowController.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “AppWindowController.d” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowController.d, NSUnderlyingError=0x7fce3961f710 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}. User info: {
NSFilePath = "/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppWindowController.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString ___strong, void (^__strong)(NSString *__strong))
Thread: <NSThread: 0x7fce394b5640>{number = 6, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2016-04-29 09:50:08.864 xcodebuild[65436:836589] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-6269/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:77
Details: Failed to load dependencies output contents from /Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditView.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “EditView.d” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditView.d, NSUnderlyingError=0x7fce396c3e70 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}. User info: { NSFilePath = "/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/EditView.d"; NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"No such file or directory\""; }. Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong)) Thread: <NSThread: 0x7fce394b5640>{number = 6, name = (null)} Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide. 2016-04-29 09:50:08.865 xcodebuild[65436:836589] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-6269/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:77 Details: Failed to load dependencies output contents from/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegate.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “AppDelegate.d” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegate.d, NSUnderlyingError=0x7fce396c8110 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}. User info: {
NSFilePath = "/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/AppDelegate.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong))
Thread: <NSThread: 0x7fce394b5640>{number = 6, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2016-04-29 09:50:08.865 xcodebuild[65436:836589] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-6269/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:77
Details: Failed to load dependencies output contents from ``/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/ShadowView.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “ShadowView.d” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/ShadowView.d, NSUnderlyingError=0x7fce396bae50 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}. User info: {
NSFilePath = "/Users/tangsir/Library/Developer/Xcode/DerivedData/XiEditor-dashndqemxpipafsxaqrdsghupby/Build/Intermediates/XiEditor.build/Debug/XiEditor.build/Objects-normal/x86_64/ShadowView.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *_strong))
Thread: <NSThread: 0x7fce394b5640>{number = 6, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
�[1m�[31m
* BUILD FAILED **

�[0m
The following build commands failed:
�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/CoreConnection.swift
�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppWindowController.swift
�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/EditView.swift
�[1mCompileSwift�[0m normal x86_64 /Users/tangsir/Downloads/tools/xi-editor/XiEditor/AppDelegate.swift
�[1mCompileSwiftSources�[0m normal x86_64 com.apple.xcode.tools.swift.compiler
(5 failures)
�[1m�[7m%�[27m�[1m�[0m

To anyone who installed Rust via homebrew

Apparently installing Rust via Homebrew installs the 1.3 version, which causes xcodebuild to return the following error.

Compiling xi-rope v0.0.0 (file:///Users/xyz/dev-lab/xi-editor/rust/rope)
   Compiling serde v0.7.0
   Compiling winapi-build v0.1.1
   Compiling num-integer v0.1.32
rope/src/tree.rs:445:1: 451:2 error: the associated type `<N as tree::NodeInfo>::L` may not live long enough [E0309]
                     ...

The solution was to install Rust from the official website obviously.

It's definitely my mistake, but I never really installed/used Rust before ...

(I thought about submitting a PR to explicitly specify a minimum Rust version ... but again I don't know enough about Rust to know which version would be required)

editor state for copy-and-paste (overwriting selection) confused by a backspace

editor state for copy-and-paste (overwriting selection) confused by a backspace

I'm using a build from master branch, commit c6fa6b2

When i start up the editor, and then type the following (where each keystroke is delimited by single quotes):

'0', '1', 'delete', '2', 'shift-leftarrow', 'shift-leftarrow', 'command-c', 'command-v'

(in other words, type the string "01", then delete the '1' and replace it with a '2', then select the full text "02" via the left arrow key; finally copy it to the clipboard and then paste it over the same selected text...)

I find, when I do this, instead of replacing "02" with "02" as I would have expected, the editor is replacing the string "02" with "00".

(There are other strange phenomena occurring I suspect are related to this.)

non-OS-X build instructions

Can we get some text in a README about how to build and run a minimal version of the backend on non-OS-X platforms?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.