Esempio n. 1
0
def main():
    G.__VERSION__ = '0.11'
    G.__PLUGIN_VERSION__ = '1.2.0'
    utils.reload_settings()

    migrations.rename_floobits_dir()
    migrations.migrate_symlinks()
    utils.normalize_persistent_data()

    emacs = emacs_handler.EmacsHandler()
    G.emacs = emacs
    _, port = reactor.reactor.listen(emacs)
    utils.set_timeout(cb, 100, port)
    reactor.reactor.block()
Esempio n. 2
0
def main():
    G.__VERSION__ = '0.11'
    G.__PLUGIN_VERSION__ = '1.1.1'
    utils.reload_settings()

    floo_log_level = 'msg'
    if G.DEBUG:
        floo_log_level = 'debug'
    msg.LOG_LEVEL = msg.LOG_LEVELS.get(floo_log_level.upper(), msg.LOG_LEVELS['MSG'])
    migrations.rename_floobits_dir()
    migrations.migrate_symlinks()
    utils.normalize_persistent_data()

    emacs = emacs_handler.EmacsHandler()
    G.emacs = emacs
    _, port = reactor.reactor.listen(emacs)
    utils.set_timeout(cb, 100, port)
    reactor.reactor.block()
Esempio n. 3
0
def main():
    G.__VERSION__ = '0.03'
    G.__PLUGIN_VERSION__ = '1.0'
    utils.reload_settings()

    floo_log_level = 'msg'
    if G.DEBUG:
        floo_log_level = 'debug'
    msg.LOG_LEVEL = msg.LOG_LEVELS.get(floo_log_level.upper(),
                                       msg.LOG_LEVELS['MSG'])
    migrations.rename_floobits_dir()
    migrations.migrate_symlinks()

    emacs = emacs_handler.EmacsHandler()
    G.emacs = emacs
    _, port = reactor.reactor.listen(emacs)
    utils.set_timeout(cb, 100, port)
    reactor.reactor.block()
Esempio n. 4
0
def main():
    G.__VERSION__ = '0.11'
    G.__PLUGIN_VERSION__ = '1.5.10'
    utils.reload_settings()

    if not os.path.exists(G.FLOORC_JSON_PATH):
        migrations.migrate_floorc()
        utils.reload_settings()

    migrations.rename_floobits_dir()
    migrations.migrate_symlinks()

    try:
        utils.normalize_persistent_data()
    except Exception:
        pass

    emacs = emacs_handler.EmacsHandler()
    G.emacs = emacs
    _, port = reactor.reactor.listen(emacs)
    utils.set_timeout(cb, 100, port)
    reactor.reactor.block()
Esempio n. 5
0
def main():
    G.__VERSION__ = '0.11'
    G.__PLUGIN_VERSION__ = '1.5.6'
    utils.reload_settings()

    if not os.path.exists(G.FLOORC_JSON_PATH):
        migrations.migrate_floorc()
        utils.reload_settings()

    migrations.rename_floobits_dir()
    migrations.migrate_symlinks()

    try:
        utils.normalize_persistent_data()
    except Exception:
        pass

    emacs = emacs_handler.EmacsHandler()
    G.emacs = emacs
    _, port = reactor.reactor.listen(emacs)
    utils.set_timeout(cb, 100, port)
    reactor.reactor.block()
Esempio n. 6
0
def main():
    G.__VERSION__ = '0.11'
    G.__PLUGIN_VERSION__ = None

    parser = optparse.OptionParser(usage='%prog [options]')
    parser.add_option("-p", "--port",
                      dest="port",
                      default=0,
                      help="The port to listen on. Useful for debugging.")
    parser.add_option("--set-version",
                      dest="version")

    options, args = parser.parse_args()
    port = int(options.port)
    G.__PLUGIN_VERSION__ = options.version
    if not G.__PLUGIN_VERSION__:
        print('--set-version is a required argument')
        print('args: %s' % ' '.join(args))
        sys.exit(1)

    utils.reload_settings()

    if not os.path.exists(G.FLOORC_JSON_PATH):
        migrations.migrate_floorc()
        utils.reload_settings()

    migrations.rename_floobits_dir()
    migrations.migrate_symlinks()

    try:
        utils.normalize_persistent_data()
    except Exception:
        pass

    emacs = emacs_handler.EmacsHandler()
    G.emacs = emacs
    _, port = reactor.reactor.listen(emacs, port=port)
    utils.set_timeout(cb, 100, port)
    reactor.reactor.block()
Esempio n. 7
0
from floo.common import api, ignore, migrations, msg, reactor, utils, shared as G
from floo.common.handlers.account import CreateAccountHandler
from floo.common.handlers.credentials import RequestCredentialsHandler
from floo.vim_handler import VimHandler
from floo import editor


reactor = reactor.reactor

# Protocol version
G.__VERSION__ = '0.11'
G.__PLUGIN_VERSION__ = '2.1.1'

utils.reload_settings()

migrations.rename_floobits_dir()
migrations.migrate_symlinks()

G.DELETE_LOCAL_FILES = bool(int(vim.eval('floo_delete_local_files')))
G.SHOW_HIGHLIGHTS = bool(int(vim.eval('floo_show_highlights')))
G.SPARSE_MODE = bool(int(vim.eval('floo_sparse_mode')))
G.TIMERS = bool(int(vim.eval('has("timers")')))


call_feedkeys = False
ticker = None
ticker_errors = 0
using_feedkeys = False

ticker_python = '''import sys; import subprocess; import time
args = ['{binary}', '--servername', '{servername}', '--remote-expr', 'g:FloobitsGlobalTick()']
Esempio n. 8
0
import vim

from floo.common import api, migrations, msg, reactor, utils, shared as G
from floo import editor, vui

VUI = vui.VUI()

reactor = reactor.reactor

# Protocol version
G.__VERSION__ = '0.11'
G.__PLUGIN_VERSION__ = '3.0.7'

utils.reload_settings()

migrations.rename_floobits_dir()
migrations.migrate_symlinks()

G.DELETE_LOCAL_FILES = bool(int(vim.eval('floo_delete_local_files')))
G.SHOW_HIGHLIGHTS = bool(int(vim.eval('floo_show_highlights')))
G.SPARSE_MODE = bool(int(vim.eval('floo_sparse_mode')))
G.TIMERS = bool(int(vim.eval('has("timers")')))


def _get_line_endings():
    formats = vim.eval('&fileformats')
    if not formats:
        return '\n'
    name = formats.split(',')[0]
    if name == 'dos':
        return '\r\n'