<commit_before># Coeditor

Yet Another Pair Programming Package for Atom.

![demo](demo.gif)

![A screenshot of your package](https://f.cloud.github.com/assets/69169/2290250/c35d867a-a017-11e3-86be-cd7c5bf3ff9b.gif)

## Features
+ Non-conflict collaborative text editing
+ Text highlight synchronization
+ Collaborative awareness
+ Project sync
+ File grammar sync
+ Active tab sync
+ Project's files saving and closing sync

## Known issue
+ If clients use different types for line ending (i.e. CRLF or LF) with each other, this package will cause files end up with inconsistent content.
**MAKE SURE ALL CLIENTS USE THE SAME TYPE FOR LINE ENDING AND SET TYPE IN PACKAGE'S SETTING VIEW! (EITHER CRLF OR LF WILL DO)**

## TODO
+ ~~Customized configuration (Server address, random session id or given by user)~~ DONE
+ ~~Broadcast disconnections to other living Atom clients~~ DONE
+ ~~Check socket status before using~~ DONE
+ ~~Broadcast server close to each Atom clients, and disconnect all clients~~ DONE
+ ~~Text selection background and cursor colors for different Atom clients ?~~ DONE  
+ Suggestions Synchronization NO API
+ ~~Settings view~~ DONE
+ ~~Working folder files synchronization~~ DONE
+ ~~File operations synchronization~~ DONE
  - ~~save -- DONE, but limited, don't work for new file which does not have path~~
  - ~~close~~
+ ~~Tab sync~~
+ Heartbeat between client and server
+ Build cloud server
+ Write spec

## Tentative
+ ~~Working folder files synchronization~~ MOVED TO TODO list
+ Server uses in-memory storage when running, so no file content will be stored in server when it is shutdown, might change to MongoDB

## Usage
_prerequisite: node.js (v>=6.10.1)_

+ Install dependencies
  - `cd coeditor`
  - `npm install`

+ Start Server
  - `npm start`

+ Toggle package in Atom
  - ~~open `coeditor` folder in Atom~~
  - ~~change `address` in `coeditor.js` and save~~
  - ~~client can now set server address when toggling package~~
  - modify settings in the package's settings view firstly
    - server address
    - client id which will show in indicator
    - indicator background color
    - line ending
  - link package to Atom
    - `cd coeditor`
    - `apm link`
  - reload Atom, `ctrl + shift + F5`
  - open an existing or new file
  - toggle coeditor, `ctrl + shift + p` then type `toggle`, hit `coeditor: toggle`
  - input ~~server address,~~ session id ~~and client id~~
  - check your server console
  - disconnect, `ctrl + shift + p` then type `disconnect`, hit `coeditor: disconnect`
<commit_msg>add YoutuBe link<commit_after># Coeditor

Yet Another Pair Programming Package for Atom.

## Demo
_Click to view high quality video on YouTube_

[![demo](demo.gif)](https://youtu.be/EOCw2HfRxZE)

## Features
+ Non-conflict collaborative text editing
+ Text highlight synchronization
+ Collaborative awareness
+ Project sync
+ File grammar sync
+ Active tab sync
+ Project's files saving and closing sync

## Known issue
+ If clients use different types for line ending (i.e. CRLF or LF) with each other, this package will cause files end up with inconsistent content.
**MAKE SURE ALL CLIENTS USE THE SAME TYPE FOR LINE ENDING AND SET TYPE IN PACKAGE'S SETTING VIEW! (EITHER CRLF OR LF WILL DO)**

## TODO
+ ~~Customized configuration (Server address, random session id or given by user)~~ DONE
+ ~~Broadcast disconnections to other living Atom clients~~ DONE
+ ~~Check socket status before using~~ DONE
+ ~~Broadcast server close to each Atom clients, and disconnect all clients~~ DONE
+ ~~Text selection background and cursor colors for different Atom clients ?~~ DONE  
+ Suggestions Synchronization NO API
+ ~~Settings view~~ DONE
+ ~~Working folder files synchronization~~ DONE
+ ~~File operations synchronization~~ DONE
  - ~~save -- DONE, but limited, don't work for new file which does not have path~~
  - ~~close~~
+ ~~Tab sync~~
+ Heartbeat between client and server
+ Build cloud server
+ Write spec

## Tentative
+ ~~Working folder files synchronization~~ MOVED TO TODO list
+ Server uses in-memory storage when running, so no file content will be stored in server when it is shutdown, might change to MongoDB

## Usage
_prerequisite: node.js (v>=6.10.1)_

+ Install dependencies
  - `cd coeditor`
  - `npm install`

+ Start Server
  - `npm start`

+ Toggle package in Atom
  - ~~open `coeditor` folder in Atom~~
  - ~~change `address` in `coeditor.js` and save~~
  - ~~client can now set server address when toggling package~~
  - modify settings in the package's settings view firstly
    - server address
    - client id which will show in indicator
    - indicator background color
    - line ending
  - link package to Atom
    - `cd coeditor`
    - `apm link`
  - reload Atom, `ctrl + shift + F5`
  - open an existing or new file
  - toggle coeditor, `ctrl + shift + p` then type `toggle`, hit `coeditor: toggle`
  - input ~~server address,~~ session id ~~and client id~~
  - check your server console
  - disconnect, `ctrl + shift + p` then type `disconnect`, hit `coeditor: disconnect`

{'fraction_non_alphanumeric': 0.09339678762641285, 'fraction_numerical': 0.00793178663493952, 'mean_word_length': 3.994059405940594, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2157586', 'n_tokens_mistral': 1509, 'n_tokens_neox': 1452, 'n_words': 660}