set shiftwidth=4 " for <<, >>, ctrl-D, and ctrl-T set softtabstop=4 " tabs are still 8 chars, but hitting tab gives me 4 spaces set expandtab " This uses spaces instead of tabs, which could be useful " for when files I create are opened in non-vi editors; space " and code indent formatting will be preserved. Remember too " that :%retab will change tabs to spaces in a document " that uses tabs instead of spaces. "set autoindent " fairly stupid indenting "set smartindent " reasonably smart indenting "set cindent " fucking brilliant indenting for any C-like language set showmatch " show matching brackets and parens filetype indent on syntax sync minlines=20 function! BeanProperty() let line = line('.') let name = input('Enter variable name: ') let type = input('Enter variable type: ') let upperName = substitute(name, '^\(\w\)\(.*\)$', '\u\1\2', '') call append(line, " //" . name) call indent(line) call append(line + 1, " private " . type . " " . name . ";") call append(line + 2, "") call append(line + 3, " public " . type . " get" . upperName . "() {") call append(line + 4, " return (this." . name . ");") call append(line + 5, " }") call append(line + 6, "") call append(line + 7, " public void set" . upperName . "(" . type . " " . name . ") {") call append(line + 8, " this." . name . " = " . name . ";") call append(line + 9, " }") return line endfunction command BP :call BeanProperty()