Small change to .vimec, added .vim dir

This commit is contained in:
Jonathan Bernard 2010-09-26 14:52:29 -05:00
parent e805054ba7
commit 284e6c9b46
4 changed files with 54 additions and 0 deletions

18
.vim/.jdb_java.vim Executable file
View File

@ -0,0 +1,18 @@
"create a lazy loaded java object
function! CLLJ(var_type, var_name)
let start_line = line('.')
let template = ["private CLLJ_VAR_TYPE CLLJ_VAR_NAME = null;", "", "private CLLJ_VAR_TYPE getCLLJ_VAR_NAME() {", "\<Tab>if (CLLJ_VAR_NAME == null) {", "\<Tab>\<Tab>CLLJ_VAR_NAME = new CLLJ_VAR_TYPE();", "\<Tab>}", "\<Tab>return CLLJ_VAR_NAME;","}"]
call append(line('.'), template)
execute "normal :%s/CLLJ_VAR_TYPE/" . a:var_type ."/g\<Enter>"
execute "normal :%s/CLLJ_VAR_NAME/" . a:var_name ."/g\<Enter>"
call cursor(start_line + 9, 0)
endfunction
"create a java GridBagConstraints object with default values
function! CGBCJ(var_name)
let start_line = line('.')
let template = ["// create constraints for CGBCJ_NAME", "GridBagConstraints CGBCJ_NAMEConstraints = new GridBagConstraints();", "CGBCJ_NAMEConstraints.gridx = 0;", "CGBCJ_NAMEConstraints.gridy = 0;", "CGBCJ_NAMEConstraints.gridwidth = 1;", "CGBCJ_NAMEConstraints.gridheight = 1;", "CGBCJ_NAMEConstraints.weightx = 0;", "CGBCJ_NAMEConstraints.weighty = 0;","CGBCJ_NAMEConstraints.ipadx = 0;", "CGBCJ_NAMEConstraints.ipady = 0;", "CGBCJ_NAMEConstraints.anchor = GridBagConstraints.CENTER;", "CGBCJ_NAMEConstraints.fill = GridBagConstraints.NONE;", "CGBCJ_NAMEConstraints.insets = new Insets(0,0,0,0); //t,l,b,r" ]
call append(line('.'), template)
execute "normal :%s/CGBCJ_NAME/" . a:var_name . "/g\<Enter>"
call cursor(start_line + 15, 0)
endfunction

3
.vim/.netrwhist Normal file
View File

@ -0,0 +1,3 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =1
let g:netrw_dirhist_1='/home/jdbernard/projects/team-maker/.git/refs/remotes/origin'

32
.vim/plugin/slime.vim Normal file
View File

@ -0,0 +1,32 @@
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function Send_to_Screen(text)
if !exists("g:screen_sessionname") || !exists("g:screen_windowname")
call Screen_Vars()
end
echo system("screen -S " . g:screen_sessionname . " -p " . g:screen_windowname . " -X stuff '" . substitute(a:text, "'", "'\\\\''", 'g') . "'")
endfunction
function Screen_Session_Names(A,L,P)
return system("screen -ls | awk '/Attached/ {print $1}'")
endfunction
function Screen_Vars()
if !exists("g:screen_sessionname") || !exists("g:screen_windowname")
let g:screen_sessionname = ""
let g:screen_windowname = "0"
end
let g:screen_sessionname = input("session name: ", "", "custom,Screen_Session_Names")
let g:screen_windowname = input("window name: ", g:screen_windowname)
endfunction
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
vmap <C-c><C-c> "ry :call Send_to_Screen(@r)<CR>
nmap <C-c><C-c> vip<C-c><C-c>
nmap <C-c>v :call Screen_Vars()<CR>

1
.vimrc
View File

@ -1,3 +1,4 @@
set ruler
set autoindent set autoindent
set tabstop=4 set tabstop=4
set shiftwidth=4 set shiftwidth=4