" private:とかのインデントを作らない(たぶん set cinoptions=g0 augroup cpp-namespace autocmd! autocmd FileType cpp inoremap ; expand_namespace() augroup END function! s:expand_namespace() let s = getline('.')[0:col('.')-2] if s =~# '\oost::" elseif s =~# '\td::" elseif s =~# '\\size_t " else return ';' endif endfunction