Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions gvim.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
from vim.rules import action, motion, object, navigation, buffer, quick_replace, quick_settings, diff, general
from vim.plugins import surround, easy_motion, netrw, ctrlp, fugitive, unimpaired, snipmate
from vim.vim_config import get_config
try:
import pkg_resources
pkg_resources.require("dragonfly >= 0.6.5beta1.dev-r99")
except ImportError:
pass

print 'new gVim grammar accessed.'

# Saving generally useful info
config = get_config()
Expand Down Expand Up @@ -80,15 +73,15 @@ def _process_recognition(self, node, extras):
# Note: there are issues with the super call. If you run into them,
# do not fret and google for super TypeError order.
super(self.__class__, self)._process_recognition(node, extras)
print "\n(INSERT)"
print("\n(INSERT)")

class InsertModeDisabler(InsertModeFinishRule):
def _process_recognition(self, node, extras):
insertModeGrammar.disable()
insertModeBootstrap.enable()
normalModeGrammar.enable()
super(self.__class__, self)._process_recognition(node, extras)
print "\n(NORMAL)"
print("\n(NORMAL)")

### 3. Command mode
from vim.rules.command_mode import CommandModeStartRule, CommandModeFinishRule, CommandModeCommands
Expand All @@ -99,15 +92,15 @@ def _process_recognition(self, node, extras):
normalModeGrammar.disable()
commandModeGrammar.enable()
super(self.__class__, self)._process_recognition(node, extras)
print "\n(EX MODE)"
print("\n(EX MODE)")

class CommandModeDisabler(CommandModeFinishRule):
def _process_recognition(self, node, extras):
commandModeGrammar.disable()
commandModeBootstrap.enable()
normalModeGrammar.enable()
super(self.__class__, self)._process_recognition(node, extras)
print "\n(NORMAL)"
print("\n(NORMAL)")

### 4. Prep & activate the requisite grammars
gvim_exec_context = AppContext(executable="gvim")
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/execute_rule.py → vim/lib/execute_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _executeRecursive(executable):
for item in executable:
_executeRecursive(item)
else:
print "Neither executable nor a list: ", executable
print("Neither executable nor a list: ", executable)

def execute_rule(*rule_names):
def _exec_function(**kwargs):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.