diff options
author | Teddy Wing | 2018-11-24 21:03:56 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-24 21:03:56 +0100 |
commit | 41ece92ba1627b7962975b3bc38129d4dcf45699 (patch) | |
tree | 21a706a3c85d07a8ff4201cdafb735baeee0429c /ftplugin/objc.vim | |
parent | 90f9f513222ef373bd0fa671d25f5d9cfc171357 (diff) | |
download | dotvim-41ece92ba1627b7962975b3bc38129d4dcf45699.tar.bz2 |
Add ftplugin/objc{,pp}.vim
Filetype plugins for Objective-C. Turns out editing ObjC in Vim is
somewhat surprisingly whoppingly better than Xcode. This gets
indentation set to 4-space tabs and sets the comment correct prefix
(Tcomment forces /* ... */).
Include `objcpp` also because ObjC header files get recognised by Vim as
ObjC++.
Diffstat (limited to 'ftplugin/objc.vim')
-rw-r--r-- | ftplugin/objc.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ftplugin/objc.vim b/ftplugin/objc.vim new file mode 100644 index 0000000..e026035 --- /dev/null +++ b/ftplugin/objc.vim @@ -0,0 +1,15 @@ +" Indentation +setlocal expandtab +setlocal tabstop=4 +setlocal softtabstop=4 +setlocal shiftwidth=4 + + +" Don't preserve indentation on empty lines +inoremap <buffer> <CR> <CR> +nnoremap <buffer> o o +nnoremap <buffer> O O + + +" Comment string +call tcomment#DefineType('objc', '// %s') |