Skip to content

Instantly share code, notes, and snippets.

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

thinca thinca

⌨️
Happy Vimming!
View GitHub Profile
" textobj-comment - Text objects for a comment.
" Version: 0.0
" Author : thinca <http://d.hatena.ne.jp/thinca/>
" License: Creative Commons Attribution 2.1 Japan License
" <http://creativecommons.org/licenses/by/2.1/jp/deed.en>
if exists('g:loaded_textobj_comment') "{{{1
finish
endif
*** snipMate.vim.old 2009-04-23 02:30:12.703125000 +0900
--- snipMate.vim 2009-04-23 01:41:56.890625000 +0900
***************
*** 187,190 ****
--- 187,202 ----
let num = inputlist(snippet) - 1
return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1]
endf
+
+ fun GetSnippetsList(ft)
if executable('jad')
silent %!jad -t -clear -ff -nonlb -8 -p "%"
runtime! syntax/java.vim
setlocal readonly
endif
if executable("native2ascii") && &modifiable
execute 'silent %!native2ascii -reverse -encoding ' . (&fileencoding == "" ? &encoding : &fileencoding)
augroup custom_ftplugin_jproperties
autocmd! * <buffer>
autocmd BufWritePre <buffer> execute 'silent %!native2ascii -encoding ' . (&fileencoding == "" ? &encoding : &fileencoding)
autocmd BufWritePost <buffer> execute 'silent %!native2ascii -reverse -encoding ' . (&fileencoding == "" ? &encoding : &fileencoding)
augroup END
endif
" Vim additional ftplugin: javascript/textobj-function
" Author : thinca <http://d.hatena.ne.jp/thinca/>
" License: Creative Commons Attribution 2.1 Japan License
" <http://creativecommons.org/licenses/by/2.1/jp/deed.en>
let s:save_cpo = &cpo
set cpo&vim
if !exists('*g:textobj_function_javascript_select')
function! g:textobj_function_javascript_select(object_type)
" Vim additional ftplugin: perl/textobj-function
" Author : thinca <http://d.hatena.ne.jp/thinca/>
" License: Creative Commons Attribution 2.1 Japan License
" <http://creativecommons.org/licenses/by/2.1/jp/deed.en>
let s:save_cpo = &cpo
set cpo&vim
if !exists('g:textobj_function_perl_select')
function! g:textobj_function_perl_select(object_type)
--- file.vim.old 2009-05-16 00:00:07.000000000 +0900
+++ file.vim 2009-05-15 23:56:51.000000000 +0900
@@ -79,28 +79,18 @@
return s:cached_items[cache_key]
endif
- let i = strridx(a:pattern, ku#path_separator())
- let components = split(a:pattern, ku#path_separator(), !0)
- let root_directory_pattern_p = i == 0
- let user_seems_want_dotfiles_p = components[-1][:0] == '.'
Index: ku.vim
===================================================================
--- ku.vim (リビジョン 373)
+++ ku.vim (作業コピー)
@@ -612,8 +612,7 @@
if empty_pattern_p
" To skip unnecessary checkings in s:_omnifunc_compare_lists(),
" use the unique part of _.word which is matched to patterns.
- let asis_C_ms = substitute(_.word[(i):], re_acc_sep, ' ', 'g')
- let word = 0
From 077af6f393ea55fb9df2030e85b8f1634e778459 Mon Sep 17 00:00:00 2001
From: thinca <thinca@gmail.com>
Date: Fri, 29 May 2009 14:56:13 +0900
Subject: [PATCH 1/2] Fix the way to check the extension of zip.
Because extension is case insensitive.
---
vim/dot.vim/autoload/ku/file.vim | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
let list = []
echo 'call add(list, i)'
let time = reltime()
for i in range(10000)
call add(list, i)
endfor
echo reltimestr(reltime(time))