Skip to content

Commit

Permalink
tweaks to completion including clang support for objc
Browse files Browse the repository at this point in the history
  • Loading branch information
kballenegger committed Jan 12, 2013
1 parent 213047f commit 5e5845a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .vim/after/plugin/snipMate.vim
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ if !exists('loaded_snips') || exists('s:did_snips_mappings')
endif endif
let s:did_snips_mappings = 1 let s:did_snips_mappings = 1


ino <silent> <tab> <c-r>=TriggerSnippet()<cr> ino <silent> <m-tab> <c-r>=TriggerSnippet()<cr>
snor <silent> <tab> <esc>i<right><c-r>=TriggerSnippet()<cr> snor <silent> <m-tab> <esc>i<right><c-r>=TriggerSnippet()<cr>
ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr> ino <silent> <s-tab> <c-r>=BackwardsSnippet()<cr>
snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr> snor <silent> <s-tab> <esc>i<right><c-r>=BackwardsSnippet()<cr>
ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr> ino <silent> <c-r><tab> <c-r>=ShowAvailableSnips()<cr>
Expand Down
11 changes: 11 additions & 0 deletions .vimrc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ set hidden


" better completion " better completion
set wildmode=list:longest set wildmode=list:longest
let g:SuperTabDefaultCompletionType = "context"

" snipmate
let g:snips_author = 'Kenneth Ballenegger'

" clang osx
let sdk_path = 'echo -n `ls /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs | head -1`'
let g:clang_complete_copen = 1
autocmd FileType objc let g:clang_use_library=1
autocmd FileType objc let g:clang_user_options = '-fblocks -isysroot ' . sdk_path . ' -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300'



" scroll by three lines when cursor moves off screen " scroll by three lines when cursor moves off screen
set scrolloff=3 set scrolloff=3
Expand Down

0 comments on commit 5e5845a

Please sign in to comment.