Skip to content

Instantly share code, notes, and snippets.

View h-east's full-sized avatar

h_east h-east

  • Osaka, Japan
  • 07:41 (UTC +09:00)
View GitHub Profile
@h-east
h-east / gist:1709817
Created January 31, 2012 10:34
patch for vim-jp/Issue#127 (":tab drop file" is moved current window.)
diff -r d3cf98aa1619 src/buffer.c
--- a/src/buffer.c Sat Jan 28 18:03:35 2012 +0100
+++ b/src/buffer.c Tue Jan 31 18:30:50 2012 +0900
@@ -4387,7 +4387,12 @@
{
int i;
win_T *wp, *wpnext;
- char_u *opened; /* array of flags for which args are open */
+ char_u *opened; /* array of weight for which args are open
+ * 0: not opened
@h-east
h-east / qa_goto_buf.patch
Created February 12, 2012 11:58
patch for vim-jp/Issue#116 (":qa is not consider tabpages)
diff -r 9140571d01ab src/ex_cmds2.c
--- a/src/ex_cmds2.c Mon Feb 06 00:13:22 2012 +0100
+++ b/src/ex_cmds2.c Sun Feb 12 20:44:10 2012 +0900
@@ -1577,32 +1577,73 @@
check_changed_any(hidden)
int hidden; /* Only check hidden buffers */
{
+ int ret = FALSE;
buf_T *buf;
int save;
@h-east
h-east / gist:2062867
Created March 17, 2012 17:13
Vim complex repeat sample
" http://d.hatena.ne.jp/abulia/20120317/1332000686 のキーボードマクロ版
:let@a=''
qq<CR>"AY<C-W>pjq
5@q
" <CR> はリターンキーを押す
" <C-W> は ctrl-w を入力
@h-east
h-east / gist:2157218
Created March 22, 2012 08:49
sudo error
[h_east@oppen ~]$ alias 須藤=sudo
[h_east@oppen ~]$ 須藤 元気
[sudo] password for h_east:
sudo: 元気: command not found
[h_east@oppen ~]$
@h-east
h-east / vim_multi_statusline.patch
Last active January 19, 2024 12:52
Vim multi-statusline patch
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 2e58c854e..2220cfb2c 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -9485,6 +9485,7 @@ multi_byte Compiled with support for 'encoding'
multi_byte_encoding 'encoding' is set to a multi-byte encoding.
multi_byte_ime Compiled with support for IME input method.
multi_lang Compiled with support for multiple languages.
+multi_statusline Compiled with 'statuslineheight' support.
mzscheme Compiled with MzScheme interface |mzscheme|.
@h-east
h-east / gist:3929304
Created October 22, 2012 02:28
r can't replace n and N on Vim 7.3.704
diff -r 06e088d016ad src/normal.c
--- a/src/normal.c Sun Oct 21 23:56:05 2012 +0200
+++ b/src/normal.c Mon Oct 22 11:26:36 2012 +0900
@@ -1086,7 +1086,7 @@
ca.nchar = ca.extra_char;
idx = find_command(ca.cmdchar);
}
- else if (ca.nchar == 'n' || ca.nchar == 'N')
+ else if ((ca.nchar == 'n' || ca.nchar == 'N') && !stuff_empty())
ca.oap->op_type = get_op_type(*cp, NUL);
@h-east
h-east / gist:4124389
Created November 21, 2012 11:15
Vimが最初のwindow構造をアロケートしている部分
(gdb) bt
#0 0x00000000005abac1 in win_append (after=0x0, wp=0x86c070) at window.c:4563
#1 0x00000000005ab7bc in win_alloc (after=0x0, hidden=0) at window.c:4390
#2 0x00000000005aa1d0 in win_alloc_firstwin (oldwin=0x0) at window.c:3384
#3 0x00000000005aa0f1 in win_alloc_first () at window.c:3341
#4 0x00000000005cdf84 in main (argc=4, argv=0x7fffffffe208) at main.c:312
@h-east
h-east / gist:4250241
Created December 10, 2012 12:15
emoji & sound test
test
@h-east
h-east / inside_vim.txt
Created December 22, 2012 18:42
Investigation for inside of Vim.
Vimのソースコードを調査して分かったことをコメントしていく。
@h-east
h-east / getvar_default_and_test89.patch
Created January 2, 2013 00:10
patch for adding default value argument feature for getbufvar(), getwinvar(), gettabvar() and gettabwinvar(). (Original patch by Shougo) https://github.com/vim-jp/issues/issues/245
diff -r b89e2bdcc6e5 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Sun Dec 16 12:50:40 2012 +0100
+++ b/runtime/doc/eval.txt Wed Jan 02 09:01:40 2013 +0900
@@ -1777,7 +1777,9 @@
get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
getbufline( {expr}, {lnum} [, {end}])
List lines {lnum} to {end} of buffer {expr}
-getbufvar( {expr}, {varname}) any variable {varname} in buffer {expr}
+getbufvar( {expr}, {varname} [, {def}])
+ any variable {varname} in buffer {expr}