Maybe the output of strace can help. I attached to the process right after typing ":w" in VIM and then pressed enter to catch less keyboard events:
Process 3304 attached - interrupt to quit select(1, [0], NULL, [0], NULL) = 1 (in [0]) read(0, "\r", 4096) = 1 select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) write(1, "\r", 1) = 1 stat("/home/bikeshedder/x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 access("/home/bikeshedder/x", W_OK) = 0 getcwd("/home/bikeshedder", 4096) = 12 select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) write(1, "\33[?25l\"x\"", 9) = 9 stat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 access("x", W_OK) = 0 getxattr("x", "system.posix_acl_access", 0x7fff5cc33380, 132) = -1 ENODATA (No data available) stat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 lstat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 lstat("4913", 0x7fff5cc33660) = -1 ENOENT (No such file or directory) open("4913", O_WRONLY|O_CREAT|O_EXCL|O_NOFOLLOW, 0100664) = 3 fchown(3, 1000, 1000) = 0 stat("4913", {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 close(3) = 0 unlink("4913") = 0 stat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 stat("/home/bikeshedder/.vimbackup/x~", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 unlink("/home/bikeshedder/.vimbackup/x~") = 0 rename("x", "/home/bikeshedder/.vimbackup/x~") = 0 fsync(4) = 0 open("x", O_WRONLY|O_CREAT|O_TRUNC, 0664) = 3 write(3, "\n", 1) = 1 fsync(3) = 0 stat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 stat("x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 close(3) = 0 chmod("x", 0100664) = 0 setxattr("x", "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x06\x00\xff\xff\xff\xff\x04\x00\x06\x00\xff\xff\xff\xff \x00\x04\x00\xff\xff\xff\xff", 28, 0) = 0 write(1, " 1L, 1C [w]", 11) = 11 stat("/home/bikeshedder/x", {st_mode=S_IFREG|0664, st_size=1, ...}) = 0 getcwd("/home/bikeshedder", 4096) = 12 select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) write(1, "\33[1;3H", 6) = 6 select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout) write(1, "\33[?12l\33[?25h", 12) = 12 select(1, [0], NULL, [0], {10, 0}^C <unfinished ...> Process 3304 detached
Maybe the output of strace can help. I attached to the process right after typing ":w" in VIM and then pressed enter to catch less keyboard events:
Process 3304 attached - interrupt to quit home/bikeshedde r/x", {st_mode= S_IFREG| 0664, st_size=1, ...}) = 0 "/home/ bikeshedder/ x", W_OK) = 0 "/home/ bikeshedder" , 4096) = 12 S_IFREG| 0664, st_size=1, ...}) = 0 posix_acl_ access" , 0x7fff5cc33380, 132) = -1 ENODATA (No data available) S_IFREG| 0664, st_size=1, ...}) = 0 S_IFREG| 0664, st_size=1, ...}) = 0 O_CREAT| O_EXCL| O_NOFOLLOW, 0100664) = 3 S_IFREG| 0664, st_size=0, ...}) = 0 S_IFREG| 0664, st_size=1, ...}) = 0 home/bikeshedde r/.vimbackup/ x~", {st_mode= S_IFREG| 0664, st_size=1, ...}) = 0 "/home/ bikeshedder/ .vimbackup/ x~") = 0 bikeshedder/ .vimbackup/ x~") = 0 O_CREAT| O_TRUNC, 0664) = 3 S_IFREG| 0664, st_size=1, ...}) = 0 S_IFREG| 0664, st_size=1, ...}) = 0 posix_acl_ access" , "\x02\x00\ x00\x00\ x01\x00\ x06\x00\ xff\xff\ xff\xff\ x04\x00\ x06\x00\ xff\xff\ xff\xff \x00\x04\ x00\xff\ xff\xff\ xff", 28, 0) = 0 home/bikeshedde r/x", {st_mode= S_IFREG| 0664, st_size=1, ...}) = 0 "/home/ bikeshedder" , 4096) = 12
select(1, [0], NULL, [0], NULL) = 1 (in [0])
read(0, "\r", 4096) = 1
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
write(1, "\r", 1) = 1
stat("/
access(
getcwd(
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
write(1, "\33[?25l\"x\"", 9) = 9
stat("x", {st_mode=
access("x", W_OK) = 0
getxattr("x", "system.
stat("x", {st_mode=
lstat("x", {st_mode=
lstat("4913", 0x7fff5cc33660) = -1 ENOENT (No such file or directory)
open("4913", O_WRONLY|
fchown(3, 1000, 1000) = 0
stat("4913", {st_mode=
close(3) = 0
unlink("4913") = 0
stat("x", {st_mode=
stat("/
unlink(
rename("x", "/home/
fsync(4) = 0
open("x", O_WRONLY|
write(3, "\n", 1) = 1
fsync(3) = 0
stat("x", {st_mode=
stat("x", {st_mode=
close(3) = 0
chmod("x", 0100664) = 0
setxattr("x", "system.
write(1, " 1L, 1C [w]", 11) = 11
stat("/
getcwd(
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
write(1, "\33[1;3H", 6) = 6
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
select(1, [0], NULL, [0], {0, 0}) = 0 (Timeout)
write(1, "\33[?12l\33[?25h", 12) = 12
select(1, [0], NULL, [0], {10, 0}^C <unfinished ...>
Process 3304 detached