-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgvim.txt
72 lines (58 loc) · 2.42 KB
/
gvim.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# This is a config file for Dragonfly's _multiedit.py command-module.
# To use this config, you must rename this file to _multiedit.txt and
# place it in the same directory as the _multiedit.py file.
#
# Pull in all of Dragonfly's action objects so that we can use them here.
from dragonfly import *
#---------------------------------------------------------------------------
# Here we define the release action which releases all
# modifier-keys used within this grammar. It is defined here
# because this functionality is used in many different places.
# Note that it is harmless to release ("...:up") a key multiple
# times or when that key is not held down at all.
release = Key("shift:up, ctrl:up")
#---------------------------------------------------------------------------
# Here we define various functions for formatting text.
# Each of these functions must have a docstring which defines its
# spoken-form. This docstring must include the "<dictation>" extra.
# See below for various examples.
# Format: some_words
def format_score(dictation): # Function name must start with "format_".
""" score <dictation> """ # Docstring defining spoken-form.
text = str(dictation) # Get written-form of dictated text.
return "_".join(text.split(" ")) # Put underscores between words.
# Format: some_words()
def format_under_function(dictation):
""" under func <dictation> """
text = str(dictation)
return "_".join(text.split(" ")) + "()"
# Format: SomeWords
def format_studley(dictation):
""" studley <dictation> """
text = str(dictation)
words = [word.capitalize() for word in text.split(" ")]
return "".join(words)
# Format: somewords
def format_one_word(dictation):
""" [all] one word <dictation> """
text = str(dictation)
return "".join(text.split(" "))
# Format: SOMEWORDS
def format_upper_one_word(dictation):
""" one word upper <dictation> """
text = str(dictation)
words = [word.upper() for word in text.split(" ")]
return "".join(words)
# Format: SOME_WORDS
def format_upper_score(dictation):
""" upper score <dictation> """
text = str(dictation)
words = [word.upper() for word in text.split(" ")]
return "_".join(words)
# Format: someWords
def format_java_method(dictation):
""" Java method <dictation> """
text = str(dictation)
words = text.split(" ")
return words[0] + "".join(w.capitalize() for w in words[1:])