parent
8865fcbb23
commit
8ce5fbd119
@ -178,12 +178,14 @@ endif
|
|||||||
ruby <<
|
ruby <<
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
require 'socket'
|
require 'socket'
|
||||||
def VIM.string_encode(str)
|
class << ::VIM
|
||||||
|
def string_encode(str)
|
||||||
'"' + str.gsub(/[\000-\037"\\]/) { |x| "\\%03o" % (x.respond_to?(:ord) ? x.ord : x[0]) } + '"'
|
'"' + str.gsub(/[\000-\037"\\]/) { |x| "\\%03o" % (x.respond_to?(:ord) ? x.ord : x[0]) } + '"'
|
||||||
end
|
end
|
||||||
def VIM.let(var, value)
|
def let(var, value)
|
||||||
VIM.command("let #{var} = #{string_encode(value)}")
|
VIM.command("let #{var} = #{string_encode(value)}")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
.
|
.
|
||||||
|
|
||||||
function! s:nrepl_call(payload) dict abort
|
function! s:nrepl_call(payload) dict abort
|
||||||
|
Loading…
Reference in New Issue
Block a user