Skip to content

Commit

Permalink
ycm updates
Browse files Browse the repository at this point in the history
  • Loading branch information
djcas9 committed Jun 16, 2015
1 parent f818246 commit ef3031a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,4 +1,5 @@
.DS_Store
*.pyc
vim/autoload
vim/.cache
*.netrwhist
Expand Down
18 changes: 18 additions & 0 deletions vim/.ycm_extra_conf.py
@@ -0,0 +1,18 @@
import os

def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )

import sys
sys.path.insert(0, DirectoryOfThisScript())

# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
compilation_database_folder = DirectoryOfThisScript()

import ycm_jsondb_core
ycm_jsondb_core.Init(compilation_database_folder)

def FlagsForFile( filename, **kwargs ):
return ycm_jsondb_core.FlagsForFile(filename, DirectoryOfThisScript())
30 changes: 21 additions & 9 deletions vimrc
Expand Up @@ -10,6 +10,7 @@ filetype off
call plug#begin('~/.vim/plugged')

Plug 'terryma/vim-multiple-cursors'
Plug 'dyng/ctrlsf.vim'
Plug 'tpope/vim-capslock'
Plug 'tpope/vim-abolish'
Plug 'terryma/vim-expand-region'
Expand Down Expand Up @@ -58,12 +59,11 @@ Plug 'tpope/vim-obsession'
Plug 'majutsushi/tagbar'
Plug 'junegunn/vim-easy-align'
Plug 'cespare/vim-toml'
Plug 'justinmk/vim-sneak'
Plug 'JulesWang/css.vim'
Plug 'tpope/vim-afterimage'
Plug 'ompugao/uncrustify-vim'

Plug 'Valloric/YouCompleteMe', { 'do': './install.sh' }
Plug 'Valloric/YouCompleteMe', { 'do': './install.sh --clang-completer --gocode-completer' }

call plug#end()

Expand Down Expand Up @@ -479,6 +479,16 @@ nnoremap Q nop
" GoldenView
let g:goldenview__enable_default_mapping=0

" YCM
" let g:ycm_global_ycm_extra_conf = '~/.vim/.ycm_extra_conf.py'
let g:ycm_error_symbol = 'XX'
let g:ycm_warning_symbol = '!!'
let g:ycm_enable_diagnostic_highlighting = 1
let g:ycm_confirm_extra_conf = 0
let g:ycm_collect_identifiers_from_tags_files = 1
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_autoclose_preview_window_after_insertion = 1

" CtrlP configuration
let g:ctrlp_mruf_exclude = '/tmp/.*\|/temp/.*' " MacOSX/Linux
let g:ctrlp_by_filename = 1
Expand All @@ -490,13 +500,15 @@ nnoremap <Leader>f :CtrlPFunky<Cr>
nnoremap <Leader>b :CtrlPBuffer<Cr>
nnoremap <Leader>r :CtrlPRegister<Cr>
" Sneak
nmap f <Plug>Sneak_s
nmap F <Plug>Sneak_S
xmap f <Plug>Sneak_s
xmap F <Plug>Sneak_S
omap f <Plug>Sneak_s
omap F <Plug>Sneak_S
nmap <C-F>f <Plug>CtrlSFPrompt
vmap <C-F>f <Plug>CtrlSFVwordPath
vmap <C-F>F <Plug>CtrlSFVwordExec
nmap <C-F>n <Plug>CtrlSFCwordPath
nmap <C-F>p <Plug>CtrlSFPwordPath
imap <C-F>t <Esc>:CtrlSFToggle<CR>
nnoremap <C-F>t :CtrlSFToggle<CR>
nnoremap <C-F>o :CtrlSFOpen<CR>

let g:ctrlp_use_caching = 0

Expand Down

0 comments on commit ef3031a

Please sign in to comment.