Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f80b582

Browse files
author
piou
committed
indent
1 parent 2f73f22 commit f80b582

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎plugin/main.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ def initialize
77
@cw = VIM::Window.current
88
@cb = VIM::Buffer.current
99

10-
@text = VIM::evaluate( %Q(join(getline(1, '$'), "\\n")) ) + "\n"
10+
@text = VIM::evaluate( %Q(join(getline(1, '$'), "\\n")) ) + "\n"
1111
@filename = VIM::evaluate("expand('%:p')")
1212
@line = @cw.cursor[0] - 1
1313
@column = @cw.cursor[1]
1414
@workspace = VIM::evaluate('getcwd()')
1515

16-
#puts @text.size
16+
#puts @text.size
1717
#puts @text
1818
#puts @filename
1919
#puts @line
@@ -23,20 +23,20 @@ def initialize
2323

2424

2525
def suggest
26-
#RestClient.post "http://localhost:7657/prepare"
27-
data = RestClient.post "http://localhost:7657/suggest",
28-
{
29-
"text": @text,
26+
#RestClient.post "http://localhost:7657/prepare"
27+
data = RestClient.post "http://localhost:7657/suggest",
28+
{
29+
"text": @text,
3030
"filename": @filename,
3131
"line": @line,
3232
"column": @column,
3333
"workspace": @workspace,
34-
"with_snippets": nil
35-
}
34+
"with_snippets": nil
35+
}
3636

37-
response = JSON.parse(data.body).to_hash
37+
response = JSON.parse(data.body).to_hash
3838

39-
#puts response["suggestions"].collect { |x| x["insert"]}
39+
#puts response["suggestions"].collect { |x| x["insert"]}
4040
return response["suggestions"].collect { |x| x["insert"]}
4141
end
4242

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /