inoreab psvm public static void main(String[] args){}O inoreab sout System.out.println(); inoreab serr System.err.println(); inoreab tryc try {}catch (Exception e) {throw new RuntimeException(e);}O inoreab tryf try {}finally {}O inoreab pubv public void (){} inoreab whi while () {} inoreab dow do {}while (); "inoreab swi switch () {case :break;default:break;} inoreab iff if () {} inoreab ife if () {}else {} function! JH_java_getter() let type = input("Variable type: ", "") if type != "" let var = input("Variable name: ", "") if var != "" let var2 = substitute(var, "^.", "\\u\\0", "") let l = line(".")-1 let res = append(l , "") let res = append(l+1, " public " . type . " get" . var2 . "()") let res = append(l+2, " {") let res = append(l+3, " return " . var . ";") let res = append(l+4, " }") endif endif endfunction function! JH_java_setter() let type = input("Variable type: ", "") if type != "" let var = input("Variable name: ", "") if var != "" let var2 = substitute(var, "^.", "\\u\\0", "") let l = line(".")-1 let res = append(l , "") let res = append(l+1, " public void set" . var2 . "(" . type . " " . var . ")") let res = append(l+2, " {") let res = append(l+3, " this." . var . " = " . var . ";") let res = append(l+4, " }") endif endif endfunction function! JH_java_getset() let type = input("Variable type: ", "") if type != "" let var = input("Variable name: ", "") if var != "" let var2 = substitute(var, "^.", "\\u\\0", "") let l = line(".")-1 let res = append(l , "") let res = append(l+1, " public " . type . " get" . var2 . "()") let res = append(l+2, " {") let res = append(l+3, " return " . var . ";") let res = append(l+4, " }") let res = append(l+5, "") let res = append(l+6, " public void set" . var2 . "(" . type . " " . var . ")") let res = append(l+7, " {") let res = append(l+8, " this." . var . " = " . var . ";") let res = append(l+9, " }") endif endif endfunction inoremap :call JH_java_getter() inoremap :call JH_java_setter() inoremap :call JH_java_getset() noremap :call JH_java_getter() noremap :call JH_java_setter() noremap :call JH_java_getset()