Commit f9c40430 authored by Murukesh Mohanan's avatar Murukesh Mohanan

ycm tex symbols

parent 82ac4fb8
...@@ -4,4 +4,4 @@ doc/* ...@@ -4,4 +4,4 @@ doc/*
plugged plugged
view view
spell/en.utf-8.add.spl spell/en.utf-8.add.spl
autoload/plug.vim.olg autoload/plug.vim.old
This diff is collapsed.
...@@ -722,15 +722,25 @@ function! s:assign_name() ...@@ -722,15 +722,25 @@ function! s:assign_name()
silent! execute 'f' fnameescape(name) silent! execute 'f' fnameescape(name)
endfunction endfunction
function! s:chsh(swap)
let prev = [&shell, &shellredir]
if !s:is_win && a:swap
set shell=sh shellredir=>%s\ 2>&1
endif
return prev
endfunction
function! s:bang(cmd, ...) function! s:bang(cmd, ...)
try try
let [sh, shrd] = s:chsh(a:0)
" FIXME: Escaping is incomplete. We could use shellescape with eval, " FIXME: Escaping is incomplete. We could use shellescape with eval,
" but it won't work on Windows. " but it won't work on Windows.
let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd
let g:_plug_bang = '!'.escape(cmd, '#!%') let g:_plug_bang = '!'.escape(cmd, '#!%')
execute "normal! :execute g:_plug_bang\<cr>\<cr>" execute "normal! :execute g:_plug_bang\<cr>\<cr>"
finally finally
unlet g:_plug_bang unlet g:_plug_bang
let [&shell, &shellredir] = [sh, shrd]
endtry endtry
return v:shell_error ? 'Exit status: ' . v:shell_error : '' return v:shell_error ? 'Exit status: ' . v:shell_error : ''
endfunction endfunction
...@@ -1823,10 +1833,7 @@ endfunction ...@@ -1823,10 +1833,7 @@ endfunction
function! s:system(cmd, ...) function! s:system(cmd, ...)
try try
let [sh, shrd] = [&shell, &shellredir] let [sh, shrd] = s:chsh(1)
if !s:is_win
set shell=sh shellredir=>%s\ 2>&1
endif
let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd let cmd = a:0 > 0 ? s:with_cd(a:cmd, a:1) : a:cmd
return system(s:is_win ? '('.cmd.')' : cmd) return system(s:is_win ? '('.cmd.')' : cmd)
finally finally
......
...@@ -135,7 +135,7 @@ Plug 'godlygeek/tabular' ...@@ -135,7 +135,7 @@ Plug 'godlygeek/tabular'
if executable('cmake') if executable('cmake')
" YCM command lifted from vim-plug readme " YCM command lifted from vim-plug readme
Plug 'Valloric/YouCompleteMe', { 'do': YCMInstallCmd(), 'for': ['cpp', 'c', 'sh', 'js', 'vim'] } Plug 'Valloric/YouCompleteMe', { 'do': YCMInstallCmd(), 'for': ['cpp', 'c', 'sh', 'js', 'vim', 'tex'] }
autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable() | endif autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable() | endif
endif endif
if executable('go') if executable('go')
...@@ -179,9 +179,8 @@ autocmd BufWritePost *.sh,*.py if get(b:, 'is_new', 0) | silent execute '!chmod ...@@ -179,9 +179,8 @@ autocmd BufWritePost *.sh,*.py if get(b:, 'is_new', 0) | silent execute '!chmod
let g:SuperTabDefaultCompletionType = "context" let g:SuperTabDefaultCompletionType = "context"
let g:SuperTabClosePreviewOnPopupClose = 1 let g:SuperTabClosePreviewOnPopupClose = 1
"set omnifunc=syntaxcomplete#Complete set omnifunc=syntaxcomplete#Complete
set foldmethod=syntax set foldmethod=syntax
set foldlevelstart=3
let g:syntastic_cpp_compiler_options = ' -std=c++11' let g:syntastic_cpp_compiler_options = ' -std=c++11'
let g:syntastic_python_python_exec = '/usr/bin/python3' let g:syntastic_python_python_exec = '/usr/bin/python3'
"let g:LatexBox_latexmk_options = ' -xelatex ' "let g:LatexBox_latexmk_options = ' -xelatex '
...@@ -249,7 +248,7 @@ autocmd BufNewFile * nested call FindInPath(expand('<afile>')) ...@@ -249,7 +248,7 @@ autocmd BufNewFile * nested call FindInPath(expand('<afile>'))
" From http://vi.stackexchange.com/questions/2358/ " From http://vi.stackexchange.com/questions/2358/
autocmd FileType * exec("setlocal dictionary+=".$HOME."/.vim/dictionary/".expand('<amatch>')) autocmd FileType * exec("setlocal dictionary+=".$HOME."/.vim/dictionary/".expand('<amatch>'))
set completeopt+=menuone,longest,preview set completeopt+=menuone,noinsert
set complete+=k set complete+=k
runtime local/$CONFLOCAL.vim runtime local/$CONFLOCAL.vim
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment