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 -r f3c987fb99b9 src/eval.c
--- a/src/eval.c Tue Jan 12 21:31:21 2010 +0100
+++ b/src/eval.c Fri Jan 15 18:46:28 2010 +0900
@@ -5334,6 +5334,9 @@
}
{
dictitem_T *item;
+ dict_T *dict;
+ dictitem_T *proto;
+ int deep = 100;
snippet sample
abc
def
snippet sample2
abc
def
syntax match vimWrongFunctionCall /^\s*\zs\%(s:\)\?[[:alnum:]#]\+\s*(/
highlight link vimWrongFunctionCall Error
@thinca
thinca / svn_diff.vim
Created February 18, 2010 09:00
Show svn diff on footer.
" Show svn diff on footer.
" Language: svn
" Version: 0.2.3
" Author: thinca <[email protected]>
" License: Creative Commons Attribution 2.1 Japan License
" <http://creativecommons.org/licenses/by/2.1/jp/deed.en>
" URL: http://gist.github.com/307495
"
" ChangeLog: {{{
" 0.2.3 2010-03-18
setlocal foldmethod=expr
setlocal foldexpr=MarkdownFold()
function! MarkdownFold()
let head = s:head(v:lnum)
if head
return head
elseif v:lnum != line('$') && getline(v:lnum + 1) =~ '^#'
return '<' . s:head(v:lnum + 1)
endif
if !exists('g:rst_header_chars')
let g:rst_header_chars = '#*=-^'
endif
nnoremap <silent> <buffer> <Plug>(rst-header) <Nop>
inoremap <silent> <buffer> <Plug>(rst-header) <Nop>
for s:i in range(len(g:rst_header_chars))
execute 'nnoremap <silent> <buffer> <Plug>(rst-header)' . (s:i + 1) .
\ ' :<C-u>call <SID>add_header(' . s:i . ')<CR>'
execute 'inoremap <silent> <buffer> <Plug>(rst-header)' . (s:i + 1) .
@thinca
thinca / .vimrc
Created March 20, 2010 19:24 — forked from tyru/.vimrc
function! s:uniq(list) "{{{
let s:dict = {}
let counter = 1
for i in a:list
if !has_key(s:dict, i)
let s:dict[i] = counter
let counter += 1
endif
endfor
Index: calendar.vim
===================================================================
--- calendar.vim (リビジョン 757)
+++ calendar.vim (作業コピー)
@@ -1008,6 +1008,7 @@
setlocal modifiable
setlocal nolist
let b:Calendar='Calendar'
+ setlocal filetype=calendar
" is this a vertical (0) or a horizontal (1) split?
" You can use ambiguous command.
" Version: 0.1.0
" Author : thinca <[email protected]>
" License: Creative Commons Attribution 2.1 Japan License
" <http://creativecommons.org/licenses/by/2.1/jp/deed.en>
if exists('g:loaded_ambicmd') || v:version < 702
finish
endif
let g:loaded_ambicmd = 1
Index: calendar.vim
===================================================================
--- calendar.vim (リビジョン 770)
+++ calendar.vim (作業コピー)
@@ -997,6 +997,7 @@
else
execute 'to '.vcolumn.'vsplit __Calendar'
endif
+ call s:CalendarBuildKeymap(dir, vyear, vmnth)
setlocal noswapfile