This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has('conceal') | |
function! s:concDebugMsg() | |
if !exists('b:conc_debug_msg') | |
setl coceallevel=2 | |
let b:conc_debug_msg = 0 | |
endif | |
if b:conc_debug_msg | |
syn clear debugMsg | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char const* argv[]) | |
{ | |
struct _hoge { | |
int x; | |
int y; | |
int len; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import Image,ImageDraw | |
import math | |
PI = math.pi | |
SQRT2 = math.sqrt(2) | |
xpos = 0 | |
ypos = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- snippets_complete.vim 2010-07-18 16:18:10.000000000 +0900 | |
+++ snippets_complete.vim.orig 2010-07-18 16:20:48.000000000 +0900 | |
@@ -178,14 +178,9 @@ | |
endfor | |
endif | |
- if has_key(l:snippets, matchstr(s:get_cur_text(), neocomplcache#get_keyword_pattern_end())) | |
- \ || has_key(l:snippets, matchstr(s:get_cur_text(), '\S\+$')) | |
- return 1 | |
- elseif search('\${\d\+\%(:.\{-}\)\?\\\@<!}\|\$<\d\+\%(:.\{-}\)\?\\\@<!>', 'w') > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command! -nargs=* -complete=help MyHelp call s:MyHelp("help",<f-args>) | |
command! -nargs=* -complete=help MyvHelp call s:MyHelp("vertical belowright help",<f-args>) | |
command! -nargs=1 -complete=help MyHelpW call s:MyHelpW(<f-args>) | |
autocmd MyAutoCmd BufEnter * if &ft == 'help' | setl bt=help | endif | |
nnoremap <C-h> :<C-u>MyHelp<Space> | |
nnoremap <C-h>v :<C-u>MyvHelp<Space> | |
nnoremap <C-h>w :<C-u>MyHelpW<Space> | |
function! s:MyHelp(cmd,...) "{{{ | |
if a:0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:resizeWindow() | |
call submode#enter_with('winsize', 'n', '', 'mws', '<Nop>') | |
call submode#leave_with('winsize', 'n', '', '<Esc>') | |
let curwin = winnr() | |
wincmd j | let target1 = winnr() | exe curwin "wincmd w" | |
wincmd l | let target2 = winnr() | exe curwin "wincmd w" | |
execute printf("call submode#map ('winsize', 'n', 'r', 'j', '<C-w>%s')", curwin == target1 ? "-" : "+") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" resize window | |
function! s:resizeWindow() | |
let mappings = [] | |
let curwin = winnr() | |
wincmd j | let target1 = winnr() | exe curwin "wincmd w" | |
wincmd l | let target2 = winnr() | exe curwin "wincmd w" | |
if curwin == target1 | |
call add(mappings,['j','-']) | call add(mappings,['k','+']) | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" http://github.com/eagletmt/dotfiles/blob/master/dot.vimrc | |
" find next help tagjump {{{2 | |
" original: http://d.hatena.ne.jp/mFumi/20100612/1276355084 | |
autocmd MyAutoCmd FileType help nnoremap <buffer> <silent> <Tab> :<C-u>call <SID>find_next_help_tagjump('W')<CR> | |
autocmd MyAutoCmd FileType help nnoremap <buffer> <silent> <S-Tab> :<C-u>call <SID>find_next_help_tagjump('bW')<CR> | |
function! s:find_next_help_tagjump(flag) " {{{ | |
let orig_view = winsaveview() | |
let helpHyperTextJump = '\\\@<!|[^"*|]\+|' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" help | |
" Tabでタグにジャンプ | |
autocmd MyAutoCmd FileType help | |
\ nnoremap <buffer> <silent> <Tab> /\C | |
\\*\@<!\( | |
\\\\@<!\|[#-)!+-~]\+\|\\| | |
\'[a-z]\{2,\}'\\| | |
\'t_..'\\| | |
\<[-a-zA-Z0-9_]\+>\\| | |
\CTRL-\(.\\|Break\\|PageUp\\|PageDown\\Insert\\|Del\)\\| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import cmd | |
import os | |
class MyShell(cmd.Cmd): | |
def __init__(self): | |
cmd.Cmd.__init__(self) | |
self.prompt = Pwd() | |
def do_cd(self,arg): |