This file contains hidden or 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
#!perl | |
# get perl function list | |
open(FH, '-|', qq|podselect -section 'DESCRIPTION/Alphabetical Listing of Perl Functions' pod/perlfunc.pod| ); | |
my @func ; | |
my $inline = 0; | |
while( <FH> ) | |
{ | |
if( /^=over/ ) { | |
$inlist++; | |
} |
This file contains hidden or 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
" C-c K to commit files with diff and status | |
" C-c k to commit files with empty buffer (faster) | |
fun! SVK_FastCommit(size,diff,status) | |
let file = tempname() | |
exec a:size . 'split ' . file | |
if a:diff | |
call append(0, "==== DiffEND =====================================================") | |
silent exec "0r !svk diff lib/" | |
call append(0, "") |
This file contains hidden or 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
#!/bin/bash | |
source=/opt/local/etc/macports/sources.conf | |
install=/opt/mports | |
echo [[ Cleaning up $install ]] | |
rm -rf $install | |
echo [[ Subversion checkout ]] | |
svn checkout http://svn.macports.org/repository/macports/trunk $install |
This file contains hidden or 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('gui') | |
set t_Co=16 | |
hi Comment ctermfg=DarkMagenta ctermbg=black | |
hi IncSearch ctermfg=black ctermbg=darkgreen | |
hi Search ctermfg=black ctermbg=darkgreen | |
hi FoldColumn ctermbg=black ctermfg=green | |
hi LineNr ctermbg=black ctermfg=green | |
hi Folded ctermbg=darkgreen ctermfg=black |
This file contains hidden or 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
#!/bin/bash | |
if [[ -z $1 ]] ; then | |
cat <<END | |
Usage: replace_list [path] [ext] [from_list] [replace_list] | |
END | |
exit | |
fi | |
path=$1 | |
extension=$2 |
This file contains hidden or 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
"smart home function | |
function! SmartHome(mode) | |
let curcol = col(".") | |
if &wrap | |
normal! g^ | |
else | |
normal! ^ | |
endif | |
if col(".") == curcol |
This file contains hidden or 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
" Window Ctrl Config"{{{ | |
let g:window_ctrl_h_inc = 13 " columns | |
let g:window_ctrl_v_inc = 3 " lines | |
let g:window_ctrl_x_inc = 400 | |
let g:window_ctrl_y_inc = 300 | |
"}}} | |
" Window Ctrl"{{{ | |
" | |
function! WHLeft() | |
execute printf('winsize %d %d', g:screen_cols / 2 , g:screen_rows ) |
This file contains hidden or 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
fun! BufferNext() | |
let c = bufnr('%') | |
let last = bufnr("$") | |
while 1 | |
let c = c + 1 | |
if c > last | |
let c = 1 | |
endif |
This file contains hidden or 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
package Test; | |
use warnings; | |
use strict; | |
use Template::Declare::Tags; | |
sub new { | |
my $class = shift; | |
bless { } , $class ; | |
} |
This file contains hidden or 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
fun! Itemfy() | |
let mdl = '# vim' . ':fdm=expr:' | |
\ . 'foldexpr=getline(v\:lnum)=~''^==''?''>1''\:getline(v\:lnum)[0]=~''[*x(]''?''>2''\:''='': | |
cal append( 0, [ mdl ] ) | |
w | |
e! % | |
endf | |
com! Itemfy :call Itemfy() |