Skip to content

Instantly share code, notes, and snippets.

View thinca's full-sized avatar
⌨️
Happy Vimming!

thinca thinca

⌨️
Happy Vimming!
View GitHub Profile
diff --git a/autoload/neocomplcache/plugin/include_complete.vim b/autoload/neocomplcache/plugin/include_complete.vim
index b3c2369..c5ad581 100644
--- a/autoload/neocomplcache/plugin/include_complete.vim
+++ b/autoload/neocomplcache/plugin/include_complete.vim
@@ -103,8 +103,9 @@ function! s:check_include(bufnumber)"{{{
for l:line in l:buflines"{{{
if l:line =~ l:pattern
let l:match_end = matchend(l:line, l:pattern)
- let l:eval = substitute(l:expr, 'v:fname', string(l:line[l:match_end :]), 'g')
- let l:filename = fnamemodify(findfile(matchstr(eval(l:eval), '\f\+'), l:path), ':p')
From 8dc95dddaadcaeeee8b65541d91f17ddf2dc1c02 Mon Sep 17 00:00:00 2001
From: thinca <thinca@gmail.com>
Date: Mon, 9 Nov 2009 23:24:27 +0900
Subject: [PATCH 1/2] vim: fakeclip: Support tmux
---
vim/dot.vim/autoload/fakeclip.vim | 73 +++++++++++++++++++++++++++----------
1 files changed, 54 insertions(+), 19 deletions(-)
diff --git a/vim/dot.vim/autoload/fakeclip.vim b/vim/dot.vim/autoload/fakeclip.vim
|n≧≦_|η
[・・"]
[ つ・ิ・ิ∀]つ
('ლ'ლ)
ლ[・・=]
[;^^Д]
[「・ิ・ิー]「
|#'m'm|
ლ[^^△]
∑[><o]
" Maybe Monad
let Maybe = {}
function! Maybe.return(m)
return Just(a:m)
endfunction
" m(self) >>= f
function! Maybe.bind(f)
let Func = type(a:f) == type('') ? function(a:f) : a:f
" Get command list.
redir => cmdlistredir
silent! command
redir END
let cmdlist = map(split(cmdlistredir, "\n")[1:],
\ 'matchstr(v:val, ''\a\w*'')')
@thinca
thinca / vim.cgi
Last active September 4, 2015 02:04
#!/usr/bin/env ruby
"
execute 'help' getline(1)
.,/[^*]$//\*\S\+\*$\|\%$/?^[^=-].*[^=-]$?print
qall!
"
require 'rubygems'
require 'json'
require 'cgi'
'vimshell'.each_char do |c|
puts c
STDOUT.flush
sleep 0.1
end
__END__
In shell:
v
function <SNR>133_on_execute..interactive#execute_pty_inout..interactive#execute_pty_out..interactive#exit の処理中にエラーが検出されました:
行 7:
E716: 辞書型にキーが存在しません: waitpid()
E15: 無効な式です: sub.waitpid()
行 8:
E121: 未定義の変数です: l:cond
E15: 無効な式です: l:cond != 'exit'
行 22:
E121: 未定義の変数です: l:status
E116: Invalid arguments for function eval(l:status)
"=============================================================================
" FILE: poslist.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
" MODIFIED BY: thinca <thinca@gmail.com>
" Last Modified: 23 Jan 2010
" Usage: Just source this file.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
" "Software"), to deal in the Software without restriction, including
@thinca
thinca / gist:261452
Created December 22, 2009 02:41 — forked from Shougo/gist:261441
function! s:ParseMarkdown()
return map(split(join(getline(1, '$'), "\n"), '\v(^|\n)\ze#+'), 'split(v:val, "\n")')
endfunction
" Usage
let s:pages = s:ParseMarkdown()
let s:max_page_number = len(s:pages) - 1