Skip to content

Instantly share code, notes, and snippets.

--- virtualenv.py.orig 2017-09-20 01:34:26.872489000 +0900
+++ virtualenv.py 2017-09-20 05:55:19.546230000 +0900
@@ -53,9 +53,11 @@
is_jython = sys.platform.startswith('java')
is_pypy = hasattr(sys, 'pypy_version_info')
-is_win = (sys.platform == 'win32')
+is_win = (sys.platform == 'win32' and not 'GCC' in sys.version)
is_cygwin = (sys.platform == 'cygwin')
is_darwin = (sys.platform == 'darwin')
--- platform/x86_64-windows/types.conf.orig 2017-09-21 01:43:17.662461500 +0900
+++ platform/x86_64-windows/types.conf 2017-09-21 01:49:15.566973800 +0900
@@ -25,3 +25,9 @@
rbx.platform.typedef.off_t = long_long
rbx.platform.typedef.useconds_t = uint
rbx.platform.typedef._sigset_t = ulong_long
+rbx.platform.typedef.uint32_t = uint
+rbx.platform.typedef.int64_t = long_long
+rbx.platform.typedef.gid_t = ushort
+rbx.platform.typedef.uid_t = ushort
@erw7
erw7 / 0002-Fix-library-path.patch
Last active January 15, 2018 10:44
Patch to fix bug in MinGW Nim of MSYS2
--- compiler/options.nim.orig 2017-09-07 15:29:38.000000000 +0900
+++ compiler/options.nim 2018-01-15 18:00:51.093056600 +0900
@@ -229,7 +229,9 @@
if prefix == "/usr": libpath = "/usr/lib/nim"
elif prefix == "/usr/local": libpath = "/usr/local/lib/nim"
else: libpath = joinPath(prefix, "lib")
- else: libpath = joinPath(prefix, "lib")
+ else:
+ libpath = joinPath(prefix, "lib", "nim")
+ if not existsDir(libpath): libpath = joinPath(prefix, "lib")
@erw7
erw7 / tut2.rst
Last active January 31, 2018 11:16

Nim Tutorial (Part II)

Author: Andreas Rumpf
Version: 0.17.2
@erw7
erw7 / tut1.rst
Last active March 25, 2018 10:01

Nim Tutorial (Part I)

Author: Andreas Rumpf
Version: 0.17.2

Introduction

Libuv Control Sequence on Windows

Sequence Description
ESC [ Control Sequence Introducer(CSI)
ESC c Full reset
ESC 7 Save cursor position and text attributes
ESC 8 Restore cursor position and text attributes
@erw7
erw7 / windows.ti
Last active November 4, 2018 09:49
libuv+basekey|vt100 base function key for libuv,
kb2=\E[G, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
kdch1=\E[3~, kend=\E[4~, kf1=\E[[A, kf10=\E[21~,
kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
kf19=\E[33~, kf2=\E[[B, kf20=\E[34~, kf3=\E[[C, kf4=\E[[D,
kf5=\E[[E, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
khome=\E[1~, kich1=\E[2~, knp=\E[6~, kpp=\E[5~,
libuv+exkey|vt100 extend function key for libuv,
@erw7
erw7 / implove-creation-of-uri.patch
Created December 3, 2018 10:31
Patch for Built-in LSP Support on Windows
diff --git a/runtime/lua/lsp/server.lua b/runtime/lua/lsp/server.lua
index eeb6ce578..eaf384056 100644
--- a/runtime/lua/lsp/server.lua
+++ b/runtime/lua/lsp/server.lua
@@ -76,7 +76,8 @@ end
server.default_callbacks = {
root_uri = function()
- return 'file://' .. (vim.api.nvim_call_function('getcwd', { }) or '/tmp/')
+ return lsp_util.get_uri(

oldtest

test42.in

When set ff=unix on line 20 of test42.in, the line feed code is changed(^M is displayed) and it does not work.

test52.in

  • vim
  • fileencordings=ucs-bom,utf-8,default,latin1
function! s:formatprocs(pid, prefix)
let result = ''
let result .= a:prefix . printf("%-24.24s%6s %12.12s %s\n",
\ s:procs[a:pid]['name'],
\ a:pid,
\ s:procs[a:pid]['Session Name'],
\ s:procs[a:pid]['Session'])
if has_key(s:procs[a:pid], 'children')
for pid in s:procs[a:pid]['children']
let result .= s:formatprocs(pid, a:prefix . ' ')